/* ============================================================================
   ESTILOS PERSONALIZADOS PARA BOOTSTRAP 5 - DISEÑO MODERNO
   ============================================================================ */

/* Variables personalizadas */
:root {
    --bs-primary: #0d6efd;
    --bs-secondary: #6f42c1;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #0a1628;
    --bs-dark-blue: #1a2332;
    --font-primary: 'Poppins', sans-serif;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* Tipografía global */
body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Efectos de texto */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navbar mejorado con glassmorphism */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
    transform: translateY(-2px);
}

/* Botones mejorados con efectos modernos */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-outline-primary {
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
    color: var(--bs-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    border-radius: 1rem;
}

/* Cards mejoradas */
.card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.1);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* Footer mejorado */
footer {
    background: linear-gradient(135deg, #212529, #343a40);
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--bs-info) !important;
    padding-left: 0.5rem;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utilidades adicionales */
.shadow-custom {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 1rem;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Mejoras de accesibilidad */
.btn:focus,
.nav-link:focus,
a:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* ============================================================================
   EFECTOS MODERNOS ADICIONALES
   ============================================================================ */

/* Cards con efectos avanzados */
.card-modern {
    border: none;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-modern:hover::before {
    transform: scaleX(1);
}

.card-modern:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Feature cards con iconos */
.feature-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card .feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: translateY(-10px) rotate(5deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Glassmorphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: var(--gradient-primary);
    color: white;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.bg-gradient-blue {
    background: var(--gradient-blue);
    color: white;
}

/* Animated gradient background */
.bg-animated-gradient {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Shimmer effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Icon boxes modernos */
.icon-box {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.icon-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-box:hover {
    border-color: var(--bs-primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.icon-box:hover::before {
    opacity: 0.03;
}

.icon-box i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.icon-box:hover i {
    transform: scale(1.2) rotate(5deg);
}

/* Stats counter con efectos */
.stat-item {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Hover effects para imágenes */
.img-hover-zoom {
    overflow: hidden;
    border-radius: 1rem;
}

.img-hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-hover-zoom:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* Overlay effects */
.overlay-gradient {
    position: relative;
}

.overlay-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-gradient:hover::after {
    opacity: 1;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Decorative elements */
.decorative-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: -1;
}

.decorative-circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
}

.decorative-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feature-card .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .icon-box i {
        font-size: 2rem;
    }
}

/* ============================================================================
   IMAGE BOXES - Cajas de imagen modernas
   ============================================================================ */

/* Image Box Base */
.image-box {
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

/* Image Box Header con imagen redondeada */
.image-box-header {
    position: relative;
    padding: 1.5rem 1.5rem 0;
    overflow: visible;
}

.image-box-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-box:hover .image-box-img {
    transform: scale(1.05);
}

/* Image Box Body */
.image-box-body {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.image-box-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.image-box-text {
    color: var(--bs-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.image-box-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.image-box-link:hover {
    color: var(--bs-secondary);
    gap: 0.75rem;
}

.image-box-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.image-box-link:hover::after {
    transform: translateX(5px);
}

/* Image Box Variantes */

/* Variante con overlay */
.image-box-overlay {
    position: relative;
}

.image-box-overlay .image-box-header::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-box-overlay:hover .image-box-header::after {
    opacity: 1;
}

/* Variante con badge */
.image-box-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: white;
    color: var(--bs-primary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

/* Variante con gradiente */
.image-box-gradient {
    background: var(--gradient-primary);
    color: white;
}

.image-box-gradient .image-box-title,
.image-box-gradient .image-box-text {
    color: white;
}

.image-box-gradient .image-box-link {
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
}

.image-box-gradient .image-box-link:hover {
    background: white;
    color: var(--bs-primary);
}

/* Image Box con icono */
.image-box-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -40px auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-box:hover .image-box-icon {
    transform: translateY(-5px) rotate(5deg);
}

/* Image Box Horizontal */
.image-box-horizontal {
    flex-direction: row;
    align-items: center;
}

.image-box-horizontal .image-box-header {
    width: 40%;
    padding: 1.5rem;
}

.image-box-horizontal .image-box-img {
    height: 100%;
    min-height: 250px;
}

.image-box-horizontal .image-box-body {
    width: 60%;
    text-align: left;
}

/* Image Box con número */
.image-box-number {
    position: absolute;
    top: -20px;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

/* Image Box Grid Layouts */
.image-box-grid {
    display: grid;
    gap: 2rem;
}

.image-box-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.image-box-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.image-box-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Image Box con hover effect especial */
.image-box-flip {
    perspective: 1000px;
}

.image-box-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.image-box-flip:hover .image-box-flip-inner {
    transform: rotateY(180deg);
}

.image-box-flip-front,
.image-box-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 2rem;
}

.image-box-flip-back {
    transform: rotateY(180deg);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Image Box con animación de reveal */
.image-box-reveal {
    overflow: hidden;
}

.image-box-reveal .image-box-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-box-reveal:hover .image-box-overlay-content {
    transform: translateY(0);
}

/* Image Box con borde animado */
.image-box-border {
    position: relative;
    border: 2px solid transparent;
}

.image-box-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.image-box-border:hover::before {
    opacity: 1;
}

/* Image Box Masonry Layout */
.image-box-masonry {
    column-count: 3;
    column-gap: 2rem;
}

.image-box-masonry .image-box {
    break-inside: avoid;
    margin-bottom: 2rem;
}

/* Image Box con tag/categoría */
.image-box-tag {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: var(--bs-primary);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Image Box con autor/meta info */
.image-box-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.image-box-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.image-box-author {
    flex-grow: 1;
}

.image-box-author-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

.image-box-author-role {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .image-box-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .image-box-masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .image-box-grid-2,
    .image-box-grid-3,
    .image-box-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .image-box-horizontal {
        flex-direction: column;
    }
    
    .image-box-horizontal .image-box-header,
    .image-box-horizontal .image-box-body {
        width: 100%;
    }
    
    .image-box-horizontal .image-box-body {
        text-align: center;
    }
    
    .image-box-masonry {
        column-count: 1;
    }
}

/* Animaciones adicionales para image boxes */
@keyframes imageBoxFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.image-box-float {
    animation: imageBoxFloat 3s ease-in-out infinite;
}

.image-box-float:nth-child(2) {
    animation-delay: 0.5s;
}

.image-box-float:nth-child(3) {
    animation-delay: 1s;
}

/* Image Box con loading skeleton */
.image-box-skeleton .image-box-img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.image-box-skeleton .image-box-title,
.image-box-skeleton .image-box-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    color: transparent;
    border-radius: 0.5rem;
}


/* ============================================================================
   MEJORAS MENÚ NAVBAR - Feature 002
   ============================================================================ */

/* Título del sitio en dos líneas */
.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    margin-left: 0.5rem;
    min-width: max-content;
}

.navbar-brand .brand-line-1 {
    font-size: 1rem;
    font-weight: 500;
    color: #6366f1; /* Un color indigo/purpura suave como en el diseño */
    white-space: nowrap;
}

.navbar-brand .brand-line-2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a8a;
    white-space: nowrap;
}

/* Logo sin height fijo - solo max-height */
.navbar-brand img {
    max-height: 65px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Hover profesional en dropdown items */
.navbar-nav .dropdown-item {
    position: relative;
    transition: all 0.3s ease;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.navbar-nav .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--bs-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
    padding-left: 2.25rem !important;
    color: var(--bs-primary);
}

.navbar-nav .dropdown-item:hover::before {
    transform: scaleY(1);
}

/* Separación del dropdown del elemento padre */
.navbar-nav .dropdown-menu {
    margin-top: 0 !important;
    min-width: 280px;
    max-width: 350px;
    padding: 0.5rem 0;
}

/* Quitar recuadro del item principal al hacer clic */
.navbar-nav .nav-link:focus {
    outline: none;
    box-shadow: none;
}

.navbar-nav .dropdown-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* Subrayado en hover y active - Solo para links sin dropdown */
.navbar-nav .nav-link:not(.dropdown-toggle) {
    position: relative;
}

.navbar-nav .nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:not(.dropdown-toggle):hover::after,
.navbar-nav .nav-link:not(.dropdown-toggle).active::after {
    width: 80%;
}

.navbar-nav .nav-link.active {
    color: var(--bs-primary) !important;
}

/* Mobile: línea completa */
@media (max-width: 991px) {
    .navbar-nav .nav-link:not(.dropdown-toggle)::after {
        left: 0;
        transform: none;
    }
    
    .navbar-nav .nav-link:not(.dropdown-toggle):hover::after,
    .navbar-nav .nav-link:not(.dropdown-toggle).active::after {
        width: 100%;
    }
}

/* Flecha del dropdown visible */
.navbar-nav .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Navbar cuando hace scroll */
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .navbar-brand img {
    max-height: 40px;
}


/* Dropdown al pasar el mouse (hover) */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        animation: dropdownFadeIn 0.3s ease;
    }
    
    .navbar-nav .dropdown-menu {
        margin-top: 0;
        display: none;
    }
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Mejorar visibilidad de texto en estadísticas */
.stat-number,
.stat-description,
.stat-icon {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Asegurar que el texto sea visible en fondos oscuros */
.stats-counter-block .stat-item {
    color: white;
}

/* Mobile: hover en dropdown items con línea completa */
@media (max-width: 991px) {
    .navbar-nav .dropdown-item {
        position: relative;
    }
    
    .navbar-nav .dropdown-item::before {
        left: 0;
        width: 3px;
    }
    
    .navbar-nav .dropdown-item:hover::before {
        width: 3px;
    }
}


/* Corregir overflow horizontal en mobile */
body {
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Ocultar círculos decorativos en mobile */
@media (max-width: 768px) {
    .decorative-circle,
    .decorative-circle-1,
    .decorative-circle-2 {
        display: none !important;
    }
    
    /* Asegurar que no haya scroll horizontal */
    body, html {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container-fluid,
    .row {
        margin-left: 0;
        margin-right: 0;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Prevenir overflow en todos los elementos */
* {
    max-width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}


/* Texto claro en hero/header */
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section p,
.hero-title,
.hero-subtitle,
.hero-description {
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Texto claro en page header */
.page-header h1,
.page-header h2,
.page-title {
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Reforzar texto claro en estadísticas */
.stats-counter-block,
.stats-counter-block * {
    color: white !important;
}

.stat-number {
    color: white !important;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.stat-description {
    color: white !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    color: white !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}


/* Símbolos institucionales en navbar */
.institutional-symbols {
    gap: 0.75rem;
}

.symbol-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: transform 0.3s ease;
}

.symbol-link:hover {
    transform: scale(1.1);
}

.symbol-img {
    height: 35px;
    width: auto;
    object-fit: contain;
}

/* Responsive: ocultar símbolos en mobile */
@media (max-width: 991px) {
    .institutional-symbols {
        display: none !important;
    }
}
