/* Explorar Page - Diseño minimalista y moderno */

.explorar-page {
    background: #fafafa;
}

.explorar-page .page-container {
    max-width: 1200px;
    padding: 2rem 1.5rem;
}

/* Hero Section */
.explorar-hero {
    text-align: center;
    padding: 3rem 0 4rem;
    max-width: 700px;
    margin: 0 auto;
}

.explorar-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.explorar-hero p {
    font-size: 1.1rem;
    color: #8e9aaf;
    line-height: 1.6;
}

/* Secciones */
.explorar-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Categorías - Desktop */
.categorias-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.categorias-row {
    display: contents;
}

.categoria-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.categoria-card:hover {
    background: #f8f9fa;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.categoria-icon {
    display: none;
}

.categoria-info {
    width: 100%;
}

.categoria-nombre {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 0;
}

.categoria-count {
    font-size: 0.875rem;
    color: #8e9aaf;
    line-height: 1;
    margin-top: 0.125rem;
}

/* Calendarios Grid */
.calendarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.calendario-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.calendario-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.calendario-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.calendario-content {
    padding: 1.5rem;
}

.calendario-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.calendario-info {
    flex: 1;
}

.calendario-nombre {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.calendario-ubicacion {
    font-size: 0.875rem;
    color: #8e9aaf;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.calendario-ubicacion i {
    font-size: 0.75rem;
}

.calendario-descripcion {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.calendario-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
}

.btn-suscribirse {
    background: #f8f9fa;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-suscribirse:hover {
    background: #e9ecef;
}

/* Regiones Tabs */
.regiones-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.regiones-tabs::-webkit-scrollbar {
    display: none;
}

.region-tab {
    background: white;
    border: 1px solid #e9ecef;
    padding: 0.625rem 1.25rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.region-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.region-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* Ciudades Grid */
.ciudades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.ciudad-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ciudad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.ciudad-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ciudad-info {
    flex: 1;
}

.ciudad-nombre {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.ciudad-count {
    font-size: 0.875rem;
    color: #8e9aaf;
}

/* Temporadas Grid */
.temporadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.temporada-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.temporada-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.temporada-imagen {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.temporada-content {
    padding: 1.5rem;
}

.temporada-nombre {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.temporada-descripcion {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.temporada-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #8e9aaf;
}

.temporada-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.temporada-meta-item i {
    font-size: 0.875rem;
    color: #667eea;
}

/* Nodos Grid */
.nodos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.nodo-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nodo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.nodo-imagen {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #f8f9fa;
}

.nodo-content {
    padding: 1.5rem;
}

.nodo-nombre {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.nodo-ubicacion {
    font-size: 0.875rem;
    color: #8e9aaf;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.nodo-ubicacion i {
    font-size: 0.75rem;
}

.nodo-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.nodo-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nodo-stat i {
    color: #667eea;
}

/* Galerías Grid */
.galerias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.galeria-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.galeria-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.galeria-preview {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.galeria-content {
    padding: 1.25rem;
}

.galeria-nombre {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.galeria-info {
    font-size: 0.875rem;
    color: #8e9aaf;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #8e9aaf;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal Fullscreen de Categoría */
.categoria-modal-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categoria-modal-fullscreen.active {
    display: flex;
    opacity: 1;
}

.categoria-modal-container {
    background: #fafafa;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.categoria-modal-fullscreen.active .categoria-modal-container {
    transform: scale(1);
}

.categoria-modal-header {
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.categoria-modal-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-back-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.btn-back-modal:hover {
    background: #f8f9fa;
}

.categoria-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.categoria-modal-filters {
    display: flex;
    gap: 0.5rem;
    background: #f8f9fa;
    padding: 0.25rem;
    border-radius: 8px;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.filter-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.categoria-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Separador de fecha */
.fecha-separador {
    margin: 1.5rem 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.fecha-separador span {
    text-transform: capitalize;
}

/* Card de evento en modal */
.evento-card-modal {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.evento-card-modal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.evento-hora-modal {
    font-size: 0.875rem;
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

.evento-info-modal {
    flex: 1;
}

.evento-titulo-modal {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.evento-organizador-modal,
.evento-ubicacion-modal,
.evento-precio-modal {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.evento-precio-modal {
    color: #667eea;
    font-weight: 600;
}

.evento-organizador-modal i,
.evento-ubicacion-modal i,
.evento-precio-modal i {
    font-size: 0.875rem;
}

.evento-imagen-modal {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #8e9aaf;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .explorar-hero {
        padding: 2rem 0 3rem;
    }

    .explorar-hero h1 {
        font-size: 2rem;
    }

    .explorar-hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    /* Mobile: 2 filas con scroll horizontal */
    .categorias-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .categorias-row {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .categorias-row::-webkit-scrollbar {
        display: none;
    }

    .categoria-card {
        flex: 0 0 auto;
        padding: 0.625rem 1rem;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 1px solid #e9ecef;
        border-radius: 20px;
        white-space: nowrap;
    }

    .categoria-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .categoria-icon {
        display: none;
    }

    .categoria-info {
        display: block;
    }

    .categoria-nombre {
        font-size: 0.875rem;
        font-weight: 600;
        color: #2c3e50;
        line-height: 1;
        margin-bottom: 0;
    }

    .categoria-count {
        font-size: 0.75rem;
        color: #8e9aaf;
        line-height: 1;
        margin-top: 0.125rem;
    }

    .calendarios-grid,
    .temporadas-grid,
    .nodos-grid {
        grid-template-columns: 1fr;
    }

    .ciudades-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .galerias-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    /* Modal fullscreen en mobile */
    .categoria-modal-fullscreen {
        padding: 0;
        background: #fafafa;
        align-items: stretch;
        justify-content: stretch;
    }

    .categoria-modal-container {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .explorar-page .page-container {
        padding: 1.5rem 1rem;
    }

    .categorias-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ciudades-grid {
        grid-template-columns: 1fr;
    }
}