:root {
    --ink: #061b31;
    --navy: #09243e;
    --blue: #123b60;
    --paper: #f4f5f4;
    --white: #fff;
    --orange: #ff7144;
    --muted: #a9bed0;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

.topbar {
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 max(24px, calc((100vw - 1220px)/2));
    background: rgba(6, 27, 49, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.65rem;
    font-weight: 850;
    letter-spacing: -.06em;
    text-decoration: none;
    position: relative;
    z-index: 1001;
}

.logo img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    transform: translateY(5px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
    transition: transform 0.2s ease;
}

.logo:hover img {
    transform: translateY(5px) scale(1.05);
}

.logo span {
    color: #fff;
}

.logo .logo-accent {
    color: #ff8059;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar nav a {
    color: #d5e1eb;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: color 0.2s;
}

.topbar nav a:hover {
    color: #ff8059;
}

.nav-vigosona-btn {
    background: linear-gradient(135deg, #f97316, #ff8059);
    color: #fff !important;
    padding: 7px 18px;
    border-radius: 999px;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-vigosona-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.nav-button {
    padding: 7px 14px;
    border: 1px solid #64809a;
    border-radius: 999px;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Botón Menú Hamburguesa Móvil */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Banner Promo Vigosona */
.banner-vigosona-promo {
    background: linear-gradient(90deg, #09243e 0%, #123b60 100%);
    padding: 12px 24px;
    color: #fff;
    border-bottom: 2px solid #ff7144;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.banner-vigosona-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-vigosona-icon {
    font-size: 1.5rem;
}

.banner-vigosona-title {
    color: #ff9c7b;
    font-size: 0.95rem;
    font-weight: 800;
}

.banner-vigosona-subtitle {
    display: block;
    font-size: 0.82rem;
    color: #d5e1eb;
}

.banner-vigosona-btn {
    background: #ff7144;
    color: #fff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 0.2s;
}

.banner-vigosona-btn:hover {
    background: #ff855f;
}

/* Adaptación para Pantallas Móviles (<= 768px) */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .topbar nav {
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        background: rgba(6, 27, 49, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 24px 20px 32px;
        gap: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        z-index: 999;
    }

    .topbar nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .topbar nav a,
    .topbar nav button {
        font-size: 1.1rem !important;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .nav-vigosona-btn {
        width: auto !important;
        padding: 10px 28px !important;
    }

    /* Vigosona promo centrado y táctil en móvil */
    .banner-vigosona-promo {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        align-items: center;
        padding: 16px 20px;
        gap: 12px;
    }

    .banner-vigosona-box {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    .banner-vigosona-subtitle {
        text-align: center;
    }

    .banner-vigosona-btn {
        display: inline-block;
        position: relative;
        z-index: 10;
        cursor: pointer;
        padding: 10px 24px;
        font-size: 0.82rem;
        margin-top: 4px;
        touch-action: manipulation;
    }
}

.hero {
    min-height: 470px;
    padding: 52px max(24px, calc((100vw - 1220px)/2));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(4, 18, 32, .91) 2%, rgba(4, 18, 32, .55) 58%, rgba(4, 18, 32, .24)), url('https://images.unsplash.com/photo-1506157786151-b8491531f063?auto=format&fit=crop&w=1800&q=85') center/cover;
    color: #fff;
}

.hero-content {
    max-width: 620px;
}

.eyebrow {
    margin: 0 0 9px;
    color: #ff9c7b;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(3rem, 6.2vw, 5.8rem);
    line-height: .89;
    letter-spacing: -.085em;
}

.hero-copy {
    max-width: 400px;
    margin: 22px 0 0;
    color: #e6edf3;
    font-size: 1.05rem;
    line-height: 1.5;
}

.search-panel {
    max-width: 800px;
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(8, 34, 57, .88);
    border: 1px solid rgba(198, 222, 240, .19);
    border-radius: 14px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

.search-field {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border-radius: 8px;
    background: #fff;
    color: #5b6775;
}

.search-field input {
    width: 100%;
    min-height: 43px;
    border: 0;
    outline: 0;
    color: var(--ink);
}

.search-panel button,
.btn-primary {
    border: 0;
    border-radius: 8px;
    background: var(--orange);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    padding: 0 19px;
}

.agenda-section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 65px 24px 78px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
}

.section-heading .eyebrow {
    color: #dd5630;
}

h2 {
    margin: 0;
    letter-spacing: -.055em;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1;
}

.contador {
    margin: 0;
    color: #637589;
    font-size: .9rem;
}

.contenedor-filtros,
.contenedor-filtros-restaurantes,
.contenedor-filtros-locales {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    margin: 20px 0 28px;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.contenedor-filtros::-webkit-scrollbar,
.contenedor-filtros-restaurantes::-webkit-scrollbar,
.contenedor-filtros-locales::-webkit-scrollbar {
    display: none;
}

.btn-filtro,
.btn-filtro-rest,
.btn-filtro-loc {
    flex: 0 0 auto;
    border: 1px solid #d5dce2;
    border-radius: 999px;
    background: #fff;
    color: #4d6174;
    padding: 9px 17px;
    cursor: pointer;
    font-weight: 700;
    font-size: .86rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-filtro:hover,
.btn-filtro-rest:hover,
.btn-filtro-loc:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-1px);
}

.btn-filtro.active {
    color: #fff;
    background: #061b31;
    border-color: #061b31;
    box-shadow: 0 4px 12px rgba(6, 27, 49, 0.25);
}

.btn-filtro-rest.active {
    color: #fff;
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-filtro-loc.active {
    color: #fff;
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-permanente {
    color: #9f5420;
    border-color: #f3d4be;
    background: #fff9f4;
}

.btn-vigonature {
    color: #1b5e20;
    border-color: #a5d6a7;
    background: #f1f8e9;
}

.btn-vigonature.active {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}


.grid-eventos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.card {
    position: relative;
    min-height: 380px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(6, 27, 49, .14);
    transition: transform .25s, box-shadow .25s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 34px rgba(6, 27, 49, .23);
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 15%, rgba(5, 17, 29, .23) 38%, rgba(5, 17, 29, .96) 92%);
}

.card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    padding: 19px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
    background: #4a779d;
    color: #fff;
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tag.musica {
    background: #c53d57
}

.tag.exposiciones {
    background: #318a6b
}

.tag.familiar {
    background: #d58d26
}

.tag.rutas {
    background: #297e91
}

.tag.escena {
    background: #7a5bae
}

.tag.formacion {
    background: #4875b2
}

.titulo-evento {
    margin: 12px 0 10px;
    font-size: 1.36rem;
    letter-spacing: -.035em;
    line-height: 1.08;
}

.info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    color: #d7e2ea;
    font-size: .8rem;
    line-height: 1.35;
}

.info svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.descripcion {
    display: -webkit-box;
    overflow: hidden;
    margin: 11px 0 0;
    color: #d2dde5;
    font-size: .8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.empty {
    grid-column: 1/-1;
    padding: 50px 20px;
    text-align: center;
    color: #607286;
}

.modal-overlay {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 70px 16px 20px;
    background: rgba(3, 16, 29, .85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-content {
    position: relative;
    width: min(790px, 100%);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .4);
    margin: auto;
}

.btn-cerrar {
    position: absolute;
    z-index: 2;
    top: 13px;
    right: 13px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 1.7rem;
    cursor: pointer;
    box-shadow: 0 2px 8px #0005;
}

.modal-header-img {
    width: 100%;
    height: min(330px, 36vh);
    object-fit: cover;
}

.modal-body {
    padding: 30px clamp(23px, 5vw, 50px) 42px;
}

.modal-body h2 {
    margin: 12px 0 22px;
    font-size: clamp(2rem, 4.4vw, 3rem);
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding: 14px 0;
    border-block: 1px solid #e1e6e9;
    color: #4c6174;
    font-size: .92rem;
}

.modal-meta p {
    margin: 0;
}

.modal-descripcion {
    margin: 27px 0;
    color: #2d4051;
    font-size: 1rem;
    line-height: 1.78;
}

.modal-descripcion p {
    margin: 0 0 1.1em;
}

.modal-descripcion p:last-child {
    margin-bottom: 0;
}

#contenedor-mapa h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

#mapa {
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.modal-actions a {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    text-decoration: none;
}

.btn-secondary {
    border: 1px solid #b9c9d6;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 750;
}

.site-footer {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 40px;
    padding: 47px max(24px, calc((100vw - 1220px)/2));
    background: var(--ink);
    color: #d5e1eb;
}

.site-footer p {
    max-width: 260px;
    margin: 14px 0 0;
    line-height: 1.5;
    font-size: .9rem;
}

.footer-links,
.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 11px 19px;
    align-content: start;
}

.footer-links a,
.footer-legal a {
    color: #d5e1eb;
    text-decoration: none;
    font-size: .84rem;
}

.footer-legal {
    flex-direction: column;
}

.cookie-banner {
    position: fixed;
    z-index: 30;
    right: 18px;
    bottom: 18px;
    width: min(400px, calc(100vw - 36px));
    padding: 17px;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 12px 36px #0004;
}

.cookie-banner[hidden] {
    display: none
}

.cookie-banner p {
    margin: 0 0 12px;
    font-size: .86rem;
    line-height: 1.45
}

.cookie-banner a {
    color: #a84020
}

.cookie-banner button {
    border: 0;
    border-radius: 6px;
    padding: 8px 13px;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

@media(max-width:680px) {
    .topbar {
        padding-block: 13px
    }

    .logo img {
        width: 90px !important;
    }

    .topbar nav a {
        display: none
    }

    .hero {
        min-height: 520px;
        padding-block: 44px
    }

    .search-panel {
        flex-direction: column
    }

    .search-panel button {
        min-height: 43px
    }

    .agenda-section {
        padding-inline: 18px
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 27px
    }

    .footer-legal {
        flex-direction: row
    }

    .grid-eventos {
        grid-template-columns: 1fr 1fr
    }

    .card {
        min-height: 325px
    }

    .card-body {
        padding: 14px
    }

    .titulo-evento {
        font-size: 1.1rem
    }

    .descripcion {
        display: none
    }
}

@media(max-width:430px) {
    .grid-eventos {
        grid-template-columns: 1fr
    }

    .card {
        min-height: 370px
    }
}

/* Insignia de Opinión en la Tarjeta de Evento */
.card {
    position: relative;
}

.badge-opinion-card {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
    letter-spacing: 0.3px;
}

/* Callout de Opinión Destacada en Modal */
.modal-opinion-callout {
    margin: 16px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(139, 92, 246, 0.08));
    border-left: 4px solid #ec4899;
    border-radius: 10px;
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-left-width: 4px;
}

.opinion-callout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.opinion-callout-icon {
    font-size: 1.1rem;
}

.opinion-callout-title {
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #be185d;
}

.opinion-callout-body {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    font-style: italic;
    margin: 0;
}

/* Atribución de Google Places */
.google-attribution-bar {
    margin: 12px 0 20px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.google-attribution-bar svg {
    color: #3b82f6;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .agenda-section {
        padding: 36px 16px 48px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .section-heading h2 {
        font-size: 1.75rem !important;
        line-height: 1.15;
    }

    .contador {
        font-size: 0.85rem;
        color: #64748b;
    }

    .google-attribution-bar {
        display: flex;
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 0.78rem;
        padding: 8px 12px;
        margin: 10px 0 16px;
        border-radius: 12px;
    }
}

/* Recomendación Gastronómica en Evento */
.restaurante-recomendado-box {
    margin: 16px 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
}

.rest-rec-header {
    font-size: 0.82rem;
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.rest-rec-content b {
    color: #1e293b;
    font-size: 1rem;
}

/* Insignia de Atribución de Fotografía (Google Places vs Foto Propia Envigo) */
.photo-attribution-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(6, 27, 49, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}