/* === THEME VARIABLES === */
:root {
  /* Dark theme (default) */
  --bg: #0a0f0e;
  --bg-gradient: radial-gradient(1400px 1400px at 80% -10%, rgba(20,184,166,.12), transparent 55%);
  --surface: #0d1514;
  --surface-elevated: #111b19;
  --text: #e8f3f1;
  --text-secondary: #9db5b0;
  --muted: #7a9691;
  --brand: #0f766e;
  --brand-light: #14b8a6;
  --brand-glow: rgba(20,184,166,.15);
  --accent: #f59e0b;
  --card-bg: #0e1817;
  --card-border: rgba(20,184,166,.12);
  --border: #1a2d2a;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.45);
  --glass-bg: rgba(13,21,20,.75);
  --glass-border: rgba(20,184,166,.18);
}

[data-theme="light"] {
  /* Light theme */
  --bg: #f8fdfb;
  --bg-gradient: radial-gradient(1400px 1400px at 80% -10%, rgba(15,118,110,.08), transparent 55%);
  --surface: #ffffff;
  --surface-elevated: #f1f9f7;
  --text: #0a1413;
  --text-secondary: #2d4f48;
  --muted: #5a7a72;
  --brand: #0f766e;
  --brand-light: #14b8a6;
  --brand-glow: rgba(15,118,110,.1);
  --accent: #ea580c;
  --card-bg: #ffffff;
  --card-border: rgba(15,118,110,.12);
  --border: #d1e7e2;
  --shadow-sm: 0 2px 8px rgba(15,118,110,.08);
  --shadow-md: 0 8px 24px rgba(15,118,110,.12);
  --shadow-lg: 0 16px 48px rgba(15,118,110,.16);
  --glass-bg: rgba(255,255,255,.85);
  --glass-border: rgba(15,118,110,.15);
}

/* === BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-gradient), var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}

.container { 
  width: min(1200px, 94vw); 
  margin: 0 auto; 
  position: relative;
}

.muted { color: var(--muted); }

/* === ACCESSIBILITY === */
.skip-link {
  position: absolute; 
  left: -9999px; 
  top: auto;
  z-index: 999;
}
.skip-link:focus { 
  left: 16px; 
  top: 16px; 
  background: var(--brand); 
  color: white; 
  padding: 10px 16px; 
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

/* === HEADER === */
.site-header {
  position: sticky; 
  top: 0; 
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: all .3s ease;
}

.header-inner {
  display: grid; 
  grid-template-columns: auto 1fr auto; 
  gap: 24px; 
  align-items: center;
  padding: 16px 0;
}

.brand { 
  display: inline-flex; 
  gap: 12px; 
  align-items: center; 
  color: var(--text); 
  text-decoration: none;
  transition: transform .2s ease;
}
.brand:hover { transform: scale(1.02); }
.brand-name { 
  font-weight: 700; 
  letter-spacing: 0.3px; 
  font-size: 18px;
}

.nav { justify-self: center; }
.nav ul { 
  list-style: none; 
  display: flex; 
  gap: 32px; 
  margin: 0; 
  padding: 0; 
}
.nav a { 
  color: var(--text-secondary); 
  text-decoration: none; 
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-light);
  transition: width .3s ease;
}
.nav a:hover { color: var(--brand-light); }
.nav a:hover::after { width: 100%; }

.header-cta { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}

.theme-toggle, .lang-toggle { 
  background: transparent; 
  color: var(--text-secondary); 
  border: 1px solid var(--border); 
  padding: 10px 12px; 
  border-radius: 10px; 
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle { 
  width: 44px; 
  height: 44px; 
  padding: 0;
}
.theme-toggle:hover, .lang-toggle:hover { 
  border-color: var(--brand);
  background: var(--brand-glow);
  transform: translateY(-1px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: all .3s ease;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.8);
}
[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
}

/* === BUTTONS === */
.btn { 
  appearance: none; 
  border: 1px solid var(--border); 
  background: var(--surface); 
  color: var(--text); 
  padding: 12px 20px; 
  border-radius: 11px; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 15px;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
}
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  transform: translate(-50%, -50%);
  transition: width .4s ease, height .4s ease;
}
.btn:hover::before {
  width: 300px;
  height: 300px;
}
.btn:hover { 
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-primary { 
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%); 
  border: none; 
  color: #ffffff;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-primary:hover { 
  box-shadow: 0 6px 20px var(--brand-glow);
  transform: translateY(-2px);
}

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

/* === HERO === */
.hero { 
  padding: 80px 0 60px;
  position: relative;
}

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

.hero-copy h1 { 
  font-size: clamp(32px, 5.5vw, 52px); 
  line-height: 1.1; 
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--brand-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead { 
  font-size: clamp(17px, 2.4vw, 20px); 
  color: var(--text-secondary); 
  margin: 0 0 28px;
  line-height: 1.7;
}

.hero-actions { 
  display: flex; 
  gap: 14px; 
  align-items: center;
  flex-wrap: wrap;
}

.badges { 
  display: flex; 
  gap: 12px; 
  padding: 0; 
  margin: 28px 0 0; 
  list-style: none; 
  flex-wrap: wrap; 
}
.badges li { 
  border: 1px solid var(--card-border); 
  background: var(--surface-elevated);
  padding: 8px 14px; 
  border-radius: 999px; 
  color: var(--text-secondary); 
  font-size: 14px;
  font-weight: 500;
  transition: all .2s ease;
}
.badges li:hover {
  border-color: var(--brand);
  background: var(--brand-glow);
  transform: translateY(-2px);
}

.hero-media { 
  position: relative;
}
.hero-media::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--brand-glow);
  border-radius: 24px;
  filter: blur(40px);
  opacity: .6;
  z-index: -1;
}
.hero-media img { 
  width: 100%; 
  height: auto; 
  border-radius: 20px; 
  box-shadow: var(--shadow-lg);
  transition: transform .3s ease;
}
.hero-media:hover img {
  transform: scale(1.02);
}

/* === SECTIONS === */
.section { 
  padding: 80px 0;
  position: relative;
}

.section.alt { 
  background: var(--surface);
  border-top: 1px solid var(--border); 
  border-bottom: 1px solid var(--border);
}

.section h2 { 
  font-size: clamp(28px, 4.5vw, 40px); 
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-intro { 
  color: var(--text-secondary); 
  margin: 0 0 40px;
  font-size: 17px;
  line-height: 1.7;
}

/* === GRID & CARDS === */
.grid { 
  display: grid; 
  gap: 24px; 
}

.cards { 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
}

.card { 
  background: var(--card-bg); 
  border: 1px solid var(--card-border); 
  padding: 28px; 
  border-radius: 16px; 
  box-shadow: var(--shadow-sm);
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.card:hover::before {
  transform: scaleX(1);
}
.card h3 { 
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
}
.card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* === DOCTORS === */
.doctors { 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
}

.profile { 
  background: var(--card-bg); 
  border: 1px solid var(--card-border); 
  border-radius: 18px; 
  overflow: hidden;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}
.profile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.profile img { 
  width: 100%; 
  height: 220px; 
  object-fit: cover; 
  display: block;
  transition: transform .3s ease;
}
.profile:hover img {
  transform: scale(1.05);
}
.profile h3 { 
  margin: 18px 18px 8px;
  font-size: 19px;
  font-weight: 600;
}
.profile p { 
  margin: 0 18px 20px; 
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === PRICING === */
.prices { 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
}

.price-item { 
  background: var(--card-bg); 
  border: 1px solid var(--card-border); 
  padding: 24px; 
  border-radius: 16px;
  text-align: center;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}
.price-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.price-item h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}
.price { 
  color: var(--accent); 
  font-weight: 700; 
  font-size: 26px;
  letter-spacing: -0.01em;
  display: block;
}

/* === TESTIMONIALS === */
.quotes { 
  display: grid; 
  gap: 20px; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
}

blockquote { 
  margin: 0; 
  background: var(--card-bg); 
  border: 1px solid var(--card-border); 
  border-left: 4px solid var(--brand); 
  padding: 24px; 
  border-radius: 14px; 
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all .3s ease;
  position: relative;
}
blockquote::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 60px;
  color: var(--brand-glow);
  font-family: Georgia, serif;
  line-height: 1;
}
blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
blockquote p {
  position: relative;
  z-index: 1;
  padding-left: 10px;
}
blockquote cite { 
  color: var(--muted); 
  font-style: normal;
  font-weight: 600;
  display: block;
  margin-top: 12px;
  padding-left: 10px;
}

/* === LOCATION === */
.location { 
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: start;
}

.details { 
  list-style: none; 
  padding: 0; 
  margin: 0 0 28px; 
}
.details li { 
  margin: 12px 0; 
  color: var(--text-secondary);
  line-height: 1.7;
  display: flex;
  gap: 8px;
}
.details a {
  color: var(--brand-light);
  text-decoration: none;
  transition: color .2s ease;
}
.details a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.cta-inline { 
  display: flex; 
  gap: 12px; 
  align-items: center;
  flex-wrap: wrap;
}

/* === FOOTER === */
.site-footer { 
  padding: 48px 0; 
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.footer-inner { 
  display: grid; 
  grid-template-columns: 1fr auto auto; 
  gap: 32px; 
  align-items: center; 
}

.foot-brand { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
}

.foot-links { 
  list-style: none; 
  display: flex; 
  gap: 20px; 
  padding: 0; 
  margin: 0; 
}
.foot-links a { 
  color: var(--text-secondary); 
  text-decoration: none;
  transition: color .2s ease;
  font-weight: 500;
}
.foot-links a:hover { 
  color: var(--brand-light); 
}

/* === MODAL === */
.modal[aria-hidden="true"] { 
  display: none; 
}

.modal { 
  position: fixed; 
  inset: 0; 
  z-index: 200;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-dialog { 
  position: relative; 
  z-index: 1; 
  width: min(600px, 92vw); 
  margin: 10vh auto; 
  background: var(--surface-elevated);
  border: 1px solid var(--glass-border); 
  border-radius: 20px; 
  box-shadow: var(--shadow-lg);
  padding: 32px;
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(30px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close { 
  position: absolute; 
  right: 16px; 
  top: 16px; 
  background: transparent; 
  color: var(--muted); 
  border: none; 
  font-size: 28px; 
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all .2s ease;
  line-height: 1;
}
.modal-close:hover {
  background: var(--brand-glow);
  color: var(--text);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}

.modal .muted {
  margin-bottom: 24px;
  display: block;
}

.form-row { 
  display: grid; 
  gap: 8px; 
  margin-bottom: 18px; 
}

label { 
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

input, select, textarea { 
  background: var(--bg);
  border: 1px solid var(--border); 
  color: var(--text); 
  padding: 12px 14px; 
  border-radius: 11px; 
  font: inherit;
  transition: all .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.form-status { 
  margin-top: 16px; 
  color: var(--brand-light); 
  font-weight: 600; 
  min-height: 1.2em;
  text-align: center;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }
  .nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-inner { 
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero { padding: 50px 0 40px; }
  .section { padding: 60px 0; }
  .location { 
    grid-template-columns: 1fr; 
  }
  .footer-inner { 
    grid-template-columns: 1fr; 
    justify-items: start;
    gap: 20px;
  }
  .foot-links {
    flex-wrap: wrap;
  }
  .header-cta {
    gap: 8px;
  }
  .lang-toggle {
    font-size: 13px;
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
}

/* === UTILITIES === */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
