/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background: 
        radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(167, 139, 250, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2d1b2e 50%, #1a1a1a 75%, #0a0a0a 100%);
    color: #f1f1f1;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* ========== CONSTELACIÓN DE ESTRELLAS ANIMADA ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(167, 139, 250, 0.8), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(139, 92, 246, 0.6), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(196, 181, 253, 0.7), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(167, 139, 250, 0.5), transparent),
        radial-gradient(2px 2px at 10% 60%, rgba(139, 92, 246, 0.7), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(196, 181, 253, 0.6), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(167, 139, 250, 0.8), transparent);
    background-size: 200px 200px, 300px 300px, 150px 150px, 250px 250px, 280px 280px, 320px 320px, 180px 180px;
    animation: starsTwinkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes starsTwinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Nebulosa flotante */
body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    top: 20%;
    right: -200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: nebulaDrift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

@keyframes nebulaDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-100px, 50px) scale(1.2); }
}

/* Header y navegación */
header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.15));
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 
        0 4px 30px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(167, 139, 250, 0.4);
    border-top: 1px solid rgba(167, 139, 250, 0.2);
}

header::before {
    content: '🌙';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    animation: moonGlow 4s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.6));
}

header::after {
    content: '🌙';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(-1);
    font-size: 1.8rem;
    animation: moonGlow 4s ease-in-out infinite 2s;
    filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.6));
}

@keyframes moonGlow {
    0%, 100% { 
        opacity: 0.6; 
        filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.4)) brightness(1);
    }
    50% { 
        opacity: 1; 
        filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.8)) brightness(1.3);
    }
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.menu {
    position: relative;
}

.menu a {
    color: #e9d5ff;
    text-decoration: none;
    padding: 0.9rem 2rem;
    display: block;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    letter-spacing: 1px;
    border: 2px solid rgba(167, 139, 250, 0.4);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(167, 139, 250, 0.08));
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
    position: relative;
    overflow: hidden;
}

.menu a::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.6s ease;
}

.menu a:hover::before {
    left: 100%;
}

.menu a:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(167, 139, 250, 0.28));
    color: #ffffff;
    border-color: #c4b5fd;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(139, 92, 246, 0.5),
        0 0 40px rgba(167, 139, 250, 0.3);
}

/* Contenido principal */
main {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2.5rem;
    position: relative;
    z-index: 10;
}

/* ========== HEADER PRINCIPAL ÉPICO ========== */
.page-header {
    text-align: center;
    padding: 5rem 3rem;
    background: 
        linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.15)),
        radial-gradient(ellipse at center, rgba(196, 181, 253, 0.1) 0%, transparent 70%);
    border-radius: 30px;
    backdrop-filter: blur(15px) saturate(150%);
    border: 2px solid rgba(167, 139, 250, 0.5);
    position: relative;
    box-shadow: 
        0 15px 60px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 80px rgba(167, 139, 250, 0.2);
    margin-bottom: 5rem;
    overflow: hidden;
}

/* Efecto de luz flotante dentro del header */
.page-header::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: lightOrb 8s ease-in-out infinite;
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -80px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: lightOrb 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes lightOrb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(50px, 30px) scale(1.2); opacity: 0.6; }
}

.page-header h1 {
    font-size: 3.5rem;
    color: #f3e8ff;
    margin-bottom: 1.5rem;
    text-shadow: 
        3px 3px 10px rgba(139, 92, 246, 0.8),
        0 0 30px rgba(167, 139, 250, 0.5),
        0 0 60px rgba(196, 181, 253, 0.3);
    font-weight: 800;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 
            3px 3px 10px rgba(139, 92, 246, 0.8),
            0 0 30px rgba(167, 139, 250, 0.5),
            0 0 60px rgba(196, 181, 253, 0.3);
    }
    50% { 
        text-shadow: 
            3px 3px 15px rgba(139, 92, 246, 1),
            0 0 40px rgba(167, 139, 250, 0.7),
            0 0 80px rgba(196, 181, 253, 0.5);
    }
}

.page-subtitle {
    font-size: 1.4rem;
    color: #ddd6fe;
    margin-bottom: 1rem;
    line-height: 2;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.page-description {
    font-size: 1.15rem;
    color: #c4b5fd;
    font-style: italic;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.page-description strong {
    color: #e9d5ff;
    font-weight: 700;
}

/* ========== SECCIÓN DE JERARQUÍA ========== */
.hierarchy-section {
    margin: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    color: #f3e8ff;
    margin-bottom: 4rem;
    text-shadow: 
        2px 2px 8px rgba(139, 92, 246, 0.8),
        0 0 30px rgba(167, 139, 250, 0.4);
    position: relative;
    padding-bottom: 1.5rem;
    font-weight: 700;
}

.section-title::before {
    content: '👑';
    position: absolute;
    left: 50%;
    top: -60px;
    transform: translateX(-50%);
    font-size: 3.5rem;
    animation: crownFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

@keyframes crownFloat {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(-5deg); }
    50% { transform: translateX(-50%) translateY(-20px) rotate(5deg); }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #8b5cf6, #a78bfa, #c4b5fd, #a78bfa, #8b5cf6, transparent);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

/* ========== GRID DE NIVELES JERÁRQUICOS MEJORADO ========== */
.hierarchy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.hierarchy-card {
    background: 
        linear-gradient(145deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.1)),
        radial-gradient(ellipse at top right, rgba(196, 181, 253, 0.08) 0%, transparent 70%);
    padding: 3.5rem 3rem;
    border-radius: 25px;
    border: 2px solid rgba(167, 139, 250, 0.5);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
}

/* Efecto de brillo deslizante mejorado */
.hierarchy-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(167, 139, 250, 0.3) 52%,
        transparent 70%
    );
    transition: left 0.8s ease;
}

.hierarchy-card:hover::before {
    left: 150%;
}

/* Orbe de luz en hover */
.hierarchy-card::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(167, 139, 250, 0) 0%, rgba(139, 92, 246, 0) 100%);
    border-radius: 50%;
    transition: all 0.5s ease;
    pointer-events: none;
}

.hierarchy-card:hover::after {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, rgba(139, 92, 246, 0.1) 50%, transparent 70%);
}

.hierarchy-card:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 
        0 30px 80px rgba(139, 92, 246, 0.6),
        0 0 60px rgba(167, 139, 250, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: #e9d5ff;
    background: 
        linear-gradient(145deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.18)),
        radial-gradient(ellipse at top right, rgba(196, 181, 253, 0.15) 0%, transparent 70%);
}

.hierarchy-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(167, 139, 250, 0.3);
    position: relative;
    z-index: 1;
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% { 
        box-shadow: 
            0 6px 20px rgba(139, 92, 246, 0.5),
            0 0 30px rgba(167, 139, 250, 0.3);
    }
    50% { 
        box-shadow: 
            0 8px 30px rgba(139, 92, 246, 0.7),
            0 0 50px rgba(167, 139, 250, 0.5);
    }
}

.hierarchy-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    animation: iconFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 15px rgba(139, 92, 246, 0.4));
    position: relative;
    z-index: 1;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(-3deg); }
    75% { transform: translateY(-12px) rotate(3deg); }
}

.hierarchy-title {
    font-size: 2.2rem;
    color: #f3e8ff;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 
        2px 2px 8px rgba(139, 92, 246, 0.6),
        0 0 20px rgba(167, 139, 250, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.hierarchy-description {
    font-size: 1.15rem;
    color: #ddd6fe;
    line-height: 2;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hierarchy-details {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(167, 139, 250, 0.08));
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid rgba(167, 139, 250, 0.4);
    text-align: left;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.hierarchy-details ul {
    list-style: none;
    padding: 0;
}

.hierarchy-details li {
    padding: 1rem 0;
    color: #c4b5fd;
    font-size: 1.08rem;
    position: relative;
    padding-left: 2.5rem;
    line-height: 1.8;
    transition: all 0.3s ease;
}

.hierarchy-details li:hover {
    color: #e9d5ff;
    transform: translateX(5px);
}

.hierarchy-details li::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.15); }
}

/* ========== DIVISOR DECORATIVO ÉPICO ========== */
.divider {
    height: 4px;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(139, 92, 246, 0.5), 
        #8b5cf6, 
        #a78bfa, 
        #c4b5fd, 
        #a78bfa, 
        #8b5cf6, 
        rgba(139, 92, 246, 0.5), 
        transparent
    );
    margin: 6rem 0;
    border: none;
    position: relative;
    border-radius: 10px;
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.6),
        0 4px 15px rgba(139, 92, 246, 0.3);
}

.divider::before {
    content: '✨';
    position: absolute;
    left: 50%;
    top: -25px;
    transform: translateX(-50%);
    font-size: 2.5rem;
    animation: dividerSparkle 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(167, 139, 250, 0.6));
}

.divider::after {
    content: '💫';
    position: absolute;
    right: 25%;
    top: -22px;
    font-size: 2rem;
    animation: dividerSparkle 3s ease-in-out infinite 0.8s;
    filter: drop-shadow(0 0 12px rgba(196, 181, 253, 0.6));
}

@keyframes dividerSparkle {
    0%, 100% { 
        opacity: 0.5; 
        transform: translateX(0) scale(1) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: translateX(-5px) scale(1.3) rotate(15deg); 
    }
}

/* ========== FOOTER ÉPICO ========== */
footer {
    text-align: center;
    padding: 5rem 2rem;
    background: 
        linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.18), rgba(139, 92, 246, 0.25)),
        radial-gradient(ellipse at center, rgba(196, 181, 253, 0.1) 0%, transparent 70%);
    color: #a78bfa;
    margin-top: 6rem;
    border-top: 2px solid rgba(167, 139, 250, 0.5);
    position: relative;
    box-shadow: 
        0 -15px 50px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

footer::before {
    content: '🌟';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.5rem;
    animation: footerStar 5s ease-in-out infinite;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.6));
}

footer::after {
    content: '⭐ ✨ 💫 ✨ ⭐';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.3rem;
    opacity: 0.5;
    letter-spacing: 25px;
    animation: footerStarsFloat 4s ease-in-out infinite;
}

@keyframes footerStar {
    0%, 100% { 
        transform: translateX(-50%) scale(1) rotate(0deg); 
        opacity: 0.7;
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    }
    50% { 
        transform: translateX(-50%) scale(1.3) rotate(180deg); 
        opacity: 1;
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
    }
}

@keyframes footerStarsFloat {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

footer p {
    font-size: 1.3rem;
    color: #ddd6fe;
    margin-bottom: 2rem;
    line-height: 2.2;
    padding: 0 2rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

footer strong {
    color: #f3e8ff;
    font-size: 2rem;
    letter-spacing: 5px;
    text-shadow: 
        3px 3px 10px rgba(139, 92, 246, 0.8),
        0 0 30px rgba(167, 139, 250, 0.5);
    display: block;
    margin-top: 1.5rem;
    animation: footerTextGlow 3s ease-in-out infinite;
}

@keyframes footerTextGlow {
    0%, 100% { 
        text-shadow: 
            3px 3px 10px rgba(139, 92, 246, 0.8),
            0 0 30px rgba(167, 139, 250, 0.5);
    }
    50% { 
        text-shadow: 
            3px 3px 15px rgba(139, 92, 246, 1),
            0 0 50px rgba(167, 139, 250, 0.7);
    }
}

/* ========== SECCIÓN FAMILIA DOMINICANA ========== */
.family-section {
    margin: 6rem 0;
    position: relative;
}

.section-intro {
    text-align: center;
    font-size: 1.4rem;
    color: #ddd6fe;
    margin-bottom: 4rem;
    font-style: italic;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.4);
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.family-card {
    background: 
        linear-gradient(145deg, rgba(139, 92, 246, 0.12), rgba(167, 139, 250, 0.08)),
        radial-gradient(ellipse at top, rgba(196, 181, 253, 0.08) 0%, transparent 70%);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 2px solid rgba(167, 139, 250, 0.4);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 30px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

/* Efecto de brillo ascendente */
.family-card::before {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        transparent,
        rgba(167, 139, 250, 0.15),
        transparent
    );
    transition: bottom 0.6s ease;
}

.family-card:hover::before {
    bottom: 100%;
}

.family-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.5),
        0 0 50px rgba(167, 139, 250, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: #c4b5fd;
    background: 
        linear-gradient(145deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.15)),
        radial-gradient(ellipse at top, rgba(196, 181, 253, 0.12) 0%, transparent 70%);
}

.family-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.4));
    animation: familyIconBounce 3s ease-in-out infinite;
}

@keyframes familyIconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.family-card h3 {
    font-size: 1.6rem;
    color: #f3e8ff;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 
        2px 2px 6px rgba(139, 92, 246, 0.6),
        0 0 15px rgba(167, 139, 250, 0.3);
}

.family-card p {
    font-size: 1.1rem;
    color: #c4b5fd;
    line-height: 1.8;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========== SECCIÓN EQUILIBRIO ========== */
.balance-section {
    margin: 6rem 0;
}

.balance-box {
    background: 
        linear-gradient(145deg, rgba(139, 92, 246, 0.18), rgba(167, 139, 250, 0.12)),
        radial-gradient(ellipse at center, rgba(196, 181, 253, 0.1) 0%, transparent 70%);
    padding: 4rem 3rem;
    border-radius: 30px;
    border: 3px solid rgba(167, 139, 250, 0.5);
    box-shadow: 
        0 15px 60px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 80px rgba(167, 139, 250, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

/* Orbes flotantes de fondo */
.balance-box::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: balanceOrb1 10s ease-in-out infinite;
    pointer-events: none;
}

.balance-box::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: -80px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: balanceOrb2 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes balanceOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 30px) scale(1.15); }
}

@keyframes balanceOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -25px) scale(1.2); }
}

.balance-box h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #f3e8ff;
    margin-bottom: 3rem;
    font-weight: 700;
    text-shadow: 
        3px 3px 10px rgba(139, 92, 246, 0.8),
        0 0 30px rgba(167, 139, 250, 0.5);
    position: relative;
    z-index: 1;
    animation: balanceTitlePulse 3s ease-in-out infinite;
}

@keyframes balanceTitlePulse {
    0%, 100% { 
        text-shadow: 
            3px 3px 10px rgba(139, 92, 246, 0.8),
            0 0 30px rgba(167, 139, 250, 0.5);
    }
    50% { 
        text-shadow: 
            3px 3px 15px rgba(139, 92, 246, 1),
            0 0 45px rgba(167, 139, 250, 0.7);
    }
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.balance-item {
    background: 
        linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(167, 139, 250, 0.1));
    padding: 3rem 2.5rem;
    border-radius: 20px;
    border: 2px solid rgba(167, 139, 250, 0.4);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 35px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Efecto de onda expansiva */
.balance-item::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.6s ease;
}

.balance-item:hover::before {
    width: 400px;
    height: 400px;
}

.balance-item:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(139, 92, 246, 0.5),
        0 0 50px rgba(167, 139, 250, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: #e9d5ff;
    background: 
        linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(167, 139, 250, 0.18));
}

.balance-emoji {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(139, 92, 246, 0.5));
    animation: balanceEmojiFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes balanceEmojiFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-5deg); }
    75% { transform: translateY(-8px) rotate(5deg); }
}

.balance-item p {
    font-size: 1.2rem;
    color: #ddd6fe;
    line-height: 2;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.balance-item strong {
    color: #f3e8ff;
    font-weight: 700;
    text-shadow: 
        1px 1px 4px rgba(139, 92, 246, 0.6),
        0 0 15px rgba(167, 139, 250, 0.3);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    header::before,
    header::after {
        font-size: 1.3rem;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .menu a {
        text-align: center;
        padding: 0.85rem 1.5rem;
    }

    .page-header {
        padding: 3.5rem 2rem;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-subtitle {
        font-size: 1.15rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .section-title::before {
        font-size: 2.5rem;
        top: -50px;
    }

    .hierarchy-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hierarchy-card {
        padding: 2.8rem 2.2rem;
    }

    .hierarchy-title {
        font-size: 1.8rem;
    }

    .family-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .family-card {
        padding: 2.5rem 1.8rem;
    }

    .balance-box {
        padding: 3rem 2rem;
    }

    .balance-box h2 {
        font-size: 2rem;
    }

    .balance-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .balance-item {
        padding: 2.5rem 2rem;
    }

    main {
        padding: 1.5rem;
        margin: 2rem auto;
    }

    footer::before {
        font-size: 2.5rem;
        top: -30px;
    }

    footer::after {
        font-size: 1.1rem;
        letter-spacing: 18px;
    }

    footer strong {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }
}