/**
 * PhysioFlex — Theme Refresh
 * ---------------------------------------------------------------
 * Purpose: a systematic UI/UX polish layer loaded AFTER main.css.
 * It does not alter markup, JS, forms, or PHP endpoints — only
 * visual presentation (color tokens, type scale, spacing, buttons,
 * cards, header/footer, forms) is adjusted here.
 *
 * How it works: main.css already drives almost the entire site
 * through CSS custom properties (--accent-color, --heading-color,
 * --default-color, etc.) and a handful of reusable class patterns
 * (.btn-primary, .btn-secondary, .service-item, .section-title...).
 * This file (a) refreshes those tokens to a consistent PhysioFlex
 * palette/scale, and (b) adds targeted, low-risk overrides for the
 * specific inconsistencies found in the current stylesheet — for
 * example the hero description rendering at 1.925rem while every
 * other lede paragraph on the site uses 1.125rem.
 * ---------------------------------------------------------------
 */

/*--------------------------------------------------------------
# 1. Design Tokens — Color, Type, Spacing, Radius, Shadow
--------------------------------------------------------------*/
:root {
  /* Brand palette — deep clinical teal + calm sage + a warm signal
     accent for CTAs, replacing the generic default blue. Reuses the
     SAME variable names main.css already reads everywhere. */
  --background-color: #F7F7F5;
  --default-color: #363636;
  --heading-color: #111111;
  --accent-color: #F6C400;
  --surface-color: #FFFFFF;
  --contrast-color: #FFFFFF;

  --heading-font: "Montserrat", sans-serif;
  --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-font: "Lato", sans-serif;

  /* Secondary brand tones, used only within this file */
  --brand-ink: #111111;
  --brand-sage: #876D00;
  --brand-sage-tint: #FFF3BF;
  --brand-line: #DEDEDA;

  /* Spacing scale */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: clamp(3rem, 6vw, 5.5rem);

  /* Shape & elevation, applied consistently across cards/buttons */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 50px;
  --shadow-card: 0 2px 5px rgba(16, 48, 43, 0.06), 0 10px 24px rgba(16, 48, 43, 0.06);
  --shadow-card-hover: 0 6px 14px rgba(16, 48, 43, 0.08), 0 18px 32px rgba(16, 48, 43, 0.10);
}

.light-background {
  --background-color: #F1F5F0;
  --surface-color: #FFFFFF;
}

.dark-background {
  --background-color: #0E2622;
  --default-color: #E7EFE9;
  --heading-color: #FFFFFF;
  --surface-color: #123C36;
  --contrast-color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/*--------------------------------------------------------------
# 2. Base Fixes — overflow, box-sizing, media
--------------------------------------------------------------*/
html, body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
  max-width: 100%;
}

@media (min-width: 1400px) {
  .container, .container-xxl {
    max-width: 1260px;
  }
}

/*--------------------------------------------------------------
# 3. Typography System — fluid, consistent hierarchy
--------------------------------------------------------------*/
body {
  font-size: 16px;
  line-height: 1.7;
}

p {
  line-height: 1.75;
}

/* Page hero titles (interior pages: About, Services, Doctors, etc.) */
.page-title .heading h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page-title .heading p {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
}

.page-title {
  padding-top: 90px;
}

.page-title .heading {
  padding: clamp(48px, 7vw, 80px) 0;
}

/* Section titles, used at the top of nearly every content block */
.section-title h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.section-title p {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: color-mix(in srgb, var(--default-color), transparent 15%);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* Hero (home page) */
.hero .hero-content h1 {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  letter-spacing: -0.02em;
}

/* Fix: this paragraph rendered at 1.925rem (~31px) in main.css — far
   larger than every other lede paragraph on the site (1.125rem).
   Restored to the size used consistently elsewhere, with a fluid
   minimum for small screens. */
.hero .hero-content .hero-description {
  font-size: clamp(1rem, 1.6vw, 1.125rem) !important;
  line-height: 1.7 !important;
  max-width: 46ch;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.25rem); }

/* Small helper / label text, standardized across badges, meta, tags */
small, .small-text, .badge-item, .stat-item p, .meta, .tag {
  font-size: 0.875rem;
}

/*--------------------------------------------------------------
# 4. Section Spacing — consistent rhythm across the site
--------------------------------------------------------------*/
section, .section {
  padding: clamp(44px, 7vw, 90px) 0;
}

.section-title {
  padding-bottom: clamp(32px, 5vw, 56px);
}

/*--------------------------------------------------------------
# 5. Buttons — one consistent system across every page
--------------------------------------------------------------*/
.btn,
[class*="btn-primary"],
[class*="btn-secondary"],
[class*="btn-outline"],
[class*="btn-light"],
[class*="btn-submit"],
[class*="btn-action"],
[class*="btn-appointment"],
[class*="btn-book"],
[class*="btn-view-all"] {
  font-family: var(--default-font);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  line-height: 1.3;
}

.btn:hover,
[class*="btn-primary"]:hover,
[class*="btn-secondary"]:hover,
[class*="btn-outline"]:hover,
[class*="btn-light"]:hover,
[class*="btn-submit"]:hover,
[class*="btn-action"]:hover,
[class*="btn-appointment"]:hover,
[class*="btn-book"]:hover,
[class*="btn-view-all"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.btn-primary,
.hero .hero-content .hero-actions .btn.btn-primary,
.btn-appointment,
.btn-book,
.btn-submit {
  background-color: var(--accent-color) !important;
  border-color: var(--accent-color) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.hero .hero-content .hero-actions .btn.btn-primary:hover,
.btn-appointment:hover,
.btn-book:hover,
.btn-submit:hover {
  background-color: color-mix(in srgb, var(--accent-color), black 12%) !important;
  border-color: color-mix(in srgb, var(--accent-color), black 12%) !important;
}

.btn-secondary,
.btn-outline,
.hero .hero-content .hero-actions .btn.btn-outline {
  background-color: transparent !important;
  border: 2px solid var(--heading-color) !important;
  color: var(--heading-color) !important;
}

.btn-secondary:hover,
.btn-outline:hover,
.hero .hero-content .hero-actions .btn.btn-outline:hover {
  background-color: var(--heading-color) !important;
  color: #ffffff !important;
}

.btn-light {
  background-color: #ffffff !important;
  color: var(--heading-color) !important;
}

/* Touch target comfort on mobile */
@media (max-width: 576px) {
  .btn, [class*="btn-"] {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/*--------------------------------------------------------------
# 6. Cards — consistent radius / elevation / hover across the site
--------------------------------------------------------------*/
.service-item,
.department-card,
.doctor-card,
.testimonial-item,
.gallery-item,
.faq-item,
.appointment-card,
.contact-form-card,
.specialty-card,
.stats-card,
.action-card,
.floating-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-item:hover,
.department-card:hover,
.doctor-card:hover,
.testimonial-item:hover,
.gallery-item:hover,
.specialty-card:hover,
.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.faq-item {
  box-shadow: none;
  border: 1px solid var(--brand-line);
}

/*--------------------------------------------------------------
# 7. Forms — consistent inputs across appointment / contact
--------------------------------------------------------------*/
.php-email-form input[type=text],
.php-email-form input[type=email],
.php-email-form input[type=tel],
.php-email-form input[type=date],
.php-email-form select,
.php-email-form textarea,
.form-control {
  border-radius: var(--radius-sm) !important;
  border: 1.5px solid var(--brand-line) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.php-email-form input[type=text]:focus,
.php-email-form input[type=email]:focus,
.php-email-form input[type=tel]:focus,
.php-email-form input[type=date]:focus,
.php-email-form select:focus,
.php-email-form textarea:focus,
.form-control:focus {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color), transparent 82%) !important;
}

.php-email-form label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--heading-color);
  margin-bottom: 0.4rem;
  display: inline-block;
}

/*--------------------------------------------------------------
# 8. Header / Navigation polish
--------------------------------------------------------------*/
.header {
  box-shadow: 0 1px 0 rgba(16, 48, 43, 0.06), 0 8px 24px rgba(16, 48, 43, 0.04);
}

.navmenu ul li a {
  font-weight: 500;
  letter-spacing: 0.01em;
}

@media (max-width: 1199px) {
  .navmenu {
    padding: var(--space-sm) 0;
  }
}

/*--------------------------------------------------------------
# 9. Footer polish
--------------------------------------------------------------*/
.footer-16 .brand-description {
  max-width: 42ch;
  line-height: 1.7;
}

.footer-nav a {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-nav a:hover {
  padding-left: 4px;
}

/*--------------------------------------------------------------
# 10. Small-screen refinements (320–430px)
--------------------------------------------------------------*/
@media (max-width: 430px) {
  .page-title .heading { padding: 40px 0; }
  .hero { min-height: auto; padding: 96px 0 48px; }
  .hero .hero-content .hero-stats { flex-wrap: wrap; row-gap: var(--space-sm); }
  .section-title { padding-bottom: 28px; }
  section, .section { padding: 36px 0; }
}

/*--------------------------------------------------------------
# 11. Tablet refinements (768–1024px)
--------------------------------------------------------------*/
@media (min-width: 768px) and (max-width: 1024px) {
  .hero .hero-content h1 { font-size: clamp(2.1rem, 4vw, 2.6rem); }
  .container { padding-left: 24px; padding-right: 24px; }
}

/* PhysioFlex identity: high-contrast black, yellow and soft neutral surfaces. */
:root {
  --nav-color: #191919; --nav-hover-color: #9B7B00;
  --nav-mobile-background-color: #fff; --nav-dropdown-background-color: #fff;
  --nav-dropdown-color: #191919; --nav-dropdown-hover-color: #9B7B00;
}
::selection { background: var(--accent-color); color: #111; }
.topbar.dark-background { background: #111 !important; }
.topbar .contact-info a, .topbar .contact-info span { color: #fff; }
.topbar .contact-info i, .topbar .social-links a { color: var(--accent-color); }
.branding { background: rgba(255,255,255,.97); }
.header .logo img { width: 49px; height: 49px; object-fit: contain; margin-right: 10px; }
.header .sitename { color: #111; font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 800; letter-spacing: -.04em; }
.navmenu ul li a { font-weight: 700; }
.navmenu a.active, .navmenu a:hover { color: #111 !important; }
.navmenu a.active::after, .navmenu a:hover::after { background: var(--accent-color) !important; height: 3px !important; }
.mobile-nav-toggle { color: #111; }
.page-title { background: #111 !important; }
.page-title .heading h1 { color: #fff; font-weight: 800; letter-spacing: -.045em; }
.page-title .heading p { color: #deded9; }
.page-title .breadcrumbs { background: #252525 !important; }
.page-title .breadcrumbs a { color: var(--accent-color); }
.section-title h2, h1, h2, h3 { font-weight: 800; letter-spacing: -.035em; }
.section-title h2::after { background: var(--accent-color) !important; height: 4px; width: 52px; }
.section-title p { color: #626262; }
.service-item, .department-card, .doctor-card, .testimonial-item, .gallery-item, .appointment-card, .contact-form-card, .specialty-card, .stats-card, .action-card, .floating-card { border: 1px solid #e4e4df; box-shadow: none; }
.service-item:hover, .department-card:hover, .doctor-card:hover, .testimonial-item:hover, .gallery-item:hover, .specialty-card:hover, .action-card:hover { border-color: var(--accent-color); }
.footer-16, .footer { background: #111 !important; color: #d7d7d2; }
.footer h1, .footer h2, .footer h3, .footer h4, .footer h5, .footer h6, .footer .sitename { color: #fff !important; }
.footer a:hover { color: var(--accent-color) !important; }
.footer-bottom { border-color: #363636 !important; }
.scroll-top { background: var(--accent-color) !important; color: #111 !important; }
body:has(.hero-badge) { background: #f7f7f5 !important; color: #363636 !important; }
.hero-badge { background: #111 !important; color: var(--accent-color) !important; border-radius: 0 !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat-box { border: 1px solid #e4e4df; box-shadow: none !important; border-radius: 0 !important; }
.icon-circle { background: var(--accent-color) !important; color: #111 !important; border-radius: 14px !important; }
.btn-success { background: #111 !important; border-color: #111 !important; color: #fff !important; }
@media (max-width: 1199px) { .navmenu ul { border-top: 4px solid var(--accent-color); } .navmenu a.active, .navmenu a:hover { background: #fff7d2 !important; } }
.btn-primary, .hero .hero-content .hero-actions .btn.btn-primary, .btn-appointment, .btn-book, .btn-submit { color: #111 !important; }
.btn-primary:hover, .hero .hero-content .hero-actions .btn.btn-primary:hover, .btn-appointment:hover, .btn-book:hover, .btn-submit:hover { background: #d9ad00 !important; border-color: #d9ad00 !important; }

/* Footer contrast: components use local CSS variables, so set them on the
   dark footer itself instead of relying on the page's light color tokens. */
.footer-16,
footer.footer {
  --default-color: #d7d7d2;
  --heading-color: #ffffff;
  --accent-color: #f6c400;
  --background-color: #111111;
  color: #d7d7d2 !important;
}
.footer-16 .brand-description,
.footer-16 .contact-item,
.footer-16 .contact-item span,
.footer-16 .contact-item a,
.footer-16 .nav-column .footer-nav a,
.footer-16 .footer-social p,
.footer-16 .footer-bottom .copyright p,
.footer-16 .footer-bottom .legal-links a,
footer.footer p,
footer.footer li,
footer.footer a {
  color: #d7d7d2 !important;
}
.footer-16 .contact-item i,
.footer-16 .contact-item a:hover,
.footer-16 .nav-column .footer-nav a:hover,
.footer-16 .footer-bottom .legal-links a:hover,
footer.footer a:hover {
  color: #f6c400 !important;
}
.footer-16 .nav-column h6,
.footer-16 .brand-section .logo .sitename,
.footer-16 .footer-bottom .copyright p .sitename {
  color: #fff !important;
}
