/* Estilos Públicos Generales - Moderno y Responsivo */

/* Variables CSS Globales */
:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --accent-color: #ffd700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s ease;
}

/* Reset y Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Layout Principal */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding-top: 2rem;
}

/* Contenedores */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Headers de Página */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

/* === ESTILOS CARRUSEL DE BANNERS === */
.carousel-wrapper {
    position: relative; /* Para posicionar los botones de navegación */
    padding: 0 50px; /* Espacio para los botones a los lados */
}

.custom-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10; /* Asegurar que estén sobre el carrusel */
    background-color: rgba(0,0,0,0.3);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.custom-carousel-control:hover {
    background-color: rgba(0,0,0,0.5);
}

.custom-carousel-control.carousel-control-prev {
    left: 5px; /* Ajustar posición del botón izquierdo */
}

.custom-carousel-control.carousel-control-next {
    right: 5px; /* Ajustar posición del botón derecho */
}

.custom-carousel-control .carousel-control-prev-icon,
.custom-carousel-control .carousel-control-next-icon {
    width: 20px;
    height: 20px;
    filter: invert(1) grayscale(100) brightness(200%);
}

/* Ajustes para los controles e indicadores del carrusel de Bootstrap que están DENTRO del carrusel */
#multiBannerCarousel .carousel-control-prev,
#multiBannerCarousel .carousel-control-next {
    /* Estos son los originales de Bootstrap, los ocultamos si usamos los custom fuera */
    display: none; 
}

/* === ESTILOS CARRUSEL DE BANNERS === */
.banner-carousel-section {
    padding: 40px 0;
    background-color: #f8f9fa; /* Un fondo suave para la sección */
}

#multiBannerCarousel .carousel-inner {
    padding-bottom: 10px; /* Espacio para sombras si las tarjetas las tuvieran */
}

.banner-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.5rem; /* Igual al de la tarjeta */
}

.banner-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.banner-card {
    position: relative;
    border: none; /* Quitar borde por defecto de Bootstrap si lo tuviera */
    border-radius: 0.5rem; /* Bordes redondeados */
    overflow: hidden; /* Para que el overlay no se salga */
    background-color: #fff;
    height: 100%; /* Asegurar misma altura */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.banner-image {
    width: 100%;
    height: 200px; /* Altura fija para las imágenes */
    object-fit: cover; /* Asegura que la imagen cubra el espacio sin deformarse */
    transition: filter 0.35s ease-in-out; /* Transición para el efecto blur */
}

.banner-link:hover .banner-image {
    filter: blur(3px) brightness(0.8); /* Imagen borrosa y ligeramente oscurecida al pasar el mouse */
}

.banner-content-original {
    /* Este contenedor puede estar vacío o usarse para contenido visible siempre */
    padding: 1rem;
}

.banner-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Overlay semi-transparente */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    padding: 20px;
    text-align: center;
    pointer-events: none; /* Para que el hover de la imagen funcione y el clic pase al enlace */
}

.banner-link:hover .banner-hover-overlay {
    opacity: 1;
}

.hover-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.hover-description {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Ajustes para los controles e indicadores del carrusel de Bootstrap */
#multiBannerCarousel .carousel-control-prev,
#multiBannerCarousel .carousel-control-next {
    width: 5%; /* Más angostos */
    background-color: rgba(0,0,0,0.2); /* Fondo sutil para mejor visibilidad */
    border-radius: 0.3rem; /* Bordes redondeados */
    transition: background-color 0.2s ease;
}

#multiBannerCarousel .carousel-control-prev:hover,
#multiBannerCarousel .carousel-control-next:hover {
    background-color: rgba(0,0,0,0.4);
}

#multiBannerCarousel .carousel-control-prev-icon,
#multiBannerCarousel .carousel-control-next-icon {
    filter: invert(1) grayscale(100) brightness(200%); /* Iconos blancos */
}

#multiBannerCarousel .carousel-indicators {
    bottom: -40px; /* Más espacio abajo */
}

#multiBannerCarousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #adb5bd;
    border: none;
    margin: 0 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#multiBannerCarousel .carousel-indicators .active {
    background-color: var(--primary-color, #0d6efd);
    transform: scale(1.2);
}

/* Responsividad para el carrusel */
@media (max-width: 991.98px) { /* Tablets */
    .banner-image { height: 180px; }
    .hover-title { font-size: 1.1rem; }
    .hover-description { font-size: 0.85rem; }
}

@media (max-width: 767.98px) { /* Móviles */
    .banner-image { 
        height: 140px; /* Altura reducida para móvil */
    }
    .banner-card {
        min-width: 250px; /* Ancho mínimo para evitar banners muy pequeños */
        margin: 0 5px;
    }
    .hover-title { 
        font-size: 0.95rem;
        line-height: 1.3;
    }
    .hover-description { 
        font-size: 0.75rem;
        line-height: 1.4;
    }
    #multiBannerCarousel .carousel-control-prev,
    #multiBannerCarousel .carousel-control-next {
        width: 35px;
        height: 35px;
        background-color: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
    }
    #multiBannerCarousel .carousel-indicators {
        bottom: -20px;
        margin-bottom: 5px;
    }
    #multiBannerCarousel .carousel-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    /* Mejorar la experiencia de scroll en móvil */
    .carousel-inner {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .carousel-item {
        scroll-snap-align: start;
    }
}

/* Media query adicional para pantallas muy pequeñas */
@media (max-width: 480px) {
    .banner-card {
        min-width: 220px;
    }
    .banner-image {
        height: 120px;
    }
    .hover-title {
        font-size: 0.9rem;
    }
    .hover-description {
        font-size: 0.7rem;
    }
}


/* === SECCIÓN HERO INSTITUCIONAL === */
.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: white;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="heroGrid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23heroGrid)"/></svg>');
    animation: backgroundFloat 20s ease-in-out infinite;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    text-align: left !important;
    padding-right: 2rem;
}

.hero-title,
.hero-subtitle,
.hero-description,
.text-gradient {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    pointer-events: auto !important;
}

.hero-section * {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

.btn-hero-primary {
    opacity: 1 !important;
    pointer-events: auto !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    position: relative !important;
    z-index: 10 !important;
}

.hero-section::before,
.hero-section::after {
    pointer-events: none !important;
    user-select: none !important;
}

.hero-title {
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    white-space: nowrap;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .hero-title {
        white-space: normal;
        line-height: 1.2;
    }
}

@media (max-width: 768px) {
    .hero-title {
        white-space: normal;
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        line-height: 1.2;
    }
}

.text-gradient {
    color: #ffffff;
    text-shadow: none;
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: flex-start;
}

.btn-hero-primary {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1e3c72;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    color: #1e3c72;
    text-decoration: none;
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
}

.hero-logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.3s both;
}

.logo-wrapper {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-logo {
    max-height: 180px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
}

.hero-decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

.floating-element.element-1 {
    width: 60px;
    height: 60px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.floating-element.element-2 {
    width: 40px;
    height: 40px;
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

.floating-element.element-3 {
    width: 30px;
    height: 30px;
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translateX(0px);
    }
    50% {
        transform: translateX(20px);
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .hero-logo-container {
        margin-top: 1.5rem;
    }
    
    .logo-wrapper {
        padding: 1rem;
    }
    
    .hero-logo {
        max-height: 100px;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
}

/* Cards Modernas */
.modern-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.modern-card .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
    border-bottom: none;
    padding: 1.5rem;
    font-weight: 600;
}

.modern-card .card-body {
    padding: 2rem;
}

/* Botones Modernos */
.btn-modern {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-smooth);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.3);
}

.btn-accent-modern {
    background: var(--accent-color);
    color: var(--text-dark);
}

.btn-accent-modern:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* Formularios Modernos */
.form-modern .form-control {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all var(--transition-smooth);
    background: #ffffff;
}

.form-modern .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 60, 114, 0.25);
    background: #ffffff;
}

.form-modern .form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Alertas Modernas */
.alert-modern {
    border-radius: 10px;
    border: none;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.alert-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.alert-info-modern {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
}

.alert-success-modern {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #1b5e20;
}

.alert-warning-modern {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
    color: #e65100;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in {
    animation: slideInLeft 0.6s ease-out;
}

/* Utilidades */

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.shadow-modern {
    box-shadow: var(--shadow-medium);
}

.border-radius-modern {
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0 2rem;
        margin-bottom: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header .lead {
        font-size: 1.1rem;
    }
    
    .modern-card .card-body {
        padding: 1.5rem;
    }
    
    .btn-modern {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .page-header {
        padding: 2rem 0 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .modern-card .card-body {
        padding: 1rem;
    }
}