/* =================================================================
   DASHBOARD - PARTE 1: LOADER & HERO SECTION (FUNDECIMA)
   ================================================================= */

/* =================================================================
   LOADER OVERLAY PROFESIONAL
   ================================================================= */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container {
    text-align: center;
    max-width: 600px;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 25px 80px rgba(30, 58, 138, 0.15);
    position: relative;
    overflow: hidden;
    animation: loaderFadeIn 0.8s ease-out;
    border: 1px solid rgba(30, 58, 138, 0.1);
}

@keyframes loaderFadeIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.loader-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.loader-institutional-image {
    width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 10px 30px rgba(30, 58, 138, 0.2));
    animation: imageFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes imageFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-1deg); }
    75% { transform: translateY(-5px) rotate(1deg); }
}

.loader-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    animation: pulseRing 2s ease-out infinite;
    z-index: 1;
}

@keyframes pulseRing {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

.loader-content { position: relative; z-index: 2; }

.loader-main-title {
    margin: 0 0 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo-image {
    max-width: 160px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(30, 58, 138, 0.2));
    animation: logoFadeIn 1s ease-out;
}

@keyframes logoFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.loader-subtitle {
    font-size: 1.1rem;
    color: #475569;
    margin: 0 0 30px 0;
    font-weight: 600;
    letter-spacing: 1px;
}

.loader-progress-wrapper { margin: 30px 0; }

.loader-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1e3a8a 0%, #059669 50%, #10b981 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: progressAnimation 2s ease-in-out infinite, gradientMove 1.5s linear infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

@keyframes progressAnimation {
    0% { width: 0%; }
    50% { width: 85%; }
    100% { width: 0%; }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.loader-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.dot:nth-child(1) { animation-delay: 0s; background: #1e3a8a; }
.dot:nth-child(2) { animation-delay: 0.2s; background: #059669; }
.dot:nth-child(3) { animation-delay: 0.4s; background: #10b981; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.loader-message {
    font-size: 0.95rem;
    color: #64748b;
    margin: 20px 0 0 0;
    font-style: italic;
    animation: messageFade 2s ease-in-out infinite;
}

@keyframes messageFade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.loader-decoration {
    position: absolute;
    font-size: 3rem;
    opacity: 0.08;
    animation: decorationFloat 6s ease-in-out infinite;
    color: #1e3a8a;
}

.loader-decoration-1 { top: 30px; left: 30px; animation-delay: 0s; }
.loader-decoration-2 { bottom: 30px; right: 30px; animation-delay: 3s; }

@keyframes decorationFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(120deg); }
    66% { transform: translate(-5px, 10px) rotate(240deg); }
}

/* =================================================================
   HERO SECTION - PALETA INSTITUCIONAL FUNDECIMA
   ================================================================= */
.hero-section-nami {
    position: relative;
    background: linear-gradient(135deg, #1e3a8a 0%, #059669 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    padding: 80px 0 100px;
    overflow: hidden;
    min-height: 650px;
    display: flex;
    align-items: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content-nami {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-text-nami {
    flex: 1;
    max-width: 650px;
    color: #ffffff;
}

.hero-tagline {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.hero-tagline span {
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title-nami {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-description-nami {
    font-size: 1.25rem;
    color: #ffffff !important;
    line-height: 1.6;
    margin-bottom: 35px;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-buttons-nami {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-hero-primary-nami,
.btn-hero-secondary-nami {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary-nami {
    background: #ffffff;
    color: #1e3a8a;
    border: 2px solid #ffffff;
}

.btn-hero-primary-nami:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.btn-hero-secondary-nami {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-hero-secondary-nami:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-3px);
}

.hero-image-nami {
    flex: 1;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper-nami {
    position: relative;
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1;
}

.hero-main-image-nami {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-decoration {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: floatDecoration 3s ease-in-out infinite;
}

.hero-decoration.decoration-1 {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 0;
    color: #1e3a8a;
    animation-delay: 0s;
}

.hero-decoration.decoration-2 {
    width: 60px;
    height: 60px;
    bottom: 15%;
    right: 0;
    color: #059669;
    animation-delay: 1s;
}

.hero-decoration.decoration-3 {
    width: 55px;
    height: 55px;
    top: 50%;
    right: -20px;
    color: #10b981;
    animation-delay: 2s;
}

@keyframes floatDecoration {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.hero-bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: #ffffff;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: #10b981;
    bottom: -50px;
    left: -50px;
}

/* =================================================================
   RESPONSIVE LOADER & HERO
   ================================================================= */
@media (max-width: 992px) {
    .hero-content-nami {
        flex-direction: column;
        text-align: center;
    }
    .hero-text-nami { max-width: 100%; }
    .hero-tagline { justify-content: center; }
    .hero-title-nami { font-size: 2.5rem; }
    .hero-description-nami { font-size: 1.1rem; }
    .hero-buttons-nami { justify-content: center; }
    .hero-image-nami { max-width: 400px; }
}

@media (max-width: 768px) {
    .loader-container { padding: 40px 25px; margin: 20px; }
    .loader-institutional-image { width: 200px; }
    .loader-logo-image { max-width: 140px; }
    
    .hero-section-nami { padding: 60px 0 80px; min-height: auto; }
    .hero-title-nami { font-size: 2rem; }
    .hero-description-nami { font-size: 1rem; }
    .hero-buttons-nami { flex-direction: column; gap: 15px; }
    .btn-hero-primary-nami, .btn-hero-secondary-nami { width: 100%; justify-content: center; }
    .hero-image-wrapper-nami { max-width: 350px; }
    .hero-decoration { display: none; }
}

@media (max-width: 480px) {
    .loader-container { padding: 30px 20px; margin: 15px; }
    .loader-institutional-image { width: 160px; }
    .loader-logo-image { max-width: 120px; }
    .hero-title-nami { font-size: 1.75rem; }
    .hero-tagline { flex-direction: column; gap: 8px; }
    .hero-tagline span { font-size: 1rem; }
    .hero-image-wrapper-nami { max-width: 280px; }
}