/* ============ CUSTOM PROPERTIES ============ */
:root {
  --blue: #0054A6;
  --blue-dark: #003d7a;
  --green: #00A651;
  --green-dark: #008c44;
  --dark: #1a1a2e;
  --gray-900: #2d2d44;
  --gray-600: #6b7280;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --light: #f8f9fa;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 115px;
  background: var(--white);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: var(--white);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--dark);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============ NAVIGATION ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);       /* Force own GPU layer — eliminates 1px compositing gap on mobile */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  flex-wrap: nowrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img {
  height: 72px;
  width: auto;
}

.nav-slogan {
  font-size: 0.82rem;
  color: var(--blue);
  font-style: italic;
  font-weight: 500;
  white-space: nowrap;
  border-left: 2px solid var(--green);
  padding-left: 12px;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--blue);
  background: var(--gray-100);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Emergency Button */
.btn-emergency {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #dc2626;
  color: var(--white);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-emergency:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.btn-emergency svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.emergency-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.emergency-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.emergency-phone {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 2px solid var(--gray-200);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.lang-toggle:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.lang-globe {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: var(--blue-dark);
  position: relative;
  overflow: hidden;
}

/* ============ HERO CAROUSEL ============ */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Prev / Next buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  backdrop-filter: blur(4px);
  transition: background var(--transition);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* Dot indicators */
.carousel-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.carousel-dot.active {
  background: var(--white);
  transform: scale(1.25);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 41, 82, 0.75) 0%, rgba(0, 84, 166, 0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ============ SERVICES ============ */
.services {
  padding: 96px 0;
  background: var(--light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  border-radius: 14px;
  padding: 12px;
  color: var(--white);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.service-card p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ============ ABOUT ============ */
.about {
  padding: 96px 0;
  background: var(--white);
}

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 64px;
}

.feature {
  display: flex;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: background var(--transition);
}

.feature:hover {
  background: var(--light);
}

.feature-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border-radius: 12px;
  padding: 10px;
  color: var(--white);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.feature p {
  font-size: 0.92rem;
  color: var(--gray-600);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

.stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* ============ DOCTORS ============ */
.doctors {
  padding: 96px 0;
  background: var(--light);
}

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

.doctor-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.doctor-photo {
  width: 100%;
  height: 200px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.doctor-photo svg {
  width: 120px;
  height: 120px;
}

.doctor-card h3 {
  padding: 20px 20px 4px;
  font-size: 1.1rem;
  color: var(--dark);
}

.doctor-specialty {
  padding: 0 20px 24px;
  color: var(--blue);
  font-weight: 500;
  font-size: 0.92rem;
}

.doctors-cta {
  text-align: center;
}

/* ============ INSURERS ============ */
.insurers {
  padding: 80px 0;
  background: var(--white);
}

.insurers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.insurer-card {
  background: var(--light);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 90px;
  transition: all var(--transition);
}

.insurer-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: transparent;
}

.insurer-card img {
  max-width: 160px;
  max-height: 56px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

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

/* ============ CONTACT ============ */
.contact {
  padding: 96px 0;
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--blue);
}

.contact-icon--emergency {
  color: #dc2626;
}

.contact-emergency-link {
  color: #dc2626;
  font-weight: 700;
  transition: opacity var(--transition);
}

.contact-emergency-link:hover {
  opacity: 0.75;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--dark);
}

.contact-item p {
  font-size: 0.92rem;
  color: var(--gray-600);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--light);
  padding: 36px;
  border-radius: var(--radius-lg);
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
}

.form-group label {
  position: absolute;
  left: 16px;
  top: 16px;
  color: var(--gray-400);
  font-size: 1rem;
  pointer-events: none;
  transition: all var(--transition);
  background: var(--white);
  padding: 0 4px;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--blue);
}

.contact-form .btn {
  width: 100%;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  height: 40px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4,
.footer-social h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--green);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all var(--transition);
  color: rgba(255, 255, 255, 0.75);
}

.social-links a:hover {
  background: var(--green);
  color: var(--white);
  transform: translateY(-3px);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  /* Mobile Navigation */
  /* 2-row navbar on mobile */
  .nav-container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px 0;
    gap: 0;
  }

  .nav-logo {
    order: 1;
    flex: 1;
    padding: 6px 0;
  }

  .nav-right {
    order: 2;
    padding: 6px 0;
  }

  .btn-emergency {
    order: 3;
    width: 100%;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 0;
    margin: 0 -16px;
    width: calc(100% + 32px);
    gap: 10px;
  }

  .nav-menu {
    position: fixed;
    top: 72px; /* fallback; JS overrides with real navbar height */
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px 24px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform var(--transition);
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1.05rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-slogan {
    display: none;
  }

  /* Hero — full viewport height */
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    margin-top: -1px;
  }

  /* Dark at bottom only — top is already dark from slide background */
  .hero-overlay {
    background: linear-gradient(to top, rgba(0, 10, 30, 0.92) 0%, rgba(0, 20, 50, 0.5) 35%, transparent 65%);
  }

  /* Show full landscape image — no cropping on portrait screens */
  .carousel-slide {
    background: var(--blue-dark);
  }

  .carousel-slide img {
    object-fit: contain;
    object-position: center center;
  }

  /* Title + button grouped at bottom, over the dark gradient */
  .hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 24px 48px;
    max-width: 100%;
    gap: 16px;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  }

  /* Hide subtitle on mobile — keeps layout clean */
  .hero-subtitle {
    display: none;
  }

  .hero-content .btn {
    padding: 14px 36px;
    font-size: 1rem;
    width: auto;
  }

  .carousel-dots {
    bottom: 14px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  /* About */
  .about-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .feature {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 12px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Doctors */
  .doctors-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto 40px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}


@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .contact-form-wrapper {
    padding: 24px 20px;
  }
}
