/* --- RESETEO GENERAL Y VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --bg-principal: #0A0B0D;
    --bg-secundario: #16191E;
    --color-acento: #E11D48;
    --texto-blanco: #FFFFFF;
    --texto-gris: #94A3B8;
    --fuente-titulos: 'Montserrat', sans-serif;
    --fuente-cuerpo: 'Inter', sans-serif;
    --border-radius-modelo: 12px;
}

body {
    background-color: var(--bg-principal);
    color: var(--texto-blanco);
    font-family: var(--fuente-cuerpo);
    line-height: 1.6;
}

/* --- NAVEGACIÓN --- */
header {
    background-color: rgba(10, 11, 13, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #1E293B;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--fuente-titulos);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--color-acento);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--texto-gris);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--texto-blanco);
}

/* --- SECCIÓN HERO --- */
.hero-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 160px 20px 10px 20px;
    display: flex;
    align-items: center;
    gap: 60px;
    min-height: 85vh;
}

.hero-content {
    flex: 1.2;
}

.hero-content h1 {
    font-family: var(--fuente-titulos);
    font-size: 54px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -1.5px;
}

.hero-content h2 {
    font-size: 22px;
    color: var(--texto-gris);
    font-weight: 400;
    margin-bottom: 25px;
}

.hero-content p {
    color: var(--texto-gris);
    font-size: 16px;
    margin-bottom: 35px;
    max-width: 520px;
}

/* --- HERO ANIMATION: TACÓMETRO --- */
.hero-animation-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 420px;
}

.tachometer-perspective-wrapper {
    perspective: 1200px;
    margin-bottom: 20px;
}

.tachometer-gauge {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    position: relative;
    background: #0f131c;
    transform: rotateX(22deg) rotateY(-22deg) rotateZ(1deg);
    transform-style: preserve-3d;
    box-shadow: 
        -12px 20px 35px rgba(0, 0, 0, 0.7),
        -3px 8px 12px rgba(0, 0, 0, 0.4),
        inset 0 0 25px rgba(0, 0, 0, 0.9);
}

.gauge-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    z-index: 2;
}

/* EFECTO NEÓN DINÁMICO EN EL TEXTO INTERNO DEL SVG */
#svg-fontes-text {
    transition: fill 0.15s ease, filter 0.15s ease;
}

/* Clase inyectada por JS dinámicamente al cortar inyección */
.neon-blink {
    animation: urgentNeonLight 0.15s steps(2, start) infinite;
}

@keyframes urgentNeonLight {
    0%, 100% {
        fill: #ef4444;
        filter: drop-shadow(0px 0px 2px #ef4444) drop-shadow(0px 0px 8px #f43f5e);
    }
    50% {
        fill: #1e293b;
        filter: none;
    }
}

/* BISEL DE ACERO */
.gauge-steel-bezel {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    background: transparent;
    border: 8px solid #cbd5e1;
    border-top-color: #f8fafc;
    border-left-color: #94a3b8;
    border-bottom-color: #475569;
    border-right-color: #64748b;
    box-shadow: 
        inset 0 2px 3px rgba(255, 255, 255, 0.6), 
        0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 15;
    pointer-events: none;
}

/* CRISTAL */
.gauge-glass-lens {
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 40%, transparent 60%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 12;
    pointer-events: none;
}

/* AGUJA - CONTROLADA POR JS TRANSPARENTE */
.gauge-needle {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 8;
    transform: rotate(-120deg);
    transition: transform 0.04s linear; /* Movimiento suave en milisegundos */
}

.needle-body {
    position: absolute;
    bottom: 50%;
    left: calc(50% - 1.25px);
    width: 2.5px;
    height: 116px;
    background: linear-gradient(to top, #e11d48 0%, #e11d48 85%, #ffffff 100%);
    border-radius: 2px 2px 0 0;
}

.needle-counterweight {
    position: absolute;
    top: 50%;
    left: calc(50% - 1.75px);
    width: 3.5px;
    height: 22px;
    background-color: #1e293b;
    border-radius: 0 0 2px 2px;
}

/* SOMBRA DE AGUJA */
.gauge-needle-shadow {
    position: absolute;
    top: 5px; left: 5px; width: 100%; height: 100%;
    z-index: 6;
    filter: blur(3px);
    transform: rotate(-117deg);
    opacity: 0.5;
    transition: transform 0.04s linear;
}
.gauge-needle-shadow::before {
    content: '';
    position: absolute;
    bottom: 50%;
    left: calc(50% - 1.25px);
    width: 3px;
    height: 114px;
    background-color: #000000;
    border-radius: 2px;
}

/* EJE CENTRAL */
.gauge-center-cap {
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    transform: translate(-50%, -50%) translateZ(4px);
    background: radial-gradient(circle, #f8fafc 0%, #cbd5e1 50%, #475569 85%, #1e293b 100%);
    border: 1px solid #64748b;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.7);
}
.inner-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 26px; height: 26px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #64748b 0%, #1e293b 100%);
}
.center-screw {
    position: absolute;
    top: 50%; left: 50%;
    width: 12px; height: 12px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #f1f5f9 0%, #334155 100%);
    border-radius: 50%;
}

/* TEXTO ALTERNANTE DEBAJO DEL TABLERO */
.text-cycle-container {
    position: relative;
    height: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.animated-label {
    font-family: var(--fuente-titulos);
    font-size: 32px;
    font-weight: 800;
    position: absolute;
    opacity: 0;
    text-align: center;
    width: 100%;
    letter-spacing: -1px;
    white-space: nowrap;
}

.animated-label span {
    color: var(--color-acento);
}

.label-brand {
    animation: textSequence1 6s infinite;
}

.label-services {
    animation: textSequence2 6s infinite;
}

@keyframes textSequence1 {
    0%, 45% { opacity: 1; transform: scale(1); }
    50%, 95% { opacity: 0; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes textSequence2 {
    0%, 45% { opacity: 0; transform: scale(0.97); }
    50%, 95% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.97); }
}

/* --- BOTONES --- */
.btn-cta {
    background-color: var(--color-acento);
    color: var(--texto-blanco);
    border: none;
    padding: 16px 32px;
    font-family: var(--fuente-titulos);
    font-size: 15px;
    font-weight: 800;
    border-radius: var(--border-radius-modelo);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 20px rgba(225, 29, 72, 0.3);
}

.btn-cta:hover {
    background-color: #BE123C;
    transform: translateY(-2px);
}

/* --- SECCIÓN SERVICIOS --- */
.services-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.services-header {
    text-align: center;
    margin-bottom: 60px;
}

.services-header h3 {
    font-family: var(--fuente-titulos);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.services-header p {
    color: var(--texto-gris);
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
}

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

.service-card {
    background-color: var(--bg-secundario);
    padding: 40px 30px;
    border-radius: var(--border-radius-modelo);
    border: 1px solid #1E293B;
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(225, 29, 72, 0.4);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.service-card h4 {
    font-family: var(--fuente-titulos);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--texto-gris);
    font-size: 15px;
}

/* --- SECCIÓN CONTACTO --- */
.contact-section {
    background-color: #0E1013;
    border-top: 1px solid #1E293B;
    padding: 80px 20px;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: center;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-family: var(--fuente-titulos);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--texto-gris);
    margin-bottom: 40px;
    font-size: 16px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    font-size: 24px;
    margin-top: 3px;
}

.info-item h5 {
    font-family: var(--fuente-titulos);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-item p {
    color: var(--texto-gris);
    font-size: 15px;
}

.map-wrapper {
    flex: 1.2;
    height: 400px;
    border-radius: var(--border-radius-modelo);
    overflow: hidden;
    border: 1px solid #1E293B;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(1) invert(0.9) contrast(1.2);
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: var(--bg-secundario);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: var(--border-radius-modelo);
    border: 1px solid #1E293B;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    color: var(--texto-gris);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--texto-blanco);
}

.modal-box h4 {
    font-family: var(--fuente-titulos);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.modal-box p {
    color: var(--texto-gris);
    font-size: 14px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--texto-gris);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background-color: #0A0B0D;
    border: 1px solid #1E293B;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--texto-blanco);
    font-family: var(--fuente-cuerpo);
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-acento);
}

.form-group textarea {
    height: 80px;
    resize: none;
}

.btn-submit {
    width: 100%;
    background-color: var(--color-acento);
    color: var(--texto-blanco);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-family: var(--fuente-titulos);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #BE123C;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #1E293B;
    color: var(--texto-gris);
    font-size: 14px;
}

/* --- RESPONSIVO MÓVILES --- */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 110px;
        gap: 10px;
    }
    .hero-content h1 {
        font-size: 36px;
    }
    .hero-content h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    .hero-content p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .hero-animation-container {
        width: 100%;
        height: auto;
        margin-top: 15px;
        margin-bottom: 15px;
        order: -1;
    }

    .tachometer-gauge {
        width: 210px;
        height: 210px;
    }
    .needle-body {
        height: 86px;
    }
    .gauge-needle-shadow::before {
        height: 84px;
    }
    .gauge-center-cap {
        width: 28px;
        height: 28px;
    }

    .animated-label {
        font-size: 24px;
    }
    .text-cycle-container {
        height: 35px;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .contact-container {
        flex-direction: column;
    }
    .map-wrapper {
        width: 100%;
        height: 300px;
    }
    .modal-box {
        padding: 30px 20px;
    }
}