/* Ajustes finales para la versión de portafolio.
   Este archivo se carga al final para resolver reglas históricas sin alterar
   Supabase, el panel administrativo ni la estructura del sitio. */

.site-header .brand-with-logo,
.site-header .brand-logo,
.site-header .brand-logo img {
  aspect-ratio: 1312 / 284;
}

.site-header .brand-with-logo {
  flex-shrink: 0 !important;
}

.site-header .brand-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 92px;
  }

  html body .site-header .header-inner {
    min-height: 84px !important;
    padding-block: 10px !important;
    gap: 12px !important;
  }

  html body .site-header .header-inner > a.brand.brand-with-logo {
    width: min(248px, calc(100vw - 88px)) !important;
    min-width: min(248px, calc(100vw - 88px)) !important;
    max-width: min(248px, calc(100vw - 88px)) !important;
    flex: 0 0 auto !important;
    margin: 0 auto 0 0 !important;
    transform: none !important;
  }

  html body .site-header .brand-logo,
  html body .site-header .brand-logo img {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html body .site-header .nav-toggle,
  html body .site-header .nav-toggle.is-open {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
  }

  html body .site-header .main-nav {
    top: 84px !important;
    left: 12px !important;
    right: 12px !important;
    max-height: calc(100svh - 96px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  html body.nav-open {
    overflow: hidden !important;
  }

  html body .site-header .nav-links,
  html body .site-header .header-actions {
    width: 100% !important;
  }

  html body .site-header .nav-links a,
  html body .site-header .btn-header {
    min-height: 44px !important;
  }

  html body .hero-actions .btn,
  html body .contact-panel .btn,
  html body .booking-card .btn,
  html body .product-card .btn,
  html body .treatment-card .btn {
    min-height: 46px !important;
  }

  html body input,
  html body select,
  html body textarea {
    max-width: 100% !important;
    font-size: 1rem !important;
  }

  html body .product-toolbar {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  html body .chip-row {
    gap: 8px !important;
  }

  html body .chip-row .chip {
    min-height: 42px !important;
    padding: 10px 16px !important;
  }

  html body .treatment-card .card-body {
    min-height: 0 !important;
  }

  html body .treatment-card .service-whatsapp-cta,
  html body .treatment-card .btn.btn-outline {
    width: 100% !important;
    margin-top: 24px !important;
    justify-content: center !important;
  }

  html body .contact-grid,
  html body .reservation-layout {
    gap: 20px !important;
  }

  html body .form-grid label,
  html body .side-form label {
    min-width: 0 !important;
  }

  html body .section-tag,
  html body .card h3,
  html body .contact-panel,
  html body .footer-contact-list {
    overflow-wrap: anywhere;
  }

  html body a.whatsapp-float,
  html body .whatsapp-float {
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .brand-with-logo,
  .site-header .brand-logo,
  .site-header .brand-logo img {
    transition: none !important;
  }
}

/* Formularios y páginas legales */
.consent-check {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  color: rgba(18, 51, 51, 0.78);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
}

.consent-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 2px 0 0 !important;
  accent-color: #397B82;
}

.consent-check a,
.footer-legal-bar a,
.legal-content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.footer-legal-bar a {
  display: block;
  color: #ffffff !important;
  opacity: 1;
  white-space: nowrap;
}

.footer-legal-bar a:nth-child(2) {
  text-align: center;
}

.footer-legal-bar a:last-child {
  text-align: right;
}

.legal-page-section {
  padding-block: clamp(54px, 7vw, 92px);
}

.legal-shell {
  width: min(100%, 920px);
  margin: 0 auto;
}

.legal-heading {
  margin-bottom: 32px;
  text-align: center;
}

.legal-heading .eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #397B82;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-heading h1 {
  margin: 0 0 12px;
  color: #123333;
  font-family: var(--font-bozon);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
}

.legal-heading p {
  margin: 0;
  color: rgba(18, 51, 51, 0.66);
  font-size: 0.95rem;
}

.legal-content {
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(94, 157, 164, 0.24);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(18, 51, 51, 0.08);
}

.legal-content section + section {
  margin-top: 30px;
  padding-top: 28px;
  border-top: 1px solid rgba(94, 157, 164, 0.18);
}

.legal-content h2 {
  margin: 0 0 12px;
  color: #123333;
  font-family: var(--font-bozon);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.25;
}

.legal-content p,
.legal-content li {
  color: rgba(18, 51, 51, 0.78);
  font-size: 1rem;
  line-height: 1.72;
}

.legal-content p {
  margin: 0;
}

.legal-content p + p {
  margin-top: 12px;
}

.legal-content ul {
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-notice {
  margin-top: 28px !important;
  padding: 18px 20px;
  border-left: 4px solid #5E9DA4;
  border-radius: 0 14px 14px 0;
  background: #EDF7F8;
}

@media (max-width: 760px) {
  .footer-legal-bar a,
  .footer-legal-bar a:nth-child(2),
  .footer-legal-bar a:last-child {
    text-align: center !important;
    white-space: normal !important;
  }

  .legal-page-section {
    padding-block: 42px 56px;
  }

  .legal-heading {
    margin-bottom: 24px;
  }

  .legal-heading h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .legal-content {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .legal-content section + section {
    margin-top: 24px;
    padding-top: 22px;
  }
}
