/*
Theme Name:   Astra Child – SoleRN
Theme URI:    https://solern.ca
Description:  Astra child theme for SoleRN, a foot care nursing practice in Niagara Falls, Canada.
Author:       SoleRN
Author URI:   https://solern.ca
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child-solern
*/

/* ==========================================================================
   Container
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ==========================================================================
   Site Main
   ========================================================================== */
.site-main {
  width: 100%;
  overflow-x: hidden;
}

/* Break Astra's entry-content width constraint for all custom page templates */
.page-template .entry-content {
  padding: 0;
  max-width: none;
  width: 100%;
}


/* ==========================================================================
   Section Typography
   ========================================================================== */
.section-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: .5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text);
  max-width: 56ch;
  margin-inline: auto;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}


/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85em 2em;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, transform .2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--color-primary);
  color: #fff;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--white {
  background-color: #fff;
  color: var(--color-accent);
}
.btn--white:hover,
.btn--white:focus-visible {
  background-color: var(--color-warm);
  transform: translateY(-2px);
}

/* Used on hero sections with a white border button over a dark background */
.btn--outline {
  background-color: transparent;
  border-color: #fff;
  color: #fff;
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: rgba(255,255,255,.15);
  transform: translateY(-2px);
}

/* Used on dark CTA bands where the secondary action sits beside btn--white */
.btn--outline-white {
  background: transparent;
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.btn--outline-white:hover,
.btn--outline-white:focus-visible {
  background: rgba(255,255,255,.12);
  transform: translateY(-2px);
}

/* Used on light backgrounds where a ghost button is needed */
.btn--outline-primary {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--outline-primary:hover,
.btn--outline-primary:focus-visible {
  background: rgba(44,120,115,.07);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .btn { width: 100%; justify-content: center; }
}


/* ==========================================================================
   Breadcrumb
   Default colours suit dark/tinted hero backgrounds (services, booking,
   insurance, contact). The about page overrides these in its own <style>
   block because its hero background is light.
   ========================================================================== */
.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: .4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 .75rem;
  font-size: .82rem;
  font-weight: 600;
}
.breadcrumb__link { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb__link:hover { color: #fff; text-decoration: underline; }
.breadcrumb__item:last-child { color: rgba(255,255,255,.55); }
.breadcrumb__item--sep { color: rgba(255,255,255,.4); line-height: 0; }


/* ==========================================================================
   Legal Pages — shared layout (Privacy Policy & Terms of Service)
   ========================================================================== */

/* Hero */
.legal-hero {
  position: relative;
  padding: 5rem 0 4rem;
  background: var(--color-accent);
  overflow: hidden;
}
.legal-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  opacity: .9;
}
.legal-hero__inner {
  position: relative;
  z-index: 1;
}
.legal-hero__headline {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin: .5rem 0 1rem;
  line-height: 1.2;
}
.legal-hero__meta {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
}

/* Two-column layout: sticky TOC + scrollable content */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 4rem 0 5rem;
}
@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
}

/* TOC sidebar */
.legal-toc {
  position: sticky;
  top: 100px;
}
.legal-toc__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: .75rem;
}
.legal-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid #e2e8f0;
}
.legal-toc__link {
  display: block;
  padding: .35rem .75rem;
  font-size: .85rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--anim-duration-fast) ease,
              border-color var(--anim-duration-fast) ease;
  border-left: 2px solid transparent;
  margin-left: -2px;
}
.legal-toc__link:hover {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
}
@media (max-width: 900px) {
  .legal-toc { position: static; }
  .legal-toc__list { display: none; }
}

/* Content area */
.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 .75rem;
}
.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1.5rem 0 .5rem;
}
.legal-content p,
.legal-content li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}
.legal-content ul {
  padding-left: 1.5rem;
  margin: .75rem 0;
}
.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
}
.legal-content a:hover { color: var(--color-accent); }

.legal-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.legal-section:last-child { border-bottom: none; }

/* Callout box */
.legal-note {
  background: #f0faf8;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.legal-note p { margin: 0; font-size: .95rem; }

/* Bracketed placeholder highlight — visible in development, remove before launch */
.legal-placeholder {
  background: #fef9c3;
  border: 1px dashed #ca8a04;
  border-radius: 3px;
  padding: 0 .25em;
  font-style: italic;
  color: #92400e;
}

/* ==========================================================================
   Header — Book Now CTA button
   ========================================================================== */

/* Strip default nav-link padding/bg from the wrapper <li> */
.solern-book-now-item {
  display: flex;
  align-items: center;
  padding: 0 !important;
  margin-left: .5rem;
}
/* Strip only Astra's default nav-link padding — do NOT touch background or
   color here since the button's own rules handle those. */
.solern-book-now-item > a,
.solern-book-now-item > a:hover,
.solern-book-now-item > a:focus {
  padding: 0 !important;
  line-height: 1 !important;
}

/* Button itself — !important on background beats any Astra nav hover rule */
.solern-book-btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-primary) !important;
  color: #fff !important;
  border-radius: 25px;
  padding: .75rem 1.5rem;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background-color .25s ease, transform .2s ease, box-shadow .25s ease;
  animation: pulseGlow 2.4s ease-in-out infinite;
}
.solern-book-btn:hover,
.solern-book-btn:focus-visible {
  background-color: var(--color-accent) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44,120,115,.4);
  animation: none;
}

/* Sticky header — add a persistent shadow so the button reads clearly
   against the condensed/scrolled header background */
.ast-header-sticked .solern-book-btn {
  box-shadow: 0 4px 16px rgba(44,120,115,.35);
}

/* Desktop (≥ 922px): show appended copy, hide prepended mobile copy */
@media (min-width: 922px) {
  .solern-book-mobile { display: none !important; }
}

/* Mobile (≤ 921px): show prepended copy at top, hide appended desktop copy */
@media (max-width: 921px) {
  .solern-book-desktop { display: none !important; }
  .solern-book-mobile {
    margin: .75rem 1rem 1rem;
    padding: 0 !important;
  }
  .solern-book-mobile .solern-book-btn {
    width: 100%;
    justify-content: center;
    padding: .9rem 1.5rem;
    font-size: 1rem;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .solern-book-btn { animation: none; }
}


/* ==========================================================================
   Custom Footer
   ========================================================================== */

.solern-footer {
  width: 100%;
  margin-top: 0;
}

/* ── Main four-column area ── */
.footer-main {
  padding: 4rem 0 3rem;
  background: var(--color-warm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

/* Branding column */
.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 .4rem;
  line-height: 1;
}

.footer-tagline {
  font-size: .9rem;
  color: var(--color-primary);
  font-weight: 600;
  margin: 0 0 1rem;
}

.footer-description {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.footer-badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-primary);
  color: #fff;
  padding: .45rem .85rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  width: fit-content;
}

/* Column headings */
.footer-heading {
  color: var(--color-primary);
  font-size: .82rem;
  font-weight: 700;
  margin: 0 0 1.4rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Quick-links column */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: .7rem;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  font-size: .92rem;
  display: inline-block;
  transition: color .2s ease, transform .2s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
  transform: translateX(4px);
}

/* Contact column */
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.1rem;
}

.footer-contact svg {
  fill: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact div {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.footer-contact a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  transition: color .2s ease;
}

.footer-contact a:hover {
  color: var(--color-primary);
}

.footer-contact small {
  color: #718096;
  font-size: .78rem;
}

.footer-contact strong {
  color: var(--color-text);
  font-size: .92rem;
  font-weight: 600;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-primary);
  color: #fff !important;
  padding: .75rem 1.4rem;
  border-radius: 25px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: .9rem;
  transition: background-color .25s ease, transform .2s ease, box-shadow .25s ease;
  margin-top: .25rem;
  width: fit-content;
}

.footer-cta-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(44,120,115,.3);
}

/* ── Service areas bar ── */
.footer-areas {
  background: rgba(44,120,115,.06);
  padding: 1.25rem 0;
  border-top: 1px solid rgba(44,120,115,.15);
  border-bottom: 1px solid rgba(44,120,115,.15);
}

.footer-areas p {
  margin: 0;
  text-align: center;
  font-size: .9rem;
  color: var(--color-text);
}

.footer-areas strong {
  color: var(--color-primary);
  margin-right: .4rem;
}

/* ── Copyright bar ── */
.footer-bottom {
  background: var(--color-accent);
  color: #fff;
  padding: 1.25rem 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: .82rem;
  opacity: .95;
}

.footer-bottom a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity .2s ease;
}

.footer-bottom a:hover {
  opacity: .75;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .footer-main {
    padding: 3rem 0 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-badges {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .footer-areas p {
    font-size: .85rem;
    line-height: 1.7;
  }
}

@media (max-width: 480px) {
  .footer-badges {
    flex-direction: column;
  }
  .footer-badges .badge {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   Header — Enhanced Styling
   ========================================================================== */

/* Remove Astra's above-header admin/promo bar (the "black bar at top") */
.ast-above-header-wrap {
  display: none !important;
}

/* Base header — white bg with subtle brand-tinted bottom border */
.main-header-bar-wrap,
.ast-primary-header-bar {
  transition: box-shadow .3s ease, background-color .3s ease;
}

.main-header-bar-wrap {
  background: #fff;
  box-shadow: 0 1px 0 rgba(44, 120, 115, .1);
}

/* Scrolled state — added to <body> by JS when user passes 80 px */
.solern-scrolled .main-header-bar-wrap {
  box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}

/* Nav link hover — sliding underline */
.main-header-menu > .menu-item > a.menu-link {
  color: var(--color-text);
  font-weight: 500;
  position: relative;
}

.main-header-menu > .menu-item > a.menu-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width .25s ease;
}

.main-header-menu > .menu-item > a.menu-link:hover::after,
.main-header-menu > .current-menu-item > a.menu-link::after {
  width: 100%;
}

/* ── Logo — container cleanup & sizing ──────────────────────────────────── */
.ast-site-identity,
.custom-logo-link {
  background: transparent;
}

.custom-logo {
  display: block;
  max-height: 56px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: filter .3s ease;
}

@media (max-width: 921px) {
  .custom-logo {
    max-height: 40px;
    max-width: 160px;
  }
}

/* ── Book Now button — visibility & appearance ───────────────────────────── */
/* Mobile copy hidden on desktop; desktop copy hidden inside mobile nav */
.solern-book-mobile { display: none; }

@media (max-width: 921px) {
  .solern-book-desktop { display: none; }
  .solern-book-mobile  { display: list-item; }
}

/* Prevent Astra's menu-item hover from adding a background behind the button */
/* ==========================================================================
   Header — Enhanced Styling (Line 165+)
   ========================================================================== */

/* ── Book Now button — visibility & appearance ───────────────────────────── */
/* Prevents Astra's menu-item hover from adding a background behind the button */
.solern-book-now-item:hover {
  background: transparent;
}

/* Base style for the button to prevent squeezing and provide proper spacing */
.solern-book-now-item {
  display: flex;
  align-items: center;
  padding: 0 !important;
  margin-left: .5rem;
}

/* Strip Astra's default nav-link padding from the wrapper <li> */
.solern-book-now-item > a,
.solern-book-now-item > a:hover,
.solern-book-now-item > a:focus {
  padding: 0 !important;
  line-height: 1 !important;
}

/* Professional button styling with a warm hover effect for clear visibility */
.solern-book-btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-warm);
  color: var(--color-accent) !important;
  border-radius: 25px;
  padding: .75rem 1.5rem;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, transform .2s ease;
  cursor: pointer;
}

.solern-book-btn:hover,
.solern-book-btn:focus-visible {
  background-color: var(--color-secondary);
  color: #fff !important;
  transform: translateY(-2px);
}

/* Desktop (≥ 922px): display settings for the book now element */
@media (min-width: 922px) {
  .solern-book-mobile { display: none !important; }
}

/* Mobile (≤ 921px): adjust padding and layout for the book now element */
@media (max-width: 921px) {
  .solern-book-desktop { display: none !important; }
  .solern-book-mobile {
    margin: .75rem 1rem 1rem;
    padding: 0 !important;
  }
  .solern-book-mobile .solern-book-btn {
    width: 100%;
    justify-content: center;
    padding: .9rem 1.5rem;
    font-size: 1rem;
    border-radius: 12px;
  }
}

/* ── Homepage: transparent header over hero ─────────────────────────────── */
.page-template-template-home-php #masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.page-template-template-home-php .main-header-bar-wrap,
.page-template-template-home-php .ast-primary-header-bar,
.page-template-template-home-php .main-header-bar {
  background: transparent;
  box-shadow: none;
}

/* Logo: invert to white silhouette over the dark hero */
.page-template-template-home-php .custom-logo {
  filter: brightness(0) invert(1);
}

/* Book Now: white outline button over the dark hero */
.page-template-template-home-php .solern-book-btn {
  background-color: transparent;
  border-color: rgba(255, 255, 255, .85);
  color: #fff;
  box-shadow: none;
}

.page-template-template-home-php .solern-book-btn:hover,
.page-template-template-home-php .solern-book-btn:focus-visible {
  background-color: rgba(255, 255, 255, .15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: none;
}

/* Nav links are white over the dark hero overlay */
.page-template-template-home-php .main-header-menu > .menu-item > a.menu-link {
  color: #fff;
}

.page-template-template-home-php .main-header-menu > .menu-item > a.menu-link::after {
  background: #fff;
}

/* Push hero content down so it clears the absolute header */
.page-template-template-home-php .hero-inner {
  padding-top: 8rem;
}

/* After scroll: switch to fixed + opaque */
.page-template-template-home-php.solern-scrolled #masthead {
  position: fixed;
}

.page-template-template-home-php.solern-scrolled .main-header-bar-wrap,
.page-template-template-home-php.solern-scrolled .ast-primary-header-bar,
.page-template-template-home-php.solern-scrolled .main-header-bar {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .1);
}

/* Restore natural logo colors once header turns opaque */
.page-template-template-home-php.solern-scrolled .custom-logo {
  filter: none;
}

/* Restore filled teal button once header turns opaque */
.page-template-template-home-php.solern-scrolled .solern-book-btn {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(44, 120, 115, .25);
}

.page-template-template-home-php.solern-scrolled .solern-book-btn:hover,
.page-template-template-home-php.solern-scrolled .solern-book-btn:focus-visible {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(44, 120, 115, .35);
}

/* Restore dark nav links once header turns opaque */
.page-template-template-home-php.solern-scrolled .main-header-menu > .menu-item > a.menu-link {
  color: var(--color-text);
}

.page-template-template-home-php.solern-scrolled .main-header-menu > .menu-item > a.menu-link::after {
  background: var(--color-primary);
}

/* Admin bar offsets for absolute/fixed header */
.admin-bar.page-template-template-home-php #masthead {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar.page-template-template-home-php #masthead {
    top: 46px;
  }
}


/* ── Back to top button ─────────────────────────────────────────────────── */
#ast-scroll-top {
  background-color: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(44, 120, 115, .3);
  transition: background-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

#ast-scroll-top:hover {
  background-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(44, 120, 115, .4);
}


/* Print styles */
@media print {
  .legal-hero { background: #fff !important; color: #000 !important; padding: 1rem 0; }
  .legal-hero__bg { display: none; }
  .legal-hero__headline,
  .legal-hero__meta { color: #000 !important; }
  .legal-toc { display: none !important; }
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .legal-content a { color: #000; text-decoration: none; }
  .legal-content a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  .legal-section { break-inside: avoid; border-bottom: 1px solid #ccc; }
  .legal-note { border: 1px solid #ccc; background: #f5f5f5; }
  header, footer, nav, .site-header, .site-footer { display: none !important; }
}
