:root {
  --primary: #393562;
  --accent: #25d366;
  --light: #fcfcfc;
  --dark: #232334;
  --text: #3a3742;
  --gray: #9190a9;
  --white: #ffffff;
  --light-gray: #f7f6f2;
  --bg-color: #f5fffc;
  --black: #000;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --navbar-height: 80px;
  --hero-height: 95vh;
  --container-width: 100%;
  --container-max-width: 1450px;
  --yellow: #fffdb2;
  --purple: #e8e1f9;
  --pink: #ffe1f3;
  --blue: #e5f0ff;
  --new-gray: #f4f4f4;
  --text-dark: #252532;
  --text-mid: #44495a;
  --creme: #fef7ed;
  --new-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.07);
  --section-pad: 36px;
  --tab-height: 54px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif; /* A modern, sleek font */
}

body {
  background-color: var(--bg-color);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

.main-container {
  width: 100%;
  background-color: var(--bg-color);
  position: relative;
}

a {
  text-decoration: none;
}

.second-container {
  background-color: var(--creme);
  width: 1450px;
  padding: 90px;
  margin: auto;
}

@media (max-width: 767px) {
  body {
    font-size: 80%; /* Slightly smaller base font size on mobile */
  }

  .second-container {
    padding: clamp(1rem, 4vw, 2rem); /* Reduced padding for smaller screens */
    width: 90%; /* Take up more of the screen width */
  }
}

/* Navbar Layout */
.navbar {
    background-color: var(--bg-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: var(--subtle-shadow);
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Desktop Navigation and Buttons (Default View) */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 6px;
    display: inline-block;
}
.nav-links a:hover {
    color: var(--primary);
    text-decoration: none;
}
.nav-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}
.btn-primary-a {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
    background: #25d366;
    color: var(--dark);
    text-decoration: none;
}
.btn-primary-a:hover {
    background: #80e9a6;
    transform: translateY(-2px);
    color: var(--dark);
}
.btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid var(--new-gray);
    font-size: 14px;
    background: transparent;
    color: var(--text);
}
.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Mega Menu Base Styles (unchanged) */
.dropdown {
    position: relative;
}
.mega-menu,
.account-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--new-shadow);
    border: 1px solid var(--new-gray);
    z-index: 2000;
    box-sizing: border-box;
    padding: 30px 30px 20px 30px;
    min-width: 250px;
}
.dropdown:hover > .mega-menu,
.account-link:hover > .account-dropdown,
.account-dropdown:hover {
    display: block;
}

/* Mega menu columns */
.mega-col {
    min-width: 180px;
    max-width: 340px;
    padding-right: 16px;
}
.mega-title {
    font-size: 15px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 5px;
}
.mega-col ul {
    list-style: none;
    padding: 0;
    margin-bottom: 7px;
}
.mega-col ul li {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 400;
    line-height: 1.4;
}
.mega-col ul li a {
    text-decoration: none;
    color: var(--text);
    display: block;
    padding: 2px 0;
}
.mega-col ul li a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* OUR THERAPIES MEGA MENU TWO-ROW GRID */
.our-therapies-mega-menu {
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    max-width: 96vw;
    padding: 32px 32px 18px 32px;
    background: var(--white, #fff);
}
.therapy-mega-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 26px 20px;
}
.therapy-mega-card {
    background: var(--light-gray, #f5f5f7);
    border-radius: 14px;
    padding: 18px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light, 0 1px 4px rgba(20, 20, 38, 0.04));
    align-items: flex-start;
    min-height: 110px;
    transition: box-shadow 0.15s;
}
.therapy-mega-card:hover {
    box-shadow: 0 6px 24px rgba(20, 20, 38, 0.13);
}
.therapy-mega-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 7px;
}
.therapy-mega-desc {
    font-size: 13px;
    color: var(--text, #232324);
    opacity: 0.77;
    margin-bottom: 9px;
    line-height: 1.5;
}
.therapy-mega-learn {
    font-size: 13px;
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
    margin-top: auto;
    margin-bottom: 0;
}
.therapy-mega-learn:hover {
    color: var(--accent, #ffcb31);
}

/* Hide default arrow in summary tag if accidentally used */
summary::-webkit-details-marker {
    display: none;
}

/* --- */

/* MOBILE MENU STYLES */
/* Start by hiding mobile elements by default */

/* FIX: Visually hide the checkbox but keep it clickable via the label */
#menu-toggle {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Hide mobile menu elements by default */
.hamburger-menu,
.close-btn {
    display: none;
}
.mobile-menu {
    display: none;
}

/* Media Query for devices smaller than 1024px (Tablets & Phones) */
@media (max-width: 1024px) {
    /* Hide the desktop navigation on small screens */
    .nav-links,
    .nav-buttons {
        display: none;
    }

    /* Show the hamburger menu icon */
    .hamburger-menu {
        display: block;
        cursor: pointer;
        z-index: 1001;
        position: relative; /* Ensure it's above the navbar */
        width: 30px;
        height: 25px;
    }
    .hamburger-menu .bar {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--text);
        margin-bottom: 6px;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    .hamburger-menu .bar:last-child {
        margin-bottom: 0;
    }

    /* Mobile Sidebar Menu */
    .mobile-menu {
        display: flex; 
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: min(85vw, 350px); /* Responsive width, no wider than 350px */
        height: 100vh;
        background-color: var(--white);
        box-shadow: var(--shadow);
        z-index: 1002;
        transition: right 0.4s ease-in-out;
        overflow-y: auto; /* Enable scrolling for long menus */
        padding: 60px 25px 30px;
    }

    .mobile-menu > a,
    .mobile-dropdown summary {
        color: var(--text-dark);
        font-weight: 500;
        padding: 15px 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--new-gray);
        cursor: pointer;
    }

    /* Styles for the mobile dropdowns */
    .mobile-dropdown {
        border-bottom: 1px solid var(--new-gray);
    }
    .mobile-dropdown ul {
        list-style: none;
        padding-left: 15px;
        padding-bottom: 15px;
    }
    .mobile-dropdown li a {
        display: block;
        padding: 8px 0;
        font-size: 0.95rem;
        color: var(--text-mid);
    }
    .mobile-dropdown ul li a:hover {
        color: var(--primary);
    }

    /* Styles for the close button */
    .close-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
        color: var(--gray);
        cursor: pointer;
        line-height: 1;
        font-weight: 300;
    }

    /* Mobile buttons */
    .mobile-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: auto;
        padding-top: 20px;
    }
    .mobile-buttons .btn-primary-a {
        padding: 12px 20px;
        text-align: center;
        font-size: 1rem;
    }
    .mobile-buttons .btn {
        padding: 12px 20px;
        text-align: center;
        font-size: 1rem;
    }

    /* ANIMATION EFFECT: CHECKBOX TOGGLE - THIS NOW WORKS! */
    /* When the checkbox is checked, slide the menu in */
    #menu-toggle:checked ~ .mobile-menu {
        right: 0;
    }
    /* Rotate bars to form a cross when menu is open */
    /* Use the general sibling selector (~) since the input is now before the label */
    #menu-toggle:checked ~ .hamburger-menu .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    #menu-toggle:checked ~ .hamburger-menu .bar:nth-child(2) {
        opacity: 0;
    }
    #menu-toggle:checked ~ .hamburger-menu .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}




/* Footer */
footer {
  background: var(--bg-color);
  color: var(--black);
  /* Fluid padding to ensure optimal space on all devices */
  padding: clamp(30px, 6vw, 80px) 5% clamp(20px, 4vw, 50px);
  position: relative;
  z-index: 1000;
}

.footer-content {
  /* Main grid layout for desktop */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
  margin-bottom: 60px;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/* Fix for logo rendering */
.footer-brand .footer-logo {
  height: auto;
  width: 100%;
  max-width: 150px;
  margin-bottom: 12px;
}
.footer-brand .footer-description {
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 20px;
}
.social-links {
  display: flex;
  gap: 15px;
}
.social-links img {
  height: 24px;
  width: 24px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.social-links a:hover img {
  opacity: 1;
}

.footer-column h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--black);
  font-weight: 600;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--dark);
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition);
  font-weight: 400;
}

.footer-links a:hover {
  opacity: 1;
  color: #007936;
}

.footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
  max-width: var(--container-max-width);
  margin: 0 auto;
  font-weight: 400;
}

/* For Tablets (up to 1024px) */
@media (max-width: 1024px) {
  .footer-content {
    /* This creates a 2-column grid that wraps */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
  }

  /* Make the brand column span two columns for better balance */
  .footer-brand {
    grid-column: span 2;
  }
}

/* For Mobile Devices (up to 768px) */
@media (max-width: 768px) {
  .footer-content {
    /* Collapse to a single column */
    grid-template-columns: 1fr;
    gap: 20px; /* Reduces space between sections */
    margin-bottom: 40px;
  }

  .footer-brand {
    grid-column: span 1; /* Reset column span for mobile */
  }

  /* Remove bottom margin/padding and border from the last item */
  .footer-column:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }

  /* Add a clean separator between the mobile columns */
  .footer-column:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 20px;
  }
}

/* visit us and functional pillar */

/* functional pillar Section Styling */
.heal-in-pillars-section {
  padding: 80px 60px;
  background: var(--white);
  /* border-radius: 20px; */
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Animation class added by JavaScript */
.heal-in-pillars-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.heal-in-pillars-header {
  /* max-width: 1200px; */
  margin: 0 auto 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  text-align: left;
}

.heal-in-pillars-header h2 {
  font-size: 2.2em;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.heal-in-pillars-header p {
  font-size: 1em;
  color: #666;
  margin: 0;
}

/* Cards Container */
.heal-in-pillars-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  /* max-width: 1200px; */
  margin: 0 auto;
}

/* Individual Card Styling */
.heal-in-pillar-card {
  background-color: #f7fcf6;
  border-radius: 16px;
  padding: 40px 25px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
}

/* Staggered animation for cards */
.heal-in-pillars-section.is-visible .heal-in-pillar-card {
  animation: card-fade-in 0.8s ease-out forwards;
}
.heal-in-pillars-section.is-visible .heal-in-pillar-card:nth-child(1) {
  animation-delay: 0.2s;
}
.heal-in-pillars-section.is-visible .heal-in-pillar-card:nth-child(2) {
  animation-delay: 0.4s;
}
.heal-in-pillars-section.is-visible .heal-in-pillar-card:nth-child(3) {
  animation-delay: 0.6s;
}
.heal-in-pillars-section.is-visible .heal-in-pillar-card:nth-child(4) {
  animation-delay: 0.8s;
}
.heal-in-pillars-section.is-visible .heal-in-pillar-card:nth-child(5) {
  animation-delay: 1s;
}

@keyframes card-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.heal-in-pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Icon Styling */
.heal-in-pillar-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.heal-in-pillar-icon-wrapper svg {
  width: 24px;
  height: 24px;
  fill: #000000;
}

/* Text Content Styling */
.heal-in-pillar-card h3 {
  font-size: 1.1em;
  font-weight: 400; /* Reduced font-weight */
  color: #333;
  margin: 0 0 10px;
}

.heal-in-pillar-card p {
  font-size: 0.9em;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

/* contact section */
.visitus-wrap {
  display: flex;
  align-items: stretch;
  background: #fff;
  box-shadow: 0 4px 36px 0 rgba(41, 92, 118, 0.1);
  overflow: hidden;
  min-height: 440px;
  opacity: 0;
  transform: translateY(60px) scale(0.97);
  transition: opacity 1s cubic-bezier(0.65, 0.1, 0.36, 1),
    transform 1.1s cubic-bezier(0.67, 0.15, 0.29, 1.03);
}
.visitus-wrap.visible {
  opacity: 1;
  transform: none;
}
.visitus-content {
  flex: 1 1 54%;
  padding: 64px 48px 60px 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(125deg, #fafdff 92%, #e2f7ed 100%);
  transition: box-shadow 0.3s;
  animation: fadeInLeft 1.3s cubic-bezier(0.67, 0.18, 0.25, 1) 0.2s both;
}
.visitus-wrap.visible .visitus-content {
  animation-play-state: running;
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.visitus-content h2 {
  font-family: "Alice", serif;
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0 0 18px 0;
  line-height: 1.15;
  color: #13382f;
  letter-spacing: -0.025em;
  -webkit-font-smoothing: antialiased;
}
.visitus-content p {
  font-size: 1.16rem;
  color: #3f585d;
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 32px;
  margin-top: 0;
  max-width: 98%;
}
.contact-list {
  list-style: none;
  margin: 0 0 32px 0;
  padding: 0;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 16px;
  font-size: 1.03rem;
  color: #255059;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.02em;
}
.contact-list li svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #18ac84;
  margin-top: 1px;
  opacity: 0.93;
  font-size: 1.1em;
}
.contact-list li a {
  color: #117c6e;
  text-decoration: underline dotted #baf7e2;
}
/* Button with arrow animation */
.visitus-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  background: linear-gradient(90deg, #1fa07c 0%, #57accb 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1.08rem;
  padding: 15px 42px 15px 28px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 22px rgba(60, 188, 190, 0.11);
  min-width: 178px;
  transition: background 0.25s, box-shadow 0.22s, transform 0.16s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.visitus-btn span {
  display: inline-block;
  transition: transform 0.23s cubic-bezier(0.83, 0.02, 0.35, 1.19);
  margin-left: 0;
}
.visitus-btn:hover,
.visitus-btn:focus {
  background: linear-gradient(90deg, #5ce2b7 0%, #5cbee7 100%);
  box-shadow: 0 8px 32px rgba(60, 188, 190, 0.18);
  transform: scale(1.03);
}
.visitus-btn:hover span,
.visitus-btn:focus span {
  transform: translateX(10px) scale(1.05);
}
/* Right image side, elegantly large */
.visitus-image {
  flex: 1 1 46%;
  min-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f7f3;
  transition: background 0.38s;
  animation: fadeInRight 1.1s cubic-bezier(0.64, 0.15, 0.38, 1) 0.35s both;
}
.visitus-wrap.visible .visitus-image {
  animation-play-state: running;
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(90px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.visitus-image img {
  max-width: 98%;
  width: 690px;
  height: 570px;
  min-height: 200px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 54px rgba(48, 170, 164, 0.13);
  border: 1.5px solid #d8efe7;
  transition: box-shadow 0.3s;
  background: #d9f4e8;
}
.visitus-image img:hover {
  box-shadow: 0 12px 44px 4px #2abaa422;
}

/*
 * =========================================
 * Responsive Styles (Optimized)
 * =========================================
 */

/* For devices with a width of 768px or less (Large phones & tablets) */
@media (max-width: 768px) {
  /* Functional Pillars Section */
  .heal-in-pillars-section {
    padding: 40px 20px;
  }
  .heal-in-pillars-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin-bottom: 20px;
  }
  .heal-in-pillars-cards {
    grid-template-columns: 1fr; /* Stack pillars vertically */
    gap: 15px;
  }
  .heal-in-pillar-card {
    padding: 30px 20px;
  }
  .heal-in-pillar-icon-wrapper {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
  }

  /* Contact Section */
  .visitus-wrap {
    flex-direction: column;
    min-height: unset;
    border-radius: 12px;
  }
  .visitus-content {
    padding: 40px 20px;
    text-align: center;
  }
  .visitus-content h2 {
    font-size: 2rem;
    text-align: center;
  }
  .visitus-content p {
    font-size: 1rem;
    text-align: center;
  }
  .contact-list {
    text-align: left;
    margin: 0 auto 20px;
  }
  .visitus-image {
    min-width: unset;
    padding: 20px;
  }
  .visitus-image img {
    width: 100%;
    height: 250px;
  }
}

/* For extra small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
  .visitus-content h2 {
    font-size: 1.8rem;
  }
  .visitus-image img {
    height: 200px;
  }
}

