/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */

:root {
  /* Colors */
  --bg: #ffffff;
  --surface: #f6faff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #387ADF;
  --primary-dark: #1C378C;
  --primary-2: #50C4ED;
  --accent: #F9BC35;
  --success: #16a34a;

  /* Shadows */
  --shadow: 0 10px 30px rgba(2, 8, 23, .08);
  --shadow-sm: 0 6px 18px rgba(2, 8, 23, .08);

  /* Layout */
  --radius: 14px;
  --container: 1140px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }

/* ==========================================================================
   Accessibility
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, transform .15s ease;
}

.btn:active { transform: scale(.97); }
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--primary-dark);
  color: #fff;
}

.btn-primary:hover { background: #264AB0; }

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

.btn-outline:hover { background: #4E8DE5; }

.btn-cta {
  background: var(--primary);
  color: #fff;
}

.btn-cta:hover { background: #4E8DE5; }

/* ==========================================================================
   Form Elements
   ========================================================================== */

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
}

.input:focus {
  border-color: rgba(80,196,237,.75);
  box-shadow: 0 0 0 4px rgba(80,196,237,.15);
}

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 999px;
  color: var(--muted);
}

a.chip.lang-toggle {
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: .35em;
}

.flag-icon {
  width: 1.25em;
  height: auto;
  border-radius: 2px;
  vertical-align: middle;
  flex-shrink: 0;
}

a.chip.lang-toggle:hover,
a.chip.lang-toggle:focus-visible {
  background: rgba(56,122,223,.08);
  border-color: rgba(56,122,223,.25);
  color: var(--primary);
}

a.chip.lang-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  gap: 12px;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 10px;
  font-weight: 900;
  padding: 8px 0;
  overflow: hidden;
}

.brand-logo {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 800;
}

.nav-links a { opacity: .9; padding: 10px 8px; border-radius: 10px; }
.nav-links a:hover { opacity: 1; color: var(--primary); background: rgba(56,122,223,.06); }
.nav-links a:focus-visible { opacity: 1; outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-links a.active { color: var(--primary); background: rgba(56,122,223,.08); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.hamburger {
  display: none;
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
  min-height: 44px;
  min-width: 44px;
}

.hamburger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding: 14px 0 18px;
  background: white;
}

.mobile-panel.open { display: block; }

.mobile-panel a {
  display: block;
  padding: 12px 0;
  font-weight: 800;
  border-bottom: 1px dashed rgba(226,232,240,.8);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 52px 0 26px;
  background:
    radial-gradient(1200px 500px at 20% 0%, rgba(80,196,237,.18), transparent 60%),
    radial-gradient(1000px 500px at 80% 20%, rgba(56,122,223,.14), transparent 55%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(80,196,237,.12);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
}

.hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(24px, 3.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  max-width: 58ch;
}

.hero-card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card h3 { margin: 0 0 10px; font-size: 16px; }
.hero-form { display: grid; gap: 10px; }

.check {
  display: flex;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
}

.check i {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: rgba(22,163,74,.14);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 900;
  margin-top: 2px;
}

/* ==========================================================================
   Sections & Layout
   ========================================================================== */

section { padding: 34px 0; }

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title h1 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 30px);
  letter-spacing: -0.02em;
}

.section-title h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

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

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.about-card {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: flex-start;
}

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

.about-img {
  width: 220px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}

.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0 0 12px; color: var(--muted); font-weight: 700; font-size: 14px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.card-footer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.price { font-weight: 900; }
.tiny { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ==========================================================================
   Service Tiles (Redesigned)
   ========================================================================== */

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

.service-card {
  border: 2px solid #a8c8e8;
  border-radius: var(--radius);
  background: white;
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.service-icon svg,
.service-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.service-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  flex: 1;
}

.service-card .price {
  font-weight: 900;
  font-size: 16px;
  margin-bottom: 12px;
}

.btn-service {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: white;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.btn-service:hover {
  background: var(--primary);
  color: white;
}

.btn-service:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   CTA Banner
   ========================================================================== */

.cta {
  background: linear-gradient(135deg, rgba(28,55,140,.94), rgba(56,122,223,.92));
  color: white;
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 14px 30px rgba(28,55,140,.22);
  border: 1px solid rgba(255,255,255,.18);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  margin-top: 26px;
  background: var(--primary-dark);
  color: rgba(255,255,255,.86);
  padding: 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}

.footer-title { font-weight: 900; margin: 0 0 10px; }
.footer-locations-divider { margin-top: 14px; }
.footer-list { display: grid; gap: 8px; font-weight: 700; font-size: 14px; color: rgba(255,255,255,.88); }
footer a:hover { color: white; }
footer a:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; color: white; }

.footer-locations {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.footer-locations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-weight: 700;
  font-size: 13px;
}
.footer-locations-list a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.88);
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.footer-locations-list a:hover {
  background: rgba(255,255,255,.18);
  color: white;
}

.contact-list {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}

.contact-card {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Map Embed
   ========================================================================== */

.map-embed {
  height: 220px;
  width: 100%;
  border-radius: 10px;
  margin-top: 14px;
  border: 1px solid var(--border);
}

.map-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.map-link:hover,
.map-link:focus-visible {
  text-decoration: underline;
}

.map-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Doctors Section
   ========================================================================== */

.doctors-grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.doctor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.doctor-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: 0 4px 16px rgba(56,122,223,.18);
}

.doctor-name {
  margin: 12px 0 2px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.doctor-role {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

/* ==========================================================================
   Visitor Counter
   ========================================================================== */

.visitor-counter {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  opacity: .7;
  font-weight: 600;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .topbar,
  .header,
  footer,
  .cta,
  .btn,
  .skip-link { display: none !important; }
  body { color: black; background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-locations-list a { font-size: 12px; padding: 5px 10px; }
  .map-embed { height: 200px; }
  .nav { padding: 0; }
}

@media (max-width: 420px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-card { padding: 20px 14px 18px; }
}

@media (max-width: 680px) {
  .about-card {
    flex-direction: column;
  }
  .about-img {
    width: 100%;
    max-height: 260px;
    order: -1;
  }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  .brand-logo {
    max-width: 200px;
    height: 100%;
    max-height: 56px;
  }
}

@media (max-width: 480px) {
  .nav-actions .btn { display: none; }
  .brand-logo {
    max-width: 150px;
    max-height: 44px;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

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