/* ==========================================================================
   Restaurante O Recreo — estilos públicos
   Paleta rústica gallega: rojo vino (logo) · verde guinga · crema · carbón
   ========================================================================== */

:root {
    --rojo-vino:   #8a2433;
    --rojo-oscuro: #5e1822;
    --verde:       #3f7d4f;
    --verde-osc:   #2c5a39;
    --crema:       #f7f1e6;
    --crema-osc:   #efe5d2;
    --carbon:      #2b2620;
    --gris:        #6f6a62;
    --dorado:      #c9a14a;
    --blanco:      #ffffff;

    --sombra:      0 10px 30px rgba(43, 38, 32, .12);
    --sombra-sm:   0 4px 14px rgba(43, 38, 32, .10);
    --radio:       14px;
    --radio-sm:    8px;
    --max:         1160px;
    --font-head:   "Playfair Display", Georgia, serif;
    --font-body:   "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

/* --- Reset ligero --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--carbon);
    background: var(--crema);
    line-height: 1.65;
    font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--rojo-vino); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rojo-oscuro); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--carbon); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.ico { font-style: normal; }

/* Iconos Feather (SVG con trazo) */
svg.feather {
    width: 1.05em; height: 1.05em;
    vertical-align: -.16em;
    stroke-width: 2;
    fill: none;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* --- Botones --- */
.btn {
    display: inline-block;
    background: var(--rojo-vino);
    color: var(--blanco);
    padding: 13px 28px;
    border-radius: 40px;
    font-weight: 700;
    letter-spacing: .02em;
    border: 2px solid var(--rojo-vino);
    cursor: pointer;
    transition: background .2s, transform .15s, color .2s;
}
.btn:hover { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); color: var(--blanco); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--blanco); border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: var(--blanco); color: var(--rojo-vino); border-color: var(--blanco); }
.btn--lg { padding: 16px 38px; font-size: 1.05rem; }
.btn--nav { padding: 9px 20px; font-size: .9rem; }

/* ==========================================================================
   Barra superior
   ========================================================================== */
.topbar {
    background: var(--rojo-oscuro);
    color: rgba(255,255,255,.92);
    font-size: .86rem;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 16px; flex-wrap: wrap; }
.topbar__info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__item, .topbar__social a { color: rgba(255,255,255,.92); display: inline-flex; align-items: center; gap: 7px; }
.topbar__item:hover, .topbar__social a:hover { color: var(--dorado); }
.topbar__item svg.feather, .topbar__social svg.feather { width: 15px; height: 15px; }

/* ==========================================================================
   Cabecera / navegación
   ========================================================================== */
.site-header {
    background: var(--crema);
    border-bottom: 1px solid var(--crema-osc);
    position: sticky; top: 0; z-index: 50;
    box-shadow: var(--sombra-sm);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.brand__logo { height: 64px; width: auto; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.main-nav a {
    color: var(--carbon); font-weight: 600; padding: 10px 14px; border-radius: var(--radio-sm);
    position: relative;
}
.main-nav a:not(.btn)::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
    background: var(--rojo-vino); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.main-nav a:not(.btn):hover::after,
.main-nav a.active:not(.btn)::after { transform: scaleX(1); }
.main-nav a.active:not(.btn) { color: var(--rojo-vino); }
.main-nav a.btn, .main-nav a.btn:hover { color: var(--blanco); }

/* Botón hamburguesa */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px; background: none; border: 0;
    cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--carbon); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   Hero / carrusel
   ========================================================================== */
.hero { position: relative; height: clamp(460px, 78vh, 720px); overflow: hidden; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
    background-size: cover; background-position: center;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(43,38,32,.35) 0%, rgba(43,38,32,.62) 100%);
}
.hero__content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: var(--blanco); padding: 0 22px;
}
.hero__eyebrow {
    text-transform: uppercase; letter-spacing: .28em; font-size: .8rem; font-weight: 700;
    color: var(--dorado); margin-bottom: 18px;
}
.hero__title {
    color: var(--blanco); font-size: clamp(2.1rem, 5.5vw, 4rem); margin: 0 0 18px;
    text-shadow: 0 2px 18px rgba(0,0,0,.4); max-width: 16ch;
}
.hero__subtitle { font-size: clamp(1.05rem, 2.2vw, 1.4rem); max-width: 40ch; margin-bottom: 30px; color: rgba(255,255,255,.94); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Indicadores del carrusel */
.hero__dots { position: absolute; bottom: 24px; left: 0; right: 0; z-index: 3; display: flex; gap: 10px; justify-content: center; }
.hero__dots button {
    width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--blanco);
    background: transparent; cursor: pointer; padding: 0; transition: background .2s;
}
.hero__dots button.is-active { background: var(--blanco); }

/* ==========================================================================
   Secciones genéricas
   ========================================================================== */
.section { padding: 84px 0; }
.section--tint { background: var(--blanco); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section__eyebrow {
    text-transform: uppercase; letter-spacing: .22em; font-size: .8rem; font-weight: 700;
    color: var(--verde); margin-bottom: 10px;
}
.section__title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section__title::after {
    content: ""; display: block; width: 64px; height: 3px; margin: 18px auto 0;
    background: var(--dorado); border-radius: 3px;
}
.section__lead { color: var(--gris); font-size: 1.1rem; }

/* Intro "cocina casera" con imagen */
.intro { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.intro__media img { border-radius: var(--radio); box-shadow: var(--sombra); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.intro__media { position: relative; }
.intro__badge {
    position: absolute; bottom: -22px; right: -16px; background: var(--rojo-vino); color: var(--blanco);
    border-radius: var(--radio); padding: 16px 22px; box-shadow: var(--sombra); text-align: center;
}
.intro__badge strong { font-family: var(--font-head); font-size: 1.6rem; display: block; }
.intro__badge span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.intro__text h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.intro__text .section__eyebrow { text-align: left; }

/* ==========================================================================
   Especialidades (tarjetas)
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; }
.card {
    background: var(--blanco); border-radius: var(--radio); overflow: hidden;
    box-shadow: var(--sombra-sm); transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sombra); }
.card__media { aspect-ratio: 4/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 22px 24px 26px; }
.card__title { font-size: 1.3rem; margin-bottom: 8px; }
.card__text { color: var(--gris); font-size: .98rem; margin: 0; }

/* ==========================================================================
   Instalaciones (lista de features)
   ========================================================================== */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.features__media img { border-radius: var(--radio); box-shadow: var(--sombra); width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.feature-list { display: grid; gap: 22px; }
.feature {
    display: flex; gap: 18px; align-items: flex-start;
}
.feature__icon {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
    background: var(--crema-osc); color: var(--verde-osc);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.feature h3 { font-size: 1.18rem; margin-bottom: 4px; }
.feature p { color: var(--gris); margin: 0; font-size: .98rem; }

/* ==========================================================================
   Galería
   ========================================================================== */
/* Pestañas de la galería */
.gallery-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -20px 0 36px; }
.gallery-tab {
    font-family: var(--font-body); font-size: .98rem; font-weight: 700; color: var(--carbon);
    background: transparent; border: 2px solid var(--crema-osc); padding: 10px 22px; border-radius: 40px;
    cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.gallery-tab:hover { border-color: var(--rojo-vino); color: var(--rojo-vino); }
.gallery-tab.is-active { background: var(--rojo-vino); border-color: var(--rojo-vino); color: var(--blanco); }

/* Mayor especificidad que `.gallery` para que el panel inactivo quede oculto */
.gallery.gallery-panel { display: none; }
.gallery.gallery-panel.is-active { display: grid; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery a { overflow: hidden; border-radius: var(--radio-sm); aspect-ratio: 1; box-shadow: var(--sombra-sm); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.08); }
.gallery a:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

/* ==========================================================================
   Banner CTA reservas
   ========================================================================== */
.cta {
    position: relative; padding: 96px 0; text-align: center; color: var(--blanco);
    background: linear-gradient(rgba(94,24,34,.82), rgba(94,24,34,.86)), center/cover no-repeat;
}
.cta h2 { color: var(--blanco); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.cta p { font-size: 1.15rem; max-width: 46ch; margin: 0 auto 28px; color: rgba(255,255,255,.92); }
.cta__phone { display: inline-block; margin-top: 18px; font-family: var(--font-head); font-size: 1.5rem; color: var(--dorado); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--carbon); color: rgba(255,255,255,.78); padding-top: 64px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: var(--blanco); font-size: 1.1rem; margin-bottom: 16px; }
.site-footer p { margin: 0 0 10px; font-size: .96rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--dorado); }
.footer-logo { height: 78px; margin-bottom: 14px; background: rgba(255,255,255,.95); border-radius: 50%; padding: 6px; }
.footer-social a { display: inline-block; margin-top: 6px; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .85rem; }
.site-footer__bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-admin { color: rgba(255,255,255,.45); }
.footer-dev { display: inline-flex; align-items: center; opacity: .75; transition: opacity .2s; }
.footer-dev img { height: 22px; width: auto; }
.footer-dev:hover { opacity: 1; }

/* ==========================================================================
   Cabecera de páginas internas
   ========================================================================== */
.page-hero {
    background-size: cover; background-position: center;
    color: var(--blanco); text-align: center; padding: 96px 0 84px;
}
.page-hero h1 { color: var(--blanco); font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 10px; }
.page-hero p { font-size: 1.1rem; color: rgba(255,255,255,.92); max-width: 50ch; margin: 0 auto; }

/* ==========================================================================
   Carta
   ========================================================================== */
.menu { max-width: 820px; margin: 0 auto; }
.menu-cat { margin-bottom: 48px; }
.menu-cat__title {
    font-size: 1.7rem; color: var(--rojo-vino); text-align: center; margin-bottom: 26px;
    position: relative;
}
.menu-cat__title::after {
    content: ""; display: block; width: 50px; height: 3px; margin: 12px auto 0;
    background: var(--dorado); border-radius: 3px;
}
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item { padding: 14px 0; border-bottom: 1px dashed var(--crema-osc); }
.menu-item:last-child { border-bottom: 0; }
.menu-item__head { display: flex; align-items: baseline; gap: 8px; }
.menu-item__name { font-family: var(--font-head); font-size: 1.18rem; font-weight: 600; }
.menu-item__dots { flex: 1; border-bottom: 2px dotted var(--crema-osc); transform: translateY(-4px); }
.menu-item__price { font-weight: 700; color: var(--rojo-vino); white-space: nowrap; }
.menu-item__desc { color: var(--gris); margin: 4px 0 0; font-size: .98rem; }
.menu-note {
    text-align: center; margin-top: 48px; padding: 30px; background: var(--blanco);
    border-radius: var(--radio); box-shadow: var(--sombra-sm);
}
.menu-note p { margin-bottom: 16px; }
/* Franja de aviso de pago, justo encima del footer */
.aviso-pago { background: var(--rojo-vino); color: var(--blanco); }
.aviso-pago .container { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; text-align: center; font-size: .95rem; font-weight: 700; }
.aviso-pago svg.feather { color: var(--dorado); flex: 0 0 auto; }

/* ==========================================================================
   Formularios
   ========================================================================== */
.form-wrap { max-width: 760px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field input, .field textarea, .field select {
    font-family: inherit; font-size: 1rem; color: var(--carbon);
    padding: 12px 14px; border: 1px solid #d8cfbd; border-radius: var(--radio-sm);
    background: var(--blanco); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--rojo-vino); box-shadow: 0 0 0 3px rgba(138,36,51,.12);
}
.field textarea { resize: vertical; }
.form-hint { font-size: .9rem; color: var(--gris); margin-top: 14px; }
.reservas-horario { display: flex; align-items: center; gap: 12px; background: var(--blanco); border: 1px solid var(--crema-osc); border-left: 4px solid var(--verde); border-radius: var(--radio-sm); padding: 14px 18px; margin-bottom: 24px; font-size: 1.02rem; }
.reservas-horario svg.feather { color: var(--verde); width: 22px; height: 22px; flex: 0 0 auto; }
.form .btn { margin-top: 6px; }

.alert { padding: 16px 20px; border-radius: var(--radio-sm); margin-bottom: 24px; }
.alert ul { margin: 0; padding-left: 20px; }
.alert--ok { background: #e8f3ea; border: 1px solid var(--verde); color: var(--verde-osc); }
.alert--error { background: #fbeaec; border: 1px solid var(--rojo-vino); color: var(--rojo-oscuro); }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contacto h2 { font-size: 1.6rem; margin-bottom: 20px; }
.contacto-list { list-style: none; margin: 0 0 26px; padding: 0; }
.contacto-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.contacto-list svg.feather { color: var(--rojo-vino); width: 20px; height: 20px; flex: 0 0 auto; margin-top: 3px; }
.map { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra-sm); }
.map iframe { display: block; }

/* ==========================================================================
   Blog / entrada
   ========================================================================== */
.post-date { color: var(--gris); font-size: .9rem; margin-bottom: 6px; }
.read-more { font-weight: 700; font-size: .95rem; display: inline-block; margin-top: 6px; }
.post { max-width: 780px; margin: 0 auto; }
.post__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 8px 0 22px; }
.post__img { width: 100%; border-radius: var(--radio); box-shadow: var(--sombra-sm); margin-bottom: 26px; max-height: 440px; object-fit: cover; }
.post__body { font-size: 1.08rem; }
.post__body p { margin-bottom: 1.2em; }
.btn--ghost-dark { background: transparent; color: var(--rojo-vino); }
.btn--ghost-dark:hover { background: var(--rojo-vino); color: var(--blanco); }

/* ==========================================================================
   Página 404
   ========================================================================== */
.error-404 { text-align: center; }
.error-404__code {
    font-family: var(--font-head); font-weight: 700; line-height: 1;
    font-size: clamp(5rem, 18vw, 11rem); color: var(--rojo-vino);
    margin: 0 0 8px; letter-spacing: .02em;
}
.error-404 .section__title { margin-top: 0; }
.error-404 .section__title::after { margin-left: auto; margin-right: auto; }
.error-404__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 30px 0 26px; }
.error-404__help { color: var(--gris); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
    .intro, .features { grid-template-columns: 1fr; gap: 36px; }
    .intro__badge { right: 16px; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .contacto { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
    .topbar__item--addr { display: none; }
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--crema); box-shadow: var(--sombra);
        max-height: 0; overflow: hidden; transition: max-height .3s ease;
    }
    .main-nav.is-open { max-height: 520px; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
    .main-nav li { width: 100%; }
    .main-nav a { display: block; padding: 14px 22px; border-radius: 0; }
    .main-nav a:not(.btn)::after { display: none; }
    .main-nav .btn--nav { margin: 10px 22px; text-align: center; }
    .section { padding: 60px 0; }
    .form-grid { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .gallery a:nth-child(1) { grid-column: span 2; grid-row: auto; aspect-ratio: 16/9; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 460px) {
    body { font-size: 16px; }
    .hero__actions { flex-direction: column; width: 100%; max-width: 280px; }
    .hero__actions .btn { width: 100%; }
}
