/* ==============================================================================
   1. VARIABLES DE DISEÑO Y CONFIGURACIÓN BASE
   ============================================================================== */
:root {
    --primary: #2e7d32;            /* Verde principal */
    --primary-dark: #1b5e20;       /* Verde oscuro */
    --accent-green: #4caf50;       /* Verde claro de acento */
    --bg-dark: #0d1b10;            /* Fondo oscuro mientras carga la imagen */
    --card-bg: #ffffff;            /* Fondo de las tarjetas de ruta */
    --text-color: #212529;         /* Color de texto principal */
    --border-color: #000000;       /* Color del borde estilo sticker/brutalista */
    --border-width: 2px;           /* Grosor general de los bordes */
    
    /* Sombras sólidas estilo Neo-brutalismo */
    --shadow-solid: 4px 4px 0px #000000;
    --shadow-sm: 2px 2px 0px #000000;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    position: relative;
    min-height: 100vh;
}

/* Capa fija de la imagen de fondo con opacidad atenuada */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/ImagenFondo.png');  
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.40;
    filter: brightness(0.7);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

/* ==============================================================================
   2. ENCABEZADO Y LOGOTIPOS
   ============================================================================== */
.fixed-logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 50;
}

.fixed-logo {
    width: 150px;
    height: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.main-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 10px;
    margin-bottom: 25px;
    text-align: center;
}

/* Etiqueta blanca principal del logo "RUTRAVESÍA" */
.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-solid);
    padding: 8px 20px;
    max-width: 95%;
}

.logo-badge .header-logo {
    width: 60px;
    height: auto;
    object-fit: contain;
}

.logo-badge span {
    font-family: 'Caveat Brush', cursive;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary-dark);
    text-transform: uppercase;
    line-height: 1;
}

.slogan-badge {
    background-color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 3px 3px 0px var(--border-color);
    padding: 8px 16px;
    width: 90%;
    max-width: 420px;
}

.slogan-badge p {
    font-family: 'Caveat Brush', cursive; 
    font-size: 1.35rem;
    font-weight: 500;
    color: #222222;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* ==============================================================================
   3. BUSCADOR Y TÍTULOS GENERALES
   ============================================================================== */
.section-title {
    font-family: 'Caveat Brush', cursive;
    text-align: center;
    font-size: 2.2rem;
    color: #ffffff;
    text-shadow: 2px 2px 0px #000000;
    margin: 15px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.search-section {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: var(--border-width) solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-solid);
    outline: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-solid);
    max-height: 200px;
    overflow-y: auto;
    z-index: 20;
}

.search-item {
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-item:hover {
    background-color: #e8f5e9;
}

/* ==============================================================================
   4. SECCIÓN ENGLOBADA Y CARRUSEL DE RUTAS (CORREGIDO)
   ============================================================================== */
.upcoming-section {
    position: relative;
    margin: 35px auto 25px auto;
    text-align: center;
    max-width: 1020px;
    padding: 25px 20px 20px 20px;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(1px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.upcoming-section .section-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Caveat Brush', cursive;
    font-size: 2.3rem;
    color: #ffffff;
    margin: 0 0 15px 0;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-shadow: 
        -2px -2px 0 #000000,  
         2px -2px 0 #000000,
        -2px  2px 0 #000000,
         2px  2px 0 #000000,
         0px  4px 10px rgba(0, 0, 0, 0.85) !important;
}

.carousel-wrapper {
    position: relative !important;
    width: 100%;
    max-width: 960px;
    margin: 15px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sube la compatibilidad con .cards-grid y .cards-carousel */
.cards-grid,
.cards-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.cards-grid::-webkit-scrollbar,
.cards-carousel::-webkit-scrollbar {
    height: 6px;
}

.cards-grid::-webkit-scrollbar-thumb,
.cards-carousel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Botones circulares flotantes del carrusel (compatibilidad total de clases) */
/* Botones de navegación circulares (Estilo Modal) */
.carousel-arrow,
.carousel-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 36px !important;
    height: 36px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 50% !important;
    color: #222222 !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    z-index: 30 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Efecto Hover idéntico */
.carousel-arrow:hover,
.carousel-btn:hover {
    background: #f0f0f0 !important;
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

/* Posicionamiento en los bordes idéntico al modal */
.carousel-arrow.prev,
.btn-prev { 
    left: -18px !important; 
}

.carousel-arrow.next,
.btn-next { 
    right: -18px !important; 
}


/* ==============================================================================
   5. TARJETAS DE RUTAS (CARDS) Y BOTÓN METÁLICO
   ============================================================================== */
.card,
.cards-grid .card,
.cards-carousel .card {
    background: var(--card-bg);
    border: var(--border-width) solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-solid);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    overflow: hidden;
    flex: 0 0 240px !important;
    width: 240px !important;
    min-width: 240px !important;
    height: 320px !important;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0px var(--border-color);
}

.card-info-header {
    width: 100%;
    text-align: left;
    flex: 1 1 auto;
    overflow: hidden;
}

.card-info-header h3 {
    color: #ffffff;
    font-size: 1.15rem; /* Ajustado ligeramente para acomodar 3 líneas sin empujar */
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2px;
    margin-bottom: 6px;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.9);
    word-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-detail-item {
    color: #f1f5f9;
    font-size: 0.80rem;
    margin: 2px 0;
    font-weight: 600;
    text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.95);
}

.card-info-header .date {
    color: #fde047;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 4px;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.95);
}

/* Llamado de atención: FECHA PROPUESTA (Optimizado de tamaño) */
.banner-fecha-propuesta {
    margin-top: 2px;
    margin-bottom: 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    height: 52px; /* Altura fija para que no desplace la tarjeta */
}

.banner-fecha-propuesta span:first-child {
    background: linear-gradient(180deg, #ffffff 0%, #a3ffb8 35%, #22e565 70%, #10b981 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.20rem; /* Reducido para encajar limpio */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    filter: 
        drop-shadow(0px 2px 0px #000000)
        drop-shadow(0px -1px 0px #000000)
        drop-shadow(1px 0px 0px #000000)
        drop-shadow(-1px 0px 0px #000000)
        drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.9));
}

.banner-fecha-propuesta .flecha-indicadora {
    background: linear-gradient(180deg, #ffffff 0%, #22e565 60%, #10b981 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem; /* Flecha ajustada para mantener proporción */
    font-weight: 900;
    margin-top: -2px;
    animation: apuntarAbajo 1s infinite alternate;
    filter: 
        drop-shadow(0px 2px 0px #000000)
        drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.9));
}

@keyframes apuntarAbajo {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}

/* Botón Metálico "VER DETALLES" (Anclado 100% al fondo) */
.btn-details {
    width: 90%;
    margin: auto auto 0 auto !important; /* Fuerza el anclaje exactamente al borde inferior */
    padding: 7px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(180deg, #ffffff 0%, #dedede 40%, #c2c2c2 60%, #9e9e9e 100%);
    border: 1px solid #555555;
    border-top: 1.5px solid #ffffff;
    border-bottom: 1.5px solid #333333;
    box-shadow: 
        0 3px 5px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 2px rgba(0, 0, 0, 0.35);
    transition: all 0.15s ease-in-out;
    display: block;
    flex-shrink: 0; /* Impide que el botón se reduzca si hay poco espacio */
}

.btn-details:hover {
    background: linear-gradient(180deg, #ffffff 0%, #ebebeb 40%, #d1d1d1 60%, #b0b0b0 100%);
    border-color: #444444;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        0 0 6px rgba(255, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.btn-details:active {
    background: linear-gradient(180deg, #9e9e9e 0%, #c2c2c2 50%, #dedede 100%);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.4),
        inset 0 2px 3px rgba(0, 0, 0, 0.5);
    transform: translateY(1px);
}

/* ==============================================================================
   6. FILTROS Y CATÁLOGO COMPLETO
   ============================================================================== */
.catalog-section {
    text-align: center;
    margin-top: 35px;
}

.btn-catalog {
    width: 100%;
    max-width: 700px;
    padding: 12px 20px;
    font-family: 'Caveat Brush', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 
        2px 2px 0px #000000,
        -1px -1px 0px #000000,  
        1px -1px 0px #000000,
        -1px 1px 0px #000000,
        0px 3px 6px rgba(0, 0, 0, 0.9);
    background: var(--primary);
    border: var(--border-width) solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-solid);
    transition: transform 0.1s ease, background 0.2s ease;
}

.btn-catalog:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #f4f4f4;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-top: 15px;
}

.filter-select {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    padding: 8px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-search-filter {
    flex: 1 1 auto;
    background-color: var(--primary);
    color: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 14px;
    font-weight: bold;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-reset-filter {
    flex: 0 0 auto;
    background-color: #ffffff;
    color: #000000;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

#catalogCardsContainer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* ==============================================================================
   7. VENTANAS MODALES Y FORMULARIO DE VOTACIÓN
   ============================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000 !important; 
}

.modal-overlay.top-modal,
#modalDetalleRuta,
#modalDetalles,
#routeDetailModal {
    z-index: 20000 !important;
}

.modal-card, 
.modal-content {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    margin: auto;
}

.modal-large {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.weekend-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

#weekendOptions > div:not(.weekend-btn) {
    display: none !important;
}

.weekend-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.weekend-btn:hover {
    border-color: var(--primary);
    background-color: #f0fdf4;
}

.weekend-btn.selected {
    border-color: var(--primary);
    background-color: var(--primary);
    color: white;
}

.vote-badge {
    background-color: #eee;
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
}

.weekend-btn.selected .vote-badge {
    background-color: white;
    color: var(--primary);
}

/* Campos e Inputs del votante */
#voterName, 
input[id*="voterName"],
.vote-input-name {
    width: 100% !important;
    padding: 12px 16px !important;
    margin-top: 10px !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border: 2px solid #ced4da !important;
    border-radius: 8px !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.25s ease-in-out !important;
}

#voterName:focus, 
input[id*="voterName"]:focus,
.vote-input-name:focus {
    background-color: #ffffff !important;
    border-color: var(--primary, #2e7d32) !important;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2) !important;
}

#voterName:disabled, 
input[id*="voterName"]:disabled,
.vote-input-name:disabled {
    background-color: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #495057 !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.9 !important;
}

.voting-title {
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 0.98rem !important;
    text-align: center !important;
    margin-top: 14px !important;
    margin-bottom: 10px !important;
    display: block !important;
}

.voting-disclaimer {
    font-size: 0.78rem !important;
    color: #64748b !important;
    text-align: center !important;
    margin-top: 10px !important;
    margin-bottom: 5px !important;
    line-height: 1.3 !important;
}

/* Botón "Me interesa realizarla" */
.btn-interest, 
button[id*="btnInteres"], 
.btn-votar {
    width: 100%;
    padding: 12px 18px;
    margin-top: 15px;
    background-color: var(--primary, #2e7d32);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border: 2px solid #1b5e20;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease-in-out;
}

.btn-interest:hover, 
button[id*="btnInteres"]:hover, 
.btn-votar:hover {
    background-color: #379412;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(17, 19, 18, 0.35);
}

.btn-interest:active, 
button[id*="btnInteres"]:active, 
.btn-votar:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(27, 94, 32, 0.2);
}

.btn-interest.voted, 
.btn-interest.active {
    background-color: #098313;
    color: #f6f8f6;
    border-color: #2e7d32;
}

/* Botones de acción unificados (WhatsApp y Enviar Voto) */
.btn-whatsapp,
#btnSubmitVote,
.btn-submit-vote {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 12px 16px !important;
    margin-top: 15px !important;
    background-color: #117a38 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: 
        -1px -1px 0 #0f5228,  
         1px -1px 0 #0f5228,
        -1px  1px 0 #0f5228,
         1px  1px 0 #0f5228,
         0px  4px 6px rgba(0, 0, 0, 1.5) !important;
    border: 2.5px solid #0d5c2c !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18) !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-whatsapp:hover,
#btnSubmitVote:hover:not(:disabled),
.btn-submit-vote:hover:not(:disabled) {
    background-color: #1ebd56 !important;
    border-color: #08421f !important;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28) !important;
    transform: translateY(-1px);
}

/* Estado Deshabilitado Unificado */
.btn-disabled,
#btnSubmitVote:disabled {
    background-color: #cbd5e1 !important;
    border: 2px solid #94a3b8 !important;
    color: #475569 !important;
    text-shadow: none !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Texto desplegable del modal */
.texto-colapsado {
    max-height: 60px !important;
    overflow: hidden !important;
    position: relative;
    line-height: 1.5;
    color: #444;
    transition: max-height 0.3s ease;
}

.texto-colapsado::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(transparent, #ffffff);
}

.btn-expandir {
    background: none;
    border: none;
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0 0 0;
    display: inline-block;
}

.btn-expandir:hover {
    text-decoration: underline;
}

/* ==============================================================================
   8. GALERÍA FILMSTRIP Y VISOR LIGHTBOX
   ============================================================================== */
.filmstrip-carousel-wrapper {
    display: flex;
    align-items: center;
    background-color: #181818;
    border-radius: 8px;
    padding: 8px 6px;
    border: 2px solid #000;
    gap: 6px;
}

.filmstrip-thumbs-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px;
    width: 100%;
}

.filmstrip-thumb {
    width: 65px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #555;
    cursor: pointer;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.filmstrip-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: var(--accent-green);
}

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.lightbox-container {
    position: relative;
    z-index: 1000000;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1000002;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #ff5252;
}

.lightbox-img-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 65vh;
    max-width: 80vw;
}

.lightbox-img-wrapper img {
    max-height: 65vh;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fcfcfc;
    color: rgb(40, 128, 59);
    border: none;
    font-size: 2.2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding: 0;
    z-index: 1000001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, background-color 0.2s;
    user-select: none;
}

.lightbox-arrow.prev {
    left: -24px;
    padding-right: 2px;
}

.lightbox-arrow.next {
    right: -24px;
    padding-left: 2px;
}

/* ==============================================================================
   9. ADAPTACIONES RESPONSIVE Y MEDIA QUERIES (UNIFICADOS)
   ============================================================================== */
@media (min-width: 600px) {
    .logo-badge .header-logo {
        width: 85px;
    }
    .logo-badge span {
        font-size: 3.2rem;
    }
    .slogan-badge p {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .fixed-logo-container {
        position: static;
        text-align: center;
        margin-bottom: 10px;
    }

    .fixed-logo {
        width: 75px;
    }

    #catalogCardsContainer {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .filter-controls {
        flex-direction: row;
    }

    .filter-select {
        flex: 1 1 calc(50% - 8px) !important;
        font-size: 0.85rem !important;
        padding: 6px 4px !important;
        text-overflow: ellipsis;
    }

    .modal-card.modal-large {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px 8px !important;
    }

    .btn-prev {
        left: -8px !important;
    }

    .btn-next {
        right: -8px !important;
    }
}

@media (max-width: 600px) {
    .lightbox-img-wrapper {
        max-height: 55vh;
    }
    
    .lightbox-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .lightbox-arrow.prev { left: -14px; }
    .lightbox-arrow.next { right: -14px; }
}