/* Estilos para el carrusel personalizado de secciones destacadas */

/* Modal para visualizar imágenes */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.image-modal.active {
    display: flex;
    opacity: 1;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }
    to {
        transform: scale(1);
    }
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background-color: #ff4444;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

/* Cursor pointer para imágenes clicables */
.carrusel-slide .imagen-conocenos {
    position: relative;
}

.carrusel-slide .imagen-conocenos img {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    position: relative;
}

.carrusel-slide .imagen-conocenos img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
}

/* Indicador de zoom en hover */
.carrusel-slide .imagen-conocenos::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(24, 152, 139, 0.9);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.carrusel-slide .imagen-conocenos:hover::after {
    opacity: 1;
}

.conocenos {
    overflow: visible !important;
    position: relative;
    background: white;
    padding: 20px 0;
}

.conocenos h3 {
    text-align: center;
    font-size: 36px;
    color: #18988bff;
    margin-bottom: 20px;
    font-weight: 700;
}

.carrusel-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.carrusel-wrapper {
    position: relative;
    width: 100%;
    min-height: 400px;
}

.carrusel-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    animation: fadeIn 0.5s ease-in-out;
}

.carrusel-slide.active {
    display: block;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carrusel-slide .Contenedor-conocenos {
    width: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 40px !important;
    padding: 30px 70px !important;
    min-height: 450px;
}

.carrusel-slide .Parrafos-y-boton-conocenos {
    flex: 1 1 55% !important;
    padding: 20px !important;
    width: auto !important;
}

.carrusel-slide .imagen-conocenos {
    flex: 1 1 40% !important;
    max-width: 480px !important;
    margin: 0 !important;
}

.carrusel-slide .imagen-conocenos img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    border-radius: 15px;
}

.carrusel-slide .noticia h1 {
    font-size: 32px !important;
    color: #18988bff !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    line-height: 1.3 !important;
}

.carrusel-slide .noticia p {
    font-size: 17px !important;
    line-height: 1.8 !important;
    color: #333 !important;
    text-align: justify !important;
    margin-bottom: 25px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Botones de navegación */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    color: #18988bff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.carrusel-btn:hover {
    background-color: #18988bff;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carrusel-prev {
    left: 20px;
}

.carrusel-next {
    right: 20px;
}

.carrusel-btn svg {
    width: 24px;
    height: 24px;
}

/* Indicadores de paginación */
.carrusel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    position: relative;
}

.carrusel-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #18988bff;
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carrusel-indicator.active {
    opacity: 1;
    background: #156875ff;
    transform: scale(1.3);
}

.carrusel-indicator:hover {
    opacity: 0.7;
}

/* Estilos para los botones de acción */
.carrusel-slide .btn-vermas {
    background-color: #18988bff !important;
    color: #fff !important;
    padding: 12px 35px !important;
    border-radius: 25px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    margin-top: 10px !important;
    box-shadow: 0 3px 10px rgba(24, 152, 139, 0.2) !important;
}

.carrusel-slide .btn-vermas:hover {
    background-color: #156875ff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(24, 152, 139, 0.4) !important;
}

/* Contenedor de botones para la encuesta */
.carrusel-slide .botones-encuesta {
    display: flex !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

/* Responsive */
/* Tablet Grande y Desktop Pequeño */
@media (max-width: 1200px) {
    .conocenos h3 {
        font-size: 32px;
    }

    .carrusel-slide .Contenedor-conocenos {
        padding: 20px 40px !important;
        gap: 30px !important;
    }

    .carrusel-slide .noticia h1 {
        font-size: 28px !important;
    }
    
    .carrusel-slide .noticia p {
        font-size: 16px !important;
        line-height: 1.7 !important;
    }
}

/* Tablet */
@media (max-width: 950px) {
    .conocenos h3 {
        font-size: 28px;
    }

    .carrusel-container {
        padding: 30px 0;
    }

    /* Ocultar indicador de zoom en tablets y móviles */
    .carrusel-slide .imagen-conocenos::after {
        display: none;
    }

    .carrusel-slide .Contenedor-conocenos {
        flex-direction: column !important;
        text-align: center !important;
        padding: 25px 30px !important;
        min-height: auto;
        gap: 25px !important;
    }
    
    .carrusel-slide .Parrafos-y-boton-conocenos {
        width: 100% !important;
        flex: 1 1 100% !important;
        padding: 15px !important;
    }
    
    .carrusel-slide .imagen-conocenos {
        max-width: 90% !important;
        margin: 0 auto !important;
        flex: 1 1 100% !important;
    }

    .carrusel-slide .imagen-conocenos img {
        max-height: 350px;
        width: auto;
        margin: 0 auto;
    }
    
    .carrusel-btn {
        width: 45px !important;
        height: 45px !important;
    }
    
    .carrusel-btn svg {
        width: 18px !important;
        height: 18px !important;
    }

    .carrusel-prev {
        left: 10px;
    }

    .carrusel-next {
        right: 10px;
    }

    .carrusel-slide .noticia h1 {
        font-size: 26px !important;
        margin-bottom: 15px !important;
    }
    
    .carrusel-slide .noticia p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }

    .carrusel-slide .botones-encuesta {
        justify-content: center !important;
    }
}

/* Móvil Grande */
@media (max-width: 768px) {
    .conocenos h3 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .carrusel-slide .Contenedor-conocenos {
        padding: 20px 20px !important;
        gap: 20px !important;
    }

    /* Modal responsive en móvil grande */
    .modal-close {
        width: 48px;
        height: 48px;
    }

    .modal-content img {
        max-height: 85vh;
    }

    .carrusel-slide .noticia h1 {
        font-size: 24px !important;
        margin-bottom: 12px !important;
    }
    
    .carrusel-slide .noticia p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 18px !important;
    }

    .carrusel-slide .imagen-conocenos {
        max-width: 100% !important;
    }

    .carrusel-slide .imagen-conocenos img {
        max-height: 280px;
    }

    .carrusel-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .carrusel-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Móvil */
@media (max-width: 600px) {
    .conocenos {
        padding: 15px 0;
    }

    .conocenos h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .carrusel-container {
        padding: 20px 0;
    }

    /* Modal responsive en móvil */
    .modal-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .modal-close svg {
        width: 22px;
        height: 22px;
    }

    .modal-content img {
        max-height: 80vh;
        border-radius: 8px;
    }

    .carrusel-slide .Contenedor-conocenos {
        padding: 15px 12px !important;
        gap: 15px !important;
        min-height: auto;
    }

    .carrusel-slide .Parrafos-y-boton-conocenos {
        padding: 10px !important;
    }

    .carrusel-slide .noticia h1 {
        font-size: 20px !important;
        margin-bottom: 10px !important;
        line-height: 1.2 !important;
    }
    
    .carrusel-slide .noticia p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
    
    .carrusel-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .carrusel-btn svg {
        width: 14px !important;
        height: 14px !important;
    }

    .carrusel-prev {
        left: 5px;
    }

    .carrusel-next {
        right: 5px;
    }

    .carrusel-slide .btn-vermas {
        padding: 10px 22px !important;
        font-size: 13px !important;
        margin-top: 8px !important;
    }

    .carrusel-slide .imagen-conocenos img {
        max-height: 220px;
    }

    .carrusel-indicators {
        margin-top: 20px;
        gap: 8px;
    }

    .carrusel-indicator {
        width: 10px !important;
        height: 10px !important;
    }

    .carrusel-slide .botones-encuesta {
        gap: 10px !important;
        flex-direction: column !important;
    }

    .carrusel-slide .botones-encuesta .btn-vermas {
        width: 100%;
        max-width: 200px;
    }
}

/* Móvil Muy Pequeño */
@media (max-width: 400px) {
    .conocenos h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .carrusel-slide .Contenedor-conocenos {
        padding: 12px 8px !important;
    }

    .carrusel-slide .noticia h1 {
        font-size: 18px !important;
    }
    
    .carrusel-slide .noticia p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    .carrusel-slide .imagen-conocenos img {
        max-height: 180px;
    }

    .carrusel-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .carrusel-btn svg {
        width: 12px !important;
        height: 12px !important;
    }

    .carrusel-slide .btn-vermas {
        padding: 8px 18px !important;
        font-size: 12px !important;
    }

    /* Modal responsive en móvil muy pequeño */
    .modal-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }

    .modal-close svg {
        width: 20px;
        height: 20px;
    }

    .modal-content {
        max-width: 98%;
        max-height: 98%;
    }

    .modal-content img {
        max-height: 85vh;
    }
}
