/* ==========================================================================
   SISTEMA DE DISEÑO MODO CLARO CORPORATIVO (IMMIGRATION LAW SOLUTIONS)
   ========================================================================== */

:root {
    /* Paleta de Colores Corporativa (Blanco, Azul Real, Negro y Oro del Logo) */
    --bg-primary: #ffffff;         /* Blanco puro predominante */
    --bg-secondary: #f0f6ff;       /* Azul corporativo muy suave para secciones alternas */
    --bg-tertiary: #ffffff;        /* Fondo para tarjetas glassmorphic claras */

    --accent-blue: #1e5ebf;        /* Azul real del logo (Confianza/Profesionalismo) */
    --accent-gold: #e5b422;        /* Dorado del logo (Detalles/Estrella) */
    --accent-red: #e5b422;         /* Alias dorado (compatibilidad) */
    --accent-blue-dark: #163f87;   /* Azul oscuro para gradientes profundos */
    --accent-glow: rgba(30, 94, 191, 0.10);

    /* Jerarquía de Texto para Fondo Claro */
    --text-primary: #1a1a2e;       /* Casi negro azulado del logo para títulos */
    --text-secondary: #2d3a55;     /* Azul oscuro para párrafos y lectura */
    --text-muted: #6b7a99;         /* Azul grisáceo medio para etiquetas */
    --text-white: #ffffff;         /* Blanco para textos sobre fondos oscuros */

    /* Tipografías */
    --font-main: 'Outfit', sans-serif;
    --font-title: 'Space Grotesk', sans-serif;

    /* Transiciones y Curvas de Aceleración */
    --transition-speed: 0.3s;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);

    /* Bordes y Sombras con tono corporativo */
    --border-glass: rgba(30, 94, 191, 0.12);
    --border-active: rgba(30, 94, 191, 0.45);
    --shadow-premium: 0 8px 30px rgba(30, 94, 191, 0.08);
    --shadow-active: 0 16px 40px rgba(30, 94, 191, 0.16);
}

/* Reset de Estilos Básicos */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--font-main);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Personalización del Scrollbar */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
    box-shadow: 0 0 8px rgba(30, 94, 191, 0.50);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) var(--transition-smooth);
}

ul {
    list-style: none;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   1. LOADER INICIAL
   ========================================================================== */

.loader-container {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.orbit-1 {
    transform-origin: center;
    animation: rotateOrbit 3s linear infinite;
}

.orbit-2 {
    transform-origin: center;
    animation: rotateOrbitReverse 2.5s linear infinite;
}

@keyframes rotateOrbit {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateOrbitReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.loader-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.loader-title {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    background: linear-gradient(135deg, var(--accent-blue) 30%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(15, 41, 74, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-red));
    box-shadow: 0 0 10px rgba(15, 41, 74, 0.15);
    transition: width 0.05s linear;
}

.loader-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-title);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ==========================================================================
   CURSOR PERSONALIZADO
   ========================================================================== */

.custom-cursor {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99998;
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    transition-timing-function: var(--transition-smooth);
}

.custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-red);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99998;
}

.custom-cursor.hovered {
    width: 50px;
    height: 50px;
    background-color: rgba(211, 47, 47, 0.05);
    border-color: var(--accent-red);
}

@media (pointer: coarse) {
    .custom-cursor, .custom-cursor-dot {
        display: none;
    }
}

/* ==========================================================================
   2. NAVBAR PREMIUM
   ========================================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 108px;
    z-index: 1000;
    border-top: 3px solid var(--accent-blue);
    border-bottom: 1px solid rgba(30, 94, 191, 0.08);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s var(--transition-smooth);
}

.main-header.scrolled {
    height: 88px;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(30, 94, 191, 0.14);
    box-shadow: 0 4px 24px rgba(30, 94, 191, 0.08);
}

.nav-container {
    max-width: 1300px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon-bg {
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    border: 2px solid rgba(30, 94, 191, 0.18);
    box-shadow: 0 4px 16px rgba(30, 94, 191, 0.14), 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: box-shadow 0.3s var(--transition-smooth), border-color 0.3s;
}

.logo-wrapper:hover .logo-icon-bg {
    border-color: rgba(30, 94, 191, 0.38);
    box-shadow: 0 6px 24px rgba(30, 94, 191, 0.24), 0 2px 8px rgba(0,0,0,0.10);
}

.logo-icon {
    width: 72px !important;
    height: 72px !important;
    flex-shrink: 0;
    display: block;
}

.logo-text-top {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.18rem;
    letter-spacing: 0.14em;
    color: var(--text-primary);
    transition: color 0.3s;
}

.logo-text-bottom {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.10em;
    color: var(--accent-blue);
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1.5px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-red));
    transition: width var(--transition-speed) var(--transition-smooth);
}

.nav-link:hover {
    color: var(--accent-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-portal {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-blue);
    padding: 10px 26px;
    border-radius: 40px;
    background: rgba(30, 94, 191, 0.05);
    border: 1.5px solid rgba(30, 94, 191, 0.25);
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--transition-smooth);
}

.btn-portal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(211, 47, 47, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s var(--transition-smooth);
}

.btn-portal:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(229, 180, 34, 0.06);
}

.btn-portal:hover::before {
    transform: translate(-50%, -50%) scale(1.2);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1100;
}

.hamburger-menu .bar {
    width: 25px;
    height: 2px;
    background-color: var(--accent-blue);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--accent-red);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--accent-red);
}

/* ==========================================================================
   3. HERO SECTION (MODO CLARO)
   ========================================================================== */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 160px 20px 90px;
    background:
        radial-gradient(ellipse at 15% 65%, rgba(30, 94, 191, 0.11) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 30%, rgba(229, 180, 34, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, #f4f8ff 0%, var(--bg-primary) 70%);
}

.hero-bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 2;
}

.shape-1 {
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background-color: var(--accent-blue);
    opacity: 0.05;
    animation: floatShape1 18s ease-in-out infinite alternate;
}

.shape-2 {
    bottom: 15%;
    right: 15%;
    width: 400px;
    height: 400px;
    background-color: var(--accent-red);
    opacity: 0.04;
    animation: floatShape2 24s ease-in-out infinite alternate;
}

.shape-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background-color: #000;
    opacity: 0.01;
}

@keyframes floatShape1 {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    100% { transform: translateY(-40px) scale(1.15) rotate(45deg); }
}

@keyframes floatShape2 {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    100% { transform: translateY(50px) scale(0.9) rotate(-60deg); }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-white);
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    box-shadow: 0 4px 18px rgba(30, 94, 191, 0.30);
    padding: 9px 24px;
    border-radius: 40px;
    margin-bottom: 28px;
    animation: fadeInDown 1s var(--transition-smooth) 1.2s both;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 25px;
    animation: fadeInUp 1s var(--transition-smooth) 1.4s both;
}

.hero-title .glow-text {
    background: linear-gradient(135deg, var(--accent-blue) 20%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(30, 94, 191, 0.15));
}

.hero-desc {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 650px;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 400;
    animation: fadeInUp 1s var(--transition-smooth) 1.6s both;
}

.hero-ctas {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s var(--transition-smooth) 1.8s both;
}

/* Botones Premium */
.btn {
    font-family: var(--font-title);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 16px 36px;
    border-radius: 50px;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-dark) 100%);
    color: var(--text-white);
    box-shadow: 0 4px 20px rgba(30, 94, 191, 0.28);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(30, 94, 191, 0.40);
    background: linear-gradient(135deg, #2468d1 0%, var(--accent-blue) 100%);
}

.btn-secondary {
    background: rgba(30, 94, 191, 0.04);
    color: var(--accent-blue);
    border: 1.5px solid rgba(30, 94, 191, 0.25);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(229, 180, 34, 0.04);
    box-shadow: 0 8px 30px rgba(229, 180, 34, 0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1s ease-out 2.5s both;
}

.scroll-text {
    font-family: var(--font-title);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-mouse {
    width: 20px;
    height: 32px;
    border: 1.5px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.scroll-wheel {
    width: 3px;
    height: 6px;
    background-color: var(--accent-red);
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollScroll 1.8s ease-in-out infinite;
}

@keyframes scrollScroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    80% { transform: translate(-50%, 10px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   SECCIONES ELEMENTOS COMUNES
   ========================================================================== */

.section-padding {
    padding: 140px 40px;
    position: relative;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-tag {
    font-family: var(--font-title);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--accent-blue);
    text-transform: uppercase;
    margin-bottom: 14px;
    background: rgba(30, 94, 191, 0.07);
    border: 1px solid rgba(30, 94, 191, 0.18);
    padding: 5px 16px;
    border-radius: 30px;
    display: inline-block;
}

.section-title {
    font-family: var(--font-title);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
    margin-top: 18px;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(30, 94, 191, 0.25);
}

/* ==========================================================================
   FRANJA DECORATIVA CORPORATIVA (entre hero y secciones)
   ========================================================================== */

.brand-stripe {
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-blue-dark), var(--accent-blue), var(--accent-gold), var(--accent-blue), var(--accent-blue-dark));
    background-size: 300% 100%;
    animation: stripeFlow 6s ease-in-out infinite alternate;
}

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

/* ==========================================================================
   4. SECCIÓN ESPECIALIDADES JURÍDICAS (TARJETAS 3D CLARAS)
   ========================================================================== */

.services-section {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.service-card {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    overflow: hidden;
    padding: 40px 30px;
    box-shadow: var(--shadow-premium);
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: border-color 0.4s var(--transition-smooth), box-shadow 0.4s, transform 0.4s;
}

/* Brillo en modo claro */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--x, 0px) var(--y, 0px), rgba(15, 41, 74, 0.04), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    transform: translateZ(30px);
}

.card-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: rgba(30, 94, 191, 0.05);
    border: 1.5px solid rgba(30, 94, 191, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-blue);
    margin-bottom: 25px;
    transition: all 0.4s var(--transition-smooth);
}

.service-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-active);
}

.service-card:hover .card-icon {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
    color: var(--text-white);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(30, 94, 191, 0.30);
}

.service-card:hover .card-more {
    color: var(--accent-gold);
}

.card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 400;
}

.card-more {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.3s;
}

.card-more span {
    transition: transform 0.3s var(--transition-smooth);
}

.service-card:hover .card-more span {
    transform: translateX(5px);
}

/* ==========================================================================
   5. ABOUT SECTION (ESTADÍSTICAS JURÍDICAS)
   ========================================================================== */

.about-section {
    background-color: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 80px;
    align-items: center;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.visual-box {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glowing-orb {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, rgba(15, 41, 74, 0.1) 30%, rgba(211, 47, 47, 0.08) 70%, transparent 100%);
    filter: blur(10px);
    animation: pulseOrb 4s ease-in-out infinite alternate;
}

.rotating-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
}

.ring-1 {
    width: 220px;
    height: 220px;
    border-top-color: var(--accent-blue);
    border-bottom-color: rgba(15, 41, 74, 0.1);
    animation: rotateOrbit 10s linear infinite;
}

.ring-2 {
    width: 280px;
    height: 280px;
    border-left-color: var(--accent-red);
    border-right-color: rgba(211, 47, 47, 0.1);
    animation: rotateOrbitReverse 15s linear infinite;
}

.matrix-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(rgba(15, 41, 74, 0.04) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    border-radius: 50%;
    opacity: 0.6;
    animation: pulseGrid 6s ease-in-out infinite alternate;
}

.balanza-hologram {
    position: absolute;
    z-index: 5;
    animation: floatBalanza 4s ease-in-out infinite alternate;
}

@keyframes floatBalanza {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

@keyframes pulseOrb {
    0% { transform: scale(0.95); opacity: 0.6; }
    100% { transform: scale(1.05); opacity: 1; }
}

@keyframes pulseGrid {
    0% { transform: scale(0.98) rotate(0deg); }
    100% { transform: scale(1.02) rotate(10deg); }
}

/* Logo Showcase en About Section */
.logo-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-showcase-img {
    width: 100%;
    max-width: 360px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(30, 94, 191, 0.14), 0 4px 16px rgba(30, 94, 191, 0.08);
    border: 2px solid rgba(30, 94, 191, 0.10);
    transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s;
}

.logo-showcase-img:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(30, 94, 191, 0.22), 0 6px 20px rgba(30, 94, 191, 0.12);
}

.logo-showcase-ring {
    position: absolute;
    inset: -20px;
    border-radius: 28px;
    border: 1.5px dashed rgba(30, 94, 191, 0.12);
    pointer-events: none;
    animation: rotateOrbit 30s linear infinite;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-lead,
.about-desc {
    font-size: 1rem !important;
    font-weight: 400 !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-body) !important;
    line-height: 1.8 !important;
}

.about-lead {
    margin-bottom: 0 !important;
}

.about-desc {
    margin-bottom: 20px !important;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.stat-item {
    background: rgba(30, 94, 191, 0.02);
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
    box-shadow: inset 0 0 0 1px rgba(30, 94, 191, 0.06);
}

.stat-number {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-symbol {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 5px;
}

/* ==========================================================================
   6. PORTAFOLIO / CASOS DE ÉXITO
   ========================================================================== */

.portfolio-section {
    background-color: var(--bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
    transition: all 0.5s var(--transition-smooth);
}

.portfolio-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.portfolio-art {
    width: 50%;
    height: 50%;
    transition: transform 0.8s var(--transition-smooth);
}

.portfolio-picture {
    width: 100%;
    height: 100%;
    display: block;
}

.portfolio-case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s var(--transition-smooth);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(15, 41, 74, 0.98) 0%, rgba(15, 41, 74, 0.6) 60%, transparent 100%);
    padding: 40px;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-info {
    transform: translateY(20px);
    transition: transform 0.5s var(--transition-smooth);
}

.project-tag {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--accent-red);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: block;
}

.project-title {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
}

.project-excerpt {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-weight: 300;
    max-width: 450px;
}

.btn-project-view {
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-white);
    border-bottom: 1.5px solid var(--accent-red);
    padding-bottom: 4px;
    text-transform: uppercase;
}

.portfolio-item:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-active);
}

.portfolio-item:hover .portfolio-art,
.portfolio-item:hover .portfolio-case-img {
    transform: scale(1.1) rotate(2deg);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

/* ==========================================================================
   PORTFOLIO MODAL (MODO CLARO)
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 41, 74, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 11000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--transition-smooth), visibility 0.5s;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 22px;
    width: min(100%, 1220px);
    height: min(840px, calc(100vh - 48px));
    max-height: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(50px) scale(0.95);
    transition: transform 0.5s var(--transition-smooth);
    box-shadow: 0 28px 70px rgba(15, 41, 74, 0.28);
}

.modal-backdrop.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: #687998;
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s, background 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-red);
    background: rgba(255,255,255,1);
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(350px, 42%) minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-visual {
    position: relative;
    overflow: hidden;
    background: #e8ecf2;
    min-height: 0;
}

.modal-picture {
    width: 100%;
    height: 100%;
    display: block;
    min-height: 320px;
}

.modal-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.modal-details {
    padding: 42px 56px 48px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    scrollbar-color: #8b8f95 transparent;
    scrollbar-width: thin;
}

.modal-tag {
    font-family: var(--font-title);
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 26px;
}

.modal-title {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 2.7vw, 2.45rem);
    font-weight: 700;
    color: #18233e;
    line-height: 1.15;
    margin: 0 54px 12px 0;
}

.modal-role {
    color: var(--accent-gold);
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.modal-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.72;
    margin: 0 0 30px;
}

.modal-section {
    margin-top: 24px;
}

.modal-tech-stack h4,
.modal-metrics h4 {
    font-family: var(--font-title);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 13px;
    text-transform: uppercase;
}

.modal-tech-stack ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-tech-stack li {
    font-size: 0.88rem;
    background: #fafbfd;
    border: 1px solid #dae3f0;
    padding: 11px 16px;
    border-radius: 999px;
    color: var(--text-primary);
}

.modal-metrics .metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.modal-metric-card {
    background: #fafbfd;
    border: 1px solid #dae3f0;
    border-radius: 12px;
    padding: 12px 15px;
}

.modal-metric-value {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-red);
}

.modal-metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================================================
   7. TESTIMONIOS (MODO CLARO)
   ========================================================================== */

.testimonials-section {
    background-color: var(--bg-primary);
}

.slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.slide-card {
    min-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.slide-quote {
    font-family: var(--font-title);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
    font-weight: 400;
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.slide-quote::before {
    content: '“';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 5rem;
    color: rgba(211, 47, 47, 0.08);
    font-family: serif;
}

.slide-author {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.95rem;
}

.author-name {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.author-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
}

.slider-btn {
    background: none;
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    transition: all 0.3s;
}

.slider-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(30, 94, 191, 0.05);
}

.slider-indicators {
    display: flex;
    gap: 10px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(15, 41, 74, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    width: 24px;
    border-radius: 4px;
    background-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(30, 94, 191, 0.35);
}

/* ==========================================================================
   5.1 SECCIÓN EQUIPO (NUEVO)
   ========================================================================== */

.team-section {
    background-color: var(--bg-secondary);
}

.team-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
    animation: fadeInUp 1s var(--transition-smooth) 0.2s both;
}

.filter-btn {
    font-family: var(--font-title);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 10px 22px;
    border-radius: 30px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.filter-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.filter-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(15, 41, 74, 0.15);
}

/* Estado de carga y error del equipo */
.team-db-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

.team-db-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.team-db-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}
.team-db-error p  { font-size: 1.05rem; margin-bottom: 8px; }
.team-db-error a  { color: var(--accent-blue); font-weight: 600; }

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.team-card {
    flex: 0 1 calc(25% - 23px);
    min-width: 220px;
    max-width: 260px;
}

@media (max-width: 1024px) {
    .team-card { flex: 0 1 calc(33.333% - 20px); }
}

@media (max-width: 768px) {
    .team-card { flex: 0 1 calc(50% - 15px); }
}

.team-card {
    position: relative;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: var(--shadow-premium);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
}

.team-photo-wrap {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.team-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    transition: transform 0.5s var(--transition-smooth);
}

.team-card:hover .team-photo-img {
    transform: scale(1.06);
}

.team-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 25px 28px;
}

.team-avatar-box {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--text-white);
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(15, 41, 74, 0.12);
    transition: transform 0.4s var(--transition-smooth);
}

.team-card:hover {
    border-color: var(--border-active);
    transform: translateY(-5px);
    box-shadow: var(--shadow-active);
}

.team-card:hover .team-avatar-box {
    transform: scale(1.08) rotate(5deg);
}

.team-name {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.team-role {
    font-size: 0.85rem;
    color: var(--accent-red);
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.team-tag-badge {
    display: inline-block;
    font-size: 0.75rem;
    background: rgba(15, 41, 74, 0.03);
    border: 1px solid var(--border-glass);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.team-bio-trigger {
    font-family: var(--font-title);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-blue);
    transition: color 0.3s;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.team-card:hover .team-bio-trigger {
    color: var(--accent-red);
}

.cert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cert-icon {
    color: var(--accent-red);
    flex-shrink: 0;
}

/* ==========================================================================
   8. SECCIÓN CONTACTO (FORMULARIO CLARO)
   ========================================================================== */

.contact-section {
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 400;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(211, 47, 47, 0.02);
    border: 1px solid rgba(211, 47, 47, 0.08);
    color: var(--accent-red);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.info-item:hover .info-icon {
    color: var(--text-white);
    background: var(--accent-red);
    border-color: transparent;
}

.info-details h4 {
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

.contact-form-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--shadow-premium);
}

.futuristic-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-row {
    position: relative;
    width: 100%;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(15, 41, 74, 0.12);
    padding: 12px 0;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color 0.3s;
    outline: none;
}

.input-group textarea {
    resize: none;
}

.input-group label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s var(--transition-smooth);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label,
.input-group select:focus ~ label,
.input-group select:valid ~ label {
    top: -14px;
    font-size: 0.75rem;
    color: var(--accent-red);
    font-family: var(--font-title);
    letter-spacing: 0.05em;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1.5px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-red));
    transition: width 0.4s var(--transition-smooth);
}

.input-group input:focus ~ .input-line,
.input-group textarea:focus ~ .input-line,
.input-group select:focus ~ .input-line {
    width: 100%;
}

.input-group select option {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.error-msg {
    position: absolute;
    bottom: -18px;
    left: 0;
    font-size: 0.7rem;
    color: #ff4a4a;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.input-group.invalid input,
.input-group.invalid textarea {
    border-bottom-color: #ff4a4a;
}

.input-group.invalid .error-msg {
    opacity: 1;
    visibility: visible;
    bottom: -20px;
}

.form-status-alert {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
}

.form-status-alert.success {
    display: block;
    background: rgba(15, 41, 74, 0.03);
    border: 1px solid rgba(15, 41, 74, 0.1);
    color: var(--accent-blue);
}

.form-status-alert.error {
    display: block;
    background: rgba(255, 74, 74, 0.05);
    border: 1px solid rgba(255, 74, 74, 0.2);
    color: #ff4a4a;
}

.btn-submit {
    position: relative;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
    border: none;
    border-radius: 50px;
    padding: 16px 40px;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.25);
}

/* ==========================================================================
   9. BOTÓN FLOTANTE WHATSAPP
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    animation: whatsappPulse 2s infinite;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 35px rgba(37, 211, 102, 0.6);
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(15, 41, 74, 0.95);
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-white);
    letter-spacing: 0.05em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   10. FOOTER CORPORATIVO (MODO OSCURO PARA EQUILIBRIO VISUAL)
   ========================================================================== */

.main-footer {
    position: relative;
    background: linear-gradient(160deg, var(--accent-blue-dark) 0%, var(--accent-blue) 60%, #1a52a8 100%);
    padding: 100px 40px 40px;
    color: rgba(255, 255, 255, 0.85);
    overflow: hidden;
    border-top: 4px solid var(--accent-gold);
}

.footer-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

.main-footer .section-container {
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-weight: 300;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.social-icon:hover {
    color: var(--accent-blue);
    background: var(--text-white);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.footer-links-column h4 {
    font-family: var(--font-title);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-white);
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-links-column ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-column a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.footer-links-column a:hover {
    color: var(--accent-red);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.latency-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7) !important;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    animation: pulseCore 1s infinite alternate;
    flex-shrink: 0;
}

@keyframes pulseCore {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* ==========================================================================
   ANIMACIONES ON-SCROLL
   ========================================================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* ==========================================================================
   HERO SLIDER (PRIMERA SECCIÓN - INDEX.HTML)
   ========================================================================== */

.hero-slider-section {
    padding: 160px 20px 90px !important;
    background: none !important;
}

/* Track: contiene los slides apilados */
.hs-track {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Cada slide ocupa toda la sección */
.hs-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.01);
    filter: saturate(0.95) contrast(0.98);
    transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.8s cubic-bezier(0.25, 0.8, 0.25, 1),
                filter 1.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, opacity, filter;
}

.hs-slide.active {
    opacity: 1;
    transform: scale(1.03);
    filter: saturate(1.03) contrast(1.01);
}

/* Fotos de fondo por slide */
.hs-slide--1 {
    background-image: url('assets/images/imagen_carrusel_1.png?v=20260711');
    background-image: -webkit-image-set(
        url('assets/images/imagen_carrusel_1.avif?v=20260711') type('image/avif'),
        url('assets/images/imagen_carrusel_1.webp?v=20260711') type('image/webp'),
        url('assets/images/imagen_carrusel_1.png?v=20260711') type('image/png')
    );
    background-image: image-set(
        url('assets/images/imagen_carrusel_1.avif?v=20260711') type('image/avif'),
        url('assets/images/imagen_carrusel_1.webp?v=20260711') type('image/webp'),
        url('assets/images/imagen_carrusel_1.png?v=20260711') type('image/png')
    );
    background-size: cover;
    background-position: center 20%;
    background-color: #0e2f58;
}
.hs-slide--2 {
    background-image: url('assets/images/imagen_carrusel_2.avif?v=20260711');
    background-image: -webkit-image-set(
        url('assets/images/imagen_carrusel_2.avif?v=20260711') type('image/avif'),
        url('assets/images/imagen_carrusel_2.webp?v=20260711') type('image/webp')
    );
    background-image: image-set(
        url('assets/images/imagen_carrusel_2.avif?v=20260711') type('image/avif'),
        url('assets/images/imagen_carrusel_2.webp?v=20260711') type('image/webp')
    );
    background-size: cover;
    background-position: center 18%;
    background-color: #163f87;
}
.hs-slide--3 {
    background-image: url('assets/images/imagen_carrusel_3.png?v=20260711');
    background-image: -webkit-image-set(
        url('assets/images/imagen_carrusel_3.avif?v=20260711') type('image/avif'),
        url('assets/images/imagen_carrusel_3.webp?v=20260711') type('image/webp'),
        url('assets/images/imagen_carrusel_3.png?v=20260711') type('image/png')
    );
    background-image: image-set(
        url('assets/images/imagen_carrusel_3.avif?v=20260711') type('image/avif'),
        url('assets/images/imagen_carrusel_3.webp?v=20260711') type('image/webp'),
        url('assets/images/imagen_carrusel_3.png?v=20260711') type('image/png')
    );
    background-size: auto 100%;
    background-position: center 100%;
    background-color: #0c1628;
}

/* Contenedor de esquinas decorativas */
.hs-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Esquinas doradas decorativas */
.hs-corner {
    position: absolute;
    width: 56px;
    height: 56px;
}

.hs-corner--tl {
    top: 128px;
    left: 48px;
    border-top: 2px solid rgba(229, 180, 34, 0.55);
    border-left: 2px solid rgba(229, 180, 34, 0.55);
}

.hs-corner--tr {
    top: 128px;
    right: 48px;
    border-top: 2px solid rgba(229, 180, 34, 0.35);
    border-right: 2px solid rgba(229, 180, 34, 0.35);
}

.hs-corner--bl {
    bottom: 80px;
    left: 48px;
    border-bottom: 2px solid rgba(229, 180, 34, 0.35);
    border-left: 2px solid rgba(229, 180, 34, 0.35);
}

.hs-corner--br {
    bottom: 80px;
    right: 48px;
    border-bottom: 2px solid rgba(229, 180, 34, 0.55);
    border-right: 2px solid rgba(229, 180, 34, 0.55);
}

/* Velo oscuro sobre las fotos para legibilidad del texto */
.hs-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,  rgba(4, 10, 22, 0.52) 0%, rgba(4, 10, 22, 0.22) 65%, rgba(4, 10, 22, 0.08) 100%),
        linear-gradient(to bottom, rgba(4, 10, 22, 0.05) 0%, rgba(4, 10, 22, 0.38) 100%);
    pointer-events: none;
}

/* ── Adaptación del contenido del hero al fondo oscuro ── */
.hero-slider-section .hero-content {
    position: relative;
    z-index: 5;
}

.hero-slider-section .hero-badge {
    background: rgba(229, 180, 34, 0.14);
    border-color: rgba(229, 180, 34, 0.45);
    color: var(--accent-gold);
    box-shadow: 0 0 22px rgba(229, 180, 34, 0.14);
}

.hero-slider-section .hero-title {
    color: #ffffff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.40);
}

.hero-slider-section .glow-text {
    background: linear-gradient(135deg, #6aaeff 15%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slider-section .hero-desc {
    color: rgba(255, 255, 255, 0.80);
    transition: opacity 0.4s ease;
}

.hero-slider-section .hero-desc.hs-fading {
    opacity: 0;
}

.hero-slider-section .btn-secondary {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
}

.hero-slider-section .btn-secondary:hover {
    background: rgba(229, 180, 34, 0.12);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 8px 28px rgba(229, 180, 34, 0.18);
}

.hero-slider-section .scroll-text {
    color: rgba(255, 255, 255, 0.50);
}

.hero-slider-section .scroll-mouse {
    border-color: rgba(255, 255, 255, 0.35);
}

/* ── Flechas de navegación ── */
.hs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.90);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hs-nav:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 4px 24px rgba(30, 94, 191, 0.50);
    transform: translateY(-50%) scale(1.08);
}

.hs-nav--prev { left: 36px; }
.hs-nav--next { right: 36px; }

/* ── Dots indicadores ── */
.hs-dots {
    position: absolute;
    bottom: 92px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: none !important;
    gap: 10px;
    align-items: center;
}

.hs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.30);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.35s var(--transition-smooth);
}

.hs-dot.active {
    width: 30px;
    border-radius: 5px;
    background: var(--accent-gold);
    box-shadow: 0 0 14px rgba(229, 180, 34, 0.55);
}

/* ── Etiqueta inferior izquierda del slide ── */
.hs-label {
    position: absolute;
    bottom: 88px;
    left: 60px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.hs-label-number {
    font-family: var(--font-title);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hs-label-title {
    font-family: var(--font-title);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--accent-gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ── Barra de progreso inferior ── */
.hs-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.hs-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
    border-radius: 0 3px 3px 0;
}

/* ── Responsive del slider ── */
@media (max-width: 768px) {
    .hs-nav {
        width: 42px;
        height: 42px;
    }
    .hs-nav--prev { left: 14px; }
    .hs-nav--next { right: 14px; }
    .hs-label { display: none; }
    .hs-dots { bottom: 78px; }
}

@media (max-width: 480px) {
    .hs-nav { display: none; }
    .hs-dots { bottom: 70px; }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .nav-container {
        padding: 0 30px;
    }

    .logo-icon {
        width: 58px !important;
        height: 58px !important;
    }

    .nav-menu {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .nav-menu.active {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1050;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s var(--transition-smooth);
    }

    .nav-menu.active.show {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu.active ul {
        flex-direction: column;
        align-items: center;
        gap: 35px;
    }

    .nav-menu.active .nav-link {
        font-size: 1.4rem;
        color: var(--text-primary);
    }

    .btn-portal {
        display: none;
    }

    .about-grid {
        gap: 40px;
    }

    .portfolio-grid {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 100px 20px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-visual {
        order: -1;
        width: 80%;
        max-width: 280px;
        margin: 0 auto;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item {
        aspect-ratio: 16/11;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-panel {
        padding: 35px 25px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-visual {
        height: 260px;
        min-height: unset;
    }

    .modal-details {
        padding: 28px 24px 32px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 20px;
    }

    .logo-icon {
        width: 48px !important;
        height: 48px !important;
    }

    .logo-text-top {
        font-size: 1rem;
    }

    .logo-text-bottom {
        font-size: 0.68rem;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 6px 14px;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-ctas .btn {
        width: 100%;
        text-align: center;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .slide-quote {
        font-size: 1.1rem;
    }

    .whatsapp-float {
        bottom: 25px;
        right: 25px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}



/* ==========================================================================
   SELECTOR DE IDIOMA (Language Switcher)
   ========================================================================== */
.lang-switcher {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-right: 10px;
}
.lang-btn {
    background: transparent;
    border: 1.5px solid rgba(15, 41, 74, 0.22);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1;
}
.lang-btn:hover {
    background: rgba(30, 94, 191, 0.09);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
.lang-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
}
@media (max-width: 768px) {
    .lang-switcher { margin-right: 6px; }
    .lang-btn { font-size: 0.6rem; padding: 3px 7px; }
}

/* Perfil jurídico: composición de dos paneles y adaptación para pantallas pequeñas. */
.team-card:focus-visible,
.team-bio-trigger:focus-visible,
.modal-close:focus-visible {
    outline: 3px solid rgba(30, 94, 191, 0.42);
    outline-offset: 4px;
}

.modal-details::-webkit-scrollbar {
    width: 8px;
}

.modal-details::-webkit-scrollbar-thumb {
    background: #8b8f95;
    border-radius: 999px;
}

.modal-details .cert-list {
    gap: 13px;
}

.modal-details .cert-item {
    align-items: flex-start;
    font-size: 0.92rem;
    line-height: 1.45;
}

.modal-details .cert-icon {
    color: var(--accent-gold);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .modal-backdrop {
        padding: 12px;
    }

    .modal-container {
        width: 100%;
        height: min(760px, calc(100vh - 24px));
        border-radius: 18px;
    }

    .modal-grid {
        grid-template-rows: 210px minmax(0, 1fr);
    }

    .modal-visual {
        height: auto;
    }

    .modal-details {
        padding: 28px 24px 34px;
    }

    .modal-title {
        font-size: 1.7rem;
    }

    .modal-tag {
        margin-bottom: 20px;
    }

    .modal-metrics .metrics-grid {
        grid-template-columns: 1fr;
    }
}
