/* =========================================
   1. CONFIGURACIÓN GENERAL
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    color: #333;
    overflow-x: hidden; /* Evita scroll horizontal indeseado */
}

/* Colores personalizados de texto */
.text-success-light { color: #2ecc71; }
.text-success-dark { color: #1D6F42; }

/* =========================================
   2. NAVBAR (MENÚ SUPERIOR) - ESTILO BLANCO
   ========================================= */
.navbar {
    background-color: #ffffff !important; /* Blanco puro */
    transition: all 0.4s ease;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Sombra sutil inicial */
}

/* Estado al bajar scroll (se compacta y aumenta sombra) */
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Enlaces del menú (Texto oscuro para verse en fondo blanco) */
.navbar-nav .nav-link {
    color: #444 !important;
    font-weight: 500;
    margin-left: 15px;
    transition: color 0.3s ease;
}

/* Hover y Activo: Verde Institucional */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: #1D6F42 !important;
}

/* Botón hamburguesa para móvil (oscuro) */
.navbar-toggler {
    border-color: rgba(0,0,0,0.1);
}
/* Icono del menú hamburguesa en color negro/gris */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* =========================================
   3. HERO SECTIONS (BANNERS PRINCIPALES)
   ========================================= */
/* Home Hero */
.hero-section {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('https://images.unsplash.com/photo-1599658880436-c61792e70672?auto=format&fit=crop&w=1500&q=80');
    background-attachment: fixed; /* Efecto Parallax */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section h1 {
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

/* Cursos Hero (Más corto y otra imagen) */
.hero-cursos {
    height: 60vh;
    background: linear-gradient(rgba(29, 111, 66, 0.8), rgba(29, 111, 66, 0.6)), 
                url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=1500&q=80');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   4. SECCIONES Y FONDOS
   ========================================= */
/* Fondo SVG Numérico (Marca de agua) */
.bg-data-pattern {
    position: relative;
    background-color: #ffffff;
    overflow: hidden;
}

.bg-data-pattern::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Patrón de números SVG */
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231D6F42' fill-opacity='0.07' font-family='monospace' font-size='14'%3E%3Ctext x='10' y='30'%3E101010%3C/text%3E%3Ctext x='50' y='80'%3E=SUM()%3C/text%3E%3Ctext x='120' y='50'%3E$A$1%3C/text%3E%3Ctext x='20' y='150'%3E3.1416%3C/text%3E%3Ctext x='100' y='180'%3E001100%3C/text%3E%3Ctext x='150' y='120'%3EXLSX%3C/text%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
    pointer-events: none;
}

/* Títulos destacados con borde lateral verde */
.title-highlight {
    padding: 10px 30px;
    border-left: 5px solid #1D6F42;
    color: #2c3e50;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

/* Fondo Gris Claro para secciones alternas */
.bg-section-gray {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

/* =========================================
   5. COMPONENTES DEL HOME
   ========================================= */

/* --- Animación "Tada" (Vibración) para Perfiles --- */
@keyframes tada-soft {
    from { transform: scale3d(1, 1, 1); }
    10%, 20% { transform: scale3d(0.95, 0.95, 0.95) rotate3d(0, 0, 1, -2deg); }
    30%, 50%, 70%, 90% { transform: scale3d(1.05, 1.05, 1.05) rotate3d(0, 0, 1, 2deg); }
    40%, 60%, 80% { transform: scale3d(1.05, 1.05, 1.05) rotate3d(0, 0, 1, -2deg); }
    to { transform: scale3d(1.05, 1.05, 1.05); }
}

.hover-effect {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.hover-effect:hover {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-color: #ffffff !important;
    animation: tada-soft 0.8s ease-in-out forwards;
    cursor: default;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}

.hover-effect:hover h4,
.hover-effect:hover p,
.hover-effect:hover .small,
.hover-effect:hover .opacity-75 {
    color: #333333 !important;
    opacity: 1 !important;
}

.hover-effect:hover i {
    color: #1D6F42 !important; /* Icono cambia a verde al hacer hover */
    transition: color 0.3s ease;
}

/* --- Tarjetas de Métricas (Contadores) --- */
.card-metric {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-metric:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(29, 111, 66, 0.15) !important;
}

/* Borde divisor en banner inferior (solo escritorio) */
@media (min-width: 768px) {
    .border-start-md { border-left: 1px solid #dee2e6; }
}

/* --- Animación de Mensajes Dinámicos (Fade In/Out) --- */
.message-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.message-transition.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Botón de Donación (PayPal) --- */
.btn-donar {
    background-color: #ffc439; /* Amarillo PayPal */
    border: none;
    color: #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-donar:hover {
    background-color: #f4b400;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 196, 57, 0.6);
}

/* --- Carrusel de Tips --- */
.title-tips {
    color: #1D6F42;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 3px solid #1D6F42;
    padding-bottom: 10px;
    font-weight: bold;
}

.tip-card {
    border: none;
    border-top: 4px solid #1D6F42;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.tip-card h5 { color: #1D6F42; margin-bottom: 15px; }

.tip-card:hover {
    background-color: #1D6F42;
    color: white !important;
    transform: translateY(-5px);
    cursor: default;
}
.tip-card:hover h5, .tip-card:hover p { color: white !important; }

/* Transición suave para items del carrusel */
.carousel-item {
    transition: transform 0.8s ease-in-out;
}

/* =========================================
   6. PÁGINA DE CURSOS (ESCALA DE VERDES)
   ========================================= */
/* Niveles de Opacidad */
.bg-level-1 { background-color: rgba(29, 111, 66, 0.6) !important; backdrop-filter: blur(5px); }
.bg-level-2 { background-color: rgba(29, 111, 66, 0.75) !important; }
.bg-level-3 { background-color: rgba(29, 111, 66, 0.9) !important; }
.bg-level-4 { background-color: #1D6F42 !important; border-bottom: 3px solid #145230; }

.card-header h4 { text-shadow: 1px 1px 3px rgba(0,0,0,0.2); }

.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* Lista del temario (Checkmarks) */
.course-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.4;
}
.course-list li::before {
    content: "✔";
    color: #1D6F42;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* =========================================
   7. PÁGINA DE LECCIONES (TEMAS)
   ========================================= */
/* Caja de fórmula tipo Excel */
.excel-formula {
    background-color: #f8f9fa;
    border-left: 5px solid #1D6F42;
    color: #333;
    font-family: 'Fira Code', 'Courier New', monospace;
    padding: 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
    overflow-x: auto;
}

/* Acordeón de Resultados */
.accordion-button:not(.collapsed) {
    background-color: rgba(29, 111, 66, 0.1);
    color: #1D6F42;
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(29, 111, 66, 0.25);
    border-color: #1D6F42;
}

/* Bordes punteados y Breadcrumbs */
.border-dashed { border-style: dashed !important; }

.breadcrumb-item a {
    color: #2ecc71;
    transition: color 0.3s;
}
.breadcrumb-item a:hover {
    color: #fff;
    text-decoration: underline;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer-link:hover {
    color: #2ecc71 !important;
    padding-left: 5px;
    transition: all 0.3s ease;
}