﻿/* ============================ VARIABLES DE DISEÑO ============================ */
:root {
    --university-primary: #003366;
    --university-secondary: #E74C3C;
    --university-light: #F8F9FA;
    --university-dark: #212529;
    --text-white: #FFFFFF;
    --text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --transition-speed: 0.6s;
    --border-radius-sm: 8px;
    --border-radius-lg: 50px;
}

/* ============================ ESTRUCTURA PRINCIPAL ============================ */
.university-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
    background: var(--university-dark);
}

.slide-content {
    position: relative;
    height: 100%;
    width: 100%;
}

/* ============================ IMÁGENES Y OVERLAY ============================ */
.university-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.8);
    transition: transform 10s ease-out;
}

.carousel-item.active .university-slide-image {
    transform: scale(1.13);
}

.university-slide-image.failed-load {
    object-fit: contain;
    background: var(--university-light);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.3) 0%, rgba(0, 51, 102, 0.1) 100%);
    z-index: 1;
}

/* ============================ CONTENIDO Y TIPOGRAFÍA ============================ */
.slide-caption {
    position: absolute;
    bottom: 5%; /* Cambiado de bottom a top */
    left: 50%;
    transform: translate(-50%, -5%); /* Centrado perfecto */
    width: 90%;
    max-width: 1200px;
    text-align: center;
    color: var(--text-white);
    z-index: 2;
    padding: 2rem;
}

.slide-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: var(--text-shadow);
    letter-spacing: -0.5px;
}

.slide-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-shadow: var(--text-shadow);
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}
/* ============================ OPCIONES DE POSICIÓN ============================ */

/* Opción 1: Centrado perfecto (recomendado) */
/*.slide-caption.centered {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}*/

/* Opción 2: Ligeramente arriba del centro */
/*.slide-caption.centered-high {
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
}*/

/* Opción 3: Centrado vertical pero con margen inferior */
.slide-caption.centered-with-margin {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -5vh; /* Ajusta este valor según necesites */
}

/* Opción 4: Para contenido más largo - centrado pero scrollable */
/*.slide-caption.centered-scrollable {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 80vh;
    overflow-y: auto;
}*/
/* ============================ BOTÓN CALL TO ACTION ============================ */


/* ============================ INDICADORES ============================ */
/*.carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
    z-index: 3;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 6px;
    transition: all 0.3s ease;
    opacity: 1;
}

.carousel-indicators .active {
    background-color: var(--text-white);
    transform: scale(1.2);
}
*/
/* ============================ CONTROLES DE NAVEGACIÓN ============================ */
.carousel-control-prev-custom,
.carousel-control-next-custom {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10%;
    max-width: 100px;
    padding: 0;
    color: var(--text-white);
    text-align: center;
    background: none;
    border: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin: 0;
    z-index: 100;
}

.carousel-control-prev-custom {
    left: 0;
    justify-content: flex-start;
    padding-left: 15px;
}

.carousel-control-next-custom {
    right: 0;
    justify-content: flex-end;
    padding-right: 15px;
}

.carousel-control-prev-custom:hover,
.carousel-control-next-custom:hover {
    opacity: 1;
}

.carousel-control-prev-icon-custom,
.carousel-control-next-icon-custom {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    background-size: 2rem;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
    border: 2px solid var(--text-white);
}

.carousel-control-prev-icon-custom {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon-custom {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.carousel-control-prev-custom:hover .carousel-control-prev-icon-custom,
.carousel-control-next-custom:hover .carousel-control-next-icon-custom {
    background-color: var(--university-primary);
    transform: scale(1.1);
}

/* ============================ ESTADO VACÍO ============================ */
.container-empty {
    background: var(--university-light);
}

.empty-content {
    padding: 2rem;
}

.empty-content i {
    opacity: 0.5;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-item.active .slide-title {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.carousel-item.active .slide-subtitle {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

/* ============================ DISEÑO RESPONSIVE ============================ */

/* Tablets */
@media (max-width: 992px) {
    .slide-caption {
        padding: 1.5rem;
        bottom: 10%;
    }

    .slide-title {
        font-size: 2.8rem;
    }
}

/* Tablets pequeñas */
@media (max-width: 768px) {
    .university-carousel {
        min-height: 450px;
    }

    .slide-caption {
        bottom: 25%;
        padding: 1rem;
    }

    .slide-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .slide-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .carousel-control-prev-icon-custom,
    .carousel-control-next-icon-custom {
        width: 35px;
        height: 35px;
        background-size: 1.5rem;
    }

    .carousel-control-prev-custom {
        padding-left: 10px;
    }

    .carousel-control-next-custom {
        padding-right: 10px;
    }
}

/* Móviles */
@media (max-width: 576px) {
    .university-carousel {
        height: 60vh;
        min-height: 400px;
    }

    .slide-caption {
        bottom: 10%;
        padding: 1rem;
    }

    .slide-title {
        font-size: 1.8rem;
    }

    .slide-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }

    .carousel-control-prev-custom,
    .carousel-control-next-custom {
        width: 15%;
    }

    .empty-content h3 {
        font-size: 1.3rem;
    }

    .empty-content p {
        font-size: 0.9rem;
    }
}

/* Móviles muy pequeños */
@media (max-width: 375px) {
    .university-carousel {
        min-height: 350px;
    }

    .slide-title {
        font-size: 1.6rem;
    }

    .slide-subtitle {
        font-size: 0.9rem;
    }
}
