/*
Theme Name: CareWell Homecare
Theme URI: https://carewellhomecare.com
Description: A custom theme for CareWell Homecare, showcasing home care services.
Author: Antigravity
Version: 1.1
*/

:root {
  --bg-color: #ede8d0;
  --text-color: #94946a; /* Green */
  --title-color: #94946a;
  --accent-color: #94946a;
  --card-bg: rgba(255, 255, 255, 0.6);
  --font-heading: "Playfair Display", serif; /* Elegant Serif */
  --font-body: "Inter", sans-serif;
  --container-width: 1300px; /* Wider container for modern feel */
  --radius: 16px;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.8; /* More breathing room */
  font-weight: 300;
  opacity: 0; /* Will be animated by JS */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--title-color);
  font-family: var(--font-heading);
  margin-top: 0;
  line-height: 1.2;
  font-weight: 600;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
  position: relative; /* Ensure content sits above fixed video */
  z-index: 10; /* Below header */
}

.header-wrapper {
  z-index: 100000 !important; /* Force header container above everything */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  transition: all 0.4s ease;
}

.header-wrapper.scrolled {
  background: transparent !important;
  box-shadow: none !important;
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Nav Link Colors on Scroll */
.header-wrapper.scrolled nav a {
  color: var(--title-color); /* Olive/Green */
}

.header-wrapper.scrolled nav a:hover {
  color: rgba(148, 148, 106, 0.8);
}

.header-wrapper.scrolled .mobile-menu-toggle span {
  background-color: var(--title-color) !important;
}

/* Logo Switching */
.logo-light {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.logo-dark {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.header-wrapper.scrolled .logo-light {
  display: none;
  opacity: 0;
}

.header-wrapper.scrolled .logo-dark {
  display: block;
  opacity: 1;
}

.header-wrapper.container {
  background: transparent !important;
}

/* Header */
header {
  padding: 30px 0;
  transition: padding 0.4s ease;
  /* ... existing header styles ... */

  /* ... */

  /* Accessibility Modes Global Overrides */
  header.ada-grayscale,
  main.ada-grayscale,
  footer.ada-grayscale,
  nav.ada-grayscale,
  .video-background.ada-grayscale {
    filter: grayscale(100%);
  }
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 99998; /* Very high to stay above all content */
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  align-items: center;
}

nav a {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  color: #ffffff;
  transition: all 0.3s ease;
  white-space: nowrap;
}

nav a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Nav CTA Button */
.nav-cta-item {
  margin-left: 10px;
}

.nav-cta-btn {
  background: var(--title-color) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 30px !important;
  font-size: 0.6rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  white-space: nowrap;
  display: inline-block;
}

.nav-cta-btn:hover {
  background: #7a7a56 !important;
  color: #fff !important;
  transform: translateY(-2px);
  border-radius: 10px;
}

.header-wrapper.scrolled .nav-cta-btn {
  background: var(--title-color) !important;
  color: #fff !important;
}

/* Single Column Dropdown List Styling */
.dropdown-simple-list {
  display: flex !important;
  flex-direction: column !important;
  min-width: 280px;
  width: max-content;
  max-width: 350px;
  padding: 10px 0 !important;
  gap: 0 !important;
  background: rgba(108, 108, 74, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin: 0;
  max-height: 60vh;
  overflow-y: auto;
}

/* Auto width modifier for parent container */
.dropdown-menu.dropdown-menu-auto {
  min-width: auto !important;
  width: max-content !important;
  padding: 0 !important; /* Let the UL handle padding/bg */
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Multi-column support for long lists (Areas We Serve) */
.dropdown-menu.dropdown-menu-auto.dropdown-columns-enabled
  .dropdown-simple-list:has(li:nth-child(15)) {
  display: block !important;
  column-count: 3;
  column-gap: 10px;
  padding: 20px !important;
  min-width: 500px;
}

.dropdown-simple-list li {
  width: 100%;
  margin: 0;
  list-style: none;
  break-inside: avoid; /* Prevent split between columns */
  page-break-inside: avoid;
}

.dropdown-simple-list a {
  display: block;
  padding: 8px 20px;
  font-size: 0.8rem !important;
  text-transform: none !important;
  letter-spacing: 0.3px !important;
  line-height: 1.3;
  color: #ede8d0 !important; /* Cream for green bg - branded */
  transition: all 0.2s ease;
  border-bottom: none;
  white-space: nowrap;
}

/* Allow wrapping in columns or if specifically needed */
/* Allow wrapping in columns or if specifically needed */
.dropdown-menu.dropdown-menu-auto.dropdown-columns-enabled
  .dropdown-simple-list:has(li:nth-child(15))
  a {
  white-space: nowrap !important;
}

.dropdown-simple-list a:hover {
  background-color: rgba(237, 232, 208, 0.15);
  color: #fff !important;
  padding-left: 25px;
}

/* Buttons */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: var(--title-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.8rem;
  border: 1px solid var(--title-color);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  transform: none;
  backface-visibility: visible;
  line-height: 1.4;
  text-align: center;
  min-height: 54px;
}

.btn:hover {
  background-color: rgba(148, 148, 106, 0.9);
  border-color: rgba(148, 148, 106, 0.9);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(148, 148, 106, 0.4);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--title-color);
  color: var(--title-color);
}

.btn-outline:hover {
  background-color: var(--title-color);
  color: #fff;
}

/* Hero Section - Full Screen Video Container */
.hero {
  text-align: center;
  padding: 0;
  position: relative;
  color: #fff;
  overflow: visible; /* Ensure content isn't clipped */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.location-hero,
.service-hero,
.condition-hero {
  padding-top: 0 !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Video Background Wrapper - Full Screen Fixed */
/* Video Background Wrapper - Full Screen Fixed */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; /* Base layer */
  overflow: hidden;
  margin: 0;
  padding: 0;
  /* Removed will-change to prevent rendering issues */
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.video-background .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Slightly lighter overlay */
  z-index: 1; /* Above video */
}

.hero-content {
  position: relative;
  z-index: 2; /* Above overlay and video */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  margin-bottom: 0; /* Ensure no bottom margin */
  text-align: center; /* Default center for children unless overridden */
}

.hero h1 {
  font-size: 5rem;
  margin-bottom: 15px;
  /* Title Center & One Line */
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
  line-height: 1.1;
  text-align: center;
}

@media (min-width: 1200px) {
  .location-hero h1 {
    white-space: nowrap;
    font-size: 4rem;
    max-width: 100vw; /* Full viewport width */
    width: 100%;
    padding: 0 20px; /* Minimal padding */
    margin-left: 0;
    margin-right: 0;
    text-align: center; /* Keep text centered but in full width container */
  }

  .location-hero .hero-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .location-hero p {
    max-width: 1000px; /* Increased from 700px but kept readable */
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

.hero p {
  font-size: 1.35rem;
  color: #f0f0f0;
  margin-bottom: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-weight: 400;
  opacity: 0.95;
  margin: 0 auto 50px; /* Center the block */
  text-align: left; /* Text inside is left aligned */
  display: block;
  column-count: 1;
}

/* Homepage specific override: Center align description */
.home .hero p,
.location-hero p {
  text-align: center;
}

.hero p * {
  text-align: left;
}

.hero .btn-outline {
  border-color: #ffffff;
  color: #ffffff;
}

.hero .btn-outline:hover {
  background-color: #ffffff;
  color: var(--title-color);
}

/* Services Section (Interactive Marquee) */
.services-section {
  padding: 50px 0;
  overflow: visible; /* Show overflow for hover effects */
  width: 100%;
}

.services-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  /* Fade Effect on Edges */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    rgba(148, 148, 106, 0.1) 10%,
    rgba(148, 148, 106, 0.1) 90%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    rgba(148, 148, 106, 0.1) 10%,
    rgba(148, 148, 106, 0.1) 90%,
    transparent
  );
}

.services-track {
  display: flex;
  gap: 30px;
  width: max-content; /* Allow track to be as wide as needed */
  padding: 20px 0; /* Space for shadow */
}

.service-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-color);
  padding: 50px 35px;
  border-radius: 24px;
  position: relative;
  transition: all 0.4s ease;
  border: var(--glass-border);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 340px;
  width: 350px; /* Fixed width needed for sleek marquee */
  flex-shrink: 0; /* Prevent shrinking */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.service-card:hover {
  background-color: var(--title-color); /* Fill with Sage Green */
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(148, 148, 106, 0.3);
  border-color: var(--title-color);
  color: #ffffff;
}

/* Icon Box */
.card-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(148, 148, 106, 0.1);
  color: var(--title-color);
  border-radius: 50%; /* Circle icon */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 30px;
  transition: all 0.4s;
}

.service-card:hover .card-icon {
  background-color: #ffffff;
  color: var(--title-color);
  transform: scale(1.1);
}

/* Typography override for cards */
.service-card h3 {
  color: var(--title-color);
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 600;
  transition: color 0.3s;
}

.service-card p {
  color: var(--text-color);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  transition: color 0.3s;
}

.service-card:hover h3,
.service-card:hover p {
  color: #ffffff;
}

/* Background Abstract decoration (optional) */
.service-card::before {
  display: none; /* Remove previous radial gradient */
}

/* Trust/Description Section */
.trust-section {
  padding: 50px 0;
  text-align: left;
  /* Gradient fades in then out to avoid hard lines */
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 70%
  );
}

.trust-section h2 {
  font-size: 3.5rem;
  margin-bottom: 30px;
}

/* Testimonial */
.testimonial-section {
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.testimonial-quote {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  color: var(--title-color);
  max-width: 1000px;
  margin: 0 auto 40px;
  font-style: italic;
  line-height: 1.4;
}

.testimonial-author {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--text-color);
}

/* Footer */
footer {
  padding: 40px 0 60px; /* Reduced padding when cookie banner is gone */
  border-top: 1px solid rgba(148, 148, 106, 0.2);
  margin-top: 40px;
  transition: padding-bottom 0.3s ease; /* Smooth transition */
}

/* Increase footer padding when cookie banner is visible */
body.cookies-visible footer {
  padding-bottom: 230px !important;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 60px;
}

.footer-column h4 {
  margin-bottom: 25px;
  font-size: 1.3rem;
}

.footer-column ul {
  padding-left: 18px; /* Align bullets with heading text edge */
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-contact {
  margin-bottom: 8px;
  font-size: 1rem;
}

.footer-contact a {
  opacity: 0.9 !important;
}

.footer-column a {
  opacity: 0.7;
}

.footer-column a:hover {
  opacity: 1;
}

/* Trust Section Specific Cards (Editorial Style) */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Force 3 columns on Desktop */
  gap: 40px;
  margin-top: 80px;
  counter-reset: trust-counter;
}

.trust-card {
  position: relative;
  padding: 60px 40px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.2)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  border-top: 4px solid var(--title-color);
  text-align: left;
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 350px;
  overflow: hidden;
  backdrop-filter: blur(5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.trust-card::before {
  counter-increment: trust-counter;
  content: "0" counter(trust-counter);
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 8rem;
  font-family: var(--font-heading);
  color: var(--title-color);
  opacity: 0.1;
  font-weight: 700;
  line-height: 1;
  transition: all 0.5s ease;
  z-index: -1;
}

.trust-card h3 {
  color: var(--title-color);
  font-size: 2.2rem;
  margin-bottom: 24px;
  margin-top: 20px;
  position: relative;
}

.trust-card p {
  color: var(--text-color);
  font-size: 1.15rem;
  line-height: 1.7;
  position: relative;
}

.trust-card:hover {
  transform: translateY(-15px);
  background: #fff;
  box-shadow: 0 20px 50px rgba(148, 148, 106, 0.15);
}

.trust-card:hover::before {
  opacity: 0.2;
  transform: translateY(10px);
  color: var(--title-color);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero h1,
  .comparison-title {
    font-size: 4rem;
  }

  .container {
    padding: 0 25px;
  }

  .trust-card {
    padding: 40px 30px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Header & Nav */
  /* Header & Nav - Mobile Modern Scroll */
  header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: none;
  }

  /* No extra padding needed since header is not fixed */
  body {
    padding-top: 0;
    overflow-x: hidden; /* Prevent horizontal scroll that cuts off video */
    max-width: 100vw; /* Ensure body doesn't exceed viewport width */
  }

  html {
    overflow-x: hidden; /* Prevent horizontal scroll at root level */
    max-width: 100vw;
  }

  .logo img {
    max-height: 80px !important; /* Bigger logo for mobile */
    width: auto;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px; /* Space for scrollbar hide if needed */
  }

  nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for cleaner look */
  }

  nav ul {
    gap: 20px;
    flex-direction: row;
    flex-wrap: nowrap; /* Prevent wrapping */
    justify-content: flex-start;
    align-items: center;
    padding: 0 20px; /* Side padding */
    width: max-content; /* Allow content to dictate width */
    margin: 0 auto; /* Center if content is small */
  }

  nav a {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #ffffff;
    white-space: nowrap; /* Keep text on one line */
    font-weight: 600;
    padding: 5px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Add text shadow for readability on video bg */
  }

  /* Hide CTA and ADA in main nav stream if too crowded, or keep them */
  /* Here we keep them but style minimal */

  nav .btn {
    display: none; /* Keep hidden as requested previously/default */
  }

  .ada-link {
    display: none !important; /* Hide ADA on mobile nav to save space, usually in footer */
  }

  /* Hero */
  .hero {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
  }

  .hero h1,
  .comparison-title {
    font-size: 2.2rem;
    line-height: 1.15;
    padding: 0 15px;
    margin-bottom: 20px;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 15px;
    line-height: 1.5;
    margin-bottom: 30px;
  }

  .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 0 20px;
  }

  .btn {
    width: auto; /* Reset width */
    max-width: 100%;
    margin: 0 auto;
    font-size: 0.85rem; /* Smaller font */
    padding: 12px 24px; /* Smaller padding */
    min-height: 48px; /* Smaller height */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-style: normal; /* Prevent italic */
    transform: none; /* Remove any skew/transform */
    display: inline-flex;
    justify-content: center;
    align-items: center; /* Ensure vertical centering */
    text-align: center;
    line-height: 1.2;
  }

  .hero-btns {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  /* Specific overrides for hero buttons on mobile */
  .hero-btns .btn {
    width: auto !important; /* Don't force full width */
    min-width: 220px; /* Slightly wider but not full width */
    margin: 0 !important;
  }

  /* Services Marquee */
  .services-section {
    padding: 60px 0;
  }

  .service-card {
    width: 280px;
    min-height: 300px;
    padding: 30px 25px;
  }

  .service-card h3 {
    font-size: 1.5rem;
  }

  /* Trust Section */
  .trust-section {
    padding: 60px 0;
  }

  /* Trust Section: Compact Elegant List Style */
  .trust-grid {
    margin-top: 30px;
    gap: 15px; /* Tighter gap */
    grid-template-columns: 1fr;
  }

  .trust-card {
    min-height: auto;
    padding: 25px 20px;
    /* Change from Top Border to Side Border for sleek list look */
    border-top: none;
    border-left: 3px solid var(--title-color);
    background: #fff; /* Solid background for clean look */
    border-radius: 12px; /* Smaller radius */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03); /* Subtle shadow */
  }

  .trust-card::before {
    /* Watermark becomes a neat corner number */
    font-size: 3.5rem;
    top: 5px;
    right: 15px;
    opacity: 0.1;
  }

  .trust-card h3 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 10px;
    padding-right: 40px; /* Ensure title doesn't hit the number */
  }

  .trust-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
  }

  /* Footer Fixes */
  footer {
    padding: 40px 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .footer-column {
    width: 100%;
  }

  .footer-column h4 {
    margin-bottom: 15px;
    font-size: 1.5rem; /* Larger headings for tappability */
  }

  .footer-column ul {
    padding: 0;
    margin: 0;
    list-style: none; /* FORCE remove bullets */
  }

  .footer-column li {
    margin-bottom: 15px;
    list-style-type: none; /* Extra safety */
  }

  .footer-column a {
    font-size: 1.1rem; /* Easier to tap */
    display: block; /* Larger tap area */
    padding: 5px 0;
  }
}
/* END RESPONSIVE */

/* =========================================
   ADVANCED ANIMATION SUPPORT
   ========================================= */

/* Lenis Smooth Scroll */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* SplitText Line Animation Support */
.split-line-parent {
  overflow: hidden;
}

.split-line {
  display: block;
  overflow: hidden;
}

.split-word {
  display: inline-block;
  white-space: nowrap;
  margin-right: 0.3em; /* Proper spacing between words */
}

/* Animation Initial States */
.anim-reveal {
  opacity: 0; /* JS will animate */
}

/* Performance Optimizations */
.service-card,
.trust-card,
.btn[data-magnetic],
.card-icon {
  will-change: transform;
}

.hero h1,
.hero p {
  will-change: opacity, transform;
}

/* 3D Transform Support for Cards */
.service-card {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Enhanced Button States */
.btn[data-magnetic] {
  position: relative;
  transform-origin: center;
  transition: box-shadow 0.3s ease;
}

.btn[data-magnetic]:hover {
  box-shadow: 0 10px 30px rgba(148, 148, 106, 0.3);
}

/* Trust Card Hover Glow */
.trust-card {
  transition:
    box-shadow 0.5s ease,
    transform 0.5s ease;
}

/* Service Card Icon Floating */
.card-icon {
  transition: transform 0.4s ease;
}

/* Smooth Transitions for All Interactive Elements */
a,
button,
.btn {
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* =========================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================= */

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

  .anim-reveal,
  .anim-card,
  .split-line,
  .split-word {
    opacity: 1 !important;
    transform: none !important;
  }

  .service-card,
  .trust-card,
  .btn[data-magnetic] {
    will-change: auto;
  }
}

/* =========================================
   NEW FEATURES & ENHANCEMENTS
   ========================================= */

/* Moving Banner Section */
.moving-banner {
  padding: 20px 0;
  overflow: hidden;
}

.banner-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: scroll-banner 40s linear infinite;
}

.banner-item {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  color: var(--title-color);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.banner-item svg {
  color: var(--title-color);
  flex-shrink: 0;
}

@keyframes scroll-banner {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Why CareWell Feature Cards */
.why-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 60px;
  margin-bottom: 60px;
}

.why-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 32px 28px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.why-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.why-feature-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: rgba(148, 148, 106, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--title-color);
}

.why-feature-icon svg {
  width: 26px;
  height: 26px;
}

.why-feature-content {
  flex: 1;
}

.why-feature-content h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--title-color);
  margin: 0 0 8px 0;
  font-weight: 600;
}

.why-feature-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
}

/* Services Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

/* Why CareWell Section */
.why-carewell-section {
  padding: 140px 0 100px; /* Increased top padding to avoid overlap */
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 70%
  );
}

.why-carewell-section h2 {
  font-size: 3.5rem;
  margin-bottom: 50px;
  text-align: center;
}

.carewell-content {
  max-width: 1000px;
  margin: 0 auto 60px;
}

.carewell-content p {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 30px;
  color: var(--text-color);
  text-align: justify;
}

/* Awards Section - removed */

/* Comparison Chart Section - Unified (matches mobile style at all viewports) */
.comparison-section {
  padding: 100px 0;
  background: #6c6c4a; /* Brand dark green background */
  color: #fff;
}

.comparison-section h2 {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 20px;
}

/* The CareWell Difference title */
.comparison-title {
  font-family: var(--font-heading);
  font-size: 5rem;
  color: #fff !important;
  letter-spacing: -1px;
  line-height: 1.1;
  text-shadow: none;
}

.comparison-section .section-subtitle {
  text-align: center;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8) !important;
  margin-bottom: 60px;
}

/* Hide old desktop table (HTML removed, but just in case) */
.comparison-table-wrapper {
  display: none !important;
}

/* ---- Mobile Comparison V2 Grid: Global (all viewports) ---- */
.mobile-comparison-v2 {
  display: block !important;
  padding: 0 15px;
  margin-top: 20px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.comp-v2-container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 30px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comp-v2-scroll-area {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  position: relative;
  padding-bottom: 5px;
}

.comp-v2-scroll-area::-webkit-scrollbar {
  height: 4px;
}
.comp-v2-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.comp-v2-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 3;
  padding: 0 25px;
}

.comp-v2-column-header {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.7;
  color: #fff;
  text-align: center;
}

.comp-v2-column-header.highlight {
  opacity: 1;
}

.comp-v2-column-header .pill {
  background: #94946a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  display: inline-block;
  white-space: nowrap;
  color: #fff;
}

.comp-v2-body {
  position: relative;
  z-index: 2;
}

.comp-v2-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 18px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comp-v2-row:last-child {
  border-bottom: none;
}

.comp-v2-feature-name,
.comp-v2-feature-label {
  position: relative;
  z-index: 1;
  background: transparent !important;
  padding-left: 0;
  padding-right: 15px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  border-right: none;
  box-shadow: none !important;
}

.comp-v2-value {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 3;
  font-size: 0.9rem;
  font-weight: 600;
}

.comp-v2-value span {
  display: inline-block;
}

.comp-v2-value .check {
  color: #fff;
}

.comp-v2-value .cross {
  color: #ff6b6b;
  font-weight: 600;
}

.comp-v2-value .partial {
  color: #f39c12;
}

/* Vertical Highlight Bar - CareWell column (2nd of 4 equal columns) */
.comp-v2-highlight-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(25% + 12px);
  width: calc(25% - 20px);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
}

/* Scroll Indicator - mobile only */
.comp-v2-scroll-indicator {
  display: none;
}

/* Mobile Comparison V2 - Size adjustments for small screens */
@media (max-width: 768px) {
  .comparison-section {
    padding: 60px 0;
  }

  .comparison-title {
    font-size: 3rem;
  }

  .mobile-comparison-v2 {
    padding: 0 10px;
  }

  .comp-v2-header {
    grid-template-columns: 130px 100px 100px 100px;
    width: max-content;
    padding: 0 15px;
  }

  .comp-v2-column-header {
    font-size: 0.75rem;
  }

  .comp-v2-column-header .pill {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .comp-v2-row {
    grid-template-columns: 130px 100px 100px 100px;
    width: max-content;
    padding: 16px 15px;
  }

  .comp-v2-feature-name,
  .comp-v2-feature-label {
    font-size: 0.85rem;
  }

  .comp-v2-value {
    font-size: 0.85rem;
  }

  /* Fixed-position highlight bar for mobile scrolling grid */
  .comp-v2-highlight-bar {
    left: 150px;
    width: 90px;
  }

  /* Scroll Indicator for mobile */
  .comp-v2-scroll-indicator {
    display: block;
    position: absolute;
    bottom: 5px;
    right: 20px;
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    z-index: 10;
  }

  .comp-v2-scroll-indicator::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40%;
    background: #fff;
    border-radius: 10px;
  }
}

/* CRITICAL: Body scroll lock when popup is active */
body.popup-open,
body:has(.care-popup.active) {
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* Modal Popup Styles */
.care-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport for mobile */
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(5px);
  z-index: 200000; /* Above header (100000) */
  display: none;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden !important;
}

.care-popup.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  animation: fadeIn 0.3s ease;
}

.care-popup-content {
  flex: 1 1 auto;
  min-height: 0; /* CRITICAL: Allow flex child to shrink and scroll */
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 80px 20px 60px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  touch-action: pan-y !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.care-popup h3 {
  color: var(--title-color);
  font-size: 1.5rem;
  margin-bottom: 25px;
  margin-top: 20px;
  font-family: "Playfair Display", serif;
  background: transparent;
  padding: 10px 0;
  width: 100%;
  text-align: center;
}

.close-popup-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #94946a !important;
  border: none;
  font-size: 2rem;
  color: white !important;
  cursor: pointer;
  line-height: 1;
  z-index: 200001 !important; /* Above popup */
  padding: 0;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto !important;
}

.close-popup-btn:hover {
  background: #7a7a5a !important;
  transform: scale(1.05);
}

.close-popup-btn:active {
  background: #6a6a4a !important;
  transform: scale(0.95);
}

/* Responsive table headers to keep single line */
@media (max-width: 1200px) {
  .comparison-table th {
    font-size: 0.9rem;
    padding: 15px 10px;
  }
}

/* Mobile-specific popup fixes */
@media (max-width: 768px) {
  .care-popup {
    padding: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
    overflow: hidden !important;
    display: none;
  }

  .care-popup.active {
    display: flex !important;
    flex-direction: column !important;
  }

  .care-popup-content {
    flex: 1 1 auto !important;
    min-height: 0 !important; /* CRITICAL for flexbox scrolling */
    height: auto !important;
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 70px 15px 120px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .close-popup-btn {
    position: fixed !important;
    top: 15px !important;
    right: 15px !important;
    font-size: 1.6rem !important;
    z-index: 200001 !important; /* Above popup */
    background: #94946a !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }

  .care-popup .care-pills-container {
    padding-bottom: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    touch-action: pan-y !important;
    width: 100% !important;
    max-width: 350px !important;
    margin: 0 auto !important;
  }

  .care-popup .care-pill {
    touch-action: pan-y !important; /* Allow swipe to scroll through pills */
    pointer-events: auto;
    user-select: none;
  }

  /* Hide header when popup is active */
  body:has(.care-popup.active) .header-wrapper,
  body:has(.care-popup.active) header,
  body:has(.care-popup.active) .mobile-menu-toggle,
  body.popup-open .header-wrapper,
  body.popup-open header,
  body.popup-open .mobile-menu-toggle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  /* Force vertical stack for mobile main view */
  .vertical-mobile {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 15px !important;
    overflow-x: visible !important; /* Disable horizontal scroll */
    width: 100% !important;
    padding: 0 !important;
  }

  .vertical-mobile .care-pill {
    width: 100% !important;
    max-width: 400px !important; /* Reasonable max width */
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding: 15px 20px !important;
    margin: 0 auto !important;
    white-space: normal !important; /* Allow text wrapping */
    flex: 0 0 auto !important; /* Prevent shrinking/growing oddities */
  }
}

/* Comparison UI Refactor - Clean Card Design */
.mobile-comparison-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comp-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 148, 106, 0.2);
  border-radius: 12px;
  padding: 20px;
  text-align: center; /* Center everything */
  margin-bottom: 0;
  box-shadow: none;
}

.comp-card-header {
  border-bottom: 1px solid rgba(148, 148, 106, 0.1);
  padding-bottom: 12px;
  margin-bottom: 15px;
}

.comp-card-header h4 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: var(--title-color);
  margin: 0;
  font-weight: 600;
}

.comp-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.comp-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.comp-column .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-color);
  margin-bottom: 5px;
  opacity: 0.7;
}

.comp-column .value {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--title-color);
}

.comp-column .value .check {
  color: var(--title-color);
  font-size: 1.1rem;
}

.comp-column .value .cross {
  color: #e74c3c;
  font-size: 1.1rem;
}

/* Visibility Toggles */
.view-all-wrapper {
  display: none;
}

@media (max-width: 768px) {
  .mobile-hidden-care {
    display: none; /* Hide default on mobile */
  }

  .care-pills-container.expanded .mobile-hidden-care {
    display: flex;
    animation: fadeIn 0.4s ease;
  }

  .view-all-wrapper {
    display: block;
  }
}

.view-all-btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 148, 106, 0.5);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--title-color);
  cursor: pointer;
  transition: all 0.3s ease;
}
.desktop-only {
  display: block;
}

.comp-card:last-child {
  border-bottom: none;
}

.comp-card.highlight-card {
  background: rgba(148, 148, 106, 0.05); /* Subtle highlight bg */
  border: none;
  border-bottom: 1px solid rgba(148, 148, 106, 0.15);
}

.comp-card-header h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--title-color);
  font-weight: 700;
  line-height: 1.3;
}

.comp-card-body {
  display: flex;
  flex-direction: row; /* Side by side values */
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.comp-row {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0;
  border: none;
  flex: 1;
}

.comp-row .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  color: #888;
}

.carewell-row .label {
  color: var(--title-color); /* Brand color for CW label */
}

.comp-row .value {
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Accordion State */
.mobile-comparison-cards .comp-card:nth-child(n + 6) {
  display: none; /* Hide 6th item onwards by default */
}

.mobile-comparison-cards.expanded .comp-card:nth-child(n + 6) {
  display: block; /* Show all when expanded */
}

/* View All Button */
.view-all-btn {
  background: transparent;
  border: 1px solid var(--title-color);
  width: 100%;
  padding: 15px;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--title-color);
  display: block;
}

.view-all-btn:hover {
  background: var(--title-color);
  color: #fff;
}

.mobile-comparison-cards.expanded + .view-all-btn-wrapper .view-all-btn {
  display: none; /* Hide button after expanding */
}

.view-all-btn-wrapper {
  padding: 0 20px 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

/* Visibility Toggles */
.mobile-only {
  display: none;
}
.desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }

  .comparison-table-wrapper {
    overflow-x: visible;
  }
}

@media (min-width: 769px) {
  .view-all-btn-wrapper {
    display: none !important;
  }
}

.comp-card-header h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: var(--title-color);
  font-weight: 600;
  line-height: 1.4;
}

.comp-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.comp-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.comp-row .label {
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
}

.carewell-row .label {
  color: var(--title-color);
  font-weight: 700;
}

.comp-row .value {
  text-align: right;
}

/* Visibility Toggles */
.mobile-only {
  display: none !important;
}
.desktop-only {
  display: flex !important;
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }

  .comparison-table-wrapper {
    overflow-x: visible;
  }
}

/* CTA Section */
.cta-section,
.condition-cta-section {
  text-align: center;
  padding: 60px 0 !important;
  /* Double-sided Ombre Effect - Intensified */
  background: linear-gradient(
    to right,
    rgba(148, 148, 106, 0.35) 0%,
    rgba(148, 148, 106, 0.05) 25%,
    rgba(148, 148, 106, 0.05) 75%,
    rgba(148, 148, 106, 0.35) 100%
  ) !important;
  margin-top: 30px !important;
}

.cta-section h2 {
  font-size: 3rem;
  margin-bottom: 5px !important; /* Reduced from 20px */
}

/* Fixed Chat Popup */
/* Fixed Chat Popup (Community Assistant) */
.chat-popup {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 350px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  overflow: hidden;
  font-family: var(--font-body);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  /* Start visible but collapsed */
  transform: translateY(0);
  opacity: 1;
}

.chat-popup:not(.open) {
  /* Cleaner Launcher Button Style */
  height: 56px;
  width: auto;
  min-width: 180px;
  max-width: 240px;
  border-radius: 28px;
  cursor: pointer;
  background: #fff; /* White background for clean look */
  border: 1px solid rgba(148, 148, 106, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-popup:not(.open):hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.chat-popup:not(.open) .chat-header {
  background: transparent;
  color: #94946a;
  padding: 0 18px;
  width: 100%;
  justify-content: center;
}

.chat-popup:not(.open) .chat-header span {
  font-size: 0.95rem;
  white-space: nowrap;
  font-weight: 600;
}

.chat-popup:not(.open) .chat-header svg {
  color: #94946a;
}

/* CRITICAL: Hide content when popup is closed */
.chat-popup:not(.open) .chat-content {
  display: none !important;
}

.chat-popup.open {
  height: 600px; /* Predictable height when open */
  max-height: 80vh; /* Don't exceed screen height */
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.chat-header {
  flex-shrink: 0; /* Keep header visible */
  background: #94946a;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-close-x {
  display: none; /* Hidden when collapsed */
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.chat-popup.open .chat-close-x {
  display: flex;
}

.chat-close-x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.chat-header svg {
  width: 24px;
  height: 24px;
}

.chat-content {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
  flex-grow: 1;
}

.chat-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  margin-bottom: 10px;
  background: #f5f5f0;
  border-radius: 12px;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
}

.chat-option:hover {
  background: #fff;
  border-color: #94946a;
  color: #94946a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.chat-option svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

/* Chat Back Button */
.chat-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 15px;
  color: #94946a;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
}

.chat-back-btn:hover {
  text-decoration: underline;
}

/* Chat View Transition */
.chat-view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.chat-view.active {
  display: block;
}

/* Premium Chat Inputs */
.chat-view input[type="text"],
.chat-view input[type="tel"],
.chat-view input[type="email"],
.chat-view textarea {
  width: 100%;
  padding: 15px 18px;
  margin-bottom: 15px;
  border: 1px solid rgba(148, 148, 106, 0.2);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fdfdfb;
  color: #444;
  transition: all 0.3s ease;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.chat-view input:focus,
.chat-view textarea:focus {
  outline: none;
  border-color: #94946a;
  box-shadow: 0 0 0 4px rgba(148, 148, 106, 0.1);
  background: #fff;
  transform: translateY(-1px);
}

.chat-view input::placeholder,
.chat-view textarea::placeholder {
  color: #a0a090;
  opacity: 0.8;
}

.chat-question {
  background: #f0f0eb;
  padding: 12px 16px;
  border-radius: 12px 12px 12px 0;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  position: relative;
  max-width: 90%;
  animation: slideInLeft 0.3s ease forwards;
}

.chat-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.chat-option.selected {
  background: #94946a;
  color: #fff;
  border-color: #94946a;
}

.chat-footer {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cookies Popup */
.cookies-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 25px;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  border-top: 3px solid var(--title-color);
}

.cookies-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.cookies-content p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
  flex: 1;
}

.cookies-buttons {
  display: flex;
  gap: 15px;
}

.btn-small {
  padding: 10px 24px;
  font-size: 0.85rem;
}

/* Footer License Info */
/* Footer License Info */
.license-info {
  margin-top: 15px;
  display: inline-block;
  padding: 10px 16px;
  background: rgba(148, 148, 106, 0.15);
  border-radius: 6px;
  border: 1px solid rgba(148, 148, 106, 0.3);
  color: var(--title-color);
}

.license-info strong {
  color: var(--title-color);
  font-size: 1.05rem;
}

/* =========================================
   RESPONSIVE ENHANCEMENTS
   ========================================= */

@media (max-width: 1024px) {
  .why-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 15px;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  /* Moving Banner */
  .moving-banner {
    padding: 15px 0;
  }

  .banner-item {
    font-size: 0.8rem;
    gap: 8px;
  }

  /* Why Feature Cards - mobile */
  .why-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 30px;
    padding: 0 16px;
  }

  .why-feature-card {
    padding: 24px 20px;
  }

  /* Services Grid */
  .services-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  /* Why CareWell */
  .why-carewell-section h2 {
    font-size: 2.2rem;
  }

  .carewell-content p {
    font-size: 1rem;
    text-align: left;
  }

  /* Features Grid */
  .why-features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 30px;
    padding: 0 16px;
    width: 100% !important;
  }

  /* Universal mobile container reset - FIXED PADDING */
  .container {
    padding: 0 20px !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  /* Force all sections to center content */
  section {
    text-align: center !important;
  }

  /* Reset body padding on mobile */
  body,
  main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Strict Centering for Components */
  .services-grid,
  .why-features-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Mobile Care/Conditions Slider - Fixed horizontal flow */
  .care-pills-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    padding: 20px 0 !important;
    gap: 12px !important;
    -webkit-overflow-scrolling: touch;
    width: calc(100% + 40px) !important;
    margin-left: -20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
    justify-content: flex-start !important;
  }

  .care-pills-container::-webkit-scrollbar {
    display: none;
  }

  .care-pill {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    scroll-snap-align: center !important;
    white-space: nowrap !important;
    padding: 12px 28px !important; /* Increased padding */
    margin: 0 !important;
    font-size: 0.95rem !important;
    border-width: 1px !important;
  }

  .pill-dot {
    margin-right: 12px !important; /* Proper spacing */
    margin-left: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Mobile Comparison Cards - Show on mobile only */
  .mobile-comparison-cards {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .mobile-comparison-cards .comp-card {
    width: 100% !important;
    padding: 20px !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }

  /* Service Cards Centering */
  .service-card {
    margin: 0 auto 30px !important; /* Center card itself */
  }

  /* Chat Popup */
  .chat-popup {
    width: 280px;
    bottom: 20px;
    right: 20px;
  }

  /* Cookies Popup */
  .cookies-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookies-buttons {
    width: 100%;
    flex-direction: column;
  }

  .cookies-buttons .btn {
    width: 100%;
  }

  /* CTA Section */
  .cta-section h2 {
    font-size: 2rem;
  }
}

/* =========================================
   DROPDOWN NAVIGATION MENU
   ========================================= */

nav ul li {
  position: relative;
}

/* Show dropdown when active class is added (via JavaScript) */
nav ul li.has-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #6c6c4a;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 15px 0;
  min-width: 280px;
  max-width: 320px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
  z-index: 99999; /* Above everything including header */
  margin-top: 0;
  border: none;
  pointer-events: none;
}

/* Add cursor pointer to clickable nav items */
nav ul li.has-dropdown > a {
  cursor: pointer;
}

.dropdown-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; /* Reduced from 35px for more text space */
}

.dropdown-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-column .nav-item-static {
  padding: 8px 16px;
  color: var(--text-color);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0.3px;
  border-radius: 8px;
  font-weight: 400;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default; /* Not clickable */
}

/* Bullet point style */
.dropdown-column .nav-item-static::before {
  content: "•";
  color: var(--title-color);
  font-size: 1.2rem;
  line-height: 1;
}

/* Remove hover scale/bg effects since it's just a list */
.dropdown-column .nav-item-static:hover {
  background: transparent;
  color: var(--text-color);
  transform: none;
  font-weight: 400;
}

/* Clickable Navigation Links */
.dropdown-column .nav-item-link {
  padding: 16px 24px; /* Much larger padding */
  color: var(--text-color);
  font-size: 1rem; /* Larger font */
  text-transform: none;
  letter-spacing: 0.3px;
  border-radius: 8px;
  font-weight: 400;
  line-height: 1.6;
  display: block; /* Full width block */
  width: 100%; /* Take full width */
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.dropdown-column .nav-item-link::before {
  content: "→";
  color: var(--title-color);
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transform: translateX(-5px);
  transition: all 0.3s ease;
  margin-right: 8px;
}

.dropdown-column .nav-item-link:hover {
  background: rgba(148, 148, 106, 0.15);
  color: var(--title-color);
  font-weight: 500;
  padding-left: 32px;
}

.dropdown-column .nav-item-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.ada-link {
  padding: 6px 12px !important;
  background: rgba(148, 148, 106, 0.3) !important;
  border-radius: 4px !important;
  font-size: 0.7rem !important;
  letter-spacing: 1px !important;
  color: var(--title-color) !important;
  border: 1px solid rgba(148, 148, 106, 0.4) !important;
  transition: all 0.3s ease;
  line-height: 1;
  display: inline-block;
}

.ada-link:hover {
  background: var(--title-color) !important;
  color: #fff !important;
  border-color: var(--title-color) !important;
}

@media (max-width: 768px) {
  .dropdown-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    padding: 80px 20px 40px; /* Top padding for close button space */
    overflow-y: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* X icon removed - user can tap outside or toggle again to close */

  nav ul li.has-dropdown.active .dropdown-menu {
    display: block !important;
    animation: slideIn 0.3s ease;
  }

  .dropdown-columns {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .dropdown-column {
    gap: 0;
  }

  /* Improved List Styling in Mobile Dropdown */
  .dropdown-column .nav-item-static {
    font-size: 1rem;
    padding: 15px 10px;
    background: transparent;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-color) !important;
    width: 100%;
    text-align: left;
    white-space: normal;
    height: auto;
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transition: none !important;
    transform: none !important;
    cursor: default;
  }

  /* Mobile bullet point */
  .dropdown-column .nav-item-static::before {
    content: "•";
    color: var(--title-color);
    font-size: 1.5rem; /* Larger bullet for mobile */
    line-height: 0.8;
  }

  .dropdown-column .nav-item-static:hover {
    background: transparent;
    color: var(--text-color) !important;
  }

  /* Mobile styles for clickable nav links */
  .dropdown-column .nav-item-link {
    font-size: 1rem;
    padding: 15px 10px;
    background: transparent;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-color) !important;
    width: 100%;
    text-align: left;
    white-space: normal;
    text-decoration: none;
  }

  .dropdown-column .nav-item-link::before {
    content: "→";
    color: var(--title-color);
    font-size: 1.1rem;
    opacity: 1;
    transform: none;
  }

  .dropdown-column .nav-item-link:hover,
  .dropdown-column .nav-item-link:active {
    background: rgba(148, 148, 106, 0.1);
    padding-left: 15px;
  }

  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  nav ul li.has-dropdown > a::after {
    content: " ▾";
    display: inline-block;
    transition: transform 0.3s;
  }

  nav ul li.has-dropdown.active > a::after {
    transform: rotate(180deg);
  }

  /* Reset link styles in dropdown */
  .dropdown-column a {
    font-size: 1rem;
    padding: 12px 10px;
    background: #f9f9f9;
    margin-bottom: 5px;
    display: block;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   CAREERS SECTION
   ========================================= */

.careers-section {
  padding: 100px 0;
  background: linear-gradient(
    to bottom,
    rgba(148, 148, 106, 0.05),
    transparent
  );
}

.careers-section h2 {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 20px;
}

.careers-content {
  max-width: 1000px;
  margin: 0 auto;
}

.careers-content > p {
  font-size: 1.15rem;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 60px;
  color: var(--text-color);
}

.careers-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

.benefit-item {
  text-align: center;
  padding: 40px 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(148, 148, 106, 0.15);
}

.benefit-item svg {
  color: var(--title-color);
  margin-bottom: 20px;
}

.benefit-item h4 {
  color: var(--title-color);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.benefit-item p {
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.6;
}

.careers-cta {
  text-align: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.careers-cta h3 {
  color: var(--title-color);
  font-size: 2rem;
  margin-bottom: 20px;
}

.careers-cta p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.careers-cta p a[href^="mailto"] {
  color: var(--title-color);
  font-weight: 600;
  text-decoration: underline;
}

/* =========================================
   ADA MODAL
   ========================================= */

.ada-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000; /* Above everything */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ada-modal.open {
  opacity: 1;
  visibility: visible;
}

.ada-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.ada-modal-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  background: #fff;
  border-radius: 20px;
  padding: 50px;
  overflow-y: auto;
  z-index: 100001; /* Above modal overlay */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.ada-modal.open .ada-modal-content {
  transform: scale(1);
}

.ada-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  font-size: 3rem;
  color: var(--title-color);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
}

.ada-modal-close:hover {
  transform: rotate(90deg);
  color: var(--title-color);
}

.ada-modal-content h2 {
  color: var(--title-color);
  font-size: 2.5rem;
  margin-bottom: 30px;
  padding-right: 50px;
}

.ada-modal-content h3 {
  color: var(--title-color);
  font-size: 1.6rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

.ada-modal-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 20px;
}

.ada-modal-body ul {
  list-style: disc;
  padding-left: 30px;
  margin-bottom: 20px;
}

.ada-modal-body li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 10px;
}

.ada-modal-body a {
  color: var(--title-color);
  font-weight: 600;
  text-decoration: underline;
}

.ada-modal-body a:hover {
  color: var(--title-color);
}

.ada-updated {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 148, 106, 0.2);
  font-size: 0.9rem;
  color: #999;
  font-style: italic;
}

/* =========================================
   RESPONSIVE - CAREERS & ADA
   ========================================= */

@media (max-width: 768px) {
  .careers-section h2 {
    font-size: 2rem;
  }

  .careers-benefits {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .benefit-item {
    padding: 30px 20px;
  }

  .careers-cta {
    padding: 40px 25px;
  }

  .careers-cta h3 {
    font-size: 1.5rem;
  }

  .ada-modal-content {
    width: 95%;
    padding: 30px 25px;
    max-height: 90vh;
  }

  .ada-modal-content h2 {
    font-size: 1.8rem;
    padding-right: 40px;
  }

  .ada-modal-content h3 {
    font-size: 1.3rem;
  }

  .ada-modal-close {
    font-size: 2.5rem;
    top: 15px;
    right: 15px;
  }
}

/* =========================================
   ADA ACCESSIBILITY WIDGET STYLES
   ========================================= */

.ada-modal-content.widget-mode {
  max-width: 600px;
  padding: 40px;
  border-radius: 24px;
}

.ada-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .ada-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ada-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  gap: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  height: 100%;
  min-height: 110px;
}

.ada-tool-btn:hover {
  transform: translateY(-4px);
  border-color: var(--title-color, #94946a);
  box-shadow: 0 10px 20px rgba(148, 148, 106, 0.15);
}

.ada-tool-btn:active {
  transform: translateY(0);
}

.ada-tool-btn .tool-icon {
  font-size: 28px;
  line-height: 1;
  display: block;
  margin-bottom: 5px;
}

.ada-tool-btn .tool-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--title-color, #333);
  text-align: center;
  line-height: 1.3;
}

.ada-tool-btn.tool-reset {
  grid-column: 1 / -1;
  background: #fff5f5;
  border-color: #ffe0e0;
  flex-direction: row;
  min-height: 60px;
  gap: 15px;
}

.ada-tool-btn.tool-reset:hover {
  background: #ffe3e3;
  border-color: #ffc9c9;
}

.ada-tool-btn.tool-reset .tool-icon {
  margin-bottom: 0;
  font-size: 20px;
  color: #e03131;
}

.ada-tool-btn.tool-reset .tool-label {
  color: #e03131;
  font-size: 0.95rem;
}

.ada-statement-link {
  margin-top: 30px;
  text-align: center;
  font-size: 0.85rem;
  color: #999;
  border-top: 1px solid #f0f0f0;
  padding-top: 20px;
}

/* Accessibility Modes Global Overrides */
header.ada-grayscale,
main.ada-grayscale,
footer.ada-grayscale,
nav.ada-grayscale,
.video-background.ada-grayscale {
  filter: grayscale(100%);
}

body.ada-high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.ada-high-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

body.ada-high-contrast img,
body.ada-high-contrast video,
body.ada-high-contrast .ada-tool-btn {
  filter: grayscale(100%) invert(100%) contrast(120%);
}

/* Invert icons in high contrast for visibility */
body.ada-high-contrast .ada-tool-btn .tool-icon,
body.ada-high-contrast .ada-tool-btn .tool-label {
  background-color: transparent !important;
  color: #000 !important; /* Becomes white after invert? No, logic is tricky */
}

/* Simpler High Contrast text override */
body.ada-high-contrast h1,
body.ada-high-contrast h2,
body.ada-high-contrast h3,
body.ada-high-contrast h4,
body.ada-high-contrast h5,
body.ada-high-contrast h6,
body.ada-high-contrast p,
body.ada-high-contrast span,
body.ada-high-contrast a,
body.ada-high-contrast li {
  color: #ffff00 !important; /* Yellow text for high contrast standard */
}

body.ada-light-bg {
  background-color: #fff !important;
  color: var(--text-color) !important;
}

body.ada-light-bg * {
  background-color: #fff !important;
  color: var(--text-color) !important;
}

body.ada-highlight-links a {
  background-color: #ffeb3b !important;
  color: var(--text-color) !important;
  text-decoration: underline !important;
  border: 2px solid var(--text-color) !important;
  border-radius: 4px;
  padding: 0 4px;
  display: inline-block;
}

/* =========================================
   SEO LANDING PAGES STYLES
   ========================================= */

/* Location Page Intro */
.location-intro,
.service-overview,
.condition-overview {
  padding: 60px 0 40px;
}

.location-intro h2,
.service-overview h2,
.condition-overview h2 {
  font-size: 2.8rem;
  margin-bottom: 40px;
  text-align: center;
}

.intro-content,
.overview-content {
  max-width: 900px;
  margin: 0 auto;
}

.intro-content p,
.overview-content p {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 25px;
  text-align: justify;
}

/* Services List Grid */
.location-services,
.service-includes,
.condition-help {
  padding: 80px 0;
  background: rgba(148, 148, 106, 0.03);
}

.location-services h2,
.service-includes h2,
.condition-help h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
}

.services-list-grid,
.includes-grid,
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.service-list-item,
.include-item,
.help-item {
  display: flex;
  gap: 20px;
  padding: 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.service-list-item:hover,
.include-item:hover,
.help-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-icon,
.include-icon,
.help-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 148, 106, 0.1);
  border-radius: 12px;
  color: var(--title-color);
}

.service-info h4,
.include-item h4,
.help-item h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--title-color);
}

.service-info p,
.include-item p,
.help-item p {
  color: var(--text-color);
  font-size: 1rem;
  margin: 0;
}

/* Why Us / Expertise Grid */
.location-why-us,
.service-benefits,
.condition-expertise {
  padding: 80px 0;
}

.location-why-us h2,
.service-benefits h2,
.condition-expertise h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
}

.location-why-us .features-grid,
.location-why-us .features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
  gap: 30px;
  margin-top: 40px;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.feature-item,
.expertise-item {
  text-align: center;
  padding: 40px 30px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: var(--glass-border);
  transition: transform 0.3s ease;
}

.feature-item:hover,
.expertise-item:hover {
  transform: translateY(-10px);
}

.feature-item svg,
.expertise-item svg {
  color: var(--title-color);
  margin-bottom: 20px;
}

.feature-item h4,
.expertise-item h4 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--title-color);
  text-align: center;
}

.feature-item p,
.expertise-item p {
  font-size: 1rem;
  color: var(--text-color);
  margin: 0;
  text-align: center;
}

/* Nearby Areas */
.location-area {
  padding: 80px 0;
  background: rgba(148, 148, 106, 0.05);
}

.location-area h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-align: center;
}

.nearby-areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.area-link {
  padding: 12px 24px;
  background: #fff;
  border: 2px solid rgba(148, 148, 106, 0.3);
  border-radius: 30px;
  color: var(--title-color);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.area-link:hover {
  background: var(--title-color);
  color: #fff;
  border-color: var(--title-color);
}

/* Related Services & Conditions */
.related-services,
.related-conditions {
  padding: 80px 0;
}

.related-services h2,
.related-conditions h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.related-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: var(--title-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

.related-item:hover {
  background: var(--title-color);
  color: #fff;
  transform: translateX(5px);
}

.related-item svg {
  transition: transform 0.3s ease;
}

.related-item:hover svg {
  transform: translateX(5px);
}

.conditions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

.condition-link {
  padding: 14px 28px;
  background: rgba(148, 148, 106, 0.1);
  border-radius: 30px;
  color: var(--title-color);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.condition-link:hover {
  background: var(--title-color);
  color: #fff;
}

/* Benefits List */
.benefits-content {
  max-width: 800px;
  margin: 0 auto;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}

.benefits-list li {
  position: relative;
  padding: 15px 0 15px 40px;
  font-size: 1.15rem;
  border-bottom: 1px solid rgba(148, 148, 106, 0.1);
}

.benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--title-color);
  font-weight: bold;
  font-size: 1.3rem;
}

/* Landing Page CTA */
.location-cta,
.service-cta,
.condition-cta {
  padding: 100px 0;
  padding: 100px 0;
  background: transparent;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* =========================================
   LANDING PAGES RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
  .location-why-us .features-grid,
  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .location-intro h2,
  .service-overview h2,
  .condition-overview h2 {
    font-size: 2rem;
  }

  .services-list-grid,
  .includes-grid,
  .help-grid {
    grid-template-columns: 1fr;
  }

  .location-why-us .features-grid,
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .nearby-areas {
    gap: 10px;
  }
}

/* Conditions We Support (Pills Layout) */
.conditions-section {
  padding: 60px 0;
  text-align: center;
  text-align: center;
}

.conditions-section .container {
  max-width: 100% !important;
  padding: 0 40px;
}

.conditions-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 100%; /* Full width */
  margin: 40px auto 0;
}

.condition-pill {
  padding: 12px 28px;
  background: #fff;
  color: var(--title-color); /* Greenish text */
  border: 1px solid rgba(148, 148, 106, 0.3);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: default;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.condition-pill:hover {
  background: var(--title-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(148, 148, 106, 0.2);
  border-color: var(--title-color);
}

@media (max-width: 768px) {
  .area-link {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    margin: 0 !important;
  }
}

/* Care & Conditions Grid (Bullet Layout) */
.care-conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 50px auto 0;
  text-align: left;
}

.care-col h3 {
  font-size: 1.8rem;
  color: var(--title-color);
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(148, 148, 106, 0.2);
  position: relative;
}

/* Custom Bullet List */
.custom-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 1.15rem;
  color: var(--text-color);
  line-height: 1.6;
  transition: transform 0.2s ease;
}

.custom-list li::before {
  content: "•";
  color: var(--title-color); /* Green bullet */
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -5px; /* Adjust to align with text */
  line-height: 1.6;
}

/* Hover effect for list items */
.custom-list li:hover {
  transform: translateX(5px);
  color: var(--title-color);
}

@media (max-width: 768px) {
  .care-conditions-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .care-col h3 {
    text-align: center;
  }
}

/* Care & Conditions Pills Layout (Image Match) */
.care-group {
  margin-top: 30px;
  text-align: center;
}

.care-group h3 {
  font-size: 1.6rem;
  color: var(--title-color);
  margin-bottom: 20px; /* Reduced margin */
  font-weight: 500;
  opacity: 0.9;
}

.care-pills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-items: center;
  gap: 15px;
  max-width: 100%; /* Full width */
  margin: 0 auto;
  text-align: center;
  padding: 20px;
}

.care-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px; /* Slightly increased padding */
  background: #fdfdf9; /* Soft off-white/cream */
  border: none; /* Removing harsh border */
  border-radius: 50px;
  font-size: 1.05rem;
  color: var(--title-color); /* Using Title color for better contrast */
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(148, 148, 106, 0.15); /* Softer, deeper shadow */
  cursor: default;
  text-align: center;
}

.care-pill:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 8px 20px rgba(148, 148, 106, 0.25);
}

.pill-dot {
  width: 10px;
  height: 10px;
  background-color: var(
    --title-color
  ); /* Changed from peach to branded green */
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Optional: vary dot colors or keep uniform. 
   If user wants exact match, peach is good. 
   Fallback to theme color if needed: var(--title-color) */

@media (max-width: 768px) {
  .care-group h3 {
    font-size: 1.4rem;
  }

  .care-pill {
    padding: 8px 16px;
    font-size: 0.95rem;
    white-space: nowrap; /* Prevent text wrapping inside pills */
  }

  .care-pills-container {
    flex-wrap: nowrap;
    overflow: visible;
    justify-content: flex-start;
    width: max-content;
    animation: scroll-pills 15s linear infinite;
    padding: 10px 0; /* Adjust padding for scroll */
  }

  /* Fade mask for smooth entry/exit of pills */
  .care-group {
    overflow: hidden;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    -webkit-mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 1),
      rgba(0, 0, 0, 1) 85%,
      transparent
    );
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 1),
      rgba(0, 0, 0, 1) 85%,
      transparent
    );
  }
}

@keyframes scroll-pills {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(
      -50%
    ); /* Assumes duplicated or wide enough content to not break visually quickly. Adjust if needed. */
  }
}

.care-pills-container:hover {
  animation-play-state: paused !important;
}

/* =========================================
   MOBILE HAMBURGER MENU & IMPROVEMENTS
   ========================================= */

/* Hide hamburger button on desktop */
.mobile-menu-toggle {
  display: none;
}

/* Mobile-specific overrides */
@media (max-width: 768px) {
  /* Hamburger Toggle Button */
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 10001;
    position: relative;
    margin-right: 15px !important; /* adjusted to be closer to edge */
  }

  .mobile-menu-toggle span {
    width: 100%;
    height: 4px;
    background: var(--title-color);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-origin: center;
  }

  /* Hamburger Animation to X */
  body.mobile-nav-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  body.mobile-nav-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
  }

  body.mobile-nav-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Override existing header mobile styles */
  header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 15px 0 !important; /* removed excess padding */
    padding-top: max(
      15px,
      env(safe-area-inset-top)
    ) !important; /* Safe area for notch */
  }

  /* Override body padding */
  body {
    padding-top: 80px !important;
  }

  /* Mobile Navigation Drawer */
  nav {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 85% !important;
    max-width: 350px !important;
    height: 100vh !important;
    background: #ede8d0 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important;
    transition: right 0.4s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 80px 0 40px 0 !important;
    pointer-events: none !important;
  }

  /* Open state */
  body.mobile-nav-open nav {
    right: 0 !important;
    pointer-events: auto !important;
  }

  /* Nav overlay */
  body.mobile-nav-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
  }

  /* Prevent body scroll when menu is open */
  body.mobile-nav-open {
    overflow: hidden;
  }

  nav ul {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 20px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  nav ul li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: auto !important;
    position: relative;
    z-index: 10000;
  }

  nav ul li.nav-cta-item {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  nav a {
    font-size: 0.95rem !important;
    letter-spacing: 0.8px !important;
    color: var(--text-color) !important;
    text-shadow: none !important;
    font-weight: 500 !important;
    padding: 18px 0 !important;
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10000 !important;
    text-align: left !important;
  }

  /* Dropdown trigger in mobile */
  nav ul li.has-dropdown > a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  nav ul li.has-dropdown > a::after {
    content: "▾" !important;
    font-size: 14px !important;
    transition: transform 0.3s ease !important;
  }

  nav ul li.has-dropdown.active > a::after {
    transform: rotate(180deg) !important;
  }

  /* Reset desktop dropdown fixed widths */
  .dropdown-simple-list,
  .dropdown-menu.dropdown-menu-auto.dropdown-columns-enabled
    .dropdown-simple-list,
  .dropdown-menu.dropdown-menu-auto.dropdown-columns-enabled
    .dropdown-simple-list:has(li:nth-child(15)) {
    min-width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    column-count: 1 !important; /* Force vertical list on mobile */
    display: flex !important;
    flex-direction: column !important;
  }

  .dropdown-simple-list a {
    color: #ffffff !important;
    white-space: normal !important;
    padding: 12px 15px !important;
    font-size: 0.9rem !important;
    text-shadow: none !important;
  }

  /* Dropdown in mobile - accordion style */
  nav ul li.has-dropdown .dropdown-menu {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    min-width: 100% !important;
    width: 100% !important;
    background: #7a7a56 !important;
    border: none !important;
    margin-top: 0 !important;
    max-height: 0 !important;
    overflow: auto !important;
    transition:
      max-height 0.4s ease,
      padding 0.3s ease !important;
    pointer-events: all !important;
    display: block !important;
  }

  nav ul li.has-dropdown.active .dropdown-menu {
    max-height: 2000px !important;
    padding: 15px 0 15px 0 !important; /* removed left padding to better align with parent */
  }

  /* ==========================================
     HORIZONTAL SCROLL SECTIONS (Reduce Scroll Length)
     ========================================== */

  /* Services Grid - Horizontal Scroll */
  /* Services Grid - ABSOLUTE CENTER */
  .services-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    padding: 0 20px !important;
    margin: 30px auto 0 auto !important;
    width: 100% !important;
    max-width: 360px !important;
    box-sizing: border-box !important;
  }

  .services-grid .flip-card {
    flex: none !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .services-grid .flip-card-inner {
    height: auto !important;
    min-height: 280px !important;
  }

  /* Center card content on mobile */
  .service-card,
  .flip-card-front,
  .flip-card-back {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .service-card h3,
  .flip-card-front h3,
  .flip-card-back h3 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .card-icon {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Why Features Grid - mobile */
  .why-features-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 20px !important;
    margin: 30px auto 0 auto !important;
    width: 100% !important;
    max-width: 360px !important;
    box-sizing: border-box !important;
  }

  /* Hide scrollbar but keep functionality */
  .services-grid::-webkit-scrollbar {
    display: none;
  }

  /* Reduce section padding to minimize scroll */
  .services-section,
  .why-carewell-section,
  .comparison-section,
  .careers-section,
  .conditions-section {
    padding: 60px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* Ensure containers are centered */
  .services-section .container,
  .why-carewell-section .container,
  .comparison-section .container,
  .conditions-section .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .hero {
    min-height: 80vh !important;
    padding: 40px 20px !important;
  }

  /* Dialog backdrop styling */
  dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
  }
}

/* =========================================
   MOBILE UI FIXES - USER FEEDBACK
   ========================================= */

@media (max-width: 768px) {
  /* Fix 1: Remove white background from header - DEPRECATED via user request */
  /* header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
  } */

  /* Fix 2: Fix hamburger menu icon being cut off */
  .mobile-menu-toggle {
    margin-right: 0 !important;
  }

  .header-wrapper {
    padding: 0 !important;
    overflow: visible !important;
  }

  .header-wrapper .container {
    padding: 0 15px !important; /* neat single padding layer */
  }

  /* Fix 3: Center hero buttons properly - SIDE BY SIDE */
  .hero-btns {
    display: flex !important;
    flex-direction: row !important; /* Changed from column to row */
    flex-wrap: wrap !important; /* Allow wrapping if needed */
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 10px !important;
    gap: 12px !important;
  }

  /* Fix for CTA buttons in inner pages */
  .cta-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 20px !important;
    gap: 15px !important;
  }

  .cta-buttons .btn {
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    margin-left: 0 !important; /* Override potential inline styles */
    margin-right: 0 !important;
    padding: 14px 10px !important;
    box-sizing: border-box !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.5px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  .hero-btns .btn {
    width: 100% !important;
    max-width: 320px !important; /* Reduced max-width for better fit */
    min-width: unset !important; /* Removed fixed min-width to prevent cutoff */
    text-align: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 14px 10px !important; /* reduce horizontal padding slightly */
    box-sizing: border-box !important;
    font-size: 0.72rem !important; /* Slightly smaller font to guarantee fit */
    letter-spacing: 0.5px !important; /* Slightly tighter tracking */
    white-space: normal !important; /* Allow wrapping if absolutely needed */
    line-height: 1.2 !important;
  }

  /* Fix 4: Make "Types of Care" pills horizontal marquee scroll */
  .care-pills-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    overflow-x: visible !important;
    padding: 24px 0 !important;
    gap: 12px !important;
    width: max-content !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    align-items: center !important;
    animation: scroll-pills 45s linear infinite !important;

    /* Fade Effect for Scroll Indication */
    mask-image: linear-gradient(to right, black, black 90%, transparent);
    -webkit-mask-image: linear-gradient(
      to right,
      black,
      black 90%,
      transparent
    );
  }

  .care-pills-container:hover {
    animation-play-state: paused !important;
  }

  .care-pills-container::-webkit-scrollbar {
    display: none !important;
  }

  .care-pill {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    width: auto !important; /* Allow pills to size naturally */
    max-width: none !important;
    justify-content: center !important;
    min-width: unset !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    padding: 12px 28px !important; /* Restore original padding */
    border-width: 1px !important; /* Restore original border */
    border-radius: 50px !important; /* Restore original border-radius */
    background: #fff !important; /* Restore original background */
    color: var(--text-color) !important; /* Restore original color */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02) !important; /* Restore original shadow */
  }

  .pill-dot {
    margin-right: 12px !important; /* Proper spacing */
    margin-left: 0 !important;
    flex-shrink: 0 !important;
    display: block !important; /* Ensure dot is visible */
  }

  /* Fix 5: Prevent service cards from being cut off */
  .services-grid .flip-card {
    margin: 0 auto !important;
  }

  .services-grid {
    padding: 20px 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Ensure container doesn't clip content */
  .container {
    overflow: visible !important;
  }

  .services-section,
  .why-carewell-section,
  .conditions-section {
    overflow: visible !important;
  }
}

/* Fix 6: Move UserWay accessibility widget to bottom LEFT */
#userwayAccessibilityIcon {
  bottom: 20px !important;
  left: 20px !important;
  top: auto !important;
  right: auto !important;
  background-color: #94946a !important;
}

/* Alternative selector for UserWay widget */
[data-uw-rm-sr],
.uwy,
#userway-s1,
.userway_buttons_wrapper {
  bottom: 20px !important;
  left: 20px !important;
  top: auto !important;
  right: auto !important;
}

/* Mobile specific - ensure UserWay is in bottom LEFT */
@media (max-width: 768px) {
  #userwayAccessibilityIcon,
  [data-uw-rm-sr],
  .uwy,
  #userway-s1,
  .userway_buttons_wrapper {
    bottom: 20px !important;
    left: 20px !important;
    top: auto !important;
    right: auto !important;
  }
}

/* =========================================
   ULTIMATE MOBILE CARD CENTERING FIX
   ========================================= */
@media (max-width: 768px) {
  /* Base reset for all centering */
  * {
    box-sizing: border-box !important;
  }

  /* Reset all parent containers */
  #services.services-section,
  #about.why-carewell-section {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 60px 20px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #services.services-section > .container,
  #about.why-carewell-section > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  /* Services Grid - Force Perfect Center */
  #services .services-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 30px 0 0 0 !important;
    padding: 0 !important;
    left: unset !important;
    right: unset !important;
    transform: none !important;
    position: static !important;
    box-sizing: border-box !important;
  }

  /* Why Features Grid - Force Perfect Center */
  #about .why-features-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 30px 0 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Individual Cards - Perfect Center */
  #services .services-grid .flip-card,
  #services .services-grid > a {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 20px 0 !important;
    left: unset !important;
    right: unset !important;
    transform: none !important;
    position: static !important;
    box-sizing: border-box !important;
  }

  #about .why-features-grid .why-feature-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 0 0 !important;
    box-sizing: border-box !important;
  }

  /* Flip Card Inner Sizing */
  .flip-card-inner {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Flip Card Front */
  .flip-card-front {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
/* =========================================
   POPUP FIXES
   ========================================= */
#care-popup .care-pills-container {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important; /* Ensure no wrapping */
  align-items: stretch !important;
  gap: 0 !important;
  padding: 10px 0 !important;
  max-width: 100% !important;
  width: 100% !important; /* Force full width */
  column-count: 1 !important; /* Override any column-count */
  columns: 1 !important;
}

#care-popup .care-pill {
  width: 100% !important;
  border: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 15px 20px !important;
  justify-content: flex-start !important;
  box-shadow: none !important;
  background: transparent !important;
  text-align: left !important;
  font-weight: 500 !important;
  color: var(--text-color) !important;
}

#care-popup .care-pill:hover {
  background-color: rgba(148, 148, 106, 0.08) !important;
  transform: none !important;
  color: var(--title-color) !important;
}

#care-popup .pill-dot {
  display: none !important; /* Hide dot for list view if desired, or keep it */
}

/* =========================================
   HEADER SCROLL STATE
   ========================================= */
.header-wrapper.scrolled {
  background: transparent !important;
  box-shadow: none !important;
}

.header-wrapper.scrolled header {
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}

header {
  transition: all 0.3s ease;
}

/* =========================================
   MOBILE HEADER IMPROVEMENTS (Sticky White + Logo 3)
   ========================================= */
@media (max-width: 768px) {
  /* Enforce sticky white header on mobile */
  .header-wrapper {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
    padding: 0 !important;
    z-index: 999999 !important;
  }

  /* Ensure inner container doesn't block background */
  .header-wrapper .container {
    background: transparent !important;
  }

  header {
    background: #ffffff !important; /* Double safety */
    padding: 15px 20px !important;
    width: 100% !important;
  }

  /* Force Dark Logo (Logo 3) on Mobile */
  .logo-light {
    display: none !important;
  }

  .logo-dark {
    display: block !important;
    opacity: 1 !important;
    height: 48px !important; /* Proper sizing for mobile */
    width: auto !important;
    visibility: visible !important;
  }

  /* Ensure Hamburger Menu is Visible (Olive Color) */
  .mobile-menu-toggle span {
    background-color: var(--title-color) !important;
  }

  /* Adjust Hero Padding so content isn't hidden behind fixed header */
  .hero {
    padding-top: 100px !important;
  }

  /* Ensure logo container doesn't overflow */
  .logo,
  .logo a {
    display: block;
    height: 48px;
    overflow: visible;
  }
}

/* --- New Subpage Layout Styles --- */

/* Split Text/Image Layout */
/* Split Text/Image Layout (Float for Text Wrapping) */
.content-split {
  display: block;
  padding: 40px 0;
}

.content-split::after {
  content: "";
  display: table;
  clear: both;
}

.content-split.reverse .content-image {
  float: left;
  margin-left: 0;
  margin-right: 40px;
}

.content-text {
  display: block;
}

.content-text h2 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  color: var(--title-color);
  line-height: 1.2;
}

.content-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
  margin-bottom: 20px;
}

.content-image {
  float: right;
  width: 45%;
  margin-left: 40px;
  margin-bottom: 20px;
}

/* Features Section (Condition Pages) */
.features-section {
  padding: 60px 0;
  background: transparent;
}

.features-section h2 {
  text-align: left;
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--title-color);
}

.content-image img {
  width: 100%;
  height: auto;
  border-radius: 24px; /* Rounded / Pill-like aesthetic */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  object-fit: cover;
  display: block;
}

/* Feature Box (The CareWell Difference) */
.dark-feature-section {
  background: var(--bg-color); /* Cream background */
  color: var(--title-color);
  padding: 20px 0;
  position: relative;
  overflow: visible; /* Allow flip cards to overflow */
}

.dark-feature-section h2 {
  color: var(--title-color);
  text-align: center;
  margin-bottom: 30px;
  font-size: 3.5rem;
}

.dark-feature-section .section-subtitle {
  color: var(--text-color);
  text-align: center;
  margin-bottom: 20px;
  display: block;
}

/* Flip Cards Grid */
.flip-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Default State: Front Drives Height */
/* Default State: Front Drives Height */
.flip-card {
  perspective: 1000px;
  height: 450px; /* Fixed height for uniform desktop look */
  cursor: pointer;
  z-index: 1;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

/* Front Face: Unified height */
.flip-card-front {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  z-index: 2;
  border-radius: 20px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 148, 106, 0.15);
}

/* Back Face: Unified height with scroll for long text */
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 40px 25px 30px 25px; /* More top padding, comfortable bottom */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Ensure long text starts at the top */
  box-sizing: border-box;
  background: #fdfdf5;
  border: 1px solid rgba(148, 148, 106, 0.2);
  transform: rotateY(180deg);
  overflow-y: auto; /* Allow scrolling if text is too long for the 450px card */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.flip-card-back p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-color);
  margin: 0;
}

/* HOVER STATE (Desktop) */
.flip-card:hover {
  z-index: 10; /* Bring to front on hover so overlay shows */
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-number {
  font-family: var(--font-heading);
  font-size: 3rem; /* Reduced from 4rem */
  color: rgba(148, 148, 106, 0.2);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
}

.flip-card-front h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem; /* Reduced from 1.5rem */
  color: var(--title-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.flip-card-front p {
  font-size: 0.85rem; /* Reduced from 0.95rem */
  line-height: 1.5;
  color: var(--text-color);
  margin: 0;
}

@media (max-width: 900px) {
  .flip-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Mobile: Restore Push Behavior (Accordion) */
  /* On mobile, we WANT the card to expand and push content down */

  .flip-card.mobile-flipped .flip-card-inner {
    transform: rotateY(180deg);
  }

  /* When flipped on mobile, Front becomes absolute */
  .flip-card.mobile-flipped .flip-card-front {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
  }

  /* When flipped on mobile, Back becomes relative to drive height */
  .flip-card.mobile-flipped .flip-card-back {
    position: relative;
    height: auto;
    min-height: 380px;
    box-shadow: none; /* No shadow needed for push */
  }

  /* Disable hover effects on mobile */
  .flip-card:hover .flip-card-inner {
    transform: none;
  }

  .flip-card.mobile-flipped:hover .flip-card-inner {
    transform: rotateY(180deg);
  }
}

/* Meta Description Banner */
.meta-description-banner {
  background: var(--bg-color);
  padding: 20px 0;
  border-bottom: 1px solid rgba(148, 148, 106, 0.15);
}

.meta-description-banner p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-color);
  text-align: center;
  margin: 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* Why Choose CareWell Content Section */
.why-choose-carewell-section {
  padding: 30px 0;
  background: var(--bg-color);
}

.why-choose-carewell-section h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--title-color);
  margin-bottom: 40px;
}

.why-choose-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 25px;
  text-align: left;
}

.why-choose-content p:last-child {
  margin-bottom: 0;
}

/* Legacy feature items (kept for compatibility) */
.dark-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.dark-feature-item {
  background: rgba(255, 255, 255, 0.6);
  padding: 60px;
  border-radius: 20px;
  border: 1px solid rgba(148, 148, 106, 0.15);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.dark-feature-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.8);
}

.dark-feature-item svg {
  stroke: var(--title-color);
  margin-bottom: 20px;
  display: block;
  width: 56px;
  height: 56px;
}

.dark-feature-item h4 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--title-color);
  font-weight: 600;
}

.dark-feature-item p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-color);
  margin: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .content-split,
  .content-split.reverse {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 50px 0;
  }

  .content-image {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    margin-bottom: 30px !important;
  }

  .content-image img {
    max-height: 400px;
  }
}

/* 
================================================================================
   ABOUT US PAGE HEADER
   Remove background on scroll to keep video/image visible
================================================================================ 
*/
.header-wrapper.about-header,
.header-wrapper.about-header.scrolled {
  background: transparent !important;
  box-shadow: none !important;
}

/* Force light text color even when scrolled */
.header-wrapper.about-header.scrolled nav a {
  color: #ffffff !important;
}

.header-wrapper.about-header.scrolled nav a:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* 
================================================================================
   ACCESSIBILITY PAGE HEADER
   Green background as requested
================================================================================ 
*/
/* 
================================================================================
   ACCESSIBILITY PAGE HEADER
   Standard Beige Background + Green Text + Dark Logo
================================================================================ 
*/
.header-wrapper.accessibility-header {
  background-color: var(--title-color) !important; /* Sage Green */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* White Text for Accessibility Header */
.header-wrapper.accessibility-header nav a {
  color: #ffffff !important;
}

.header-wrapper.accessibility-header .mobile-menu-toggle span {
  background-color: #ffffff !important;
}

/* Force Light Logo (Logo 2) */
.header-wrapper.accessibility-header .logo-light {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.header-wrapper.accessibility-header .logo-dark {
  display: none !important;
  opacity: 0 !important;
}

/* Fix CTA Button Text Color on Accessibility Page */
.header-wrapper.accessibility-header .nav-cta-btn {
  color: var(--title-color) !important; /* Sage Green */
  background-color: #ffffff !important; /* White background for contrast */
}

/* If button is outlined, ensure text is visible */
.header-wrapper.accessibility-header .nav-cta-btn.outline {
  color: var(--text-color) !important;
  border-color: var(--text-color) !important;
}

.header-wrapper.about-header.scrolled .mobile-menu-toggle span {
  background-color: #ffffff !important;
}

/* Ensure Light Logo Stays Visible */
.header-wrapper.about-header.scrolled .logo-light {
  display: block !important;
  opacity: 1 !important;
}

.header-wrapper.about-header.scrolled .logo-dark {
  display: none !important;
  opacity: 0 !important;
}

/* 
================================================================================
   CHAT FORM STYLES
================================================================================ 
*/
.chat-form-container {
  padding: 10px;
}

.chat-form-container p {
  font-size: 0.9rem;
  margin-bottom: 15px;
  color: #555;
  text-align: center;
}

#carewell-chat-form input,
#carewell-chat-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  box-sizing: border-box;
}

#carewell-chat-form textarea {
  resize: vertical;
}

.chat-submit-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.chat-submit-btn:hover {
  background-color: #7a7a58; /* Darker green */
}

.chat-submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Success View */
.chat-success-message {
  text-align: center;
  padding: 20px;
}

.chat-success-message .success-icon {
  margin-bottom: 15px;
}

.chat-success-message h3 {
  color: var(--title-color);
  margin-bottom: 10px;
}

.chat-success-message p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 20px;
}

/* Mobile Visibility Fixes & Interaction Hints */
@media (max-width: 768px) {
  /* Force all animated elements to be visible on mobile to prevent JS issues */
  .anim-reveal,
  .anim-card,
  .split-line,
  .split-word {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* Add Swipe Hint for Care Pills */
  .care-group {
    position: relative;
    padding-bottom: 25px; /* Space for the hint */
  }

  .care-group::after {
    content: "Swipe to view details →";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--title-color);
    opacity: 0.6;
    font-style: italic;
    pointer-events: none;
    animation: fadePulse 2s infinite;
  }
}

@keyframes fadePulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

/* --- Desktop Fixes --- */

/* Reduce gap between "Care & Conditions" title and subtitle */
.conditions-section h2 {
  margin-bottom: 10px !important;
}

/* --- Staggered Title Removed --- */
/*
.feature-title-stagger {
  display: block;
  text-align: left;
  line-height: 1.1;
  width: fit-content;
  margin: 0 auto 30px;
}

.feature-title-stagger span {
  display: block;
  font-family: var(--font-heading);
}

.feature-title-stagger .indent-1 {
  margin-left: 1.5em;
}

.feature-title-stagger .indent-2 {
  margin-left: 3em;
}
*/

/* Force visibility for all reveal elements (Fixes missing titles on web/mobile) */
.anim-reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Fix for unresponsive chat close button on desktop header */
.chat-window,
.chat-popup {
  z-index: 100000 !important;
}

/* =========================================
   EMAIL LEAD CAPTURE SECTION
   ========================================= */
.lead-capture-section {
  background-color: var(--title-color);
  color: #fff;
  padding: 60px 0;
  margin-top: 0; /* Removed margin to connect with section above */
  text-align: center;
}

.lead-capture-content {
  max-width: 800px;
  margin: 0 auto;
}

.lead-capture-text h2 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.lead-capture-text p {
  font-size: 1.15rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.lead-capture-form {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.lead-capture-form input[type="email"] {
  flex: 1;
  min-width: 250px;
  padding: 15px 25px;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
}

.lead-capture-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.lead-capture-form input[type="email"]:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.lead-capture-form .btn-subscribe {
  background-color: #fff;
  color: var(--title-color);
  border: none;
  padding: 15px 35px;
  font-size: 1rem;
}

.lead-capture-form .btn-subscribe:hover {
  background-color: var(--bg-color);
  color: var(--title-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .lead-capture-section {
    padding: 40px 0;
    margin-top: 0; /* Removed margin */
  }

  .lead-capture-text h2 {
    font-size: 2rem;
  }

  .lead-capture-form {
    flex-direction: column;
    gap: 15px;
  }

  .lead-capture-form input[type="email"],
  .lead-capture-form .btn-subscribe {
    width: 100%;
  }
}

/* =========================================
   EMAIL LEAD CAPTURE POPUP
   ========================================= */
.lead-capture-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999; /* Below chat header (100000) but above everything else */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.lead-capture-popup.active {
  opacity: 1;
  visibility: visible;
}

.lead-capture-popup-content {
  background: var(--bg-color);
  width: 90%;
  max-width: 800px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lead-capture-popup.active .lead-capture-popup-content {
  transform: translateY(0) scale(1);
}

.popup-close-x {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  color: var(--title-color);
  transition: all 0.3s ease;
}

.popup-close-x:hover {
  background: var(--title-color);
  color: #fff;
  transform: rotate(90deg);
}

.popup-image {
  flex: 1;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  min-height: 250px;
}

.popup-image img {
  max-width: 80%;
  height: auto;
  object-fit: contain;
}

.popup-text {
  flex: 1.5;
  padding: 50px 40px;
  background: var(--title-color);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popup-text h2 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 15px;
  line-height: 1.2;
}

.popup-text p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.6;
}

.popup-lead-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.popup-lead-form input[type="email"] {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.popup-lead-form input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.popup-lead-form input[type="email"]:focus {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.popup-lead-form .btn-subscribe {
  background: #fff;
  color: var(--title-color);
  width: 100%;
  border-radius: 50px;
  padding: 16px;
  font-weight: 700;
  border: none;
  font-size: 1.05rem;
}

.popup-lead-form .btn-subscribe:hover {
  background: var(--bg-color);
  transform: translateY(-2px);
}

.popup-disclaimer {
  font-size: 0.8rem !important;
  opacity: 0.6 !important;
  margin-top: 15px;
  margin-bottom: 0 !important;
  text-align: center;
}

@media (max-width: 768px) {
  .lead-capture-popup-content {
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
  }

  .popup-image {
    min-height: 150px;
    padding: 30px;
  }

  .popup-image img {
    max-width: 60%;
  }

  .popup-text {
    padding: 40px 30px;
  }

  .popup-text h2 {
    font-size: 1.8rem;
  }

  .popup-close-x {
    background: rgba(0, 0, 0, 0.1);
    top: 10px;
    right: 10px;
  }
}

/*
================================================================================
   RESOURCES PAGES
================================================================================
*/
.resources-hub-page,
.resource-single-page {
  background: transparent;
}

.resources-kicker {
  margin-bottom: 16px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.resources-hero .hero-content,
.resource-single-hero .hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.resource-hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 0.75rem;
}

.resource-library-section {
  padding: 80px 0 100px;
  background: linear-gradient(
    180deg,
    rgba(237, 232, 208, 0.95) 0%,
    #e9e4ca 100%
  );
}

.resource-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.resource-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(148, 148, 106, 0.12);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.resource-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.12);
}

.resource-card-image-wrap {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.resource-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.resource-card:hover .resource-card-image {
  transform: scale(1.04);
}

.resource-card-body {
  padding: 24px;
}

.resource-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(108, 108, 74, 0.8);
}

.resource-card-body h3 {
  font-size: 1.32rem;
  line-height: 1.35;
  margin-bottom: 10px;
}

.resource-card-body h3 a:hover {
  color: #6c6c4a;
}

.resource-card-body p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #5e5e42;
}

.resource-read-link {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--title-color);
}

.resource-single-content {
  padding: 60px 0 100px;
  background: linear-gradient(
    180deg,
    rgba(237, 232, 208, 0.95) 0%,
    #e9e4ca 100%
  );
}

.resource-single-layout {
  max-width: 920px;
}

.resource-feature-image-wrap {
  margin-bottom: 28px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}

.resource-feature-image {
  display: block;
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.resource-article-content {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 44px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(148, 148, 106, 0.15);
}

.resource-article-content h2 {
  margin-top: 0;
  font-size: 2.2rem;
  line-height: 1.25;
}

.resource-article-content h3 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 1.5rem;
  line-height: 1.35;
}

.resource-article-content p {
  font-size: 1.03rem;
  line-height: 1.88;
  color: #4f4f38;
}

.resource-article-content ul {
  margin: 14px 0 18px 20px;
}

.resource-article-content li {
  margin-bottom: 10px;
  line-height: 1.78;
  color: #4f4f38;
}

.resource-article-content hr {
  border: 0;
  border-top: 1px solid rgba(148, 148, 106, 0.35);
  margin: 28px 0;
}

.resource-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 26px;
  font-size: 0.95rem;
}

.resource-compare-table th,
.resource-compare-table td {
  border: 1px solid rgba(148, 148, 106, 0.35);
  padding: 12px;
  vertical-align: top;
  text-align: left;
}

.resource-compare-table th {
  background: rgba(148, 148, 106, 0.12);
  color: #3f3f2d;
  font-weight: 600;
}

.resource-single-cta {
  margin-top: 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  padding: 36px 26px;
  border: 1px solid rgba(148, 148, 106, 0.18);
}

.resource-single-cta h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.resource-single-cta p {
  max-width: 620px;
  margin: 0 auto 20px;
}

@media (max-width: 980px) {
  .resource-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .resource-article-content {
    padding: 34px 28px;
  }

  .resource-article-content h2 {
    font-size: 1.95rem;
  }

  .resource-feature-image {
    height: 340px;
  }
}

@media (max-width: 768px) {
  .resource-library-section,
  .resource-single-content {
    padding: 55px 0 70px;
  }

  .resource-card-body {
    padding: 20px;
  }

  .resource-card-body h3 {
    font-size: 1.2rem;
  }

  .resource-article-content {
    padding: 26px 20px;
  }

  .resource-article-content h2 {
    font-size: 1.65rem;
  }

  .resource-article-content h3 {
    font-size: 1.28rem;
  }

  .resource-feature-image {
    height: 280px;
  }

  .resource-hero-meta {
    flex-wrap: wrap;
    gap: 6px;
  }

  .resource-compare-table {
    font-size: 0.9rem;
  }

  .resource-compare-table th,
  .resource-compare-table td {
    padding: 10px;
  }
}
