/*
Theme Name:  Rayén
Theme URI:   https://restauranterayen.cl
Author:      Restaurante Rayén
Author URI:  https://restauranterayen.cl
Description: Tema personalizado para Restaurante Rayén — Maicolpué, San Juan de la Costa. Cocina familiar, sostenible y mapuche frente al Pacífico.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rayen
Tags:        restaurant, food, custom-menu, custom-logo, full-width-template
*/

:root {
  /* Paleta Rayén — extraída del logo */
  --verde-900: #1a3d1f;
  --verde-800: #234d28;
  --verde-600: #2a6030;
  --verde-400: #4a8c52;
  --naranja-700: #b85e00;
  --naranja-500: #e8881a;
  --naranja-300: #f5ae5a;
  --sand-100: #f7f4ee;
  --sand-200: #ede7d9;
  --ink:       #1a2e1c;
  --cream:     #fdfaf4;
  --radius:    18px;
  --shadow:    0 18px 40px -16px rgba(26,45,20,.32);

  /* aliases */
  --wood-900: var(--verde-900);
  --wood-800: var(--verde-800);
  --wood-600: var(--verde-600);
  --ocean-700: var(--verde-800);
  --ocean-500: var(--verde-600);
  --ocean-300: var(--verde-400);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  {
  font-family: 'Jost', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}
h1,h2,h3,h4,blockquote { font-family: 'Cormorant Garamond', Georgia, serif; line-height: 1.15; }
img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

/* ── Layout ── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 18px 0;
  transition: background .35s, padding .35s, box-shadow .35s;
}
.site-header.scrolled {
  background: rgba(26,61,31,.94);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.nav { display: flex; align-items: center; justify-content: space-between; }
.brand img { height: 46px; transition: height .35s; }
.site-header.scrolled .brand img { height: 36px; }

.nav-links {
  display: flex; align-items: center; gap: 28px;
  transition: transform .4s ease;
}
.nav-links a {
  color: #fff; font-size: .93rem; letter-spacing: .03em; font-weight: 400;
  position: relative; padding: 4px 0;
}
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px; background: #fff; transition: width .3s;
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
  background: var(--naranja-500); padding: 10px 22px !important;
  border-radius: 30px; font-weight: 500;
}
.nav-cta:hover { background: var(--naranja-700); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; z-index: 600; padding: 4px;
}
.nav-toggle span { width: 26px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 30px;
  font-size: .93rem; letter-spacing: .02em; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: background .3s, transform .3s;
}
.btn-primary              { background: var(--naranja-500); color: #fff; }
.btn-primary:hover        { background: var(--naranja-700); transform: translateY(-2px); }
.btn-outline              { border-color: var(--verde-600); color: var(--verde-800); }
.btn-outline:hover        { background: var(--sand-200); transform: translateY(-2px); }
.hero .btn-outline        { border-color: rgba(255,255,255,.7); color: #fff; }
.hero .btn-outline:hover  { background: rgba(255,255,255,.12); }
.btn-disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; overflow: hidden;
}

/* Slideshow */
.hero-slideshow         { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.slide.active           { opacity: 1; }
.slide-label {
  position: absolute; bottom: 36px; right: 36px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
  color: #fff; font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-style: italic;
  padding: 8px 18px; border-radius: 30px;
  letter-spacing: .04em; opacity: 0;
  transition: opacity .6s ease .4s;
}
.slide.active .slide-label { opacity: 1; }

.slideshow-dots {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.dot-btn {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.45); border: 0; cursor: pointer;
  transition: background .3s, transform .3s; padding: 0;
}
.dot-btn.active { background: #fff; transform: scale(1.35); }

.hero-overlay           {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,14,9,.55) 0%, rgba(20,14,9,.3) 40%, rgba(20,14,9,.78) 100%);
}
.hero-content           { position: relative; z-index: 2; color: #fff; max-width: 680px; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .18em;
  font-size: .76rem; color: var(--ocean-300); margin-bottom: 14px; font-weight: 500;
}
.eyebrow.center         { display: block; text-align: center; color: var(--ocean-500); }
.hero .eyebrow          { color: var(--verde-400); }
.hero-mapuche           { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: clamp(1.4rem,3vw,2rem); color: var(--naranja-300); margin-bottom: 10px; letter-spacing: .01em; }
.hero h1                { font-size: clamp(3.4rem,8vw,6.2rem); font-weight: 600; color: #fff; }
.hero h1 .dot           { color: var(--naranja-300); }
.hero-sub               { font-size: 1.12rem; margin: 20px 0 34px; max-width: 520px; line-height: 1.65; color: #f1ece3; }
.hero-actions           { display: flex; gap: 14px; flex-wrap: wrap; }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1.4rem; z-index: 2; animation: bounce 2s infinite; opacity: .75;
}
@keyframes bounce { 0%,100%{transform:translate(-50%,0)} 50%{transform:translate(-50%,8px)} }

/* ── Strip ── */
.strip { background: var(--wood-900); color: #f1ece3; padding: 32px 0; }
.strip-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  text-align: center; gap: 20px;
}
.strip-grid strong { display: block; font-family: 'Nunito', sans-serif; font-size: 2.1rem; font-weight: 800; color: var(--ocean-300); letter-spacing: -.01em; }
.strip-grid span   { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

/* ── Sections ── */
.section     { padding: 100px 0; }
.section.alt { background: var(--sand-100); }
.section h2  { font-size: clamp(2rem,4vw,2.7rem); font-weight: 600; margin: 6px 0 18px; }
.center      { text-align: center; }
.lead        { max-width: 680px; margin: 0 auto 50px; color: #5b5247; font-size: 1.03rem; line-height: 1.7; }

/* ── Split ── */
.split         { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split.reverse .split-text  { order: 1; }
.split-media img {
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; height: 560px; object-fit: cover;
}
.split-text p         { color: #4a423a; line-height: 1.75; margin-bottom: 16px; font-size: 1.01rem; }
.split-text blockquote {
  border-left: 3px solid var(--ocean-500); padding-left: 20px;
  margin: 24px 0; font-size: 1.28rem; font-style: italic; color: var(--wood-800);
}
.tags        { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tags span   {
  background: var(--sand-200); color: var(--wood-800);
  padding: 7px 16px; border-radius: 30px; font-size: .8rem; letter-spacing: .02em;
}
.checklist li {
  position: relative; padding-left: 28px;
  margin-bottom: 12px; color: #4a423a; line-height: 1.5;
}
.checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--ocean-500); font-weight: 700; }
.contact-list li { margin-bottom: 14px; color: #4a423a; }

/* ── Historia: foto familiar completa ── */
.historia-media {
  display: flex; align-items: center; justify-content: center;
  background: var(--sand-200); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.historia-media img {
  width: 108%; margin-left: -8%;
  height: auto !important; object-fit: contain !important;
  border-radius: 0; box-shadow: none;
}

/* ── Cabaña reencuadre ── */
.cabana-reframe { object-position: center 90% !important; }

/* ── Image placeholder ── */
.img-placeholder {
  background: linear-gradient(135deg, var(--sand-200) 0%, var(--ocean-300) 100%);
  border-radius: var(--radius); min-height: 400px;
  display: flex; align-items: center; justify-content: center;
}
.img-placeholder::after {
  content: 'Imagen próximamente';
  font-family: 'Jost', sans-serif; font-size: .85rem;
  color: rgba(255,255,255,.85); letter-spacing: .06em; text-transform: uppercase;
}

/* ── Cabaña feature ── */
.cabana-feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center; margin-top: 20px;
}
.cabana-img img {
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; height: 520px; object-fit: cover;
}
.cabana-info h3   { font-size: 1.8rem; margin-bottom: 14px; }
.cabana-info p    { color: #4a423a; line-height: 1.75; margin-bottom: 16px; }

/* ── Rooms grid ── */
.rooms-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin: 20px 0;
}
.room-card {
  background: #fff; border-radius: 14px; padding: 18px 14px;
  text-align: center; box-shadow: 0 4px 16px -8px rgba(20,12,5,.2);
  display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; border: 2px solid transparent;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.room-card:hover {
  border-color: var(--verde-600); transform: translateY(-3px);
  box-shadow: 0 8px 24px -8px rgba(20,12,5,.25);
}
.room-icon { font-size: 1.4rem; }
.room-card strong { font-size: .9rem; color: var(--wood-800); }
.room-card span   { font-size: .8rem; color: var(--ocean-500); font-weight: 500; }
.room-gallery-hint { font-size: .75rem; color: var(--verde-600); margin-top: 4px; }

/* ── Gallery lightbox ── */
.gallery-lb { align-items: center; justify-content: center; }
.gallery-img-wrap {
  max-width: min(90vw, 900px); max-height: 85vh;
  display: flex; align-items: center; justify-content: center;
}
.gallery-img-wrap img { max-width: 100%; max-height: 85vh; border-radius: 8px; object-fit: contain; }
.gallery-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); color: #fff; border: 0;
  width: 52px; height: 52px; border-radius: 50%; font-size: 2rem;
  cursor: pointer; transition: background .2s; z-index: 1001;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.gallery-nav:hover { background: rgba(255,255,255,.3); }
.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }
.gallery-counter {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.8); font-size: .9rem; z-index: 1001;
  background: rgba(0,0,0,.4); padding: 4px 14px; border-radius: 20px;
}

/* ── Descuento badge ── */
.descuento-badge {
  margin-top: 20px; background: var(--ocean-500); color: #fff;
  padding: 14px 20px; border-radius: 14px; font-size: .95rem; font-weight: 500; line-height: 1.4;
}

/* ── Place cards ── */
.place-media {
  position: relative;
  background: linear-gradient(135deg, var(--place-color, var(--ocean-700)) 0%, color-mix(in srgb, var(--place-color, var(--ocean-700)) 60%, #000) 100%);
}
.place-media img  { position: relative; z-index: 1; }
.place-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
}

/* ── Cards ── */
.card-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 28px; margin-top: 14px;
}
.card-grid.places { grid-template-columns: repeat(4,1fr); }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .35s, box-shadow .35s;
}
.card:hover              { transform: translateY(-6px); box-shadow: 0 28px 50px -20px rgba(20,12,5,.4); }
.card-media              { height: 220px; overflow: hidden; }
.card-media img          { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-media img { transform: scale(1.07); }
.card-body               { padding: 20px 22px 24px; }
.card-body h3            { font-size: 1.3rem; margin-bottom: 8px; }
.card-body p             { color: #5b5247; line-height: 1.6; font-size: .93rem; }
.note { text-align: center; margin-top: 28px; color: #8a7e70; font-size: .84rem; font-style: italic; }

/* ── Carta ── */
.menu-preview {
  position: relative; max-width: 500px; margin: 0 auto;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.menu-frame     { height: 560px; overflow: hidden; background: #fff; }
.menu-frame img { width: 100%; display: block; }
.menu-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  background: linear-gradient(180deg, rgba(246,241,233,0) 0%, var(--sand-100) 96%);
  pointer-events: none;
}
.menu-actions { display: flex; justify-content: center; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15,10,7,.94);
  display: none; align-items: flex-start; justify-content: center;
}
.lightbox.open     { display: flex; }
.lightbox-scroll   { max-height: 100vh; overflow-y: auto; padding: 56px 16px 32px; }
.lightbox-scroll img { max-width: min(94vw,700px); margin: 0 auto; border-radius: 6px; }
.lightbox-close {
  position: fixed; top: 16px; right: 20px; z-index: 1001;
  background: rgba(255,255,255,.12); color: #fff;
  border: 0; width: 46px; height: 46px; border-radius: 50%;
  font-size: 1.6rem; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.26); }

/* ── CTA Band ── */
.cta-band { position: relative; overflow: hidden; color: #fff; padding: 0; }
.cta-img  {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: brightness(.45);
}
.cta-text {
  position: relative; z-index: 1;
  padding: 90px 24px; max-width: 680px;
}
.cta-text h2 { font-size: clamp(1.8rem,3.5vw,2.5rem); color: #fff; }
.cta-text p  { margin: 14px 0 28px; color: #e8ddd0; line-height: 1.65; }
.social-links { display: flex; gap: 14px; flex-wrap: wrap; }
.social-links a {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.6); padding: 10px 22px;
  border-radius: 30px; font-size: .9rem; transition: background .3s, color .3s;
}
.social-links a:hover { background: #fff; color: var(--wood-900); }

/* ── Vimeo embed ── */
#video-territorio { isolation: isolate; }
.vimeo-wrap {
  position: relative; padding: 56.25% 0 0 0;
  margin-top: 36px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}

/* ── Map ── */
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 420px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ── Footer ── */
.site-footer { background: #000; color: #b0b0b0; padding: 36px 0; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { height: 34px; }
.footer-grid p { font-size: .84rem; }

/* ── Back to top ── */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ocean-500); color: #fff; border: 0;
  font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background .3s;
}
.back-to-top.show  { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--ocean-700); }

.screen-reader-text { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ── Responsive ── */
@media (max-width: 1060px) {
  .card-grid.places { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 960px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media,
  .split.reverse .split-text { order: initial; }
  .split-media img { height: 380px; }
  .card-grid { grid-template-columns: repeat(2,1fr); }
  .cabana-feature { grid-template-columns: 1fr; gap: 32px; }
  .cabana-img img { height: 360px; }
  .rooms-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: var(--wood-900); flex-direction: column;
    justify-content: center; align-items: flex-start;
    padding: 0 40px; gap: 26px;
    transform: translateX(100%);
  }
  .nav-links.open { transform: translateX(0); }
  .strip-grid     { grid-template-columns: repeat(2,1fr); }
  .card-grid, .card-grid.places { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .menu-frame { height: 420px; }
  .cta-text   { padding: 70px 24px; }
  .rooms-grid { grid-template-columns: 1fr; }
  .cabana-img img { height: 280px; }
}
