/* Responsive styles for Solara Premium Theme */

@media (max-width: 1080px) {
  :root {
    --section-padding: 84px;
  }

  /* Hide the desktop "Reservar" button and the nav links */
  .nav-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  /* El header flota sobre el overlay para que el botón X sea siempre visible */
  .site-header {
    z-index: 1001;
  }

  /* Anchor the dropdown to the bottom of the navbar */
  .navbar {
    position: relative;
    overflow: visible;
  }

  /* Mobile menu: siempre en el DOM (display:grid), oculto vía opacity/visibility */
  .nav-menu {
    display: grid !important;
    position: fixed !important;
    /* Empieza justo debajo del header (~90px) para que el botón X quede visible */
    top: 90px;
    left: 0;
    width: 100%;
    /* Altura restante tras el header */
    height: calc(100vh - 90px);
    background-color: var(--color-surface, #fff);
    padding: 1.5rem 2rem 2rem;
    gap: 1rem;
    z-index: 999;
    overflow-y: auto;
    border-top: 1px solid var(--color-border, #eee);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
  }

  .nav-menu.is-open {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .nav-menu a {
    font-size: 1rem;
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid var(--color-border, #eee);
    border-radius: 0;
  }

  .nav-menu a:last-child {
    border-bottom: none;
  }

  .nav-menu a:hover {
    background: var(--color-bg-soft);
    padding-left: 0.5rem;
    transition: padding-left 150ms ease;
  }

  .nav-menu .lang-switcher {
    margin-top: auto;
  }

  .hero-grid,
  .grid-2,
  .section-heading,
  .contact-grid,
  .newsletter-box,
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 560px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .price-card.featured {
    transform: none;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* ── Mobile hero & stats ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
    padding: 100px 1.5rem 3rem;
    text-align: center;
  }

  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-actions a {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* 4 stats → 2×2 grid on mobile */
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
  }
}

@media (max-width: 720px) {
  :root {
    --section-padding: 70px;
  }

  .container {
    width: min(100% - 22px, var(--container));
  }

  .site-header {
    top: 10px;
  }

  /* A 720px el header mide ~74px (top:10 + navbar:64): ajustar el overlay */
  .nav-menu {
    top: 74px !important;
    height: calc(100vh - 74px) !important;
  }

  .navbar {
    min-height: 64px;
    padding: 9px 11px;
  }

  .logo-text {
    max-width: 132px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding: 122px 0 60px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  h2 {
    font-size: clamp(2.35rem, 13vw, 3.8rem);
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
  }

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

  .hero-stats,
  .grid-3,
  .grid-4,
  .sidebar,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 460px;
  }

  .hero-card {
    inset: 0 0 82px 0;
    border-radius: 34px;
  }

  .floating-panel {
    left: 14px;
    right: 14px;
    max-width: none;
    padding: 20px;
  }

  .orbit-badge {
    width: 94px;
    height: 94px;
    right: 14px;
    top: 24px;
    font-size: 0.82rem;
  }

  .service-card {
    min-height: 260px;
  }

  .service-icon {
    margin-bottom: 34px;
  }

  .split-image img {
    height: 380px;
  }

  .newsletter-box,
  .cta-panel {
    padding: 32px 22px;
    border-radius: 30px;
  }

  .newsletter-form {
    flex-direction: column;
    border-radius: 24px;
  }

  .newsletter-form input {
    min-height: 46px;
  }

  .article-hero,
  .page-hero {
    padding: 126px 0 58px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .icon-button {
    width: 42px;
    height: 42px;
  }

  /* Mantener tamaño mínimo del hamburguesa en pantallas muy pequeñas */
  .menu-toggle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Hide language dropdown on very small screens to avoid navbar overflow */
  .lang-dropdown {
    display: none;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .post-body,
  .price-card,
  .testimonial-card,
  .contact-card,
  .benefit-card {
    padding: 24px;
  }
}

/* Desktop: restablecer nav-menu a fila horizontal */
@media (min-width: 1081px) {
  .nav-menu {
    display: flex;
    flex-direction: row;
    position: static;
    height: auto;
    width: auto;
    background: none;
    padding: 0;
    overflow-y: visible;
  }

  .menu-toggle {
    display: none;
  }
}
