/* ========================================
   TOM Impact 2026 - Campañas
   ======================================== */


/* === HEADER UNIFICADO (igual que home.css) === */
body {
    margin: 0;
}
body {
    font-family: 'Montserrat', sans-serif;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: black;
}
.logo {
    font-size: 1.5em;
    font-weight: bold;
}
.nav-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.nav-options a {
    color: black;
    text-decoration: none;
    font-size: 1em;
    font-weight: normal;
}
.nav-options a:hover {
    text-decoration: underline;
}
.social-icons {
    display: flex;
    gap: 10px;
    position: absolute;
    top: 10px;
    right: 20px;
}
.social-icons img {
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
}
.outline-text {
    font-family: 'Montserrat-black', Arial, sans-serif;
    font-size: 2rem;
    color: black;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px black;
    text-align: center;
}
.montserrat-bold {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 900;
    font-style: normal;
}
.title-montserrat {
    font-size: 35px;
}
.title-montserrat2{
    font-size: 55px;
}

/* ========================================
   Layout Principal
   ======================================== */

.main-container {
    min-height: 100vh;
    padding: 40px 20px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
}

/* ========================================
   Columna Izquierda - Lista de Campañas
   ======================================== */

.campaigns-column {
    flex: 1;
    min-width: 0;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
}

.campaigns-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Separador entre campañas */
.campaign-separator {
    height: 3px;
    position: relative;
    margin: 20px 0;
}

.campaign-separator::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #000;
}

/* Cards de campaña */
.campaign-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.campaign-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.campaign-thumbnail {
    width: 200px;
    height: 130px;
    flex-shrink: 0;
    background: #34495e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.campaign-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.campaign-thumbnail-placeholder {
    color: white;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

.campaign-info {
    flex: 1;
    min-width: 0;
}

.campaign-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 0 12px 0;
    color: #333;
}

.campaign-detail {
    margin: 6px 0;
    color: #666;
    font-size: 14px;
}

/* Mensaje vacío */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    font-size: 18px;
    margin: 0;
}

/* Indicador de carga */
.loading-indicator {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-indicator p {
    margin: 15px 0 0 0;
    font-size: 14px;
    font-weight: 600;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Columna Derecha - Filtros
   ======================================== */

.filters-column {
    width: 320px;
    flex-shrink: 0;
}

.filters-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

.filters-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2rem;
}

/* Barra de búsqueda */
.search-container {
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #000000;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #333;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    font-size: 16px;
}

/* Botones */
.btn-clear-filters {
    width: 100%;
    padding: 10px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    color: #333;
    transition: background 0.3s;
}

.btn-clear-filters:hover {
    background: #e0e0e0;
}

.btn-primary {
    width: 100%;
    padding: 50px 18px;
    border: none;
    background: #000;
    border-radius: 19px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-top: 30px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #333;
}

/* Filtros desplegables */
.filter-group {
    margin-bottom: 20px;
}

.filter-toggle {
    width: 100%;
    padding: 12px;
    border: 1px solid #000000;
    border-radius: 8px;
    background: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    transition: background 0.3s;
}

.filter-toggle:hover {
    background: #f9f9f9;
}

.filter-toggle span {
    transition: transform 0.3s;
}

.filter-content {
    display: none;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-content::-webkit-scrollbar {
    width: 6px;
}

.filter-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.filter-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.filter-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Checkboxes */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-radius: 4px;
    transition: background 0.2s;
}

.filter-checkbox-label:hover {
    background: #f5f5f5;
}

.filter-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

/* ========================================
   Modal / Popup
   ======================================== */

.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow-y: auto;
}

.popup-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.2s;
}

.popup-close:hover {
    transform: scale(1.1);
}

.popup-content-wrapper {
    padding: 60px 20px 20px;
}

.popup-content {
    max-width: 1200px;
    margin: 0 auto;
    background: #2c3e50;
    border-radius: 12px;
    padding: 40px;
    color: white;
}

.popup-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.popup-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
}

.popup-info-item strong {
    display: block;
    margin-bottom: 8px;
    opacity: 0.8;
}

/* Galería */
.gallery-section {
    margin-bottom: 30px;
}

.gallery-title {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.gallery-grid-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-grid-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.gallery-video {
    width: 100%;
    border-radius: 8px;
}

/* Overlay de imagen grande */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .filters-column {
        width: 100%;
        order: 1;
    }
    
    .campaigns-column {
        order: 2;
    }
    
    .filters-container {
        position: static;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 15px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .campaign-card {
        flex-direction: column;
    }
    
    .campaign-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .campaign-title {
        font-size: 1.2rem;
    }
    
    .popup-content {
        padding: 20px;
    }
    
    .popup-title {
        font-size: 1.8rem;
    }
    
    .popup-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-grid-images,
    .gallery-grid-videos {
        grid-template-columns: 1fr;
    }
    
    .popup-close {
        font-size: 30px;
        right: 15px;
        top: 15px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .filters-container {
        padding: 20px;
    }
    
    .campaign-card {
        padding: 15px;
    }
    
    .campaign-thumbnail {
        height: 150px;
    }
}

/* ========================================
   Contenedor de Detalle de Campaña
   ======================================== */

.campaign-detail {
    max-width: 1400px;
    margin: 0 auto;
}

/* Botón volver */
.btn-volver-detalle {
    background: transparent;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    padding: 10px;
    transition: color 0.3s;
}

.btn-volver-detalle:hover {
    color: #000;
}

/* Layout de dos columnas */
.detail-two-column-layout {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 30px;
}

/* Columna principal */
.detail-main-column {
    background: #fff;
    padding: 40px;
    border-radius: 0;
}

/* Título */
.detail-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #333;
    margin: 0 0 25px 0;
    line-height: 1.3;
}

/* Información simple */
.detail-info-simple {
    margin-bottom: 30px;
    color: #666;
}

.detail-info-simple p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.detail-info-simple strong {
    color: #333;
    font-weight: 600;
}

/* Secciones */
.detail-section {
    margin-bottom: 30px;
}

.detail-section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #666;
    margin: 0 0 15px 0;
}

.detail-description {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

/* Galería dentro del detalle */
.detail-gallery-section {
    margin: 30px 0;
}

/* Columna sidebar */
.detail-sidebar-column {
    display: flex;
    flex-direction: column;
}

/* Botón inscribir caso */
.btn-inscribir-caso {
    width: 100%;
    padding: 50px 18px;
    border: none;
    background: #000;
    border-radius: 19px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: white;
    cursor: pointer;
    margin-top: 30px;
    transition: background 0.3s;
}

.btn-inscribir-caso:hover {
    background: #000;
}

.btn-volver:hover {
    background: #555 !important;
}

/* ========================================
   Galería de Imágenes - Carrusel
   ======================================== */

.galeria-fotos-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.galeria-fotos-slider {
    position: relative;
    width: 100%;
    height: 498px;
    background: #f8f9fa;
}

.galeria-foto-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galeria-foto-slide.active {
    opacity: 1;
}

.galeria-foto-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
}

/* Botones de navegación */
.galeria-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(156, 156, 156, 0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.galeria-nav:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.galeria-prev {
    left: 15px;
}

.galeria-next {
    right: 15px;
}

/* Indicadores */
.galeria-indicadores {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicador {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicador:hover {
    background: rgba(255, 255, 255, 0.8);
}

.indicador.active {
    background: white;
    transform: scale(1.2);
}

/* Estilos para galería de videos */
.galeria-video {
    margin-bottom: 18px;
}

.galeria-video h3 {
    color: #000000;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.5rem;
}

.galeria-video video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
    display: block;
    object-fit: cover;
}

/* Contenedor para "no videos/images" */
.galeria-video > div,
.no-images-message {
    background: rgba(255,255,255,0.1);
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    color: #000;
    border: 2px dashed rgba(0,0,0,0.1);
}

/* Botones de videos adicionales */
.btn-video-adicional {
    margin: 5px;
    padding: 8px 15px;
    background: rgba(0,0,0,0.05);
    border: 1px solid #000000;
    border-radius: 6px;
    color: #000000;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-video-adicional:hover {
    background: rgba(0,0,0,0.1);
}

.videos-adicionales {
    text-align: center;
}


/* Mensaje cuando no hay contenido */
.no-media-message,
.no-images-message {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    border: 2px dashed rgba(0,0,0,0.1);
    color: #000;
}

/* Overlay para imagen grande */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* Responsive para galería */
@media (max-width: 768px) {
    .detail-two-column-layout {
        grid-template-columns: 1fr;
    }
    
    .detail-sidebar-column {
        order: -1;
        margin-bottom: 20px;
    }
    
    .detail-main-column {
        padding: 30px 20px;
    }
    
    .galeria-fotos-slider {
        height: 300px;
    }
    
    .galeria-nav {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .galeria-prev {
        left: 10px;
    }
    
    .galeria-next {
        right: 10px;
    }
    
    .galeria-indicadores {
        bottom: 10px;
    }
    
    .indicador {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .campaign-detail {
        padding: 0 10px;
    }
    
    .detail-main-column {
        padding: 20px 15px;
    }
    
    .detail-title {
        font-size: 1.4rem;
    }
    
    .galeria-fotos-slider {
        height: 250px;
    }
    
    .galeria-nav {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* ========================================
   Loader de página completa
   ======================================== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
}
