/* ZUR Boutique Hostel — adaptabilidad global (móvil, tablet, escritorio) */

:root {
  --section-pad-x: clamp(1rem, 3vw, 1.35rem);
  --section-pad-y: clamp(2.75rem, 4.5vw, 3.5rem);
  --header-inset: clamp(0.65rem, 2.5vw, 0.85rem);
  --content-max: 1140px;
}

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

body {
  overflow-x: clip;
}

.hero {
  overflow-x: visible;
}

/* Áreas seguras (notch / barra de gestos) */
.site-header {
  top: max(var(--header-inset), env(safe-area-inset-top, 0px));
  left: max(var(--header-inset), env(safe-area-inset-left, 0px));
  right: max(var(--header-inset), env(safe-area-inset-right, 0px));
}

.promo-bar {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.book-tab {
  right: env(safe-area-inset-right, 0px);
}

.cookie-banner {
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

/* Cabecera — evitar que “Boutique” o el teléfono se corten con “…” */
.logo {
  flex-shrink: 0;
  min-width: 0;
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    align-items: center;
  }

  .header-pill {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .header-actions {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 0.5rem;
  }

  .header-pill {
    flex: 1 1 100%;
    justify-content: space-between;
    padding: 0.55rem 0.9rem;
    gap: 0.85rem;
  }

  .header-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
    gap: 0.4rem;
  }

  .logo {
    font-size: 0.9rem;
  }

  .logo small {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .btn-book-header {
    font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    padding: 0.65rem 0.9rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .btn-lang {
    padding: 0.65rem 0.75rem;
    font-size: 0.75rem;
  }

  body.page-home .hero {
    padding-top: calc(9.25rem + env(safe-area-inset-top, 0px));
  }

  body.page-home .hero-title .line {
    font-size: clamp(2.6rem, 13.5vw, 4.2rem);
  }
}

/* Menú lateral */
@media (max-width: 899px) {
  .nav-drawer {
    padding: max(0.75rem, env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px))
      max(0.75rem, env(safe-area-inset-left, 0px));
    place-items: stretch;
    align-content: center;
  }

  .nav-modal {
    width: 100%;
    max-height: min(96dvh, 100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: auto 0;
  }

  .nav-top {
    padding-left: 4.25rem;
    gap: 0.65rem;
  }

  .nav-close {
    width: 48px;
    height: 48px;
    font-size: 1.65rem;
  }

  .nav-media {
    display: none;
  }
}

@media (max-height: 700px) {
  .nav-media img {
    max-height: min(26vh, 220px);
  }

  .nav-links {
    gap: 0.85rem;
  }

  .nav-links a {
    font-size: clamp(1.35rem, 3.2vw, 2rem);
  }
}

/* Secciones */
.section {
  padding-left: var(--section-pad-x);
  padding-right: var(--section-pad-x);
}

.about-intro,
.about-values,
.about-team,
.about-gallery,
.about-reviews-teaser,
.rooms-intro,
.rooms-catalog,
.contact-intro,
.contact-main,
.grupos-experience,
.grupos-contact,
.article-shell,
.article-cta,
.article-related,
.faq-section .section-inner,
.legal-inner,
.privacy-inner,
.cookies-inner {
  padding-left: var(--section-pad-x);
  padding-right: var(--section-pad-x);
}

/* Heroes */
@media (max-width: 520px) {
  .hero,
  .page-hero,
  .contact-visual-hero,
  .grupos-hero {
    padding-top: 6rem;
    padding-bottom: calc(4rem + var(--promo-h));
  }

  body.page-home .hero {
    padding-top: calc(9.5rem + env(safe-area-inset-top, 0px));
  }

  body.page-home .hero-title .line {
    font-size: clamp(2.5rem, 13vw, 3.95rem);
  }

  .page-hero--cookies,
  .page-hero--privacy,
  .page-hero--legal {
    min-height: 42vh;
    min-height: 42dvh;
    padding-top: 5.5rem;
    padding-bottom: 2rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero,
  .page-hero,
  .contact-visual-hero,
  .grupos-hero,
  .page-hero--article {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: calc(2.5rem + var(--promo-h));
  }

  .error-hero {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }
}

/* Inicio — Bienvenida (solo móvil) */
@media (max-width: 899px) {
  body.page-home .welcome-media {
    display: none;
  }

  body.page-home .welcome-text {
    display: flex;
    flex-direction: column;
  }

  body.page-home .welcome-services-wrap {
    order: 2;
    margin-top: 1.15rem;
    margin-bottom: 0;
  }

  body.page-home .welcome-discover-cta {
    order: 3;
    margin-top: 1.15rem;
    margin-bottom: 0;
    max-width: 100%;
  }
}

/* Títulos interiores */
@media (max-width: 520px) {
  .page-hero-title,
  .page-hero--legal .page-hero-title,
  .page-hero--privacy .page-hero-title,
  .page-hero--cookies .page-hero-title {
    font-size: clamp(2rem, 11vw, 3.25rem);
    line-height: 1.02;
  }

  .page-hero-title--about {
    font-size: clamp(2rem, 10vw, 3.25rem);
  }

  .contact-visual-title .line-solid,
  .contact-visual-title .line-outline {
    white-space: normal;
    font-size: clamp(2rem, 10vw, 3.2rem);
  }
}

/* Pestaña reservar + promo */
@media (max-width: 400px) {
  .book-tab {
    min-width: 52px;
    min-height: 168px;
    padding: 1rem 0.7rem;
  }

  .book-tab-label {
    font-size: 0.85rem;
  }

  .promo-book {
    margin-right: 0.5rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.62rem;
  }

  .promo-track span {
    padding: 0 1.25rem;
    font-size: 0.72rem;
  }
}

/* Habitaciones (home) */
@media (max-width: 640px) {
  .room-card {
    flex: 0 0 min(90vw, 440px);
    min-height: clamp(380px, 72vh, 500px);
  }

  .rooms-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .room-filters {
    justify-content: center;
    gap: 1rem 1.5rem;
  }

  .rooms-top {
    justify-content: center;
  }

  .carousel-nav {
    justify-content: center;
    width: 100%;
  }
}

/* Carruseles táctiles en tablet / móvil */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
  .discover-carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
}

/* Descubre Fuengirola */
@media (max-width: 899px) {
  .discover-top {
    margin-bottom: 1.75rem;
  }
}

@media (max-width: 480px) {
  .blog-card {
    flex: 0 0 min(92vw, 340px);
  }
}

/* Grupos (home) */
@media (max-width: 767px) {
  .group-card {
    gap: 2rem;
    text-align: center;
  }

  .group-copy {
    max-width: none;
  }

  .group-visual-tag--top {
    left: 0.25rem;
  }
}

/* Servicios */
@media (max-width: 479px) {
  .section-services .service-item {
    min-height: 96px;
    font-size: 0.68rem;
    padding: 0.8rem 0.75rem;
  }
}

/* Footer */
@media (max-width: 767px) {
  .newsletter-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-fields input[type="email"],
  .newsletter-fields .btn-newsletter-send {
    width: 100%;
    flex: 1 1 auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .footer-credit {
    padding-top: 0.35rem;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-columns .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

.footer-contact a,
.contact-info-value,
.legal-card p,
.privacy-card p {
  overflow-wrap: anywhere;
}

/* Banner cookies */
@media (max-width: 599px) {
  .cookie-banner-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .cookie-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* ——— Páginas específicas ——— */

/* Habitaciones — modal */
@media (max-width: 767px) {
  .room-modal {
    padding: 0.65rem;
    padding-bottom: calc(0.65rem + var(--promo-h));
    display: grid;
    place-items: center;
  }

  .room-modal-dialog {
    flex-direction: column;
    align-items: center;
    width: min(94vw, 360px);
    height: auto;
    max-height: none;
    margin-inline: auto;
    border-radius: 16px;
    overflow: hidden;
  }

  .room-modal-media {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: none;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .room-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .room-modal-body {
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
    padding: 0.65rem 0.85rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }

  .room-modal-progress {
    width: 100%;
    margin: 0 0 0.15rem;
  }

  .room-modal-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    text-align: center;
    gap: 0.45rem;
  }

  .room-modal-title {
    width: 100%;
    font-size: clamp(0.92rem, 4.2vw, 1.1rem);
    line-height: 1.08;
    text-align: center;
  }

  .room-modal-book {
    display: inline-flex;
    width: auto;
    min-width: 0;
    padding: 0.55rem 1rem;
    font-size: 0.68rem;
    margin-inline: auto;
    justify-content: center;
    margin-top: 0;
  }

  .room-modal-capacity {
    justify-content: center;
    width: 100%;
    margin: 0;
    font-size: 0.72rem;
    text-align: center;
  }

  .room-modal-detail {
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .room-modal-detail p {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.4;
    text-align: center;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
  }

  .room-modal-features {
    width: 100%;
    max-width: none;
    margin: 0.15rem 0 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .room-modal-features li {
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.2rem;
    font-size: 0.64rem;
    line-height: 1.15;
    text-align: center;
  }

  .room-modal-features li::before {
    width: 14px;
    height: 14px;
    background-size: 8px;
  }
}

@media (max-width: 520px) {
  .rooms-filters {
    gap: 0.75rem 1.25rem;
  }

  .rooms-filter {
    font-size: clamp(1.1rem, 5vw, 1.75rem);
  }
}

/* Contacto — mapa */
@media (max-width: 767px) {
  .contact-map-panel {
    min-height: 360px;
  }

  .contact-map-wrap {
    min-height: 260px;
  }

  .contact-form-panel {
    padding: 1.5rem 1.15rem 1.75rem;
  }

  .contact-map-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Grupos */
@media (max-width: 520px) {
  .grupos-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
  }

  .grupos-card {
    width: 100%;
    flex: none;
    transform: rotate(0deg);
    padding: 1rem 0.75rem;
  }

  .grupos-card:nth-child(odd),
  .grupos-card:nth-child(even) {
    --tilt: 0deg;
  }

  .grupos-gallery-slide {
    flex: 0 0 min(94vw, 720px);
  }
}

/* Blog — artículo */
@media (max-width: 520px) {
  .page-hero--article {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: calc(2.5rem + var(--promo-h));
  }

  .page-hero--article .page-hero-inner {
    padding-right: var(--section-pad-x);
  }

  .article-hero-title {
    font-size: clamp(1.65rem, 7vw, 2.35rem);
    max-width: 100%;
  }

  .article-hero-meta {
    gap: 0.5rem;
  }

  .article-breadcrumb {
    font-size: 0.72rem;
    line-height: 1.4;
  }
}

@media (min-width: 480px) and (max-width: 699px) {
  .article-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .article-table {
    min-width: 360px;
    font-size: 0.82rem;
  }

  .article-table th,
  .article-table td {
    padding: 0.6rem 0.75rem;
  }
}

/* FAQs */
@media (max-width: 520px) {
  .faq-filters {
    gap: 0.5rem;
  }

  .faq-filter {
    flex: 1 1 calc(50% - 0.35rem);
    text-align: center;
    padding: 0.75rem 0.85rem;
    font-size: 0.68rem;
  }
}

/* Sobre nosotros — equipo y galería */
@media (max-width: 520px) {
  .about-team-card {
    flex: 0 0 min(78vw, 260px);
  }

  .about-gallery-slide,
  .grupos-gallery-slide {
    flex: 0 0 min(94vw, 720px);
  }

  .about-values-bg,
  .about-gallery-bg {
    font-size: clamp(2.5rem, 14vw, 5rem);
  }
}

/* Legal / privacidad / cookies */
@media (max-width: 520px) {
  .legal-card,
  .privacy-card,
  .cookies-card {
    padding: 1rem 1rem;
  }
}

/* Contenedores alineados al ancho global */
.about-intro-grid,
.about-values-inner,
.about-gallery-inner,
.about-reviews-inner,
.grupos-intro-grid,
.grupos-ventajas-inner,
.grupos-experience-inner,
.grupos-contact-grid,
.contact-intro-grid,
.contact-main-grid,
.rooms-intro-inner,
.rooms-catalog-inner,
.faq-layout,
.article-shell,
.article-related-inner,
.legal-inner,
.privacy-inner,
.cookies-inner,
.page-hero-inner,
.contact-visual-inner,
.grupos-hero-inner {
  max-width: var(--content-max);
}

/* —— Escala compacta: portátiles y pantallas medianas —— */
@media (min-width: 901px) and (max-width: 1599px) {
  :root {
    --section-pad-y: clamp(2.35rem, 3.8vw, 3rem);
  }

  .book-tab {
    min-height: 190px;
    min-width: 62px;
    padding: 1.15rem 0.85rem;
  }

  .nav-links a {
    font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  }

  .nav-media img {
    max-height: min(36vh, 320px);
  }

  .room-card-body h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.65rem);
  }

  .group-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    gap: clamp(1rem, 2.5vw, 1.75rem);
  }

  .about-intro,
  .grupos-intro,
  .contact-intro {
    padding-top: var(--section-pad-y);
    padding-bottom: var(--section-pad-y);
  }

  .about-value-card h3,
  .about-value-card p {
    font-size: 0.92rem;
  }
}

@media (min-width: 901px) and (max-width: 1366px) {
  :root {
    --section-pad-y: clamp(2.1rem, 3.5vw, 2.75rem);
    --content-max: 1080px;
  }

  .section-title {
    font-size: clamp(1.65rem, 3.8vw, 2.45rem);
  }

  .bg-word,
  .about-values-bg,
  .about-gallery-bg,
  .about-reviews-bg {
    font-size: clamp(3rem, 14vw, 7.5rem);
  }
}

@media (min-width: 1600px) {
  :root {
    --content-max: 1180px;
  }
}
