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

/* =================================================================
   LOADER OVERLAY PROFESIONAL - CENTRO DE PANTALLA
   ================================================================= */

#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

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

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

/* Imagen Institucional */
.loader-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

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

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

.loader-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(107, 76, 127, 0.2) 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;
    }
}

/* Contenido del Loader */
.loader-content {
    position: relative;
    z-index: 2;
}

.loader-main-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.title-word {
    color: #6b4c7f;
    display: inline-block;
    animation: titlePulse 2s ease-in-out infinite;
}

.title-word-highlight {
    color: #5a9e7f;
    display: inline-block;
    animation: titlePulse 2s ease-in-out infinite 0.5s;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* Barra de Progreso */
.loader-progress-wrapper {
    margin: 30px 0;
}

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

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6b4c7f 0%, #5a9e7f 50%, #6b4c7f 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(107, 76, 127, 0.5);
}

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

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

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

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

.dot:nth-child(1) { animation-delay: 0s; background: #6b4c7f; }
.dot:nth-child(2) { animation-delay: 0.2s; background: #5a9e7f; }
.dot:nth-child(3) { animation-delay: 0.4s; background: #6b4c7f; }

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

.loader-message {
    font-size: 1rem;
    color: #888;
    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; }
}

/* Decoraciones */
.loader-decoration {
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    animation: decorationFloat 6s ease-in-out infinite;
    color: #6b4c7f;
}

.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);
    }
}

/* Responsive Loader */
@media (max-width: 768px) {
    .loader-container {
        padding: 40px 25px;
        margin: 20px;
    }
    
    .loader-institutional-image {
        width: 160px;
    }
    
    .loader-pulse-ring {
        width: 180px;
        height: 180px;
    }
    
    .loader-main-title {
        font-size: 2rem;
    }
    
    .loader-subtitle {
        font-size: 0.95rem;
    }
    
    .loader-message {
        font-size: 0.9rem;
    }
    
    .loader-decoration {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .loader-container {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .loader-institutional-image {
        width: 130px;
    }
    
    .loader-pulse-ring {
        width: 150px;
        height: 150px;
    }
    
    .loader-main-title {
        font-size: 1.6rem;
    }
    
    .loader-subtitle {
        font-size: 0.85rem;
    }
}

/* =================================================================
   HERO SECTION TIPO NAMI (REEMPLAZA SLIDER ANTERIOR)
   ================================================================= */

.hero-section-nami {
    position: relative;
    background: linear-gradient(135deg, #1e88e5 0%, #43a047 50%, #6b4c7f 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 80px 0 100px;
    overflow: hidden;
    min-height: 650px;
    display: flex;
    align-items: center;
}

/* Helpline Vertical - LADO DERECHO */
.helpline-vertical {
    position: absolute;
    right: 0; /* Cambiado de left a right */
    left: auto; /* Nos aseguramos de que left no interfiera */
    top: 30%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 10px;
    border-radius: 8px 0 0 8px; /* Invertido: esquinas redondeadas ahora a la izquierda */
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15); /* Invertido: sombra proyectada hacia la izquierda */
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.helpline-vertical span {
    font-weight: 700;
    color: #6b4c7f;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.helpline-vertical a {
    font-weight: 800;
    color: #5a9e7f;
    font-size: 1.1rem;
    text-decoration: none;
}

/* Contenido Hero */
.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);
}

.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;
    line-height: 1.7;
    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: #5a9e7f;
    color: #ffffff;
    border: 2px solid #5a9e7f;
}

.btn-hero-primary-nami:hover {
    background: #ffffff;
    color: #5a9e7f;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-hero-secondary-nami {
    background: #ffffff;
    color: #6b4c7f;
    border: 2px solid #ffffff;
}

.btn-hero-secondary-nami:hover {
    background: transparent;
    color: #ffffff;
    transform: translateY(-3px);
}

/* Imagen Hero */
.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.3);
    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: #6b4c7f;
    animation-delay: 0s;
}

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

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

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

/* Decoraciones de fondo */
.hero-bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

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

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

/* ============================================
   RESPONSIVE HERO SECTION NAMI
   ============================================ */

@media (max-width: 992px) {
    .helpline-vertical {
        display: none;
    }
    
    .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) {
    .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;
        padding: 14px 25px;
    }
    
    .hero-image-wrapper-nami {
        max-width: 350px;
    }
    
    .hero-main-image-nami {
        border-width: 5px;
    }
    
    .hero-decoration {
        display: none;
    }
}

@media (max-width: 480px) {
    .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;
    }
}