/* ===== ACTIVIDADES PAGE ===== */

/* Hero Section para Actividades */
.activities-hero {
    height: 50vh;
    min-height: 400px;
    background: linear-gradient(135deg, #0F2D3F 0%, #2C72B7 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activities-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/logo.jpg') center/cover no-repeat;
    opacity: 0.1;
    animation: parallax 20s ease-in-out infinite;
}

@keyframes parallax {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-10px); }
}

.activities-hero .hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.activities-hero .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.activities-hero .hero-description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== FILTROS ===== */
.filters-section {
    background: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* QUITA position: sticky y top */
    /* QUITA z-index */
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #6c757d;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #2C72B7;
    color: #2C72B7;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #2C72B7, #0F2D3F);
    color: white;
    border-color: #2C72B7;
    box-shadow: 0 4px 12px rgba(44, 114, 183, 0.3);
}

/* Buscador */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2C72B7;
    box-shadow: 0 0 0 3px rgba(44, 114, 183, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
}

/* ===== GRID DE ACTIVIDADES ===== */
.activities-grid-section {
    padding: 3rem 0 4rem;
    background: #f8f9fa;
    min-height: 60vh;
}

.activities-count {
    text-align: center;
    margin-bottom: 2rem;
    color: #6c757d;
    font-size: 1rem;
}

.activities-count span {
    font-weight: bold;
    color: #2C72B7;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Card de Actividad */
.activity-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Imagen de la actividad */
.activity-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-card:hover .activity-image img {
    transform: scale(1.1);
}

/* Badge de categoría */
.activity-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95);
    color: #2C72B7;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Badges por categoría */
.activity-badge.becas {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.activity-badge.eventos {
    background: linear-gradient(135deg, #2C72B7, #0F2D3F);
    color: white;
}

.activity-badge.talleres {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
}

.activity-badge.donaciones {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

/* Badge de video */
.video-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Contenido de la card */
.activity-content {
    padding: 1.5rem;
}

.activity-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.activity-date i {
    color: #2C72B7;
}

.activity-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #0F2D3F;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.activity-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.activity-stats span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.activity-stats i {
    color: #2C72B7;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2C72B7;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: #0F2D3F;
    gap: 0.75rem;
}

/* ===== ESTADOS ===== */

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #e9ecef;
    border-top: 4px solid #2C72B7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: sticky;
    top: 1rem;
    right: 1rem;
    float: right;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #2C72B7;
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

/* Header del modal */
.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: bold;
    color: #0F2D3F;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.modal-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-meta i {
    color: #2C72B7;
}

/* Galería del modal */
.modal-gallery {
    margin-bottom: 2rem;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #2C72B7;
}

.thumbnail.active {
    border-color: #2C72B7;
    box-shadow: 0 4px 12px rgba(44, 114, 183, 0.3);
}

/* Video del modal */
.modal-video {
    margin-bottom: 2rem;
}

.modal-video video {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Contenido del modal */
.modal-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #495057;
}

.modal-text h2 {
    font-size: 1.5rem;
    color: #0F2D3F;
    margin: 2rem 0 1rem;
}

.modal-text h3 {
    font-size: 1.25rem;
    color: #2C72B7;
    margin: 1.5rem 0 1rem;
}

.modal-text p {
    margin-bottom: 1rem;
}

.modal-text ul, .modal-text ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.modal-text li {
    margin-bottom: 0.5rem;
}

/* Botones de compartir */
.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.twitter { background: #1da1f2; }

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delays escalonados para las cards */
.activity-card:nth-child(1) { animation-delay: 0.1s; }
.activity-card:nth-child(2) { animation-delay: 0.2s; }
.activity-card:nth-child(3) { animation-delay: 0.3s; }
.activity-card:nth-child(4) { animation-delay: 0.4s; }
.activity-card:nth-child(5) { animation-delay: 0.5s; }
.activity-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
    .activities-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .activities-hero .hero-title {
        font-size: 2rem;
    }
    
    .filters-section {
        position: relative;
        top: 0;
    }
    
    .filters-container {
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .activities-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .activity-image {
        height: 200px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .main-image {
        height: 300px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .activities-hero .hero-title {
        font-size: 1.75rem;
    }
    
    .filters-container {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .activities-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .activity-card {
        max-width: 100%;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .main-image {
        height: 250px;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .thumbnail {
        height: 60px;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .activity-card,
    .modal-content,
    .modal-overlay {
        animation: none !important;
    }
    
    .activity-card:hover {
        transform: none !important;
    }
    
    .filter-btn:hover,
    .read-more-btn:hover {
        transform: none !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .activity-card {
        border: 2px solid #0F2D3F;
    }
    
    .filter-btn {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .filters-section,
    .modal,
    .share-buttons {
        display: none !important;
    }
    
    .activities-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .activity-card {
        page-break-inside: avoid;
    }
}

