:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  /* Light Theme */
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-transparent: rgba(255, 255, 255, 0.7);
  --text: #1a1a1a;
  --text-muted: #555;
  --accent: #005a9c;
  --accent-light: #e6f0ff;
  --border: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg: #121212;
  --surface: #1e1e1e;
  --surface-transparent: rgba(30, 30, 30, 0.7);
  --text: #f5f5f5;
  --text-muted: #aaa;
  --accent: #4da6ff;
  --accent-light: #2a3a4d;
  --border: #333;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden; /* kill unwanted horizontal scroll */
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}
h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

section {
  padding: clamp(3rem, 8vw, 6rem) 0;
  scroll-margin-top: 96px; /* fixes sticky header anchor offset */
}

/* UTILITIES */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--text);
  color: var(--bg);
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.03);
  box-shadow: var(--shadow-sm);
  opacity: 1;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
}

.card {
  background-color: var(--surface);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* SKIP LINK */
.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 1rem;
  z-index: 9999;
}
.skip-link:focus {
  top: 0;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 0.75rem 0;
  z-index: 1000;
  background: var(--bg);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: var(--surface-transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}
.logo:hover {
  opacity: 1;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* THEME TOGGLE */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}
.theme-toggle:hover {
  box-shadow: var(--shadow-sm);
  transform: scale(1.05);
}
.theme-toggle .icon {
  width: 20px;
  height: 20px;
  color: var(--text);
}
.theme-toggle .icon-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* MOBILE NAV */
.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}
@media (min-width: 900px) {
  .mobile-menu-toggle {
    display: none;
  }
}
.mobile-menu-toggle .icon-menu,
.mobile-menu-toggle .icon-close {
  width: 28px;
  height: 28px;
  color: var(--text);
}
.mobile-menu-toggle .icon-close {
  display: none;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -80vw; /* hide off screen */
  width: 80vw;
  max-width: 320px;
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  transition: right 0.4s ease-in-out;
  padding: 6rem 2rem 2rem;
  overflow-y: auto;
}
.mobile-nav .nav-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}
.mobile-nav .nav-links a {
  font-size: 1.1rem;
}

body.nav-open .mobile-nav {
  right: 0;
}
body.nav-open .mobile-menu-toggle .icon-menu {
  display: none;
}
body.nav-open .mobile-menu-toggle .icon-close {
  display: block;
}
body.nav-open {
  overflow: hidden;
}

/* dark overlay when nav open */
body.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
}

/* hide mobile panel on desktop */
@media (min-width: 900px) {
  .mobile-nav {
    display: none;
  }
}

/* HERO */
#hero {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 6rem;
  padding-bottom: 6rem;
  position: relative;
  color: #fff;
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.35),
      rgba(0, 0, 0, 0.35)
    ),
    url("Logo_1.png");
  background-size: cover;
  background-position: center;
}

.hero-container {
  max-width: 650px;
}

.hero-image {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 2rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.hero-title span {
  color: #ff4136;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
  color: #f5f5f5;
}

.hero-doctor-name {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: #ddd;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.hero-cta-group {
  margin-top: 2.5rem;
}

/* ABOUT */
#about .grid-2 {
  align-items: center;
}

.credentials {
  list-style: disc;
  margin-left: 1.5rem;
  color: var(--text-muted);
}
#about img {
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* GRIDS */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 500px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* SECTION HEADER */
.section-header {
  max-width: 650px;
  margin: 0 auto 3rem auto;
  text-align: center;
}
.section-header h2 {
  margin-bottom: 0.5rem;
}

/* SERVICES */
#services {
  background-color: var(--surface);
}

.service-card {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.service-card .icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.service-card .icon svg {
  width: 28px;
  height: 28px;
}

/* PREDICTOR */
.predictor-widget {
  max-width: 700px;
  margin: 0 auto;
}
.predictor-header {
  margin-bottom: 2rem;
}

.predictor-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .predictor-form {
    grid-template-columns: repeat(3, 1fr);
    align-items: flex-end;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.form-group select {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-sans);
}
.predictor-submit {
  grid-column: 1 / -1;
  justify-self: center;
}

#predictor-result {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  display: none;
}
#predictor-result h4 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* BOOKING */
#booking {
  background-color: var(--surface);
}
.booking-iframe-wrapper {
  position: relative;
  width: 100%;
  min-height: 500px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.booking-iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.booking-iframe-large {
  min-height: 700px;
}
.booking-fallback {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.booking-spacer {
  height: 4rem;
}
.booking-subtitle {
  margin-bottom: 1.5rem;
}

/* CLASSES */
.class-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.youtube-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* TESTIMONIALS */
#testimonials {
  background-color: var(--surface);
}
.testimonial-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
}
.testimonial-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.testimonial-slide {
  flex: 0 0 100%;
  padding: 0 1rem;
}
.testimonial-card {
  padding: 2.5rem;
  text-align: center;
}
.testimonial-card blockquote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 1.5rem;
  border: none;
  padding: 0;
}
.testimonial-card cite {
  font-weight: 600;
  font-style: normal;
  color: var(--accent);
}
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.carousel-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
.carousel-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}
.carousel-btn svg {
  width: 20px;
  height: 20px;
  color: var(--text);
}

/* ACCORDION */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}
.accordion-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.accordion-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.accordion-button:hover {
  background-color: var(--accent-light);
}
.accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}
.accordion-button[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}
.accordion-content-inner {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.accordion-content-inner p:last-child {
  margin-bottom: 0;
}

/* FAQ background */
#faq {
  background-color: var(--surface);
}

/* CONTACT */
#contact .grid-2 {
  align-items: center;
}
.contact-details ul {
  list-style: none;
  margin-bottom: 2rem;
}
.contact-details li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.contact-details .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
}
.social-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.social-links a:hover svg {
  color: #fff;
}
.social-links svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.map-embed {
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* FOOTER */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer-about h4,
.footer-links h4 {
  color: var(--text);
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: var(--text-muted);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}
.footer-bottom .social-links a {
  width: 36px;
  height: 36px;
}
.footer-bottom .social-links svg {
  width: 16px;
  height: 16px;
}

/* FLOATING BUTTONS */
.floating-action-buttons {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 998;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-md);
  color: #fff;
  transition: all 0.3s ease;
}
.fab:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  opacity: 1;
}
.fab-whatsapp {
  background-color: #25d366;
}
.fab-phone {
  background-color: var(--accent);
}
.fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* ANIMATIONS ON SCROLL */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
