/* --- 1. RESET MAESTRO --- */
* {
    box-sizing: border-box; /* Fundamental para que nada se desborde */
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden; /* Prohíbe el scroll horizontal fantasma */
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #444;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Evitar que palabras largas rompan el diseño en móviles */
h1, h2, h3, p, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* --- 2. HEADER Y MENÚ --- */
header {
    background-color: #000;
    padding: 0.8rem 1.2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-header { height: 45px; border-radius: 50%; }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
}

nav a:hover { color: #cc0000; }

/* --- 3. SECCIONES Y LAYOUTS --- */
main { margin-top: 80px; width: 100%; }

section {
    padding: 5rem 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden; /* Blindaje extra */
}

.contenedor-ancho {
    max-width: 1100px;
    width: 100%;
}

.titulo-seccion {
    color: #cc0000;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 2.5rem;
    text-align: center;
    text-transform: uppercase;
}

.seccion-clara { background-color: #ffffff; }
.seccion-oscura { background-color: #111111; color: #dddddd; }

.layout-dos-columnas { 
    display: flex; 
    gap: 3rem; 
    align-items: center; 
    width: 100%; 
}
.layout-dos-columnas.reverso { flex-direction: row-reverse; }

.imagen-destacada, .hero-video-container { flex: 1; width: 100%; }
.imagen-destacada img, .video-hero-derecha {
    width: 100%;
    height: auto;
    border-radius: 15px;
    border-bottom: 6px solid #cc0000;
    display: block;
}

.texto-destacado, .hero-texto { flex: 1; }

/* --- 4. GRILLA Y TARJETAS --- */
.layout-grilla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.mini-tarjeta {
    background: #ffffff;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    border-top: 5px solid #000;
    transition: 0.4s;
    color: #333;
}

.mini-tarjeta:hover {
    transform: translateY(-12px);
    border-top-color: #cc0000;
    box-shadow: 0 10px 20px rgba(204,0,0,0.2);
}

.seccion-oscura .mini-tarjeta { background: #1e1e1e; color: #eee; border-top-color: #444; }

.icono-tarjeta { font-size: 2.8rem; display: block; margin-bottom: 0.8rem; }

/* --- 5. HERO SECTION --- */
.seccion-hero {
    background: linear-gradient(135deg, #111 0%, #000 100%);
    color: white;
    min-height: 75vh;
}

.logo-hero-izquierda { width: 110px; border-radius: 50%; border: 2px solid #cc0000; margin-bottom: 1rem; animation: flotar 3s infinite ease-in-out; }
.titulo-animado { font-size: clamp(2rem, 8vw, 3.5rem); font-family: 'Montserrat'; margin-bottom: 1rem; }
.subtitulo-animado { font-size: 1.1rem; color: #ccc; margin-bottom: 2rem; }

/* --- 6. BOTONES --- */
.btn-primario {
    background-color: #cc0000; color: white; padding: 12px 30px; 
    text-decoration: none; border-radius: 30px; font-weight: bold; text-transform: uppercase;
    display: inline-block;
}

.btn-whatsapp {
    position: fixed; bottom: 20px; right: 20px; background-color: #25D366; 
    color: white; padding: 12px 20px; border-radius: 30px; text-decoration: none; 
    z-index: 2000; display: flex; align-items: center; gap: 8px; font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* --- 7. RESPONSIVE --- */
@media (max-width: 768px) {
    header { padding: 0.5rem 1rem; }
    .menu-toggle { display: block; }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #000;
        flex-direction: column;
        padding: 1.5rem 0;
    }

    nav.active { display: flex; }
    nav a { margin: 12px 0; text-align: center; width: 100%; font-size: 1rem; margin-left: 0; }

    .layout-dos-columnas, .layout-dos-columnas.reverso { 
        flex-direction: column !important; 
        text-align: center;
    }

    .hero-layout { flex-direction: column-reverse !important; }
    .hero-texto { padding-right: 0; }
    .logo-hero-izquierda { margin: 0 auto 1.5rem auto; }
}

/* --- 8. ANIMACIONES --- */
.oculto { opacity: 0; transform: translateY(25px); transition: 0.8s ease-out; }
.mostrar { opacity: 1; transform: translateY(0); }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }