/* =========================================================
   DENTAL MAX — responsive.css
   Mobile-first: style.css já cobre o layout em telemóvel.
   Aqui progressivamente ativamos tablet/desktop.
   ========================================================= */

/* ---------- Até 767px: menu hamburger ---------- */
@media (max-width: 767.98px) {
  .menu-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul {
    flex-direction: column;
    padding: 10px 20px 20px;
    gap: 2px;
  }
  .main-nav a { padding: 14px 10px; font-size: 1rem; border-bottom: 1px solid var(--gray-100); }

  .btn-header-cta { display: none; }

  .hero-actions .btn,
  .contact-actions .btn { width: 100%; }

  /* Menos deslocamento horizontal em ecrãs pequenos, para nunca aproximar o overflow lateral. */
  [data-reveal="left"] { transform: translateX(-16px); }
  [data-reveal="right"] { transform: translateX(16px); }

  /* Resultados: carrossel horizontal com scroll-snap, em vez de 3 cards altos empilhados. */
  .results-grid {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -20px;
    padding: 4px 20px 10px;
    scrollbar-width: none;
  }
  .results-grid::-webkit-scrollbar { display: none; }
  .result-card {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .results-dots { display: flex; }

  /* Lightbox: menos padding lateral para dar mais espaço à imagem. */
  .lightbox-box { padding: 46px 16px 20px; }
  .lightbox-nav { width: 36px; height: 36px; }
  .lightbox-nav svg { width: 18px; height: 18px; }
}

/* ---------- 768px+ (tablet) ---------- */
@media (min-width: 768px) {
  .hero-inner { flex-direction: row; align-items: center; }
  .hero-content { flex: 1; }
  .hero-media { flex: 1; }
  .hero-img { height: 420px; }

  .highlights-grid { grid-template-columns: repeat(3, 1fr); }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: repeat(3, 1fr); }

  .about-inner { flex-direction: row; align-items: center; text-align: left; }
  .about-media { flex: 1; }
  .about-media img, .about-media.img-fallback { height: 380px; }
  .about-content { flex: 1; text-align: left; }
  .about-content .section-title, .about-content .section-eyebrow { text-align: left; }
  .about-text { margin-left: 0; }

  .form-row { grid-template-columns: 1fr 1fr; }

  .contacts-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-actions { flex-direction: row; flex-wrap: wrap; max-width: none; justify-content: center; }
  .contact-actions .btn { width: auto; }

  .footer-inner { flex-direction: row; justify-content: space-between; }
  .footer-nav { flex-direction: row; gap: 24px; }
}

/* ---------- 1024px+ (desktop) ---------- */
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }

  .booking-inner { flex-direction: row; align-items: flex-start; }
  .booking-intro { flex: 0 0 40%; text-align: left; position: sticky; top: calc(var(--header-h) + 20px); }
  .booking-intro .section-eyebrow,
  .booking-intro .section-title { text-align: left; }
  .booking-text { margin-left: 0; }
  .booking-alt-contact { align-items: flex-start; }
  .booking-form { flex: 1; }

  .hero { padding: 84px 0 100px; }
  .highlights { padding: 100px 0 64px; }
}

/* ---------- 1366px+ (desktop grande) ---------- */
@media (min-width: 1366px) {
  .hero-img { height: 480px; }
}

/* ---------- Garantia: sem scroll horizontal em nenhuma largura ---------- */
html, body { max-width: 100%; }
