/* ==========================================================================
   Mulgund Multispeciality Clinic — Frosted-glass design system
   Palette: deep navy, light grey, white, black
   ========================================================================== */

:root {
  /* Brand palette */
  --navy:        #1a3a8a;
  --navy-deep:   #0f2557;
  --navy-soft:   #3b5db5;
  --navy-tint:   #e8edfa;

  --grey-50:     #f7f9fc;
  --grey-100:    #eef1f6;
  --grey-200:    #d8dde6;
  --grey-300:    #b6bdcb;
  --grey-500:    #6b7280;
  --grey-700:    #374151;
  --ink:         #0a0e1a;
  --white:       #ffffff;

  /* Glass tokens */
  --glass-bg:        rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border:    rgba(255, 255, 255, 0.55);
  --glass-stroke:    rgba(26, 58, 138, 0.08);
  --glass-shadow:    0 12px 40px rgba(15, 37, 87, 0.12), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  --glass-blur:      saturate(180%) blur(24px);

  /* Layout */
  --radius-sm:  10px;
  --radius:     18px;
  --radius-lg:  28px;
  --radius-xl:  36px;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;

  --container: 1180px;

  --font-en: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-kn: 'Noto Sans Kannada', 'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------- Reset ----------------------------- */

/* The HTML [hidden] attribute should always win, regardless of any
   display:flex / inline-flex / grid set on the same element. Browsers'
   UA styles set [hidden] { display: none } but our class rules have
   higher specificity, so we make this explicit. */
[hidden] { display: none !important; }

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.6;
  color: var(--grey-700);
  background: var(--grey-50);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="kn"] body { font-family: var(--font-kn); }
html[lang="kn"] h1, html[lang="kn"] h2, html[lang="kn"] h3, html[lang="kn"] h4 { font-family: var(--font-kn); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

p { margin: 0; }

/* ----------------------------- Ambient backdrop ----------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f3f6fc 0%, #e8edf6 60%, #dde4f1 100%);
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
}

.blob-a {
  width: 620px; height: 620px;
  top: -180px; left: -160px;
  background: radial-gradient(circle, var(--navy) 0%, transparent 70%);
  opacity: 0.32;
  animation: drift-a 28s ease-in-out infinite alternate;
}

.blob-b {
  width: 720px; height: 720px;
  top: 320px; right: -240px;
  background: radial-gradient(circle, var(--navy-soft) 0%, transparent 70%);
  opacity: 0.28;
  animation: drift-b 36s ease-in-out infinite alternate;
}

.blob-c {
  width: 560px; height: 560px;
  bottom: -180px; left: 30%;
  background: radial-gradient(circle, #c7d3ee 0%, transparent 70%);
  opacity: 0.5;
  animation: drift-c 42s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.7;
  mix-blend-mode: overlay;
}

@keyframes drift-a { from { transform: translate(0,0); } to { transform: translate(60px, 80px) scale(1.1); } }
@keyframes drift-b { from { transform: translate(0,0); } to { transform: translate(-80px, -40px) scale(1.05); } }
@keyframes drift-c { from { transform: translate(0,0); } to { transform: translate(40px, -60px) scale(0.95); } }

/* ----------------------------- Glass primitive ----------------------------- */

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* ----------------------------- Layout helpers ----------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container.narrow { max-width: 820px; }

main > section { padding: var(--space-9) 0; }
main > section:first-child { padding-top: var(--space-8); }

.section-head { text-align: center; margin-bottom: var(--space-7); }
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.025em;
}
.section-sub {
  margin-top: var(--space-3);
  font-size: 17px;
  color: var(--grey-500);
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: var(--space-4);
  text-align: center;
}

.lede {
  text-align: center;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
  color: var(--grey-700);
}

/* ----------------------------- Kannada typography fixes -----------------------------
   Kannada has vowel marks (matras) above the baseline + conjunct consonants.
   Tight line-height and English-style letter-spacing/uppercase break the script.
*/

html[lang="kn"] body            { line-height: 1.7; }

html[lang="kn"] h1,
html[lang="kn"] h2,
html[lang="kn"] h3,
html[lang="kn"] h4              { line-height: 1.45; letter-spacing: 0; }

html[lang="kn"] .hero-title     {
  line-height: 1.4;
  letter-spacing: 0;
  padding: 0.12em 0;            /* avoid background-clip cropping matras */
}

/* Kill English-style uppercase + wide tracking on caps-style labels */
html[lang="kn"] .hero-tagline,
html[lang="kn"] .section-eyebrow,
html[lang="kn"] .brand-tag,
html[lang="kn"] .info-label,
html[lang="kn"] .doctor-hours,
html[lang="kn"] .footer-copy {
  letter-spacing: 0.02em;
  text-transform: none;
}

html[lang="kn"] .doctor-spec,
html[lang="kn"] .doctor-quals,
html[lang="kn"] .doctor-focus,
html[lang="kn"] .info-value,
html[lang="kn"] .lede,
html[lang="kn"] .owner-body,
html[lang="kn"] .section-sub,
html[lang="kn"] .map-meta span {
  line-height: 1.7;
  letter-spacing: 0;
}

html[lang="kn"] .nav a          { letter-spacing: 0; }
html[lang="kn"] .lang-toggle    { letter-spacing: 0; }
html[lang="kn"] .btn            { letter-spacing: 0; }

html[lang="kn"] .brand-name     { line-height: 1.4; }

/* ----------------------------- Header ----------------------------- */

.site-header {
  position: sticky;
  top: var(--space-3);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: calc(100% - var(--space-5) * 2);
  max-width: var(--container);
  margin: var(--space-3) auto 0;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.62);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--white);
  padding: 4px;
  border: 1px solid var(--glass-stroke);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-tag {
  font-size: 11px;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-end {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.nav {
  display: flex;
  gap: var(--space-2);
}
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-700);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav a:hover {
  background: rgba(26, 58, 138, 0.08);
  color: var(--navy);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lang-toggle:hover { background: var(--navy-deep); transform: translateY(-1px); }
.lang-toggle-icon { font-size: 14px; opacity: 0.85; }

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease);
}

/* ----------------------------- Buttons ----------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(26, 58, 138, 0.28);
}
.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26, 58, 138, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
  border: 1px solid rgba(26, 58, 138, 0.18);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: var(--white);
  border-color: var(--navy);
  transform: translateY(-2px);
}

/* ----------------------------- Hero ----------------------------- */

.hero {
  padding: var(--space-7) var(--space-4) var(--space-8);
  display: flex;
  justify-content: center;
}

.hero-inner {
  max-width: 820px;
  width: 100%;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  text-align: center;
  border-radius: var(--radius-xl);
}

.glass-hero {
  background: linear-gradient(140deg, rgba(255,255,255,0.78) 0%, rgba(255,255,255,0.55) 100%);
  border: 1px solid rgba(255,255,255,0.7);
}

.hero-logo {
  width: 110px;
  height: 110px;
  margin: 0 auto var(--space-5);
  border-radius: 24px;
  background: var(--white);
  padding: 12px;
  box-shadow: 0 8px 30px rgba(26, 58, 138, 0.18);
}

.hero-tagline {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, var(--ink) 0%, var(--navy) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-3);
}

html[lang="kn"] .hero-title {
  font-size: clamp(28px, 5vw, 50px);
  line-height: 1.25;
}

.hero-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--grey-500);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.hero-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: var(--space-6);
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ----------------------------- About (intro) ----------------------------- */

.about { padding-top: var(--space-7) !important; padding-bottom: var(--space-7) !important; }

/* ----------------------------- Doctors ----------------------------- */

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.card {
  padding: clamp(24px, 3vw, 36px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.doctor-card { text-align: center; }
.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15, 37, 87, 0.18), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.doctor-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(26, 58, 138, 0.25);
}
.doctor-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.avatar-fallback {
  font-size: 36px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

.doctor-name {
  font-size: 22px;
  margin-bottom: 4px;
}
html[lang="kn"] .doctor-name { font-size: 20px; line-height: 1.3; }

.doctor-spec {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-3);
}

.doctor-quals {
  font-size: 13px;
  color: var(--grey-500);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

.doctor-focus {
  font-size: 13.5px;
  color: var(--grey-700);
  line-height: 1.55;
  padding: 12px 16px;
  background: rgba(232, 237, 250, 0.5);
  border: 1px solid rgba(26, 58, 138, 0.08);
  border-radius: 14px;
  margin-bottom: var(--space-4);
  text-align: left;
}

.doctor-hours {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy-tint);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ----------------------------- Services ----------------------------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.service-card { display: flex; flex-direction: column; }
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 37, 87, 0.16), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
  box-shadow: 0 6px 18px rgba(26, 58, 138, 0.28);
}

.service-card h3 {
  font-size: 19px;
  margin-bottom: var(--space-4);
  color: var(--navy-deep);
}
html[lang="kn"] .service-card h3 { font-size: 18px; line-height: 1.35; }

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--grey-700);
  line-height: 1.5;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--navy);
}

/* ----------------------------- Featured photo (About) ----------------------------- */

.featured-photo {
  position: relative;
  margin-top: var(--space-7);
  padding: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  display: block;
}

.featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  display: block;
}

.featured-photo.placeholder::after {
  content: "Add assets/images/clinic-front.jpg";
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy-tint) 0%, #f3f6fc 100%);
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: calc(var(--radius-lg) - 8px);
}

.featured-cap {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-deep);
  box-shadow: 0 4px 14px rgba(15, 37, 87, 0.15);
}

@media (max-width: 640px) {
  .featured-photo { aspect-ratio: 4 / 3; }
  .featured-cap { left: 14px; bottom: 14px; font-size: 12px; padding: 6px 12px; }
}

/* ----------------------------- Gallery ----------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: var(--space-4);
}

.gallery-item {
  position: relative;
  padding: 6px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 37, 87, 0.18), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 6px);
  display: block;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-item figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-deep);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(15, 37, 87, 0.12);
}

/* Span variants for the masonry-style layout */
.gallery-item            { grid-column: span 1; grid-row: span 1; }
.gallery-tall            { grid-column: span 2; grid-row: span 2; }
.gallery-wide            { grid-column: span 2; grid-row: span 1; }

.gallery-item.placeholder img { display: none; }
.gallery-item.placeholder::after {
  content: "Add this photo";
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy-tint) 0%, #f3f6fc 100%);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  border-radius: calc(var(--radius-lg) - 6px);
}

@media (max-width: 880px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-tall { grid-column: span 2; grid-row: span 2; }
  .gallery-wide { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery-tall, .gallery-wide { grid-column: span 1; grid-row: span 1; }
}

/* ----------------------------- Visit ----------------------------- */

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-5);
}

.visit-info { display: flex; flex-direction: column; gap: var(--space-5); }
.info-row { display: flex; flex-direction: column; gap: 4px; }
.info-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.info-value {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.5;
}
.info-value a { color: var(--ink); transition: color 0.2s var(--ease); }
.info-value a:hover { color: var(--navy); }

.visit-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.visit-map {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 6px;
  overflow: hidden;
  min-height: 380px;
}

.map-frame {
  flex: 1;
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: calc(var(--radius-lg) - 6px);
  display: block;
  background: var(--grey-100);
}

.map-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 8px;
}
.map-meta strong {
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}
.map-meta > span {
  font-size: 13px;
  color: var(--grey-500);
  line-height: 1.4;
}
.map-meta-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  align-self: flex-start;
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}
.map-meta-cta:hover { gap: 10px; color: var(--navy-deep); }

/* ----------------------------- Owner ----------------------------- */

.owner-card {
  text-align: center;
  padding: clamp(36px, 5vw, 56px);
}
.owner-card h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  margin-bottom: var(--space-4);
}
.owner-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--grey-700);
  margin-bottom: var(--space-5);
}
.owner-other {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--grey-500);
}
.owner-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy-tint);
  color: var(--navy);
  font-weight: 600;
  transition: background 0.2s var(--ease);
}
.owner-link:hover { background: var(--navy); color: var(--white); }

.owner-sep {
  color: var(--grey-300);
  font-size: 12px;
  margin: 0 4px;
}

.owner-link-subtle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--navy);
  font-weight: 500;
  border-bottom: 1px dashed rgba(26, 58, 138, 0.4);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.owner-link-subtle:hover {
  color: var(--navy-deep);
  border-bottom-color: var(--navy-deep);
  border-bottom-style: solid;
}
.owner-link-subtle svg { opacity: 0.7; }

/* ----------------------------- Footer ----------------------------- */

.site-footer {
  padding: var(--space-8) 0 var(--space-6);
  margin-top: var(--space-8);
  background: linear-gradient(180deg, transparent 0%, rgba(15, 37, 87, 0.04) 100%);
  border-top: 1px solid var(--glass-stroke);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: var(--space-3); }
.footer-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--white);
  padding: 4px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--grey-500);
}

.footer-meta {
  text-align: right;
  font-size: 13px;
  color: var(--grey-500);
}
.footer-meta a {
  color: var(--navy);
  font-weight: 600;
  transition: color 0.2s var(--ease);
}
.footer-meta a:hover { color: var(--navy-deep); }
.footer-copy { margin-top: 4px; font-size: 12px; color: var(--grey-500); }

/* ----------------------------- Responsive ----------------------------- */

@media (max-width: 880px) {
  .visit-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand-text { display: none; }              /* free up width on tablets */
  .lang-toggle { padding: 8px 12px; font-size: 12px; }
  .lang-toggle-label { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .site-header.menu-open .nav {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
  }
}

@media (max-width: 560px) {
  .site-header { padding: 7px 10px; gap: 8px; border-radius: 22px; }
  .brand-text { display: none; }
  .header-end { gap: 6px; }
  .lang-toggle { padding: 7px 12px; font-size: 11.5px; flex-shrink: 1; min-width: 0; }
  .lang-toggle-label { display: inline; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lang-toggle-icon { font-size: 13px; }
  .menu-toggle { width: 36px; height: 36px; flex-shrink: 0; }
  .container { padding: 0 var(--space-4); }
  main > section { padding: var(--space-7) 0; }
  .hero-inner { padding: 36px 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

/* ----------------------------- Scroll reveal ----------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger for grids — children fade in slightly delayed */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-stagger.is-visible > *           { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* Initial hero entrance — runs on load */
.hero-inner > * {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-rise 0.8s var(--ease) forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.10s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.20s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.30s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.40s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.50s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.60s; }
.hero-inner > *:nth-child(7) { animation-delay: 0.70s; }

@keyframes hero-rise {
  to { opacity: 1; transform: none; }
}

/* ----------------------------- Mobile polish ----------------------------- */

/* Prevent layout shift while images load */
.gallery-item img,
.featured-photo img,
.doctor-avatar img {
  background: var(--grey-100);
}

/* Tap targets — ensure all interactive elements >= 44px on touch */
@media (hover: none) {
  .nav a, .lang-toggle, .btn { min-height: 44px; }

  /* Disable hover lifts on touch devices — they trigger on tap and feel buggy */
  .doctor-card:hover,
  .service-card:hover,
  .gallery-item:hover,
  .visit-map:hover { transform: none; }

  .gallery-item:hover img { transform: none; }
}

/* Smooth scroll for anchor jumps */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Tighten things on phone */
@media (max-width: 480px) {
  .hero-logo { width: 92px; height: 92px; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { padding: 11px 18px; font-size: 14px; }
  .doctor-avatar { width: 96px; height: 96px; }
  .avatar-fallback { font-size: 32px; }
  .visit-cta { flex-direction: column; align-items: stretch; }
  .visit-cta .btn { justify-content: center; }
  .map-canvas { min-height: 220px; }
  .footer-meta { font-size: 12px; }

  /* Smaller blob blur on phone for perf */
  .blob { filter: blur(60px); opacity: 0.45; }
}

/* iOS safe-area: respect notch */
@supports (padding: max(0px)) {
  .site-header { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .site-footer { padding-bottom: max(var(--space-6), env(safe-area-inset-bottom)); }
}

/* Disable expensive ambient animation on small screens for smoother feel */
@media (max-width: 700px) {
  .blob-a, .blob-b, .blob-c { animation-duration: 0s; animation-play-state: paused; }
  .grain { opacity: 0.4; }
}

/* Image zoom on hover (gallery) — disable for touch handled above */

/* ----------------------------- Lightbox ----------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(10, 14, 26, 0.86);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
}
.lightbox.is-open {
  display: flex;
  animation: lightbox-fade 0.25s var(--ease);
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: auto;
  cursor: default;
  -webkit-overflow-scrolling: touch;
  touch-action: pinch-zoom;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  animation: lightbox-zoom 0.3s var(--ease);
}

@keyframes lightbox-zoom {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 20px));
  right: max(20px, env(safe-area-inset-right, 20px));
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: scale(1.06);
}

.lightbox-cap {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  max-width: 86vw;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lightbox-cap:empty { display: none; }

/* Make gallery + featured photos look clickable */
.gallery-item img,
.featured-photo img {
  cursor: zoom-in;
}

/* Lock body scroll when lightbox open */
body.lightbox-open {
  overflow: hidden;
}

/* ----------------------------- Reduced motion ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
