/* VARIABLES DEL SISTEMA */
:root {
    --gold: #c5a059;
    --gold-glow-color: rgba(197, 160, 89, 0.35);
    --dark-prime: #07090c;
    --glass-background: rgba(255, 255, 255, 0.02);
    --glass-border-light: rgba(255, 255, 255, 0.07);
    --text-primary: #f5f6f8;
    --text-secondary: #9ea4b0;
    --font-serif-kinetic: 'Cinzel', serif;
    --font-sans-modern: 'Plus Jakarta Sans', sans-serif;
    --bezier-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    scroll-behavior: smooth;
}

/* --- SEGURIDAD GLOBAL --- */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
}

/* APLICAR COLOR DORADO A LOS H3 Y H4 DE TODO EL SITIO */
h3, h4 {
    color: #c5a059 !important;
}

.text {
    color: var(--text-secondary);
}

/* CENTRADO GLOBAL EN ESCRITORIO */
.desktop-centered-layout {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* FONDOS INMERSIVOS ANIMADOS */
.fixed-bg-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; overflow: hidden;
}
.bg-layer {
    position: absolute; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0.12;
    animation: immersiveKenBurns 32s infinite alternate ease-in-out;
}
.layer-1 { background-image: url('justicia.jpg'); }
.layer-2 { background-image: url('justicia1.jpg'); animation-delay: -16s; opacity: 1; }

@keyframes immersiveKenBurns {
    0% { transform: scale(1.0) translate(0, 0); }
    100% { transform: scale(1.15) translate(-1%, -2%); }
}
.overlay-mesh {
    position: absolute; width: 100%; height: 100%; background: radial-gradient(circle at 50% 50%, rgba(7,9,12,0.4) 0%, var(--dark-prime) 85%);
}

/* SECCIONES Y DISTRIBUCIÓN */
section { 
    min-height: 100vh; 
    padding: 140px 24px 100px 24px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    position: relative; 
}
.section-divider { border-bottom: 1px solid var(--glass-border-light); }
.section-divider::after {
    content: ''; position: absolute; top: 0; left: 15%; width: 70%; height: 1.5px; 
    background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 12px 1.5px var(--gold);
}

.section-header-margin { padding-top: 20px; }
.center-title { 
    font-family: var(--font-serif-kinetic); 
    font-size: 2rem; 
    text-align: center; 
    margin-bottom: 60px; 
    letter-spacing: 2px;
}
.content-spacing-top { margin-top: 30px; }

.title-small {
    font-size: 1.5rem !important;
    display: inline-block;
    padding: 10px 20px;
    border-width: 1px;
    margin: 0 auto 40px auto;
}

@media (max-width: 768px) {
    .title-small {
        font-size: 1.2rem !important;
    }
}

/* AJUSTES DE CENTRADO */
.center-aligned { align-items: center; justify-content: center; text-align: center; }
.alignment-center { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 850px; }
.text-center { text-align: center; }
.cta-center-wrapper { width: 100%; display: flex; justify-content: center; margin-top: 10px; }
.layout-centered-width { width: 100%; max-width: 1100px; margin: 0 auto; }

/* MENÚ DE NAVEGACIÓN */
.glass-nav { position: fixed; top: 15px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 1300px; background: rgba(7, 9, 12, 0.45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border-light); border-radius: 40px; padding: 14px 28px; z-index: 1000; transition: var(--bezier-smooth); }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-serif-kinetic); font-size: 1.35rem; font-weight: 700; letter-spacing: 2px; }
.desktop-menu { display: none; }

.desktop-menu .nav-item {
    color: var(--text-secondary);
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--bezier-smooth);
    padding: 6px 4px;
    border-bottom: 2px solid transparent;
}
.desktop-menu .nav-item:hover, .desktop-menu .nav-item.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow-color);
}

.nav-extra { display: flex; align-items: center; gap: 15px; }
.lang-glass-btn { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border-light); color: var(--text-primary); padding: 8px 14px; border-radius: 20px; font-weight: 600; cursor: pointer; }
.menu-icon-toggle { background: transparent; border: none; color: var(--text-primary); font-size: 1.3rem; cursor: pointer; }

/* Arreglo clave para el menú flotante móvil */
.mobile-floating-nav { 
    position: fixed; 
    top: 85px; 
    right: 4%; 
    width: 240px; 
    background: rgba(7, 9, 12, 0.92); 
    backdrop-filter: blur(25px); 
    -webkit-backdrop-filter: blur(25px); 
    border: 1px solid var(--glass-border-light); 
    border-radius: 20px; 
    padding: 22px; 
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
    opacity: 0; 
    transform: translateY(-15px) scale(0.95); 
    pointer-events: none; 
    transition: var(--bezier-smooth); 
    z-index: 999;
}
.mobile-floating-nav.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.mobile-floating-nav a { color: goldenrod; text-decoration: none; font-size: 1rem; font-weight: 600; padding: 6px 10px; transition: var(--bezier-smooth); }

/* NOSOTRAS */
.about-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 50px; 
    align-items: center; 
    justify-items: center;
    width: 100%; 
}
.about-text-card {
    padding: 40px;
    text-align: left;
    background: var(--glass-background);
    border: 1px solid var(--glass-border-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    transition: var(--bezier-smooth);
    max-width: 550px;
}
.about-text-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 15px var(--gold-glow-color);
}
.icon-wrapper-card { font-size: 2rem; color: var(--gold); margin-bottom: 15px; }
.about-text-card h3 { font-family: var(--font-serif-kinetic); color: var(--gold); font-size: 1.8rem; margin-bottom: 20px; }
.about-text-card p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 15px; font-size: 0.95rem; }

.venn-wrapper.wider-gap {
    position: relative;
    width: 100%;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
    max-width: 600px;
    overflow: visible;
}
.venn-photo img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 50%;
}
.venn-photo {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--glass-border-light);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    transition: border-color 0.6s ease;
}
.venn-caption {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-align: center;
}
.space-left { 
    z-index: 2; 
    animation: autoVennLeft 3s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
}
.space-right { 
    z-index: 1; 
    animation: autoVennRight 3s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate;
}

@keyframes autoVennLeft {
    0%, 15% { transform: translateX(-45px) scale(1); border-color: var(--glass-border-light); }
    50%, 100% { transform: translateX(-90px) scale(1.03); border-color: var(--gold); }
}
@keyframes autoVennRight {
    0%, 15% { transform: translateX(45px) scale(1); border-color: var(--glass-border-light); }
    50%, 100% { transform: translateX(90px) scale(1.03); border-color: var(--gold); }
}

.venn-center-axis { position: absolute; z-index: 4; background: var(--dark-prime); border: 2px solid var(--gold); width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--gold); font-size: 1.4rem; box-shadow: 0 0 20px var(--gold-glow-color); pointer-events: none; }

/* ESCRITURA AUTOMÁTICA */
.glow-title { 
    font-family: var(--font-serif-kinetic); 
    font-size: 2rem; 
    color: var(--gold); 
    text-transform: uppercase; 
    margin-bottom: 15px; 
    min-height: 45px; 
    display: inline-flex;  
    align-items: center;   
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}
.glow-title::after {
    content: "";
    display: inline-block; 
    margin-left: 10px; 
    flex-shrink: 0;
    width: 4px;         
    height: 0.85em; 
    background-color: var(--gold);
    animation: blinkCursor 0.75s step-end infinite;
}
@keyframes blinkCursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* PILARES */
.values-grid.dual-block-desktop { display: grid; grid-template-columns: 1fr; gap: 25px; }
.micro-card { padding: 25px 20px !important; text-align: center; transition: var(--bezier-smooth); }
.micro-card h4 { font-family: var(--font-serif-kinetic); font-size: 1.15rem !important; margin-bottom: 10px !important; letter-spacing: 1px; }
.micro-card p { font-size: 0.85rem !important; line-height: 1.5 !important; color: var(--text-secondary); }
.micro-card .card-icon-glow { font-size: 1.8rem !important; margin-bottom: 15px !important; color: var(--gold); text-shadow: 0 0 10px var(--gold-glow-color); }
.micro-card:hover { border-color: rgba(197, 160, 89, 0.3); transform: translateY(-5px); background: rgba(255,255,255,0.04); }

/* ÁREAS DE PRÁCTICA */
.services-cards-independent { display: grid; grid-template-columns: 1fr; gap: 30px; width: 100%; }
.service-box-card { padding: 45px 35px; text-align: center; transition: var(--bezier-smooth); }
.service-icon-new { font-size: 2.4rem; color: var(--gold); margin-bottom: 22px; display: inline-block; }
.service-box-card h3 { font-family: var(--font-serif-kinetic); font-size: 1.4rem; margin-bottom: 14px; letter-spacing: 1px; }
.service-box-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }
.service-box-card:hover { border-color: rgba(197, 160, 89, 0.4); transform: translateY(-6px); box-shadow: 0 15px 35px rgba(0,0,0,0.4); }

/* RESULTADOS DEMOSTRABLES */
.stats-equal-grid-centered { display: grid; grid-template-columns: 1fr; gap: 25px; width: 100%; }
.identical-size { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 190px; text-align: center; }
.counter-display { font-family: var(--font-serif-kinetic); font-size: 3.8rem; font-weight: 700; color: var(--gold); display: block; margin-bottom: 5px; }

/* TESTIMONIOS */
.carousel-container-compact { position: relative; overflow: hidden; padding: 50px 35px; text-align: center; max-width: 700px; margin: 0 auto; width: 100%; }
.carousel-slides { position: relative; height: 180px; }
.slide { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; visibility: hidden; transition: opacity 0.8s ease-in-out, visibility 0.8s; }
.slide.active { opacity: 1; visibility: visible; position: relative; }
.testimony-text { font-style: italic; font-size: 1.05rem; line-height: 1.7; margin-bottom: 20px; color: var(--text-primary); }
.testimony-author { color: var(--gold); font-weight: 600; letter-spacing: 1px; font-size: 0.9rem; }
.carousel-indicators { display: flex; justify-content: center; gap: 8px; margin-top: 25px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); cursor: pointer; transition: 0.3s; }
.dot.active { background: var(--gold); transform: scale(1.2); }
.quote-mark { font-size: 2.2rem; color: var(--gold); opacity: 0.15; margin-bottom: 12px; }

/* BOTONES Y REDES */
.floating-socials { position: fixed; left: 20px; bottom: 30px; display: flex; flex-direction: column; gap: 12px; z-index: 100; }
.social-link, .float-scroll-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--glass-border-light); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; color: var(--text-primary); text-decoration: none; transition: var(--bezier-smooth); }
.social-link:hover, .float-scroll-btn:hover { background: var(--gold-glow-color); border-color: var(--gold); color: var(--gold); transform: translateY(-4px); }
.float-scroll-btn { position: fixed; right: 20px; bottom: 30px; color: var(--gold); opacity: 0; pointer-events: none; }
.float-scroll-btn.show { opacity: 1; pointer-events: auto; }

.glass-item { background: var(--glass-background); border: 1px solid var(--glass-border-light); backdrop-filter: blur(12px); border-radius: 20px; }
.glow-text { text-shadow: 0 0 15px var(--gold-glow-color); }
h2.center-title.glow-text { color: var(--gold); }
.btn-glow-gold { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 12px 24px; border-radius: 30px; font-weight: 700; text-decoration: none; text-transform: uppercase; font-size: 0.85rem; transition: var(--bezier-smooth); cursor: pointer; letter-spacing: 1px; }
.btn-glow-gold:hover { background: var(--gold); color: var(--dark-prime); box-shadow: 0 0 25px var(--gold); }

.kinetic-title { font-family: var(--font-serif-kinetic); color: white; font-size: 2.2rem; line-height: 1.3; margin-bottom: 10px; letter-spacing: 1px; }
.hero-subtitle { color: var(--text-secondary); line-height: 1.8; margin-bottom: 40px; max-width: 650px; font-size: 0.95rem; }

/* FORMULARIO */
.contact-form-box { max-width: 650px; margin: 0 auto; padding: 45px 35px; }
.contact-form-box h2 { font-family: var(--font-serif-kinetic); font-size: 1.9rem; text-align: center; margin-bottom: 45px; }
.interactive-form-group { position: relative; margin-bottom: 35px; }
.interactive-form-group input { width: 100%; padding: 12px 5px; background: transparent; border: none; border-bottom: 1px solid var(--glass-border-light); color: var(--text-primary); transition: var(--bezier-smooth); font-family: var(--font-sans-modern); }
.interactive-form-group input:focus { outline: none; border-bottom-color: var(--gold); }
.interactive-form-group label { position: absolute; top: 12px; left: 5px; color: var(--text-secondary); transition: var(--bezier-smooth); pointer-events: none; font-size: 0.95rem; }
.interactive-form-group input:focus ~ label, .interactive-form-group input:not(:placeholder-shown) ~ label { top: -14px; font-size: 0.8rem; color: var(--gold); }

.target-section { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease-out, transform 0.9s ease-out; }
.target-section.revealed { opacity: 1; transform: translateY(0); }

/* FOOTER MÍNIMO */
.footer-legal-minimal { padding: 20px 10px; background: rgba(7, 9, 12, 0.95); border-top: 1px solid var(--glass-border-light); }
.footer-container { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 1px; }
.footer-container .separator { display: none; }

/* MEDIA QUERIES */
@media (min-width: 463px) {
    section { padding: 150px 60px 110px 60px; }
    .kinetic-title { font-size: 3.5rem; }
    .glow-title { font-size: 4.5rem; min-height: 120px; margin-bottom: 25px; }
    .stats-equal-grid-centered { grid-template-columns: repeat(3, 1fr); gap: 30px; }
    .venn-wrapper.wider-gap { height: 400px; }
    .venn-photo { width: 180px; height: 180px; }
    
    @keyframes autoVennLeft {
        0%, 15% { transform: translateX(-55px) scale(1); }
        50%, 100% { transform: translateX(-110px) scale(1.04); border-color: var(--gold); }
    }
    @keyframes autoVennRight {
        0%, 15% { transform: translateX(55px) scale(1); }
        50%, 100% { transform: translateX(110px) scale(1.04); border-color: var(--gold); }
    }
    
    .carousel-slides { height: 130px; }
    .footer-container { flex-direction: row; gap: 15px; }
    .footer-container .separator { display: inline; }
}

@media (min-width: 1024px) {
    .desktop-menu { display: flex; gap: 32px; }
    .menu-icon-toggle, .mobile-floating-nav { display: none; }
    .about-grid { grid-template-columns: 1.2fr 0.8fr; gap: 30px; max-width: 1300px; margin: 0 auto; }
    .values-grid.dual-block-desktop { grid-template-columns: repeat(3, 1fr); gap: 35px; max-width: 1200px; margin: 0 auto; }
    .services-cards-independent { grid-template-columns: repeat(3, 1fr); gap: 35px; max-width: 1200px; margin: 0 auto; }
    .venn-wrapper.wider-gap { height: 460px; max-width: 550px; margin: 0; }
    .venn-photo { width: 240px; height: 240px; }
    
    @keyframes autoVennLeft {
        0%, 15% { transform: translateX(-65px) scale(1); }
        50%, 100% { transform: translateX(-130px) scale(1.05); border-color: var(--gold); }
    }
    @keyframes autoVennRight {
        0%, 15% { transform: translateX(65px) scale(1); }
        50%, 100% { transform: translateX(130px) scale(1.05); border-color: var(--gold); }
    }
    
    .carousel-container-compact { max-width: 650px; padding: 55px 45px; }
}

@media (max-width: 768px) {
  .interactive-form-group input:focus {
    font-size: 16px !important;
  }
}

/* MODAL DE WHATSAPP */
#whatsapp-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 9, 12, 0.6); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    animation: fadeInOverlay 0.4s ease-out;
}

.whatsapp-modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border-light);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.02);
    padding: 40px 30px;
    text-align: center;
    box-sizing: border-box;
    animation: scaleUpBox 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#btn-close-whatsapp-modal {
    position: absolute;
    top: 20px;
    right: 22px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--bezier-smooth);
    line-height: 1;
}
#btn-close-whatsapp-modal:hover {
    color: var(--gold);
    transform: scale(1.15);
}

.whatsapp-modal-box h3 {
    font-family: var(--font-serif-kinetic);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.whatsapp-modal-box p {
    color: var(--text-secondary);
    font-family: var(--font-sans-modern);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.whatsapp-team-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.whatsapp-agent-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 16px 22px;
    background: rgba(197, 160, 89, 0.02); 
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-sans-modern);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: var(--bezier-smooth);
}

.whatsapp-agent-btn:hover {
    background: rgba(197, 160, 89, 0.08); 
    border-color: var(--gold); 
    color: #ffffff;
    transform: translateY(-3px); 
    box-shadow: 0 0 25px var(--gold-glow-color), 0 0 50px rgba(197, 160, 89, 0.15), inset 0 0 12px var(--gold-glow-color);
}

.whatsapp-agent-btn i {
    font-size: 20px;
    color: #25d366; 
    transition: var(--bezier-smooth);
}
.whatsapp-agent-btn:hover i {
    color: var(--gold);
    transform: scale(1.1);
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleUpBox {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
