/* =========================================
   VARIABLES Y TOKENS (SISTEMA DE DISEÑO)
   ========================================= */
:root {
    /* Paleta de colores Premium Oscura */
    --color-bg-base: #050505;
    --color-bg-alt: #0a0a0a;
    --color-bg-card: #121212;
    --color-bg-card-hover: #181818;

    --color-neon-primary: #0088ff;
    --color-neon-hover: #0066ee;
    --color-neon-glow: rgba(0, 136, 255, 0.4);

    --color-text-main: #ffffff;
    --color-text-muted: #a0a0a0;
    --color-border: #222222;

    /* Tipografía */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Espaciado */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 5rem;
    --space-8: 8rem;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   RESET Y BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

/* =========================================
   TIPOGRAFÍA
   ========================================= */
h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-neon {
    color: var(--color-neon-primary);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-white {
    color: #fff;
}

.fw-bold {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

/* =========================================
   UTILIDADES Y CONTENEDORES
   ========================================= */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

.container-narrow {
    max-width: 1000px;
}

.section {
    padding: var(--space-8) 0;
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-3 {
    margin-top: var(--space-3);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-5 {
    margin-top: var(--space-5);
}

.mt-6 {
    margin-top: var(--space-6);
}

.bg-darker {
    background-color: var(--color-bg-alt);
}

/* Grids */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.align-center {
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   BOTONES Y ENLACES
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-neon {
    background-color: var(--color-neon-primary);
    color: var(--color-bg-base);
}

.btn-neon:hover {
    background-color: var(--color-neon-hover);
    box-shadow: 0 0 20px var(--color-neon-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: #333;
    color: var(--color-text-main);
}

.btn-outline:hover {
    border-color: var(--color-text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-outline-neon {
    background-color: transparent;
    border-color: var(--color-neon-primary);
    color: var(--color-neon-primary);
}

.btn-outline-neon:hover {
    background-color: var(--color-neon-primary);
    color: var(--color-bg-base);
    box-shadow: 0 0 15px var(--color-neon-glow);
}

.shadow-neon {
    box-shadow: 0 0 30px rgba(0, 136, 255, 0.3);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-neon-primary);
    font-weight: 600;
    font-family: var(--font-heading);
}

.link-arrow svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.link-arrow:hover svg {
    transform: translateX(5px);
}

/* =========================================
   NAVEGACIÓN
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
    display: inline-flex;
    align-items: baseline;
    text-transform: uppercase;
}

.logo-dot {
    color: var(--color-neon-primary);
    font-size: 1.6em;
    line-height: 0.7;
    margin-right: 2px;
}

.logo-word1 {
    color: #ffffff;
}

.logo-word2 {
    color: var(--color-neon-primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.nav-links a:hover {
    color: var(--color-text-main);
}

/* =========================================
   1. HERO
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
    background-image:
        linear-gradient(to right, rgba(5, 5, 5, 0.9) 0%, rgba(5, 5, 5, 0.7) 40%, rgba(5, 5, 5, 0.3) 100%),
        url('images/cabecera.png');
    /* Fallback image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Pseudo element for additional darkness / blur if needed */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, transparent 20%, var(--color-bg-base) 90%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    max-width: 800px;
    z-index: 10;

    /* CAMBIO: Usamos un porcentaje para mayor profundidad */
    margin-left: 13%;

    text-align: left;
    /* Eliminamos cualquier margin: 0 auto anterior si existiera */
}

.hero-title {
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-weight: 800;
    /* Unificado */
    letter-spacing: -3px;
    /* Unificado con las otras cabeceras */
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* =========================================
   2. BLOQUE AUTORIDAD
   ========================================= */
.authority-image {
    position: relative;
}

.authority-image img {
    border-radius: 8px;
    position: relative;
    z-index: 2;
    filter: grayscale(20%) contrast(1.1);
}

.glow-backdrop {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-neon-primary);
    border-radius: 8px;
    z-index: 1;
    opacity: 0.5;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin: 1.5rem 0;
}

.divider {
    height: 1px;
    width: 60px;
    background-color: var(--color-neon-primary);
    margin: 2rem 0;
}

.bullet-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 1.1rem;
}

.bullet-list svg {
    width: 24px;
    height: 24px;
    color: var(--color-neon-primary);
}

/* =========================================
   3. PROBLEMA
   ========================================= */
.problem-card {
    background-color: var(--color-bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    text-align: center;
}

.problem-card:hover {
    border-color: rgba(0, 255, 102, 0.3);
    transform: translateY(-5px);
}

.problem-card .icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-text-muted);
}

.problem-card h3 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.problem-closure .highlight-text {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* =========================================
   4. SOLUCIÓN (MÉTODO)
   ========================================= */
.method-card {
    background-color: var(--color-bg-base);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.method-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    transition: var(--transition-base);
}

.method-card:hover,
.method-card.active {
    background-color: var(--color-bg-card);
    transform: translateY(-5px);
}

.method-card:hover::before,
.method-card.active::before {
    background-color: var(--color-neon-primary);
    box-shadow: 0 0 15px var(--color-neon-glow);
}

.method-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neon-primary);
}

.method-icon svg {
    width: 40px;
    height: 40px;
}

.method-card h3 {
    margin-bottom: 1rem;
}

.method-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* =========================================
   5. SERVICIOS (CARDS PRO)
   ========================================= */
.service-pro-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
}

.card-img {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 2px solid var(--color-neon-primary);
    filter: sepia(0.3) hue-rotate(180deg) blur(0) contrast(1.2);
    transition: var(--transition-base);
}

.card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-bg-card) 5%, transparent 100%);
}

.service-pro-card:hover .card-img {
    filter: none;
    transform: scale(1.05);
    /* very subtle zoom without breaking layout */
}

.card-content-pro {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    background-color: var(--color-bg-card);
    /* cover up the scaled bg if needed */
    z-index: 2;
}

.pro-icon-container {
    width: 50px;
    height: 50px;
    background-color: var(--color-bg-base);
    border: 1px solid rgba(0, 136, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -4rem;
    /* pulls icon up over the image border */
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.service-pro-card:hover {
    border-color: rgba(0, 136, 255, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-pro-card:hover .card-glow {
    opacity: 1;
}

.pro-icon {
    font-size: 1.5rem;
}

.service-pro-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.pro-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.pro-bullets {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
}

.pro-bullets li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 2.5rem;
}

/* =========================================
   6. FILOSOFÍA
   ========================================= */
.philosophy {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.philosophy-box {
    max-width: 900px;
    background-color: var(--color-bg-card);
    border: 1px solid rgba(0, 136, 255, 0.1);
    border-radius: 20px;
    padding: 5rem 4rem;
    text-align: center;
    position: relative;
    z-index: 5;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.philosophy-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--color-neon-glow) 0%, transparent 60%);
    z-index: -1;
    opacity: 0.5;
    filter: blur(60px);
}

.philosophy-text {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 2rem auto 0;
}

/* =========================================
   7. CTA FUERTE
   ========================================= */
.cta-massive {
    position: relative;
    padding: 8rem 0;
    background-color: var(--color-bg-base);
    overflow: hidden;
}

.cta-massive-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0, 136, 255, 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.cta-massive>.container {
    position: relative;
    z-index: 2;
}

.cta-massive h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

.cta-massive p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
}

/* =========================================
   8. SOBRE NOSOTROS (MINI)
   ========================================= */
.about-mini {
    background-color: var(--color-bg-alt);
}

.about-image img {
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    filter: contrast(1.1);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin: 1.5rem 0;
    max-width: 500px;
}

/* =========================================
   9 & 10. FOOTER & CONTACTO RÁPIDO
   ========================================= */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 5rem 0 2rem;
    background-color: var(--color-bg-base);
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

.footer ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer ul a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer ul a:hover {
    color: var(--color-neon-primary);
}

.footer ul svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* =========================================
   ANIMACIONES SCROLL
   ========================================= */
.fade-in,
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    will-change: transform, opacity;
}

.fade-in {
    transition: opacity 0.8s ease;
}

.reveal-up {
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale {
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* =========================================
   SERVICIOS HORIZONTALES (Página Servicios)
   ========================================= */
.service-horizontal-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 4rem;
    transition: var(--transition-base);
}

.service-horizontal-card:hover {
    border-color: rgba(0, 136, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(-5px);
}

.horizontal-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
}

.horizontal-content {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Alternar orden */
.service-horizontal-card:nth-child(even) .horizontal-img {
    order: 2;
}

.service-horizontal-card:nth-child(even) .horizontal-content {
    order: 1;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 1024px) {
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2-col,
    .grid-3-col,
    .grid-4-col {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .nav-links {
        display: none;
        /* Hide for mobile simplicity, needs a burger menu ideally */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .philosophy-box {
        padding: 3rem 2rem;
    }

    .about-image img {
        margin: 0 auto;
    }

    .about-text,
    .authority-text {
        text-align: center;
    }

    .authority-image,
    .about-image {
        order: -1;
    }

    .divider {
        margin: 1.5rem auto;
    }

    .bullet-list li {
        justify-content: center;
    }

    .flex-between {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .flex-between .link-arrow {
        display: none;
    }

    .mobile-cta {
        display: block !important;
    }

    .service-horizontal-card {
        grid-template-columns: 1fr;
    }

    .service-horizontal-card:nth-child(even) .horizontal-img,
    .service-horizontal-card:nth-child(even) .horizontal-content {
        order: unset;
    }

    .horizontal-img {
        min-height: 250px;
    }

    .horizontal-content {
        padding: 2rem;
    }
}

/* --- Ajuste de proximidad en Servicios --- */

.service-horizontal-card .pro-text {
    margin-bottom: 1rem;
    /* Reducido de 2.5rem a 1rem */
    padding-bottom: 0;
}

.features-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 0.5rem;
    /* Reducido para acercarlo al párrafo */
    padding-top: 1.5rem;
    /* Reducido el espacio sobre la línea divisoria */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-mini-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    /* Título más pegado a su descripción */
}

/* Espaciado drástico entre servicios */
.service-horizontal-card {
    margin-bottom: 12rem;
    /* Separación profunda */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding-bottom: 4rem;
    /* Línea sutil de separación al final de cada bloque */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* El último servicio no necesita margen ni borde */
.service-horizontal-card:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

/* Ajuste dinámico para pantallas medianas/pequeñas */
@media (max-width: 992px) {
    .service-horizontal-card {
        margin-bottom: 8rem;
        gap: 3rem;
        grid-template-columns: 1fr;
        /* Apilado en móvil */
    }
}

/* ASeparación de la Fase y el Título */
.service-badge {
    margin-bottom: 2rem;
    /* Separa la fase del título */
}

.service-horizontal-card h3 {
    margin-bottom: 1.5rem !important;
    /* Separa el título del texto */
}

.service-horizontal-card .pro-text {
    margin-bottom: 2.5rem;
    /* Espacio antes de la mini-grid */
}

/* --- REDISEÑO SOBRE NOSOTROS PRO --- */

.about-hero-pro {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/office.png') center/cover no-repeat;
    position: relative;
    padding-top: 80px;
}

.hero-overlay-dark {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.2), #050505 95%);
    z-index: 1;
}

.giant-title {
    font-family: var(--font-heading) !important;
    font-size: clamp(3rem, 12vw, 7.5rem) !important;
    font-weight: 800 !important;
    line-height: 0.85 !important;
    letter-spacing: -3px !important;
    text-transform: uppercase;
    color: #ffffff !important;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 1);
    margin-top: 20vh !important;
}

.text-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.4);
    /* Unificado en Optimización de Capas */
}

.badge-neon {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--color-neon-primary);
    color: var(--color-neon-primary);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    border-radius: 50px;
}

.section-tag {
    color: var(--color-neon-primary);
    font-weight: 800;
    letter-spacing: 5px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 1.5rem;
}

/* Pilares Estilo Tarjeta */
.pilar-grid-expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.pilar-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-left: 2px solid var(--color-neon-primary);
    transition: 0.3s;
}

.pilar-card:hover {
    background: rgba(0, 136, 255, 0.05);
    transform: translateY(-5px);
}

.pilar-id {
    color: var(--color-neon-primary);
    font-weight: 900;
    font-size: 0.7rem;
    opacity: 0.5;
}

/* Visual Pro con Elementos Flotantes */
.image-stack {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.img-pro {
    width: 100%;
    border-radius: 8px;
    filter: grayscale(100%) contrast(1.1);
    transition: 0.6s ease;
}

.image-stack:hover .img-pro {
    filter: grayscale(0%);
}

.ui-element {
    position: absolute;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    z-index: 10;
}

.floating-1 {
    top: 10%;
    right: -10%;
    border-left: 3px solid var(--color-neon-primary);
}

.floating-2 {
    bottom: 15%;
    left: -10%;
    border-right: 3px solid #fff;
}

.scan-line {
    width: 100%;
    height: 2px;
    background: var(--color-neon-primary);
    margin-top: 10px;
    box-shadow: 0 0 10px var(--color-neon-primary);
    animation: scan 2s infinite alternate;
}

@keyframes scan {
    from {
        opacity: 0.2;
    }

    to {
        opacity: 1;
    }
}

/* Stats Grid */
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 3rem;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    display: block;
}

.stat-item p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsivo */
@media (max-width: 768px) {
    .giant-title {
        font-size: 3.5rem;
    }

    .floating-1,
    .floating-2 {
        display: none;
    }

    .stats-mini-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


/* --- OPTIMIZACIÓN DE CAPAS Y LEGIBILIDAD --- */

.services-hero-custom {
    background: url('images/office.png') center/cover no-repeat !important;
    height: 85vh !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10vh;
    position: relative;
    overflow: hidden;
    /* Evita que el degradado se salga */
}

.hero-overlay-dark-refined {
    position: absolute;
    inset: 0;
    /* El degradado ahora es más profundo abajo pero más claro arriba */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.3) 0%, #050505 100%);
    z-index: 1;
    /* Capa inferior */
}

.relative.z-10 {
    position: relative;
    z-index: 10 !important;
    /* Capa superior: asegura que el texto esté SOBRE el negro */
}

.giant-title-refined {
    font-family: var(--font-heading) !important;
    font-size: clamp(3rem, 12vw, 7.5rem) !important;
    /* Ajusta aquí el tamaño que prefieras */
    font-weight: 800 !important;
    /* Este valor define el grosor. Cámbialo a 800 en ambas */
    line-height: 0.85 !important;
    letter-spacing: -3px !important;
    text-transform: uppercase;
    color: #ffffff !important;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 1);
    margin-top: 20vh !important;
    /* Para que todas bajen igual */
}

.text-outline {
    color: transparent !important;
    /* Reducimos ligeramente el grosor para que no colapse en las esquinas de la E */
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.6);

    /* PROPIEDAD CLAVE: Evita que el trazo rompa la forma de la letra */
    paint-order: stroke fill;

    /* Mejora el suavizado de los bordes en navegadores modernos */
    -webkit-font-smoothing: antialiased;

    /* Ajuste de tracking: separa un poco las letras para que no choquen entre ellas */
    letter-spacing: 2px;
}

/* --- HERO CONTACTO --- */
.contact-hero-custom {
    background: url('images/contacto.png') center/cover no-repeat !important;
    height: 85vh !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10vh;
    position: relative;
    overflow: hidden;
}

/* --- FORMULARIO DE CONTACTO --- */
.form-control-pro {
    width: 100%;
    background: rgba(5, 5, 5, 0.5);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.form-control-pro:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.form-control-pro::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* --- HERO NOSOTROS --- */
.about-hero-custom {
    background: url('images/cabecera-nosotros.png') center/cover no-repeat !important;
    height: 85vh !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10vh;
    position: relative;
    overflow: hidden;
}