/* ============================================================
   MEGABITE — Cabinet stomatologic
   Minimalist, bold, mobile-first. Palette: charcoal grey / black
   on white.
   ============================================================ */

:root {
  --ink:        #0f1115;   /* near-black */
  --ink-soft:   #3a3f47;
  --muted:      #6b7280;
  --line:       #e4e6ea;
  --bg:         #eceef1;   /* light grey page canvas */
  --paper:      #ffffff;   /* white surfaces (cards, header) */
  --paper-alt:  #f4f5f7;   /* alternating band — a hair lighter than canvas */
  --accent:     #33383f;   /* charcoal grey */
  --accent-dk:  #1a1d22;   /* near-black charcoal */
  --accent-soft:#eceef1;   /* light grey tint */
  --accent-lt:  #b7bcc4;   /* light grey (for dark sections) */

  --radius:     14px;
  --radius-lg:  22px;
  --maxw:       1120px;
  --ease:       cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}
.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 4px;
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-dk); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 14vw, 150px) 0 clamp(64px, 11vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, transparent 68%);
  z-index: -1;
  pointer-events: none;
}
.hero-inner { max-width: 760px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dk);
  margin-bottom: 20px;
}

.hero-logo {
  width: min(600px, 100%);
  height: auto;
  margin: 6px 0 30px;
}

.hero-lead {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 26px;
}

.hero-badges { margin-bottom: 32px; }

.cas-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.cas-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-note { font-size: 0.9rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(15, 17, 21, 0.22);
}
.btn-primary:hover { background: var(--accent-dk); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn-lg { padding: 17px 40px; font-size: 1.05rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 116px) 0; }
.section-alt { background: var(--paper-alt); }

.section-head { max-width: 620px; margin-bottom: clamp(38px, 6vw, 60px); }
.section-index {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent-dk);
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Servicii cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin-bottom: 22px;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -24px rgba(15, 17, 21, 0.22);
  border-color: transparent;
}
.card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.card p { color: var(--ink-soft); }

/* ---------- Medici ---------- */
.doctors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.doctor {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.doctor-avatar {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--ink);
}
.doctor-body h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 6px; }
.doctor-body p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Galerie ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-alt);
  aspect-ratio: 3 / 2;
  cursor: pointer;
  display: block;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0);
  transition: background 0.3s var(--ease);
}
.gallery-item:hover::after { background: rgba(15, 17, 21, 0.1); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 11, 14, 0.93);
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 20px; right: 20px; width: 48px; height: 48px; font-size: 1.9rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 2rem; }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
@media (max-width: 560px) {
  .lightbox-nav { width: 44px; height: 44px; font-size: 1.6rem; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* ---------- Program ---------- */
.program-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 70px);
  align-items: start;
}
.program-grid .section-head { margin-bottom: 0; }

.hours {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 30px 26px;
  background: var(--paper);
}
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.hours-row:last-of-type { border-bottom: none; }
.hours-row.muted { color: var(--muted); }
.hours-open { font-weight: 700; color: var(--accent-dk); }
.hours-note { color: var(--muted); font-size: 0.92rem; margin-top: 16px; }

/* ---------- Contact (dark) ---------- */
.section-dark { background: var(--ink); color: #fff; }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head p { color: rgba(255, 255, 255, 0.6); }
.section-dark .section-index { color: var(--accent-lt); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
}
.contact-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-lt);
  margin-bottom: 6px;
}
.contact-value { font-size: 1.15rem; font-weight: 600; transition: color 0.2s var(--ease); }
a.contact-value:hover { color: #fff; }
.contact-sub { font-size: 0.88rem; color: rgba(255, 255, 255, 0.5); }

/* Social icon buttons */
.socials { display: flex; gap: 12px; margin-top: 4px; }
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; }

/* Embedded map */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 46px;
  line-height: 0;
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  filter: grayscale(1) contrast(1.03);
}

.contact-cta { text-align: center; }
.cas-note {
  margin-top: 18px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 46px 0;
}
.footer-inner { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.site-footer .brand { color: #fff; letter-spacing: 0.16em; }
.site-footer p { font-size: 0.92rem; }
.footer-socials { display: flex; gap: 12px; margin: 12px 0 6px; }
.footer-cas { font-size: 0.85rem; color: var(--accent-lt); font-weight: 600; }
.copyright { color: rgba(255, 255, 255, 0.45); font-size: 0.85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 800px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 22px 22px;
    transform: translateY(-140%);
    transition: transform 0.35s var(--ease);
    box-shadow: 0 24px 40px -24px rgba(15, 17, 21, 0.28);
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:last-child { border-bottom: none; }
  .nav-cta { margin-top: 14px; text-align: center; padding: 14px; }

  .program-grid { grid-template-columns: 1fr; }
}

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

/* ---------- Motion / accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* --- Language switcher --- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.lang-switch a {
  color: inherit;
  opacity: .55;
  text-decoration: none;
  transition: opacity .2s ease;
}
.lang-switch a:hover { opacity: .85; }
.lang-switch a.is-active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* header copy sits in the nav on desktop; standalone on mobile menu */
.header-inner > .nav { margin-left: auto; }
.header-inner > .lang-switch { margin-left: 1.25rem; }
@media (max-width: 800px) {
  .header-inner > .lang-switch { display: none; }
  #nav .lang-switch { margin-top: 1rem; }
}
@media (min-width: 801px) {
  #nav .lang-switch { display: none; }
}
