/* Estilos específicos para la página de Escuelas con Memoria */

/* Hero Section mejorado */
.hero-section {
    background: linear-gradient(135deg, 
        rgba(26, 75, 132, 0.9) 0%, 
        rgba(138, 43, 226, 0.8) 25%, 
        rgba(70, 130, 180, 0.7) 50%, 
        rgba(135, 206, 235, 0.6) 75%, 
        rgba(173, 216, 230, 0.5) 100%);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.2) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0.6;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.3rem;
    color: white;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    line-height: 1.6;
}

/* Botón de regreso mejorado */
.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a4b84 0%, #0d2b4a 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 2rem;
    box-shadow: 0 4px 15px rgba(26, 75, 132, 0.3);
}

.back-btn:hover {
    background: linear-gradient(135deg, #0d2b4a 0%, #1a4b84 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 75, 132, 0.4);
}

/* Contenido principal */
.main-content {
    padding-top: 2rem;
    background: #f8f9fa;
}

/* Secciones de contenido */
.content-section {
    background: white;
    margin: 2rem auto;
    max-width: 1200px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.content-section .container {
    padding: 3rem;
}

.content-section h2 {
    font-size: 2.5rem;
    color: #1a4b84;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #8A2BE2 0%, #9370DB 100%);
    border-radius: 2px;
}

/* Texto de introducción */
.intro-text {
    max-width: 900px;
    margin: 0 auto 3rem auto;
}

.intro-text p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

/* Enlace del proyecto */
.project-link {
    background: linear-gradient(135deg, 
        rgba(75, 0, 130, 0.05) 0%, 
        rgba(138, 43, 226, 0.03) 25%, 
        rgba(70, 130, 180, 0.02) 50%, 
        rgba(135, 206, 235, 0.01) 75%, 
        rgba(173, 216, 230, 0.02) 100%);
    border: 2px solid rgba(75, 0, 130, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.project-link h4 {
    color: #1a4b84;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Contenedor de estadísticas */
.stats-container {
    margin-top: 2rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stats-row:last-child {
    margin-bottom: 0;
}

.stat-item {
    background: linear-gradient(135deg, 
        rgba(26, 75, 132, 0.1) 0%, 
        rgba(138, 43, 226, 0.08) 100%);
    border: 2px solid rgba(26, 75, 132, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.4) 1px, transparent 0);
    background-size: 15px 15px;
    opacity: 0.6;
    pointer-events: none;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(26, 75, 132, 0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #8A2BE2;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: #1a4b84;
    font-weight: 500;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Carrusel de galería */
.gallery-carousel-container {
    position: relative;
    margin-top: 2rem;
    max-width: 100%;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.gallery-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
}

.gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    cursor: grab;
}

.gallery-track:active {
    cursor: grabbing;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gallery-slide:hover .gallery-caption {
    background: linear-gradient(transparent, rgba(26, 75, 132, 0.98));
    backdrop-filter: blur(15px);
    transform: translateY(0);
}

.gallery-slide:not(:hover) .gallery-caption {
    background: linear-gradient(transparent, rgba(26, 75, 132, 0.85));
    backdrop-filter: blur(5px);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.gallery-caption {
    display: none !important;
}

.gallery-modal-caption {
    display: none !important;
}

.gallery-caption h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    color: #ffffff;
    letter-spacing: 0.5px;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: #f0f8ff;
    font-weight: 300;
}

/* Controles del carrusel */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.gallery-btn {
    background: rgba(26, 75, 132, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gallery-btn:hover {
    background: rgba(26, 75, 132, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.gallery-btn:active {
    transform: scale(0.95);
}

.gallery-btn svg {
    width: 24px;
    height: 24px;
}

/* Indicadores */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(26, 75, 132, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator:hover {
    background: rgba(26, 75, 132, 0.6);
    transform: scale(1.2);
}

.gallery-indicator.active {
    background: #8A2BE2;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
}

/* Footer de la galería mejorado */
.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, 
        rgba(26, 75, 132, 0.05) 0%, 
        rgba(138, 43, 226, 0.03) 25%, 
        rgba(70, 130, 180, 0.02) 50%, 
        rgba(135, 206, 235, 0.01) 75%, 
        rgba(173, 216, 230, 0.02) 100%);
    border: 2px solid rgba(26, 75, 132, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.gallery-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-counter {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a4b84;
    background: rgba(26, 75, 132, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.gallery-description p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
}

.gallery-actions {
    display: flex;
    gap: 0.5rem;
}

.gallery-action-btn {
    background: rgba(26, 75, 132, 0.9);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 75, 132, 0.3);
}

.gallery-action-btn:hover {
    background: rgba(26, 75, 132, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 75, 132, 0.4);
}

.gallery-action-btn:active {
    transform: scale(0.95);
}

.gallery-action-btn.active {
    background: #8A2BE2;
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

/* Modal para ver imagen en grande */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.gallery-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.gallery-modal-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal-image-container img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.gallery-modal-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: 2rem;
    text-align: center;
}

.gallery-modal-caption h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.gallery-modal-caption p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.gallery-modal-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.gallery-modal-btn {
    background: rgba(26, 75, 132, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-modal-btn:hover {
    background: rgba(26, 75, 132, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gallery-modal-btn:active {
    transform: scale(0.95);
}

/* Grid de recursos */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.resource-item {
    background: linear-gradient(135deg, 
        rgba(75, 0, 130, 0.05) 0%, 
        rgba(138, 43, 226, 0.03) 25%, 
        rgba(70, 130, 180, 0.02) 50%, 
        rgba(135, 206, 235, 0.01) 75%, 
        rgba(173, 216, 230, 0.02) 100%);
    border: 2px solid rgba(75, 0, 130, 0.1);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resource-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.4) 1px, transparent 0);
    background-size: 15px 15px;
    opacity: 0.6;
    pointer-events: none;
}

.resource-item:hover {
    border-color: rgba(75, 0, 130, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.resource-item h4 {
    color: #1a4b84;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.resource-item p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Botones mejorados */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #8A2BE2 0%, #9370DB 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    position: relative;
    z-index: 1;
}

.btn:hover {
    background: linear-gradient(135deg, #9370DB 0%, #8A2BE2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

/* Iconos para diferentes tipos de recursos */
.resource-item[data-type="normativa"]::before {
    content: '📋';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.resource-item[data-type="material"]::before {
    content: '📚';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.resource-item[data-type="propuestas"]::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .content-section .container {
        padding: 2rem 1.5rem;
    }
    
    .content-section h2 {
        font-size: 2rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .back-btn {
        margin: 1rem;
        padding: 10px 20px;
    }

    /* Carrusel responsive */
    .gallery-carousel {
        height: 350px;
    }
    
    .gallery-caption {
        padding: 1rem;
        height: 35%;
    }
    
    .gallery-caption h4 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .gallery-caption p {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .gallery-btn {
        width: 40px;
        height: 40px;
    }
    
    .gallery-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery-controls {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-carousel {
        height: 300px;
    }
    
    .gallery-caption {
        padding: 0.8rem;
        height: 40%;
    }
    
    .gallery-caption h4 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .gallery-caption p {
        font-size: 0.75rem;
        line-height: 1.1;
    }
    
    .gallery-btn {
        width: 35px;
        height: 35px;
    }
    
    .gallery-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Footer responsive */
    .gallery-footer {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .gallery-info {
        text-align: center;
    }

    .gallery-actions {
        justify-content: center;
    }

    .gallery-action-btn {
        width: 40px;
        height: 40px;
    }

    /* Modal responsive */
    .gallery-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 1rem;
    }

    .gallery-modal-caption {
        padding: 1rem;
    }

    .gallery-modal-caption h3 {
        font-size: 1.2rem;
    }

    .gallery-modal-caption p {
        font-size: 0.9rem;
    }

    .gallery-modal-btn {
        width: 40px;
        height: 40px;
    }
}

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

.content-section {
    animation: fadeInUp 0.6s ease-out;
}

.stat-item {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
}

.resource-item {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
} 