/* =====================================================
   Val de Santa María — Estilos principales
   Fuentes: Nunito (títulos/cuerpo) + Montserrat (nav)
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --verde:      #2E6DA4;
    --verde-med:  #256090;
    --verde-claro:#5A9FD4;
    --crema:      #EAF3FB;
    --crema-med:  #D8EAF7;
    --piedra:     #6A8FAD;
    --texto:      #1A2A3A;
    --texto-med:  #3A4A5A;
    --texto-suave:#7A8FA0;
    --blanco:     #FFFFFF;
    --borde:      #D0E4F0;
    --radio:      8px;
    --radio-lg:   14px;
    --sombra:     0 2px 12px rgba(0,0,0,0.08);
    --sombra-hover: 0 6px 24px rgba(0,0,0,0.14);
    --fuente-titulo: 'Nunito', sans-serif;
    --fuente-ui:    'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--fuente-titulo);
    font-size: 16px;
    line-height: 1.7;
    color: var(--texto);
    background: var(--blanco);
}

/* ---- Contenedor ---- */
.container {
    width: min(100%, 1100px);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* =====================================================
   CABECERA / NAVEGACIÓN
   ===================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--borde);
    transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.10); }

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 1rem;
}

.site-logo { text-decoration: none; display: flex; flex-direction: column; gap: 1px; }
.logo-nombre {
    font-family: var(--fuente-titulo);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--verde);
    line-height: 1.2;
}
.logo-sub {
    font-family: var(--fuente-ui);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--piedra);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.site-nav a {
    font-family: var(--fuente-ui);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--texto-med);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radio);
    transition: color .15s, background .15s;
}
.site-nav a:hover, .site-nav a.active {
    color: var(--verde);
    background: rgba(45,80,22,0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--texto);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

/* ---- Widget del tiempo ---- */
.tiempo-widget {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--fuente-ui);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--texto-med);
    background: var(--crema);
    border: 1px solid var(--borde);
    border-radius: 100px;
    padding: 0.28rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity .3s;
}
.tiempo-widget i { font-size: 1rem; color: var(--verde); }
.tiempo-widget #tiempo-temp { font-weight: 700; color: var(--texto); }
.tiempo-widget .tiempo-hum {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    color: var(--piedra);
    font-size: 0.75rem;
    padding-left: 0.35rem;
    border-left: 1px solid var(--borde);
    margin-left: 0.1rem;
}
.tiempo-widget .tiempo-hum i { font-size: 0.82rem; color: var(--verde-claro); }

@media (max-width: 600px) {
    .tiempo-widget .tiempo-hum { display: none; }
}

/* ---- Popover previsión 3 días ---- */
.tiempo-popover {
    position: absolute;
    z-index: 200;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    min-width: 220px;
    padding: .5rem 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
}
.tiempo-popover.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.tiempo-pop-header {
    font-family: var(--fuente-ui);
    font-size: .7rem;
    font-weight: 600;
    color: var(--piedra);
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .45rem 1rem .6rem;
    border-bottom: 1px solid var(--borde);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.tiempo-pop-dia {
    display: grid;
    grid-template-columns: 4.5rem 1.4rem 1fr auto;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-bottom: 1px solid var(--crema-med);
    font-family: var(--fuente-ui);
    font-size: .8rem;
}
.tiempo-pop-dia:last-child { border-bottom: none; }
.tiempo-pop-label {
    font-weight: 600;
    color: var(--texto);
    white-space: nowrap;
}
.tiempo-pop-dia i {
    font-size: 1rem;
    color: var(--verde);
    text-align: center;
}
.tiempo-pop-desc {
    color: var(--texto-suave);
    font-size: .76rem;
}
.tiempo-pop-temps {
    display: flex;
    gap: .35rem;
    white-space: nowrap;
}
.pop-max { font-weight: 700; color: var(--texto); }
.pop-min { color: var(--texto-suave); }

/* =====================================================
   HERO (portada)
   ===================================================== */
.hero {
    position: relative;
    height: 65vh;
    min-height: 420px;
    max-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 0;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: url('/assets/img/hero.jpg') center/cover no-repeat;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.55) 100%);
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.52) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    color: var(--blanco);
    padding: 1.5rem;
}
.hero-eyebrow {
    font-family: var(--fuente-ui);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1rem;
}
.hero h1 {
    font-family: var(--fuente-titulo);
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* =====================================================
   BOTONES
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--fuente-ui);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radio);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--verde);
    color: var(--blanco);
    border-color: var(--verde);
}
.btn-primary:hover { background: var(--verde-med); border-color: var(--verde-med); }
.btn-outline {
    background: transparent;
    color: var(--blanco);
    border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-outline-dark {
    background: transparent;
    color: var(--verde);
    border-color: var(--verde);
}
.btn-outline-dark:hover { background: rgba(45,80,22,0.06); }
.btn-sm { font-size: 0.8rem; padding: 0.45rem 1rem; }

/* =====================================================
   SECCIONES Y LAYOUT
   ===================================================== */
.site-main { padding-top: 64px; }

.section { padding: 4rem 0; }
.section-alt { background: var(--crema); }

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-label {
    font-family: var(--fuente-ui);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--verde-claro);
    margin-bottom: 0.5rem;
    display: block;
}
.section-header h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--texto);
}
.section-header p {
    color: var(--texto-suave);
    margin-top: 0.5rem;
    max-width: 540px;
    margin-inline: auto;
}

/* =====================================================
   CARDS
   ===================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.card:hover {
    box-shadow: var(--sombra-hover);
    transform: translateY(-2px);
}
.card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.card-meta {
    font-family: var(--fuente-ui);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--texto-suave);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card h3 { font-size: 1.05rem; font-weight: 800; color: var(--texto); line-height: 1.3; }
.card p { font-size: 0.9rem; color: var(--texto-med); line-height: 1.6; flex: 1; }
.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--borde);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   TABLÓN DE ANUNCIOS
   ===================================================== */
.tablon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.anuncio {
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: box-shadow .2s;
}
.anuncio:hover { box-shadow: var(--sombra); }

.anuncio-cat {
    display: inline-flex;
    align-items: center;
    font-family: var(--fuente-ui);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    width: fit-content;
}
.cat-venta      { background: #EAF3DE; color: #3B6D11; }
.cat-alquiler   { background: #E6F1FB; color: #185FA5; }
.cat-busqueda   { background: #FAEEDA; color: #854F0B; }
.cat-aviso      { background: #FCEBEB; color: #A32D2D; }
.cat-otro       { background: var(--crema-med); color: var(--piedra); }

.anuncio h3 { font-size: 1rem; font-weight: 800; line-height: 1.3; }
.anuncio p { font-size: 0.88rem; color: var(--texto-med); line-height: 1.6; }
.anuncio-fecha {
    font-family: var(--fuente-ui);
    font-size: 0.72rem;
    color: var(--texto-suave);
    margin-top: auto;
}

/* =====================================================
   FILTROS
   ===================================================== */
.filtros {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.filtro-btn {
    font-family: var(--fuente-ui);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--borde);
    border-radius: 100px;
    background: var(--blanco);
    color: var(--texto-med);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.filtro-btn:hover, .filtro-btn.active {
    background: var(--verde);
    border-color: var(--verde);
    color: var(--blanco);
}

/* =====================================================
   GALERÍA
   ===================================================== */
.galeria-grid {
    columns: 3;
    column-gap: 0.75rem;
}
.galeria-thumb {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border-radius: var(--radio);
    cursor: pointer;
    position: relative;
}
.galeria-thumb img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .3s;
}
.galeria-thumb:hover img { transform: scale(1.06); }
.galeria-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: flex-end;
    padding: 0.75rem;
    transition: background .2s;
}
.galeria-thumb:hover .galeria-thumb-overlay { background: rgba(0,0,0,0.35); }
.galeria-thumb-overlay span {
    color: var(--blanco);
    font-size: 0.82rem;
    opacity: 0;
    transition: opacity .2s;
}
.galeria-thumb:hover .galeria-thumb-overlay span { opacity: 1; }

/* Contenido enriquecido (TinyMCE) */
.rich-content { line-height: 1.75; }
.rich-content p  { margin: 0 0 .75em; }
.rich-content ul, .rich-content ol { margin: 0 0 .75em 1.4em; }
.rich-content li { margin-bottom: .25em; }
.rich-content strong { font-weight: 700; }
.rich-content em { font-style: italic; }
.rich-content a { color: var(--verde); text-decoration: underline; }
.rich-content a:hover { opacity: .8; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    align-items: center;
    justify-content: center;
    display: none;
    transition: background .25s, backdrop-filter .25s;
}
.lightbox.open {
    display: flex;
}
.lightbox.open.visible {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radio);
    opacity: 0;
    transform: scale(0.93);
    transition: opacity .25s, transform .25s;
}
.lightbox.open.visible .lightbox-img {
    opacity: 1;
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--blanco);
    font-size: 1.5rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: var(--blanco);
    font-size: 1.5rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-caption {
    position: absolute;
    bottom: 1rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    padding-inline: 4rem;
}

/* =====================================================
   PÁGINA INTERIOR (hero pequeño)
   ===================================================== */
.page-hero {
    background: var(--verde);
    padding: 4rem 0 3rem;
    text-align: center;
    color: var(--blanco);
}
.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
}
.page-hero p {
    color: rgba(255,255,255,0.75);
    margin-top: 0.5rem;
}

/* =====================================================
   AGENDA
   ===================================================== */
.evento-card {
    display: flex;
    gap: 1rem;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    padding: 1.25rem;
    transition: box-shadow .2s;
}
.evento-card:hover { box-shadow: var(--sombra); }
.evento-fecha-box {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    background: var(--verde);
    color: var(--blanco);
    border-radius: var(--radio);
    padding: 0.5rem 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.evento-dia { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.evento-mes {
    font-family: var(--fuente-ui);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.75);
}
.evento-info { flex: 1; }
.evento-info h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.25rem; }
.evento-info p { font-size: 0.88rem; color: var(--texto-med); }
.evento-lugar {
    font-family: var(--fuente-ui);
    font-size: 0.75rem;
    color: var(--texto-suave);
    margin-top: 0.3rem;
}

/* =====================================================
   FORMULARIOS
   ===================================================== */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-family: var(--fuente-ui);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--texto-med);
    margin-bottom: 0.35rem;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    font-family: var(--fuente-titulo);
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    background: var(--blanco);
    color: var(--texto);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(45,80,22,0.12);
}
.form-group textarea { resize: vertical; min-height: 140px; }

.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radio);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.alert-ok  { background: #EAF3DE; color: #3B6D11; border: 1px solid #C0DD97; }
.alert-err { background: #FCEBEB; color: #A32D2D; border: 1px solid #F7C1C1; }

/* =====================================================
   DIRECTORIO
   ===================================================== */
.directorio-lista { display: flex; flex-direction: column; gap: 0.75rem; }
.directorio-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
}
.directorio-icono {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(45,80,22,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.directorio-info h4 { font-size: 0.95rem; font-weight: 600; }
.directorio-info p { font-size: 0.82rem; color: var(--texto-suave); }
.directorio-tel {
    margin-left: auto;
    font-family: var(--fuente-ui);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--verde);
    text-decoration: none;
    white-space: nowrap;
}
.directorio-tel:hover { text-decoration: underline; }

/* =====================================================
   DOCUMENTOS
   ===================================================== */
.doc-lista { display: flex; flex-direction: column; gap: 0.6rem; }
.doc-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio);
    text-decoration: none;
    color: var(--texto);
    transition: box-shadow .15s;
}
.doc-item:hover { box-shadow: var(--sombra); }
.doc-item-icon { font-size: 1.4rem; color: var(--piedra); flex-shrink: 0; }
.doc-item-info { flex: 1; }
.doc-item-info strong { display: block; font-size: 0.92rem; font-weight: 600; }
.doc-item-info span { font-size: 0.78rem; color: var(--texto-suave); font-family: var(--fuente-ui); }
.doc-item-dl {
    font-family: var(--fuente-ui);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--verde);
    white-space: nowrap;
}

/* =====================================================
   PIE DE PÁGINA
   ===================================================== */
.site-footer {
    background: var(--texto);
    color: rgba(255,255,255,0.75);
    padding: 3rem 0 1.5rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blanco);
    margin-bottom: 0.35rem;
}
.footer-sub { font-size: 0.82rem; line-height: 1.6; }
.footer-heading {
    font-family: var(--fuente-ui);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--blanco);
    margin-bottom: 0.75rem;
}
.site-footer nav { display: flex; flex-direction: column; gap: 0.35rem; }
.site-footer nav a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color .15s;
}
.site-footer nav a:hover { color: var(--blanco); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
}

/* =====================================================
   RESPONSIVE — MÓVIL
   ===================================================== */
/* =====================================================
   FORMULARIO TABLÓN PÚBLICO
   ===================================================== */
.tablon-form-wrap {
    max-width: 700px;
    margin: 0 auto;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--radio-lg);
    padding: 2rem;
}
/* Botón enviar foto galería */
#btn-enviar-foto {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--verde);
    color: #fff;
    border: none;
    border-radius: var(--radio);
    padding: .6rem 1.1rem;
    font-family: var(--fuente-ui);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
#btn-enviar-foto:hover { background: #555; }
#btn-enviar-foto i { font-size: 1.1rem; }

/* Modal envío de foto */
#modal-foto {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#modal-foto-box {
    background: var(--blanco);
    border-radius: var(--radio-lg);
    padding: 2rem;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.tablon-form-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--borde);
}
.tablon-form-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: .25rem;
}
.tablon-form-header p {
    font-size: .88rem;
    color: var(--texto-suave);
}

/* =====================================================
   SECCIONES RÁPIDAS (portada)
   ===================================================== */
.secciones-rapidas {
    background: var(--blanco);
    border-bottom: 1px solid var(--borde);
    padding: 2rem 0 0;
}
.secciones-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0;
}
.seccion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0.5rem 1.25rem;
    text-decoration: none;
    color: var(--texto-suave);
    border-radius: var(--radio);
    transition: color .15s, transform .15s;
    text-align: center;
    position: relative;
}
.seccion-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20%; right: 20%;
    height: 3px;
    background: var(--verde);
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity .15s;
}
.seccion-item:hover {
    color: var(--verde);
    transform: translateY(-2px);
}
.seccion-item:hover::after { opacity: 1; }

.seccion-item i {
    font-size: 36px;
    color: var(--verde);
    line-height: 1;
    opacity: 0.75;
    transition: opacity .15s, transform .15s;
}
.seccion-item:hover i {
    opacity: 1;
    transform: scale(1.1);
}
.seccion-item span {
    font-family: var(--fuente-ui);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.35;
    color: inherit;
}

/* Divisor y categorías secundarias */
.secciones-divisor {
    border-top: 1px solid var(--borde);
    margin-top: 0;
}
.secciones-cats {
    display: flex;
    gap: 0;
    padding: 0.1rem 0;
}
.seccion-cat {
    font-family: var(--fuente-ui);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--texto-suave);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
}
.seccion-cat:hover,
.seccion-cat.active {
    color: var(--verde);
    border-bottom-color: var(--verde);
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: 64px; left: 0; right: 0;
        flex-direction: column;
        background: var(--blanco);
        border-bottom: 1px solid var(--borde);
        padding: 0.75rem 1.25rem 1rem;
        gap: 0.25rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 0.6rem 0.75rem; font-size: 0.9rem; }

    .secciones-grid { grid-template-columns: repeat(4, 1fr); }
    .seccion-item i { font-size: 28px; }
    .secciones-cats { flex-wrap: wrap; }

    .footer-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .footer-cols > :first-child { grid-column: 1 / -1; }

    .evento-card { flex-direction: column; }
    .evento-fecha-box { width: 100%; flex-direction: row; gap: 0.5rem; padding: 0.5rem 0.75rem; }

    .directorio-tel { font-size: 0.85rem; }

    .cards-grid { grid-template-columns: 1fr; }
    .tablon-grid { grid-template-columns: 1fr; }
    .galeria-grid { columns: 2; }

    .lightbox-nav { display: none; }
}

@media (max-width: 480px) {
    .secciones-grid { grid-template-columns: repeat(4, 1fr); }
    .seccion-item { padding: 1rem 0.25rem 0.875rem; gap: 0.5rem; }
    .seccion-item i { font-size: 24px; }
    .seccion-item span { font-size: 0.6rem; letter-spacing: .04em; }
    .secciones-cats { display: none; }
    .footer-cols { grid-template-columns: 1fr; }
    .galeria-grid { columns: 2; column-gap: 0.5rem; }
}
