/* ===== GLOBAL: performance & images ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
img[width][height] { height: auto; }
picture img { width: 100%; }

/* ===== GAP KILLER: compact layout, no empty space ===== */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-main);
  background: var(--main-bg);
  margin: 0;
  overflow-x: hidden;
}

.content {
  margin-left: 0;
  width: 100%;
  padding-top: 72px;
}
.section,
.stats,
.booking-cta,
.site-footer {
  height: auto !important;
  padding: 80px 6% !important;
  min-height: 0 !important;
}

.section { padding-left: 5%; padding-right: 5%; }
.section--alt { background: var(--dental-gray); }
.section--gray { background: var(--bg-off); }
.section--dark { background: var(--sidebar-bg); color: var(--sidebar-text-bright); }
.section--dark .section__label { color: var(--accent); }
.section--dark .section__label::before { background: var(--accent); }
.section--dark .section__subtitle { color: var(--sidebar-text); }

.section__label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.section__label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  font-style: italic;
  margin-bottom: 10px;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  color: var(--text-main);
}
.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: min(560px, 100%);
  line-height: var(--leading-relaxed);
  margin-bottom: 10px;
  overflow-wrap: break-word;
}
.section__divider {
  width: 50px;
  height: 3px;
  background: var(--accent);
  border: none;
  margin: 10px 0;
}
.section__header { margin-bottom: 1.75rem; }
.section__header--center { text-align: center; }
.section__header--center .section__divider { margin-inline: auto; }
.section__header--center .section__subtitle { margin-inline: auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-main);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
}
h1 { font-size: var(--text-hero); font-weight: var(--weight-extrabold); }
h2 { font-size: var(--text-4xl); font-weight: 800; }
h3 { font-size: var(--text-2xl); }
p { line-height: var(--leading-relaxed); }

/* ===== HERO LOAD ANIMATIONS ===== */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== REVEAL (IntersectionObserver: opacity 0→1, translateY 20px→0, 0.5s) — GPU-friendly ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth); will-change: transform; }
.reveal--visible { opacity: 1; transform: translateY(0); will-change: auto; }
.reveal-left { opacity: 0; transform: translateX(-24px); transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth); will-change: transform; }
.reveal-left--visible { opacity: 1; transform: translateX(0); will-change: auto; }
.reveal-right { opacity: 0; transform: translateX(24px); transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth); will-change: transform; }
.reveal-right--visible { opacity: 1; transform: translateX(0); will-change: auto; }
.reveal-scale { opacity: 0; transform: scale(0.96); transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth); will-change: transform; }
.reveal-scale--visible { opacity: 1; transform: scale(1); will-change: auto; }
/* Fallback: if JS fails to add --visible classes, show content after 3s */
@keyframes revealFallback {
  to { opacity: 1; transform: none; }
}
.reveal, .reveal-left, .reveal-right, .reveal-scale {
  animation: revealFallback 0.6s ease forwards 3s;
}
.reveal--visible, .reveal-left--visible, .reveal-right--visible, .reveal-scale--visible {
  animation: none;
}
.hero .reveal, .hero .reveal-left, .hero .reveal-right { opacity: 1; transform: translateY(0); }
.hero .reveal-left { transform: translateX(0); }
.hero .reveal-right { transform: translateX(0); }
.stats .reveal { opacity: 1; transform: translateY(0); }
.about-intro .reveal-left, .about-intro .reveal-right { opacity: 1; transform: translateX(0); }
[data-delay="1"] { transition-delay: .1s; }
[data-delay="2"] { transition-delay: .2s; }
[data-delay="3"] { transition-delay: .3s; }
[data-delay="4"] { transition-delay: .4s; }

/* ===== HERO: min-height 100vh, content left so it doesn't cover doctor's face ===== */
.hero {
  position: relative;
  min-height: 100vh;
  margin-top: -72px;
  padding-top: 72px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--sidebar-bg);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--sidebar-bg);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.20) 40%, rgba(13,148,136,.08) 70%, transparent 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 2rem 5%;
  margin-left: 5%;
  margin-right: auto;
  max-width: 640px;
  text-align: left;
}
/* Tabular nums on counter to reduce layout shift during count animation (desktop + mobile) */
.hero__accent-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw + 1rem, 4.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: var(--leading-tight);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: normal;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 4px 24px rgba(0,0,0,0.4), 0 0 40px rgba(0,0,0,0.2);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  animation: heroFadeUp 0.9s var(--ease-out) 0.15s both;
}
.hero__accent-number span { font-size: 0.65em; }
.hero__accent-number-value,
.hero__accent-number-plus {
  display: inline-block;
  font-size: 1em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  will-change: contents;
}
.hero__divider {
  width: 60px; height: 3px; background: var(--accent); border: none; margin: 10px 0 14px;
  animation: heroFadeIn 0.8s var(--ease-out) 0.45s both;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vw, 1.75rem);
  font-style: normal;
  font-weight: 800;
  color: var(--white);
  line-height: var(--leading-snug);
  margin-bottom: 12px;
  max-width: 520px;
  margin-left: 0;
  margin-right: auto;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 4px 20px rgba(0,0,0,0.4), 0 0 30px rgba(0,0,0,0.25);
  animation: heroFadeUp 0.9s var(--ease-out) 0.55s both;
}
.hero__actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0; justify-content: flex-start;
  animation: heroFadeUp 0.9s var(--ease-out) 0.75s both;
}
.hero__scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.hero__scroll-hint span {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  font-weight: var(--weight-medium);
}
.hero__scroll-line {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.25);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: translateY(-100%);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0% { transform: translateY(-100%); } 50% { transform: translateY(100%); } 100% { transform: translateY(100%); } }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  box-shadow: var(--shadow-soft);
}
.btn:hover { transform: scale(1.03); }
.btn--accent { background: var(--accent); color: var(--white); border-color: var(--accent); border-radius: 30px; box-shadow: 0 4px 18px rgba(13, 148, 136, 0.4), 0 8px 36px rgba(13, 148, 136, 0.2), 0 0 20px rgba(13, 148, 136, 0.15); }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 8px 32px rgba(13, 148, 136, 0.55), 0 16px 52px rgba(13, 148, 136, 0.3), 0 0 36px rgba(13, 148, 136, 0.2); transform: scale(1.04) translateY(-2px); }
.btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); box-shadow: none; }
.btn--outline:hover { background: var(--white); color: var(--text-main); border-color: var(--white); box-shadow: var(--shadow-soft); }
.btn--outline-dark { background: transparent; color: var(--text-main); border-color: var(--text-main); box-shadow: none; }
.btn--outline-dark:hover { background: var(--text-main); color: var(--white); box-shadow: var(--shadow-soft); }
.btn--lg { padding: 0.9rem 2rem; font-size: var(--text-sm); }
.btn--white { background: var(--white); color: var(--text-main); border-color: var(--white); box-shadow: var(--shadow-soft); }
.btn--white:hover { background: transparent; color: var(--white); border-color: var(--white); box-shadow: 0 0 0 2px var(--white); }

/* ===== STATS ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  align-items: center;
  justify-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6F5 100%);
  padding-left: 5% !important;
  padding-right: 5% !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(13, 148, 136, 0.08);
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}
.stats__item { display: flex; flex-direction: column; align-items: center; }
.stats__number {
  font-family: var(--font-heading);
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--accent);
  line-height: var(--leading-none);
}
.stats__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== SERVICES GRID (tight, 3 columns on desktop) ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 1.25rem;
}
.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 12px 40px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #22d3c8);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}
.service-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12), 0 36px 72px rgba(15, 23, 42, 0.08); border-color: rgba(13, 148, 136, 0.3); }
.service-card:hover::after { opacity: 1; }
.service-card__img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
  border-radius: 15px 15px 0 0;
}
.service-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease-out);
}
.service-card:hover .service-card__img { transform: scale(1.05); }
.service-card__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(15,23,42,.75) 100%);
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  transition: background .35s var(--ease-out);
}
.service-card:hover .service-card__img-overlay {
  background: linear-gradient(180deg, rgba(13,148,136,.12) 0%, rgba(15,23,42,.85) 70%);
}
.service-card__img-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--white);
  line-height: var(--leading-tight);
}
.service-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.service-card__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: 10px;
  flex-grow: 1;
}
.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  transition: gap .25s var(--ease-out);
  margin-top: auto;
}
.service-card__link:hover { gap: 0.5rem; }

/* Services CTA: below last row of cards, centered, no overlap */
.services-section__cta {
  display: block;
  margin-top: 2.5rem;
  padding-top: 50px;
  text-align: center;
  position: static;
}

/* ===== TEAM ===== */
.section--team {
  padding-top: 110px !important; /* 60px section + 50px gap above Naš tim */
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  max-width: 100%;
}
.team-card { text-align: center; }
.team-card__img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 3/4;
  margin-bottom: 8px;
  background: var(--bg-off);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.team-card:hover .team-card__img-wrap {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-accent);
}
.team-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
  transition: transform .5s var(--ease-out), filter .5s;
}
.team-card:hover .team-card__img { transform: scale(1.03); filter: grayscale(0); }
.team-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  margin-bottom: 2px;
}
.team-card__role { font-size: var(--text-xs); color: var(--text-muted); margin-bottom: 0; }
.team-card__socials { display: flex; justify-content: center; gap: 0.5rem; margin-top: 4px; }
.team-card__social-link { color: var(--text-light); font-size: var(--text-xs); transition: color .2s; }
.team-card__social-link:hover { color: var(--accent); }

/* ===== BOOKING CTA (no space-between) ===== */
.booking-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-left: 5% !important;
  padding-right: 5% !important;
  position: relative;
  overflow: hidden;
}
.booking-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(13,148,136,0.4), transparent);
}
.booking-cta::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.booking-cta__text h2 { color: var(--sidebar-text-bright); margin-bottom: 4px; font-size: var(--text-2xl); font-family: var(--font-display); }
.booking-cta__text p { color: var(--sidebar-text); font-size: var(--text-base); margin-bottom: 0; }
/* Flush: seamless transition from map to CTA bar */
.booking-cta--flush {
  margin-top: 0 !important;
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}
.booking-cta--flush::before {
  display: none;
}

/* Pulse animation for CTA button */
@keyframes ctaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  70%  { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.btn--pulse {
  animation: ctaPulse 2.5s ease-in-out 3s infinite;
}
.btn--pulse:hover {
  animation-play-state: paused;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding-left: 5% !important;
  padding-right: 5% !important;
  padding-bottom: 1rem !important;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.footer__heading {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--sidebar-text-bright);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.footer__text { font-size: var(--text-sm); line-height: var(--leading-relaxed); margin-bottom: 0; }
.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--sidebar-text);
  padding: 0.15rem 0;
  transition: color .2s, padding-left .2s;
}
.footer__link:hover { color: var(--accent); padding-left: 4px; }
.footer__bottom {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__copyright { font-size: var(--text-xs); color: var(--text-light); }

/* ===== ABOUT INTRO ===== */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}
.about-intro__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  position: relative;
}
.about-intro__img::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(13, 148, 136, 0.15);
  pointer-events: none;
}
.about-intro__img img { width: 100%; height: 100%; object-fit: cover; }
.about-intro__text .section__label { margin-bottom: 6px; }
.about-intro__text h2 { margin-bottom: 8px; }
.about-intro__text p { color: var(--text-muted); margin-bottom: 10px; }
.about-intro__text .btn { margin-top: 0; }

/* ===== PAGE HERO (inner pages, compact) ===== */
.page-hero {
  position: relative;
  height: auto !important;
  min-height: 0 !important;
  padding: 5rem 5% 2.5rem !important;
  margin-top: -72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--sidebar-bg);
}
.page-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.page-hero__overlay { position: absolute; inset: 0; background: var(--overlay-dark); }
.page-hero__content { position: relative; z-index: 2; text-align: center; }
.page-hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}
.page-hero__subtitle { font-size: var(--text-base); color: rgba(255,255,255,0.7); margin-bottom: 0; }
.page-hero__divider { width: 50px; height: 3px; background: var(--accent); border: none; margin: 8px auto 0; }

/* ===== ABOUT PAGE ===== */
.about-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.about-value { display: flex; gap: 0.75rem; align-items: flex-start; }
.about-value__icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.about-value__text h4 { font-size: var(--text-base); margin-bottom: 2px; }
.about-value__text p { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 0; }

/* ===== SERVICES PAGE ===== */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.service-detail--reverse { direction: rtl; }
.service-detail--reverse > * { direction: ltr; }
.service-detail__img { position: relative; overflow: hidden; }
.service-detail__img img { width: 100%; height: 100%; object-fit: cover; }
.service-detail__content { display: flex; flex-direction: column; justify-content: center; padding: 2rem; }
.service-detail__content h3 { font-size: var(--text-2xl); margin-bottom: 0.5rem; }
.service-detail__content p { color: var(--text-muted); margin-bottom: 0.75rem; line-height: var(--leading-relaxed); }
.service-detail__list { margin-bottom: 1rem; }
.service-detail__list li { padding: 0.25rem 0; font-size: var(--text-sm); color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; }
.service-detail__list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ===== GALLERY ===== */
.gallery-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; justify-content: center; }
.gallery-filter-btn {
  padding: 0.4rem 1rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all .25s var(--ease-out);
}
.gallery-filter-btn:hover,
.gallery-filter-btn--active { background: var(--accent); color: var(--white); border-color: var(--accent); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s;
  color: var(--white);
  opacity: 0;
}
.gallery-item:hover .gallery-item__overlay { background: rgba(15,23,42,0.6); opacity: 1; }
.gallery-item__label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
}

/* ===== CONTACT PAGE ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.5rem; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--dental-gray);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-light);
  transition: box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.contact-info-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}
.contact-info-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.contact-info-card__text h4 { font-size: var(--text-base); margin-bottom: 2px; }
.contact-info-card__text p,
.contact-info-card__text a { font-size: var(--text-sm); color: var(--text-muted); }
.contact-info-card__text a:hover { color: var(--accent); }
.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 12px 48px rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border-light);
}
.contact-form h3 { margin-bottom: 1.25rem; }
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-off);
  font-size: var(--text-sm);
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
  font-style: italic;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
  outline: none;
}
.form-group textarea { resize: vertical; min-height: 100px; }
/* Gradient submit button */
.contact-form .btn--accent {
  background: linear-gradient(135deg, #0D9488 0%, #0f766e 100%);
  border: none;
  border-radius: 50px;
  font-size: var(--text-sm);
  padding: 1rem 2rem;
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.35);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.contact-form .btn--accent:hover {
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.5);
  transform: translateY(-2px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.contact-map {
  margin: 0;
  padding: 0 !important;
  border-radius: 0;
  overflow: hidden;
  width: 100%;
  box-shadow: inset 0 3px 12px rgba(15, 23, 42, 0.08);
  position: relative;
}
.contact-map iframe { width: 100%; height: 400px; border: 0; display: block; }
/* Grayscale map with color on hover */
.contact-map--grayscale iframe {
  filter: grayscale(100%) brightness(0.95);
  transition: filter 0.5s var(--ease-smooth);
}
.contact-map--grayscale:hover iframe {
  filter: grayscale(0%) brightness(1);
}
.contact-map__caption { text-align: center; padding: 0.6rem 1rem; background: var(--sidebar-bg); font-size: var(--text-sm); color: var(--sidebar-text); margin: 0; }
.contact-map__caption a { color: var(--accent); font-weight: var(--weight-semibold); transition: color 0.2s; }
.contact-map__caption a:hover { text-decoration: underline; }

/* ===== CHAT ATTENTION BOUNCE (fires every 30s after 8s initial delay) ===== */
@keyframes chatAttention {
  0%    { transform: scale(1) translateY(0); }
  2%    { transform: scale(1.08) translateY(-7px); }
  4%    { transform: scale(1) translateY(0); }
  5.5%  { transform: scale(1.06) translateY(-5px); }
  7%    { transform: scale(1) translateY(0); }
  100%  { transform: scale(1) translateY(0); }
}

/* ===== CHAT WIDGET — modern UI, smooth open, typing animation ===== */
.chat-toggle {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  min-width: 160px;
  height: 48px;
  border-radius: 9999px;
  border: none;
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  z-index: 600;
  box-shadow: 0 6px 24px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  animation: chatAttention 30s ease-in-out 8s infinite;
}
.chat-toggle:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
  box-shadow: 0 8px 32px var(--accent-glow), 0 16px 48px rgba(13, 148, 136, 0.2);
  animation-play-state: paused;
}
.chat-toggle__text { font-family: var(--font-heading); font-size: 0.85rem; font-weight: var(--weight-semibold); letter-spacing: 0.02em; white-space: nowrap; }
.chat-toggle__avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.9); }
.chat-toggle__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.chat-widget {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: 100px;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(480px, calc(100vh - 6rem));
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 601;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.chat-widget--open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.chat-widget__header {
  padding: 0.85rem 1rem;
  background: var(--sidebar-bg);
  color: var(--sidebar-text-bright);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
}
.chat-widget__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.chat-widget__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}
.chat-widget__close {
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
  margin-left: auto;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
.chat-widget__close:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.chat-widget__body { padding: 1rem; background: var(--dental-gray); flex: 1; overflow-y: auto; min-height: 220px; max-height: 300px; }
.chat-widget__messages { display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble {
  max-width: 85%;
  padding: 0.65rem 1rem;
  font-size: 15px;
  line-height: 1.5;
  animation: chatFadeIn 0.3s var(--ease-out);
}
@keyframes chatFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.chat-bubble--assistant {
  align-self: flex-start;
  background: var(--white);
  color: var(--text-main);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--white);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.25);
}
.chat-bubble--typing {
  align-self: flex-start;
  background: var(--white);
  color: var(--text-light);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-style: normal;
  min-height: 1.5em;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 1rem;
  font-size: 15px;
  line-height: 1.5;
}
.chat-bubble--typing .chat-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.chat-bubble--typing .chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-light);
  animation: chatTypingBounce 1.2s ease-in-out infinite both;
}
.chat-bubble--typing .chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-bubble--typing .chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chat-widget__footer {
  padding: 0.75rem 1rem;
  background: var(--white);
  border-top: 1px solid #eee;
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 0.5rem;
}
.chat-widget__input {
  flex: 1;
  border: none;
  border-radius: 24px;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  background: #f1f5f9;
  transition: box-shadow 0.2s;
}
.chat-widget__input::placeholder { color: var(--text-light); }
.chat-widget__input:focus { outline: none; box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2); }
.chat-widget__send {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.chat-widget__send:hover { background: var(--accent-hover); transform: scale(1.05); }

.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; }
