/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --bg-color: #121212;
    --bg-darker: #0a0a0a;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --gold: #c5a059;
    --border: rgba(255, 255, 255, 0.1);
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Fondo de Cuadrícula */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   NAVEGACIÓN (MOBILE FIRST)
   ========================================= */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: lowercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo svg {
    width: 24px; height: 24px;
    fill: none; stroke: var(--text-main); stroke-width: 2;
}

/* Botón Hamburguesa */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px; height: 2px;
    background: var(--text-main);
    transition: 0.3s;
}

/* Menú Desplegable Móvil */
.nav-links {
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    background: var(--bg-darker);
    flex-direction: column;
    align-items: center;
    padding: 40px 0; /* Más espacio vertical */
    gap: 30px; /* Más separación entre enlaces */
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.nav-links.active {
    transform: translateY(0);
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1rem; /* Texto un poco más grande en móvil */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 20px; /* Área de toque más grande */
    transition: color 0.3s;
    display: block;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    padding-top: 60px;
}

.hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 900;
    max-width: 1000px;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-main);
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 30px;
}

.cta-btn {
    padding: 15px 30px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* =========================================
   SECCIONES GENERALES
   ========================================= */
.section-container {
    padding: 80px 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 50%; height: 2px;
    background: var(--accent);
}

/* =========================================
   SERVICIOS (GRID)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 30px 20px;
    transition: all 0.4s ease;
}

.icon-box {
    width: 40px; height: 40px;
    margin-bottom: 15px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

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

/* =========================================
   IMPACTO (CONTADORES)
   ========================================= */
.impact-section {
    background: var(--bg-darker);
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

.stat-item h2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
}

/* Corrección de color y estilo para los textos de los contadores */
.stat-item p, 
.stat-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: var(--text-muted) !important;
    margin-top: 5px;
}

/* =========================================
   FOOTER Y CONTACTO
   ========================================= */
.footer-section {
    padding: 60px 20px 30px;
    background: var(--bg-darker);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

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

.social-links a {
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: all 0.3s;
}

.contact-data {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
}

.contact-data a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.social-handle {
    color: var(--text-muted);
    margin-top: 10px;
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* =========================================
   ANIMACIONES SCROLL
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--gold) }
}

/* =========================================
   MEDIA QUERIES (DESKTOP / TABLET)
   ========================================= */
@media (min-width: 768px) {
    /* Navbar Desktop */
    .navbar { padding: 20px 50px; }
    .menu-toggle { display: none; }
    .nav-links {
        position: static;
        flex-direction: row;
        background: transparent;
        padding: 0;
        border: none;
        transform: none;
        width: auto;
        gap: 40px; /* Separación amplia entre enlaces en escritorio */
    }
    .nav-links a { 
        font-size: 0.9rem; 
        padding: 5px 0;
    }

    /* Hero Desktop */
    .hero h1 { font-size: clamp(3rem, 5vw, 4.5rem); }
    .hero-desc { font-size: 1.2rem; margin-bottom: 40px; }
    .cta-btn { padding: 18px 40px; font-size: 0.9rem; }
    
    /* Efecto Hover Botón */
    .cta-btn::before {
        content: '';
        position: absolute;
        top: 0; left: -100%;
        width: 100%; height: 100%;
        background: var(--accent);
        transition: all 0.3s ease;
        z-index: -1;
    }
    .cta-btn:hover { color: var(--bg-color); }
    .cta-btn:hover::before { left: 0; }

    /* Secciones Desktop */
    .section-container { padding: 100px 10%; }
    .section-title { font-size: 2.5rem; margin-bottom: 60px; }

    /* Grid Servicios Desktop */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
    .service-card { padding: 40px 30px; }
    .service-card:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-5px);
    }

    /* Stats Desktop */
    .impact-section { padding: 100px 10%; }
    .stats-container {
        flex-direction: row;
        justify-content: space-around;
    }
    .stat-item h2 { font-size: 4rem; }

    /* Footer Desktop */
    .footer-section { padding: 80px 10% 40px; }
    .contact-grid { grid-template-columns: 1fr 1fr; gap: 50px; }
    .social-links a:hover {
        background: var(--accent);
        color: var(--bg-color);
    }
}

/* =========================================
   FORMULARIO DE CONTACTO
   ========================================= */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

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

.contact-form button {
    padding: 12px 20px;
    background: var(--accent);
    color: var(--bg-color);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form button:hover {
    background: var(--gold);
    color: var(--bg-color);
}