/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 08-17-2025, 09:59:01 AM
    Author     : JOSE POLANCO
*/

/* Estilos personalizados para las tarjetas */

/* Fondo igual que principal.css */
body {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1)), linear-gradient(rgba(255, 255, 255, 0.9), rgba(209, 250, 229, 0.8)), url('../img/fondo-caf.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    min-height: 100vh;
}

.titulo-principal-container {
    text-align: center;
    margin-bottom: 1rem;
}

.titulo-principal-icon {
    font-size: 1.25rem;
    /* icon size inside circle */
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    /* full circle */
    background: #f2c67a;
    /* match noticias.jsp badge tone */
    color: #5a3e1b;
    /* contrast icon color */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.titulo-principal-texto {
    color: #22c55e;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.tarjeta-secundaria {
    background-color: #fefefe;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 0;
}

.tarjeta-secundaria.aos-animate {
    opacity: 1;
    transform: translateY(0);
}

.tarjeta-secundaria:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.titulo-secundario-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.titulo-secundario-icon {
    font-size: 1rem;
    /* icon size inside circle */
    margin-right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #f2c67a;
    color: #5a3e1b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.titulo-secundario-texto {
    color: #8b5a2b;
    font-size: 1.25rem;
    font-weight: 600;
}

.parrafo-contenido {
    color: #374151;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Animaciones mejoradas */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Estilos para contenedores de video */
.video-container {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #cbd5e1;
    transition: all 0.3s ease;
}

.video-container:hover {
    background: linear-gradient(135deg, #f1f5f9, #dbeafe);
    border-color: #93c5fd;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1);
}

/* Estilos para imágenes */
.imagen-container {
    position: relative;
    overflow: visible;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 1rem 0;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    width: 100%;
}

.imagen-container:hover {
    transform: translateY(-2px);
}

.imagen-container img {
    transition: all 0.3s ease;
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    cursor: pointer;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.imagen-container:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Caption de la imagen */
.imagen-caption {
    margin-top: 0.75rem;
    text-align: center;
    padding: 0.75rem;
    background: rgba(242, 198, 122, 0.1);
    border-radius: 0.5rem;
    border-left: 4px solid #f2c67a;
    max-width: 100%;
    display: inline-block;
}

.imagen-caption p {
    color: #6b7280;
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
    word-wrap: break-word;
}

/* Estilos para el modal de imagen */
#imageModal {
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

#imageModal img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Botón de cerrar del modal */
.modal-close-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Indicador de instrucciones del modal */
.modal-instructions {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .imagen-container {
        padding: 0;
        margin: 0.5rem 0;
        border-radius: 0;
    }

    .imagen-container img {
        border-radius: 0.5rem;
    }

    .imagen-caption {
        margin-top: 0.5rem;
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    #imageModal img {
        max-width: 98vw;
        max-height: 85vh;
    }

    .modal-close-btn {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    .modal-instructions {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Estilos para diferentes tipos de imagen */
.imagen-container img[src*="banner"] {
    max-height: 300px;
    object-fit: cover;
    width: 100%;
}

.imagen-container img[src*="logo"] {
    max-height: 120px;
    object-fit: contain;
    width: auto;
}

/* Imágenes de noticias - adaptarse al contenido natural */
.imagen-container img[src*="noticias"] {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Imágenes pequeñas - centrar sin expandir */
.imagen-container img[src*="iconos"] {
    max-width: 60px;
    height: auto;
    object-fit: contain;
}

/* Efecto de carga para imágenes */
.imagen-container img {
    opacity: 0;
    animation: fadeInImage 0.5s ease-in forwards;
    width: auto;
    height: auto;
    max-width: 100%;
}

/* Forzar que las imágenes se ajusten a su tamaño natural */
.imagen-container img:not([src*="banner"]):not([src*="logo"]):not([src*="iconos"]) {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Indicador de carga */
.imagen-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #9ca3af;
}

.imagen-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}