/* =========================================
   Doroteo Hotel Boutique - MAIN STYLES
   Header sobre video + hero full-screen (cover)
   ========================================= */

/* ---------- Variables base ---------- */
:root {
  --brand:   #0f766e;
  --brand-2: #134e4a;
  --text:    #0f172a;
  --header-bg: #2F302D;
  --header-h: 90px; /* el JS puede actualizar este valor al alto real */
}
@media(max-width: 425px){
  :root {
    --header-h: 70px; /* el JS puede actualizar este valor al alto real */
  }
}
/* ---------- Reset y tipografía ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
}
html, body{
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;               /* mejor que hidden en móviles modernos */
}
@supports not (overflow-x: clip){
  html, body{ overflow-x: hidden; }
}
/* ---------- Contenedor y utilidades ---------- */
.container { max-width: 60%; margin: 0 auto; padding: 1rem; }
.stack > * { margin-block: 1rem; }

/* =========================================
   HEADER + TOPBAR
   ========================================= */
.site-header {
  position: absolute;         /* sobre el hero (home) */
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  backdrop-filter: saturate(180%) blur(3px);
  padding-block: 1.5rem;
  overflow: visible;          /* dropdowns */
}
/* Header sólido fuera de home */
body:not(.home) .site-header {
  position: relative;
  background: var(--header-bg);
  backdrop-filter: none;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
@media (max-width: 992px){ .site-header { background: #30312E; } }

.header-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; width: 90%; margin: 0 auto;
}
.brand-wrap { display: flex; align-items: center; gap: .75rem; }
.logo { max-height: 56px; height: auto; width: auto; }
@media(max-width: 425px){
  .logo{
    max-height: 45px;
  }
}
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }

.topbar-inline { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: #f3f4f6; margin-right: 18px; }
.topbar-inline .social { list-style: none; display: flex; gap: .5rem; margin: 0; padding: 0; }
.topbar-inline a { color: #f3f4f6; text-decoration: none;}
@media(max-width: 425px){
  .topbar-inline a{
    font-size: 12px;
  }
  
}
@media(max-width: 375px){
  .topbar-inline .social {  display: none; }
}
.topbar-inline .sep { opacity: .5; }
/* Ocultar correo en móvil */

@media (max-width: 992px){
  .topbar-inline .mail{ display:none !important; }
  .topbar-inline .sep:last-of-type{ display:none !important; }
  .topbar-inline { margin-right: 10px; }
}
@media(max-width: 425px){
  .topbar-inline { margin-right: 0px; }
}
/* ====== Menú principal ====== */
.menu, .menu-footer { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.header-menu a { text-decoration: none; color: #f3f4f6; font-weight: 600; letter-spacing: .03em; }
.header-menu a:hover { opacity: .85; }

.header-menu, .header-menu li { position: relative; }
.header-menu > li { list-style: none; margin: 0; }
.header-menu > li > a {
  display: block;
  padding: 14px 18px;
  color: #f3f4f6;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 600;
}
.header-menu > li > a:hover{
  color: #c09b5d;
  background-color: #2E2F2C;
}

/* Flecha para items con submenú */
.header-menu li.menu-item-has-children > a::after {
  content: "▾";
  margin-left: .5rem;
  font-size: .85em;
  opacity: .8;
}

/* Submenús */
.header-menu .sub-menu {
  position: absolute; left: 0; top: 100%;
  min-width: 260px;
  background: #333633; color: #fff;
  padding: 10px 0; margin: 0; list-style: none;
  border-radius: 4px; box-shadow: 0 12px 28px rgba(0,0,0,.28);
  z-index: 999; display: none;
}
.header-menu .sub-menu li a {
  display: block; padding: 12px 18px; color: #fff; text-decoration: none;
  text-transform: uppercase; letter-spacing: .02em;
}
.header-menu .sub-menu li a:hover { background: rgba(255,255,255,.06); }

/* Mostrar submenú en hover/focus */
.header-menu li.menu-item-has-children:hover > .sub-menu,
.header-menu li.menu-item-has-children:focus-within > .sub-menu { display: block; }

/* Sub-submenús a la derecha */
.header-menu .sub-menu .sub-menu { top: 0; left: 100%; margin-left: 4px; }

/* Activo (desktop por defecto) */
.header-menu .current-menu-item > a,
.header-menu .current-menu-parent > a,
.header-menu .current-menu-ancestor > a {
  color: #c09b5d; position: relative;
}
.header-menu .current-menu-item > a::after,
.header-menu .current-menu-parent > a::after,
.header-menu .current-menu-ancestor > a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: #c09b5d;
}

/* ===== Ajuste SOLO en singles de Habitaciones ===== */
body.single-habitacion  .site-header .menu > li.current-menu-item > a,
body.single-habitacion  .site-header .menu > li.current-menu-parent > a,
body.single-habitacion  .site-header .menu > li.current-menu-ancestor > a,
body.single-habitaciones .site-header .menu > li.current-menu-item > a,
body.single-habitaciones .site-header .menu > li.current-menu-parent > a,
body.single-habitaciones .site-header .menu > li.current-menu-ancestor > a {
  color: #c09b5d !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
body.single-habitacion  .site-header .menu > li.current-menu-item > a::after,
body.single-habitacion  .site-header .menu > li.current-menu-parent > a::after,
body.single-habitacion  .site-header .menu > li.current-menu-ancestor > a::after,
body.single-habitaciones .site-header .menu > li.current-menu-item > a::after,
body.single-habitaciones .site-header .menu > li.current-menu-parent > a::after,
body.single-habitaciones .site-header .menu > li.current-menu-ancestor > a::after {
  display: none !important;
}
body.single-habitacion  .site-header .menu .sub-menu li.current-menu-item > a,
body.single-habitaciones .site-header .menu .sub-menu li.current-menu-item > a {
  color: #c09b5d !important;
}

/* ===== Accesibilidad ===== */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ===== Botón hamburguesa ===== */
.nav-toggle{ display:none; position:relative; z-index:1001; width:44px; height:44px; margin-left:auto; border:0; background:transparent; cursor:pointer; }
.nav-toggle .bar{ display:block; width:24px; height:2px; margin:5px auto; background:#fff; transition:.2s; }
body.nav-open .nav-toggle .bar:nth-child(2){ opacity:0; }
body.nav-open .nav-toggle .bar:nth-child(1){ transform:translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle .bar:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ===== NAV móvil off-canvas (sin franjas ni scroll X) ===== */
@media (max-width: 992px){
  html, body { overflow-x: hidden; }

  .header-right{ display:flex; flex-direction:column; align-items:stretch; gap:6px; }
  .nav-toggle{ display:block; margin-left:auto; align-self:flex-end; }

  .site-nav{
    position: fixed;
    top: var(--header-h); left: 0;
    width: 100vw; height: calc(100vh - var(--header-h));
    z-index: 1000; background: #30312E;
    transform: translateX(105%); transition: transform .25s ease;
    padding: 16px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch;
    pointer-events: none;
  }
  body.nav-open .site-nav{ transform: translateX(0); pointer-events: auto;}

  .site-nav .header-menu{ display:block !important; background:transparent !important; }
  .site-nav .header-menu > li{ display:block; border-bottom:1px solid rgba(255,255,255,.08); }
  .site-nav .header-menu a{
    display:flex; justify-content:space-between; align-items:center;
    padding:14px 6px; color:#fff; text-decoration:none; font-size:18px;
  }

  .site-nav .sub-menu{ display:none; padding-left:12px; }
  .site-nav li.open > .sub-menu{ display:block; }

  .submenu-toggle{
    display:inline-flex !important;
    align-items:center; justify-content:center;
    width:32px; height:32px; margin-left:8px;
    border:0; background:transparent; color:inherit; line-height:1;
  }
  .site-nav .menu > li.menu-item-has-children > a::after{ display:none !important; }
}
@media(max-width: 425px){
  .header-right{ gap:0px; }
  .nav-toggle{ width:30px; height:40px;}
   body.nav-open .site-nav{margin-top: 20px;}
}
.submenu-toggle{ display:none !important; }

/* =========================================
   HERO con VIDEO de fondo (COVER)
   ========================================= */
.hero-video {
  position: relative; min-height: 100vh; padding: 0; margin: 0;
  color: #fff; display: grid; align-items: center; z-index: 0;
}
.hero-video__wrap { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-video__overlay { position: absolute; inset: 0; z-index: 1; }
.hero-video__iframe { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-video__iframe iframe {
  position: absolute; top: 50%; left: 50%;
  width: 177.78vh; height: 100vh; transform: translate(-50%, -50%);
  min-width: 100vw; min-height: 56.25vw; pointer-events: none;
}
.hero-video__content { position: relative; z-index: 2; padding: 6rem 1rem; text-align: left; }
.hero-title   { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; margin: 0 0 .5rem; }
.hero-subtitle{ font-size: clamp(1rem, 2.5vw, 1.25rem); opacity: .95; margin: 0 0 1.25rem; }

.btn {
  background-color: #c09b5d; color: #fff;
  font-family: 'Quattrocento', serif; font-weight: 400; text-transform: uppercase;
  font-size: 18px; padding: 20px 35px; text-decoration: none;
}
.btn:hover { background: #967a4a; opacity: .92; transition: .4s ease; }

.scroll-down { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 3; }
.scroll-down img { width: 40px; height: auto; display: block; }

/* ========================================
  info hotel
===========================================*/
.hotel-intro{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 70px 0;
}
.intro-content{
  width: 60%;
  text-align: center;
}
.intro-logo{ width: 340px; }
.intro-text{ font-size: 1.2rem; margin-bottom: 50px; }
.intro-btn{ margin-bottom: 50px; }
@media(max-width: 900px){
  .intro-content{ width: 80%; }
  .intro-logo{ width: 40%; }
}
@media(max-width: 600px){
  .intro-logo{ width: 70%; }
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  background: #dad3c6; color: #2a2a2a;
  padding: 2.5rem 0; border-top: 1px solid #e5e7eb;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start;
}
.footer-title { margin: 0 0 1rem 0; font-size: clamp(1.25rem, 2.8vw, 1.75rem); letter-spacing: .02em; }
.footer-address { margin: 0 0 .75rem 0; font-style: normal; line-height: 1.6; }
.footer-links { margin: 0 0 1rem 0; font-size: 1.05rem; }
.footer-links a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { border-bottom-color: currentColor; }
.footer-links .sep { opacity: .5; }
.footer-copy { margin: .75rem 0 0 0; opacity: .85; font-size: .95rem; }
.footer-social { text-align: right; }
.social-list { list-style: none; display: inline-flex; gap: 1rem; padding: 0; margin: .5rem 0 0 0; }
.social-list img { display: block; width: 20px; height: 24px; transition: transform .18s ease; }
.social-list a:hover img { transform: scale(1.06); }
.footer-home-link { color: inherit; text-decoration: none; }
.footer-home-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .footer-social { text-align: left; }
}

/* =========================================
   Página Hotel (secciones)
   ========================================= */
.info-principal {
  display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 450px;
}
.pri-info {
  background: #b9975b; color: #fff; padding: 3rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.pri-titulo { margin: 0 0 1rem 0; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.pri-parrafo { font-size: 1.05rem; line-height: 1.7; }
.pri-galeria { display: grid; grid-template-rows: 1fr 1fr; }
.pri-imagen { width: 100%; height: 100%; object-fit: cover; display: block; }
.pri-imagen.uno { grid-row: 1; } .pri-imagen.dos { grid-row: 2; }
@media (max-width: 1024px) {
  .info-principal { grid-template-columns: 1fr; min-height: auto; }
  .pri-galeria { grid-template-rows: auto; grid-auto-rows: 300px; }
}
@media (max-width: 600px) {
  .pri-info { padding: 2rem 1.25rem; }
  .pri-parrafo { font-size: 1rem; }
  .pri-galeria { grid-auto-rows: 220px; }
}

.info-secundario {
  display: grid; grid-template-columns: 1fr 1fr; width: 100%; min-height: 450px;
}
.sec-galeria { overflow: hidden; }
.sec-imagen { width: 100%; height: 100%; object-fit: cover; display: block; }
.sec-info {
  background: #1e1e1e; color: #f1f1f1; padding: 3rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.sec-parrafo { font-size: 1.05rem; line-height: 1.7; margin-bottom: 2rem; }
.sec-titulo { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; margin: 0; text-align: center; }
@media (max-width: 1024px) {
  .info-secundario { grid-template-columns: 1fr; min-height: auto; }
  .sec-info { order: 1; }
  .sec-galeria { order: 2; min-height: 320px; }
  .sec-imagen { height: 100%; }
}
@media (max-width: 600px) {
  .sec-info { padding: 2rem 1.25rem; }
  .sec-parrafo { font-size: 1rem; }
  .sec-galeria { min-height: 220px; }
}

/* =========================================
   Habitaciones destacadas (HOME) + Parallax
   ========================================= */

/* Contenedor general */
.rooms-featured { display: grid; gap: 0; position: relative; isolation: isolate; }

/* Cada bloque de habitación */
.room-block { position: relative; min-height: 100vh; }

/* Grid 50/50 desktop */
.room-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: inherit; position: relative;
}

/* Columna de texto */
.room-text {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem; color: #f8fafc;
}
.room-title { font-size: clamp(1.5rem, 2vw, 2.25rem); margin: 0; }
.room-excerpt { font-size: 1.05rem; line-height: 1.65; color: #e5e7eb; }
.room-cta { background: #b9975b; color: #fff; padding: 1rem 2.5rem; border-radius: 0; text-decoration: none; font-weight: 700; align-self: flex-start; }
.room-cta:hover { background: #967a4a; opacity: .92; transition: .4s ease;}

/* Columna de imagen */
.room-media { position: relative; z-index: 0; overflow: hidden; background: transparent; }

/* Alternancia 50/50 desktop */
.room-grid.text-left  .room-text  { grid-column: 1; }
.room-grid.text-left  .room-media { grid-column: 2; }
.room-grid.text-right .room-media { grid-column: 1; }
.room-grid.text-right .room-text  { grid-column: 2; }

/* ===== Parallax base coherente (desktop) ===== */
.jarallax-lite{
  position: relative;
  overflow: hidden;
  background: transparent;
  z-index: 0;
}
.jarallax-lite .media-inner{
  position: relative;
  width: 100%;
  height: 140%;                /* overscan para el efecto */
  transform: translate3d(0,0,0);
  will-change: transform;
  z-index: 0;
}
.jarallax-lite .media-img,
.jarallax-lite .media-placeholder{
  position: absolute;          /* clave: ABSOLUTA en desktop */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 0;
}
.media-placeholder{ background:#222; }

/* ========= DESKTOP (≥993px): asegurar stacking y sin deformación ========= */
@media (min-width: 993px){
  .home .room-block .room-media{
    position: relative !important;
    overflow: hidden !important;
    z-index: 1;
  }
  .home .jarallax-lite{ position: relative !important; z-index: 0 !important; }
  .home .jarallax-lite .media-inner{
    position: relative !important;
    width: 100% !important;
    height: 140% !important;
    transform: translate3d(0,0,0);
    will-change: transform;
    z-index: 0 !important;
  }
  .home .jarallax-lite .media-img{
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    z-index: 0 !important;
    pointer-events: none;
  }
  .home .room-block .room-text{ position: relative; z-index: 2; }
}

/* ========= MÓVIL (≤992px): imagen en flujo con altura proporcional ========= */
@media (max-width: 992px){
  .home .room-block .room-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: stretch;
  }

  /* Orden: imagen arriba, texto abajo */
  .home .room-block .room-media{
    order: 1;
    position: static !important;
    overflow: visible !important;
    height: 100% !important;
    min-height: auto !important;
    background: red;
  }
  .home .room-block .room-text{
    order: 2;
    padding: clamp(16px, 4vw, 24px);
  }

  /* Parallax neutralizado en móvil */
  .home .jarallax-lite .media-inner{
    position: static !important;
    transform: none !important;
    height: 100% !important;
    width: 100% !important;
    will-change: auto !important;
    
  }
  .home .room-block .room-media .media-img{
    position: static !important;     /* en móvil NO absoluta */
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
    aspect-ratio: 16 / 10;           /* altura uniforme y responsive */
  }
}

/* =========================================
   Contacto
   ========================================= */
.page-contacto .contact-hero { padding: 2rem 0 1rem; background: #fff; }
.page-contacto .contact-title { margin: 0; text-align: center; font-size: clamp(1.75rem, 3.5vw, 2.25rem); letter-spacing: .02em; }
.page-contacto .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 100%; min-height: 520px; background: #fff; }
.page-contacto .contact-map { position: relative; overflow: hidden; background: #eee; }
.page-contacto .map-embed { position: relative; width: 100%; height: 100%; }
.page-contacto .map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.page-contacto .contact-form { background: #fff; padding: 2rem 2rem 2.5rem; display: flex; flex-direction: column; justify-content: flex-start; }
.page-contacto .contact-subtitle { margin: 0 0 1rem 0; text-align: center; font-size: clamp(1.4rem, 3vw, 1.75rem); }

/* Contact Form 7 */
.page-contacto .wpcf7-form label { font-weight: 600; }
.page-contacto .wpcf7-form-control { width: 100%; border: 1px solid #cfcfcf; padding: .75rem .9rem; font-size: 1rem; background: #fff; }
.page-contacto .wpcf7-textarea { min-height: 220px; resize: vertical; }
.page-contacto .wpcf7-submit {
  display: inline-block; margin-top: 1rem; background: #2f3331; color: #fff;
  padding: 1rem 2.5rem; border: 0; cursor: pointer; text-transform: uppercase; letter-spacing: .02em;
}
.page-contacto .wpcf7-submit:hover { opacity: .92; }
@media (max-width: 1024px) {
  .page-contacto .contact-grid { grid-template-columns: 1fr; min-height: auto; }
  .page-contacto .contact-form { order: 1; }
  .page-contacto .contact-map  { order: 2; min-height: 360px; }
  .page-contacto .map-embed iframe { height: 100%; }
}

/* =========================================
   Reservaciones (Cloudbeds)
   ========================================= */
.page-reservaciones .reservas-hero { padding: 2rem 0 1rem; background: #fff; }
.page-reservaciones .reservas-title { margin: 0; text-align: center; font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.page-reservaciones .reservas-wrap { padding: 0 0 2rem; }
.page-reservaciones .reservas-iframe-wrap {
  max-width: 1200px; margin: 20px auto 0 auto; padding: 0 1rem; min-height: 20vh;
}
.page-reservaciones .reservas-iframe {
  width: 100%; height: 100%; min-height: 70vh; border: 0; display: block;
}
.page-reservaciones .reservas-fallback { text-align: center; margin-top: 1rem; opacity: .8; }

/* ===== MOBILE FIX: resetear columnas forzadas en 1 sola columna ===== */
@media (max-width: 992px){
  .home .room-block .room-grid{
    grid-template-columns: 1fr !important;
  }

  /* reset de grid-column para cualquier variante text-left/right */
  .home .room-block .room-grid[class*="text-"] > .room-text,
  .home .room-block .room-grid[class*="text-"] > .room-media{
    grid-column: 1 !important;     /* <- clave */
  }

  /* orden: imagen arriba, texto abajo */
  .home .room-block .room-media{ order: 1; }
  .home .room-block .room-text { order: 2; }
}
/* ==== NAV móvil: sin scroll horizontal y bien oculto ==== */
@media (max-width: 992px){
  /* Nunca permitir scroll lateral */
  html, body {overflow-x: hidden;}

  /* Panel off-canvas anclado a la derecha */
  .site-nav{
    position: fixed;
    top: var(--header-h);
    right: 0;           /* anclado a la derecha */
    left: auto;         /* importante: no a la izquierda */
    width: 100%;        /* usa % para no pasarte de la visual viewport */
    max-width: 100%;
    height: calc(100vh - var(--header-h));
    background: #30312E;
    transform: translate3d(100%,0,0);  /* fuera de la pantalla, sin “105%” */
    transition: transform .25s ease;
    padding: 16px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    box-sizing: border-box;
    contain: layout style paint;           /* aísla el panel y evita “pintar” fuera */
  }

  body.nav-open .site-nav{
    transform: translate3d(0,0,0);
    pointer-events: auto;
    /* IMPORTANTE: elimina cualquier margin-top aquí */
  }

  /* Bloquea el body cuando el panel está abierto (evita paneo lateral en iOS) */
  body.nav-open{
    position: fixed;         /* fija el body para impedir paneo lateral */
    left: 0; right: 0;
    width: 100%;
    overflow: hidden;        /* por si clip no está */
    touch-action: pan-y;     /* sólo scroll vertical */
    overscroll-behavior-x: none;
  }
  .site-header{ overflow-x: clip; }
}
body.nav-open .site-nav{ margin-top: 0 !important; }