/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ed1c24; /* Rojo Guardatti */
    --dark: #0a0a0a;
    --darker: #050505;
    --text: #ffffff;
    --gray: #888888;
    --font-head: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--darker);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal si algo se rompe */
}

/* REGLA DE ORO: IMÁGENES RESPONSIVAS */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 1. NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
    padding: 15px 0;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-family: var(--font-head);
    font-size: 1.2rem;
}

/* AQUÍ ESTÁ EL ARREGLO: Limitar tamaño del logo */
.nav-logo {
    width: 40px; 
    height: 40px; 
    object-fit: contain;
}

.dot { color: var(--primary); }

.nav-links {
    display: none; /* Oculto en móvil por defecto */
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover { color: var(--primary); }

.btn-nav {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* 2. HERO SECTION */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    margin-top: 70px; /* Espacio para el navbar fijo */
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('images/hero-bg.jpg'); /* Asegúrate de tener esta imagen */
    background-size: cover;
    background-position: center;
    filter: brightness(0.3); /* Oscurece la foto */
    z-index: -1;
}
/* Fallback si no hay imagen */
.hero-bg { background-color: #111; }

.hero-content h1 {
    font-family: var(--font-head);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.text-neon {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(237, 28, 36, 0.4);
}

.subtitle {
    color: var(--gray);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 10px;
}

/* 3. SECTIONS & GRIDS */
.section { padding: 80px 0; }
.bg-dark { background: var(--dark); }
.bg-black { background: var(--darker); }

.section-title {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.center { text-align: center; }
.center-text { text-align: center; color: var(--gray); margin-bottom: 50px; }

.divider {
    width: 60px; height: 3px; background: var(--primary); margin: 15px 0 30px 0;
}

/* Grid 2 Columnas (Texto + Stats / Contacto + Mapa) */
.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

/* Stats Box */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
}
.stat-card h3 { font-size: 2rem; color: var(--primary); font-family: var(--font-head); }
.stat-card small { color: #aaa; font-size: 0.7rem; letter-spacing: 1px; }

/* 4. SERVICIOS (Responsive Grid) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: #121212;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-lg { font-size: 2.5rem; color: #555; margin-bottom: 20px; display: block; transition: 0.3s;}
.service-card:hover .icon-lg { color: var(--primary); }

.service-card h4 { font-size: 1.2rem; margin-bottom: 10px; text-transform: uppercase; }
.service-card p { font-size: 0.9rem; color: var(--gray); }

.highlight { border-color: rgba(237, 28, 36, 0.4); background: linear-gradient(to bottom, #121212, #1a0505); }

/* 5. CONTACTO */
.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}
.contact-item i { font-size: 1.8rem; color: var(--primary); }
.contact-item strong { display: block; color: white; }
.contact-item p { color: var(--gray); }

.btn-full {
    display: block;
    width: 100%;
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    margin-top: 20px;
}

.map-wrapper iframe {
    width: 100%;
    height: 400px;
    border: 0;
    filter: invert(90%) hue-rotate(180deg) contrast(90%); /* Dark Mode Map */
    border-radius: 12px;
}

footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: #666;
}

/* RESPONSIVE DESKTOP */
@media (min-width: 900px) {
    .nav-links { display: flex; } /* Mostrar menú en PC */
    .grid-2-cols { grid-template-columns: 1fr 1fr; } /* 2 Columnas reales */
    .hero-content h1 { font-size: 5rem; }
}

/* =========================================
       CORRECCIONES PARA MÓVIL (Mobile Fixes)
       ========================================= */
    @media (max-width: 768px) {
        
        /* 1. Centrar todo el contenido del Hero */
        .hero-content {
            text-align: center;
            padding: 0 15px; /* Margen lateral para que no toque los bordes */
        }

        /* 2. Reducir el tamaño del título gigante en móvil */
        .hero-content h1 {
            font-size: 2.8rem; /* Bajamos de 3.5rem a 2.8rem */
            line-height: 1.1;
        }

        /* 3. Centrar textos de secciones (como Trayectoria) */
        .text-content {
            text-align: center;
            margin-bottom: 2rem;
        }

        /* 4. Centrar la línea roja divisoria */
        .divider {
            margin-left: auto;
            margin-right: auto;
        }

        /* 5. Asegurar que los párrafos no sean demasiado anchos */
        .text-content p, 
        .hero-content p {
            max-width: 100%;
            margin-left: auto;
            margin-right: auto;
        }
        
        /* 6. Ajuste extra para el navbar en móvil */
        .brand {
            font-size: 1rem; /* Logo un poco más chico para dar espacio al botón */
        }
        
        .btn-nav {
            padding: 6px 12px;
            font-size: 0.8rem;
        }
    }

    