html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ✅ Ensure sections don’t break layout when tilted */
section {
  box-sizing: border-box;
  max-width: 900px;
  margin: auto;
  overflow: visible;

  padding: 20px;
  background: rgba(255, 255, 255, 0.23);
  backdrop-filter: blur(15px) saturate(130%);
  -webkit-backdrop-filter: blur(15px) saturate(130%);
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.32);

  /* 3D POP EFFECT */
  transform-style: preserve-3d;
  transform: perspective(1000px) translateZ(0);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);

  margin-bottom: 30px;
  transition: 
    transform 0.4s ease,
    box-shadow 0.4s ease,
    background 0.3s ease;
  will-change: transform, opacity;
}

/* ✅ When the section scales/rotates, keep it inside the viewport */
section:hover {
  will-change: transform;
}

body { 
  font-family: Arial, sans-serif; 
  margin: 0; 
  padding: 0; 
  background: #f4f4f4; 
  color: #333; 
  transition: background 0.3s ease;
  overflow-x: hidden;
}

/* Header */ 
header { 
  background: #00796b; 
  color: white; 
  padding: 15px 20px; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
} 

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* ✅ equal left & right */
  align-items: center;
  padding: 0 10px;
} 

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start; /* left */
} 

header img { 
  max-height: 50px; 
  width: auto; 
  border-radius: 5px; 
} 

.header-text {
  text-align: center;
  justify-self: center;
}

.header-text h1 {
  margin: 0;
  font-size: 1.8em;
}

.header-text p {
  margin: 2px 0 0;
  font-size: 0.95em;
} 

/* ========================================= */
/* NEW FLOATING MENU CSS - UPDATED           */
/* ========================================= */

/* ===== Burger Base ===== */
.menu-toggle {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px; /* ✅ IMPORTANT (controls spacing) */
  cursor: pointer;
  justify-self: end;
  position: relative;
  z-index: 10001;
}

/* Lines */
.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 3px;

  transition: all 0.3s ease;
  transform-origin: center;
}

/* ===== ACTIVE STATE (Burger → X) ===== */

/* Top line */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

/* Middle line disappears */
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

/* Bottom line */
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* 3. The Teal Floating Window */
#nav-menu {
  position: fixed;
  top: 70px;
  right: 15px;
  left: auto;

  width: 150px; 
  background-color: #00796b;
  border: 1px solid #ffffff;
  border-radius: 12px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);

  padding: 15px;

  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 9999;

  /* ✅ KEY FIX START */
  max-height: calc(100vh - 90px); /* limit height based on screen */
  overflow-y: auto;               /* enable scroll inside menu */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on mobile */
  /* ✅ KEY FIX END */

  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
}

/* 4. Active State */
#nav-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0); 
}

/* Optional: Custom scrollbar for menu */
#nav-menu::-webkit-scrollbar {
  width: 4px;
}
#nav-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.4);
  border-radius: 10px;
}

/* 5. Styling the Links (White text for Teal background) */
#nav-menu a {
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  padding: 12px 15px;
  border-radius: 8px;
  color: #ffffff !important; 
  transition: background 0.2s ease;
}

#nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.15); 
}

/* ========================================= */
/* END OF FLOATING MENU CSS                  */
/* ========================================= */

@media (max-width: 700px) { 
  .header-top { 
    flex-direction: row; 
    justify-content: space-between; 
    text-align: left; 
  } 
  .menu-toggle { 
    display: flex; 
  } 
}

/* ===== Glass Effect for each Section (Enhanced with 3D Pop-up) ===== */


/* ===== SCROLL ANIMATION STYLES ===== */
.section-animate {
  opacity: 0;
  transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}
.section-animate.from-left {
  transform: translateX(-100px);
}
.section-animate.from-right {
  transform: translateX(100px);
}
.section-animate.active {
  opacity: 1;
  transform: translateX(0);
}

h1 { color: #ffffff; } 
section h2 { color: #0f6b3a; } 
footer { 
  background: #333 !important; 
  color: #ffffff !important; 
  text-align: center; 
  padding: 15px 10px; 
  width: 100%;
  box-sizing: border-box;
  display: block;
  margin-top: 30px; /* Gives some breathing room below your content */
} 

.contact-btn { 
  display: inline-block; 
  padding: 12px 22px; 
  background: #00796b; 
  color: white; 
  text-decoration: none; 
  border-radius: 6px; 
  margin-top: 10px; 
  font-weight: bold; 
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease; 
} 

.contact-btn:hover { 
  background: #00695c; 
  transform: translateY(-3px) scale(1.05); 
  box-shadow: 0 6px 15px rgba(0,0,0,0.25); 
} 

/* ===== Google Reviews Button (Refined) ===== */

/* Center container */
.reviews-btn-container {
  text-align: center;
  margin-top: 18px;
}

/* Button layout */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  padding: 12px 24px;
  /* Control the size of BOTH the text and the icon here */
  font-size: 18px; 
  font-weight: 600;

  border-radius: 8px;
  text-decoration: none;
  background: #00796b; /* Match your brand color */
  color: white;
}

/* Google icon - FIXED FOR FULL WORD LOGO */
.google-icon {
  height: 1.8em;               /* Slightly larger for prominence */
  width: auto;                
  flex-shrink: 0;             
  display: block;
  object-fit: contain;        
  
  /* Create a clean white "dock" for the logo colors to pop */
  background: white;
  padding: 4px 10px;
  border-radius: 6px;
  
  /* Adds a subtle lift and glow effect */
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0,0,0,0.2);
  
  /* Smooth transition for hover effects */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.google-btn:hover .google-icon {
  transform: scale(1.1); /* Logo grows slightly on hover */
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); /* Glow intensifies */
}

/* Better alignment on small screens */
@media (max-width: 480px) {
  .google-btn {
    gap: 10px;
    padding: 10px 20px;
    /* The icon will automatically shrink on mobile because this font-size shrinks */
    font-size: 16px; 
  }
}

button.contact-btn {
  font-size: 16px; 
  line-height: normal;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
}

.about-container { 
  display: flex; 
  flex-wrap: wrap; 
  align-items: flex-start; 
  gap: 20px; 
} 

.doctor-photo { 
  width: 150px;
  max-width: 40%;
  height: auto; 
  border-radius: 10px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
  flex-shrink: 0; 
}

.about-text { 
  flex: 1; 
  min-width: 250px; 
}

@media (max-width: 700px) { 
  .about-container { 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
  } 
  .about-text { 
    min-width: 100%; 
    text-align: left; 
  } 
  .doctor-photo { 
    width: 100px; 
    max-width: 60%; 
  } 
  /* Back to top button */
#backToTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 121, 107, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 12px 16px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 9999; /* Kept 9999 so it stays above your mobile menu */
  transition: background 0.25s, transform 0.25s;
  outline: none;
}

#backToTop span {
  color: #fff;
  text-shadow: 0 2px 8px #00796b, 0 0 20px #fff;
  font-weight: bold;
}

#backToTop:hover {
  background: rgba(0, 77, 64, 0.7);
  transform: scale(1.1);
  }
}

@media (max-width: 480px) { 
  .doctor-photo { 
    width: 80px; 
    max-width: 80%; 
  } 
} 

#backToTop { display: none; }

#faq-preview .faq-item { margin-bottom: 12px; } 
#faq-preview .faq-question { margin: 0 0 8px; color: #0f6b3a; font-size: 1.1em; } 
#faq-preview .faq-answer-preview { margin: 0; max-height: 3.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-overflow: ellipsis; } 
#faq-preview .more-link { text-align: right; margin-top: 12px; }

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .review-card {
    background: rgba(30, 30, 30, 0.7);
    border-color: rgba(0, 121, 107, 1); /* Keeps the border purely teal */
    /* Stronger teal glow to pop against the dark background */
    box-shadow: 0 0 20px rgba(0, 121, 107, 0.7), 0 6px 20px rgba(0, 0, 0, 0.5); 
  }
  .review-text { color: #f0f0f0; }
  .review-author strong { color: #4da3ff; }
}
/* Ensure the map fills its container properly */
#map {
  padding: 10px; /* Reduces padding inside the section for a larger map view */
  line-height: 0; /* Removes tiny extra space at the bottom of the iframe */
}

#map iframe {
  display: block;
  width: 100%;
}
/* ===== SWIPER REVIEW CAROUSEL (FINAL) ===== */

.review-swiper {
  width: 100%;
  padding: 20px 0;
  overflow: hidden;
}

/* Wrapper */
.swiper-wrapper {
  display: flex;
  align-items: stretch;
}

/* Slide FIX (prevents stretch in landscape) */
.swiper-slide {
  display: flex;
  justify-content: center;

  flex: 0 0 100%;
  max-width: 100%;
}

/* ===== REVIEW CARD ===== */
.review-card {
  flex: 0 0 auto;

  width: 100%;
  max-width: 100%;

  margin: 0 10px;
  padding: 20px;

  /* 🔥 Premium dark glass */
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

    border-radius: 12px;
  border: 3px solid rgba(0, 121, 107, 0.9); /* Solid teal border */
  /* Stacked shadow: first one is the teal glow, second is the dark depth shadow */
  box-shadow: 0 0 15px rgba(0, 121, 107, 0.45), 0 6px 20px rgba(0, 0, 0, 0.25);
  text-align: left;
}

/* ===== TEXT ===== */
.review-stars {
  color: #fbbc04;
  margin-bottom: 8px;
  font-size: 14px;
}

.review-text {
  color: #eaeaea;
  font-size: 0.95em;
  line-height: 1.5;
  margin-bottom: 12px;
}

.review-author {
  border-top: 1px solid rgba(0, 121, 107, 0.2);
  padding-top: 10px;
  font-size: 0.85em;
}

.review-author strong {
  display: block;
  color: #4db6ac;
}

.review-author span {
  color: #bbbbbb;
}

/* ===== LANDSCAPE OPTIMIZATION ===== */
@media (max-width: 800px) and (orientation: landscape) {
  .review-card {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;

    margin: 0 8px !important;
    padding: 14px !important;
  }
}
/* ===== Desktop Review Layout Fix ===== */
@media (min-width: 768px) {
  .swiper-slide {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 1000px) {
  .swiper-slide {
    flex: 0 0 33.33%;
    max-width: 33.33%;
  }
}

/* ========================================= */
/* WEBSITE - VCARD STYLE SERVICES GRID       */
/* ========================================= */

.services-box {
  background: linear-gradient(135deg, rgba(240, 247, 255, 0.65), rgba(255, 255, 255, 0.8));
  border-left: 5px solid #00796b; /* Website Teal Theme */
  padding: 20px;
  border-radius: 12px;
  margin: 15px auto;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.service-category {
  font-size: 14.5px;
  color: #00796b;
  margin: 18px 0 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 4px;
  font-weight: 700;
}

.services-box h3 + .service-category {
  margin-top: 10px; /* Less margin for the very first category */
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Forces 2 columns like vcard */
  gap: 8px 10px;
  margin-bottom: 5px;
}

@media (min-width: 600px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on PC/Tablet */
  }
}

.services-grid span {
  background: #ffffff;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  line-height: 1.2;
}

/* Neurological Services */
.services-grid span.neuro {
  background: #eef7ff; 
  border: 1px solid #adcffa;
  color: #0e5a95; 
  font-weight: 600;
}

/* Highlight (Home Visit) */
.services-grid span.highlight {
  background: #e8f5e9; 
  border: 1px solid #c8e6c9;
  color: #2e7d32;
  font-weight: 800;
  grid-column: 1 / -1; /* Makes it span full width if you want, or remove to keep it pill sized */
}

/* --- Dark Mode Adjustments --- */
@media (prefers-color-scheme: dark) {
  .services-box {
    background: linear-gradient(135deg, rgba(31, 42, 54, 0.7), rgba(24, 34, 44, 0.7));
    border-left-color: #4db6ac;
  }
  .service-category { color: #4db6ac; border-bottom-color: rgba(255,255,255,0.1); }
  .services-grid span { background: #2a3542; color: #f0f0f0; }
  .services-grid span.neuro { background: #1a222c; border: 1px solid #0e5a95; color: #4da3ff; }
  .services-grid span.highlight { background: #1b3320; border-color: #2e7d32; color: #69ff99; }
}

/* ===== FULLY ADAPTIVE WELCOME HERO SECTION ===== */
.hero-container {
    position: relative;
    width: 100%;
    max-width: 100% !important;
    
    /* Default landscape shape for desktop/tablets */
    aspect-ratio: 16 / 9 !important; 
    height: auto !important; 
    
    margin: 0 0 30px 0 !important;
    padding: 0 !important;
    
    background-image: url('https://meharphysiotherapyclinic.github.io/website/welcome-hero.png') !important;
    background-size: cover;
    
    /* FIX: Centers the focal point at 65% from the left (directly on the therapist) */
    background-position: 65% center !important; 
    
    background-repeat: no-repeat;
    border-radius: 0 !important;
    border: none !important;
    transform: none !important;
    background-color: #1a1a1a; 
}

.hero-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    padding: 20px;
}

.hero-motto {
    color: #ffcc00 !important; 
    font-size: 2rem; 
    font-style: italic;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

.hero-bottom-status {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 121, 107, 0.85); 
    color: white;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ============================================================ */
/* FINAL MOBILE HERO - MOTTO TOP-LEFT & STATUS BAR CENTERED     */
/* ============================================================ */
@media (max-width: 700px) {
    .hero-container {
        aspect-ratio: auto !important; 
        min-height: 300px !important; 
        background-position: 80% center !important; 
    }

    .hero-overlay {
        display: flex !important;
        justify-content: flex-start !important; 
        align-items: flex-start !important; 
        /* Removed the global text-align: left to prevent inheritance issues */
    }

    .hero-content {
        padding: 40px 20px !important; 
        width: 100%;
    }

    .hero-motto {
        font-size: clamp(1.1rem, 5vw, 1.4rem) !important;
        /* Keep only the motto left-aligned */
        text-align: left !important; 
        max-width: 70%; 
        margin: 0 !important; 
        line-height: 1.2 !important;
        text-shadow: 2px 2px 10px rgba(0,0,0,0.7) !important;
    }

    /* FORCE the teal status bar back to the center */
    .hero-bottom-status {
        text-align: center !important;
        width: 100% !important;
        left: 0 !important;
        display: block !important;
    }
}
