:root {
    --primary: #002347; 
    --accent: #d4af37;  
    --bg-light: #fdfdfd;
    --text-dark: #333;
    --text-muted: #666;
    --white: #ffffff;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Lora', serif; font-weight: 700; color: var(--primary); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 2; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

/* HEADER */
header { background: var(--white); padding: 1rem 0; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #eee; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 100px; width: auto; }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--primary); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }

/* Menú Hamburguesa */
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; cursor: pointer; border: none; background: transparent; z-index: 1001; }
.menu-toggle .bar { width: 100%; height: 3px; background-color: var(--primary); border-radius: 3px; transition: all 0.3s ease; }

/* HERO */
.hero {
    padding: 12rem 0; text-align: center;
    background: linear-gradient(rgba(0, 35, 71, 0.75), rgba(0, 35, 71, 0.75)), 
                url('medios/hero.png');
    background-size: cover; background-position: center; background-attachment: fixed; color: var(--white);
}
.hero h1 { font-size: 3.5rem; margin-bottom: 1.5rem; color: var(--white); }
.hero .subtitle { font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); max-width: 700px; margin: 0 auto 2.5rem; }

/* BOTONES */
.cta-group { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.btn-primary, .btn-secondary, .btn-secondary-white {
    padding: 1.1rem 2.2rem; text-decoration: none; border-radius: 4px; font-weight: 600; transition: 0.3s; cursor: pointer; display: inline-block; border: none; font-size: 0.95rem;
}
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: #c19b2e; transform: translateY(-2px); }
.btn-secondary-white { border: 1px solid var(--white); color: var(--white); background: transparent; }
.btn-secondary-white:hover { background: var(--white); color: var(--primary); }

/* SECCIONES Y FILTRO */
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3.5rem; }
.filtro-honestidad { background: var(--primary); color: var(--white); padding: 6rem 0; text-align: center; position: relative; z-index: 3; }
.anti-marketing { font-family: 'Lora', serif; font-style: italic; font-size: 2rem; max-width: 850px; margin: 0 auto; }

/* SERVICIOS (3 en línea) */
.servicios { padding: 8rem 0; background: #fff; }
.grid-servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.card { padding: 0; border: 1px solid #eee; transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.card-img { width: 100%; height: 220px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.card h3 { margin: 1.8rem 1.8rem 1rem; font-size: 1.4rem; }
.card p { margin: 0 1.8rem 2rem; font-size: 0.95rem; color: var(--text-muted); }

/* Hover Cards */
.card:hover { background-color: var(--primary); border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,35,71, 0.25); color: var(--white); transform: translateY(-8px); }
.card:hover .card-img img { transform: scale(1.1); }
.card:hover h3, .card:hover p { color: var(--white); }

/* SOBRE NOSOTROS & FOTO MAITE */
.sobre { padding: 10rem 0; background-color: var(--white); position: relative; overflow: hidden; }
.sobre-text p { margin-bottom: 1.5rem; max-width: 650px; }
.sobre-brand-visual { display: flex; justify-content: center; align-items: center; position: relative; width: 100%; height: 100%; }

/* Nueva clase para que la foto luzca profesional en lugar de difuminada */
.foto-perales { 
    width: 100%; 
    max-width: 450px; 
    border-radius: 8px; 
    box-shadow: 0 15px 40px rgba(0, 35, 71, 0.15); /* Sombra con el color corporativo */
    object-fit: cover;
    z-index: 1; 
}

/* FORMULARIO */
.contacto { padding: 8rem 0; background: #f8f9fa; position: relative; z-index: 3;}
.contacto-wrapper { max-width: 650px; margin: 0 auto; background: white; padding: 4rem; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.6rem; font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; }
.campo-validacion { position: absolute; left: -9999px; top: auto; }
.checkbox-group { display: flex; align-items: flex-start; gap: 0.8rem; margin: 2rem 0; }
.checkbox-group input[type="checkbox"] { width: auto; margin-top: 0.2rem; transform: scale(1.2); cursor: pointer; flex-shrink: 0; }
.checkbox-group label { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; line-height: 1.4; cursor: pointer; }

/* --- SLIDER CAPTCHA --- */
.slider-captcha-container { margin: 2rem 0; width: 100%; user-select: none; }
.slider-track {
    position: relative; width: 100%; height: 50px; background-color: #f4f4f4; 
    border-radius: 4px; border: 1px solid #ddd; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: background-color 0.3s;
}
.slider-text { color: var(--text-muted); font-size: 0.95rem; z-index: 1; transition: color 0.3s; font-weight: 500;}
.slider-handle {
    position: absolute; left: 0; top: 0; width: 50px; height: 100%; background-color: var(--white);
    border: 1px solid #ccc; border-radius: 4px; display: flex; align-items: center; justify-content: center;
    cursor: grab; z-index: 2; color: var(--primary); box-shadow: 2px 0 5px rgba(0,0,0,0.1); transition: color 0.3s, background-color 0.3s;
}
.slider-handle:active { cursor: grabbing; }

/* Estados del Slider */
.slider-track.verified { background-color: #e6f4ea; border-color: #34a853; }
.slider-track.verified .slider-text { color: #137333; font-weight: 600; }
.slider-track.verified .slider-handle { background-color: #34a853; color: white; border-color: #34a853; cursor: default; }
.slider-error { animation: shake 0.4s ease-in-out; border-color: #ea4335; }
.slider-error .slider-text { color: #ea4335; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* FOOTER & COOKIES */
footer { padding: 4rem 0; text-align: center; border-top: 1px solid #eee; font-size: 0.9rem; color: var(--text-muted); background: white;}
.link-legal { color: var(--text-muted); text-decoration: underline; }
.link-legal:hover { color: var(--primary); }

.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--white); box-shadow: 0 -10px 30px rgba(0,0,0,0.1); z-index: 9999; padding: 1.5rem 0; transform: translateY(100%); transition: transform 0.4s ease; display: none; }
.cookie-banner.show { transform: translateY(0); }
.cookie-content { max-width: 1100px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem;}
.cookie-content p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.5;}
.btn-sm { padding: 0.6rem 1.2rem; font-size: 0.85rem;}

/* MOBILE BLINDAJE */
@media (max-width: 992px) {
    .grid-servicios { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .menu-toggle { display: flex; }
    .nav-links { position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--white); flex-direction: column; align-items: center; padding: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
    .nav-links.active { max-height: 600px; padding: 2rem 0 3rem 0; border-top: 1px solid #eee; }
    .nav-links li { width: 100%; text-align: center; margin: 1rem 0; }
    .nav-links a { display: block; padding: 0.5rem; font-size: 1.1rem; }
    .hero { padding: 6rem 1.5rem; background-attachment: scroll; }
    .hero h1 { font-size: 2.2rem; line-height: 1.2; }
    .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
    .sobre-brand-visual { height: auto; overflow: visible; margin-top: 1rem; }
    .foto-perales { max-width: 300px; margin: 0 auto; }
    .contacto-wrapper { padding: 2rem; }
    .btn-primary, .btn-secondary-white { width: 100%; text-align: center; }
    .cookie-content { flex-direction: column; text-align: center; gap: 1.5rem; }
    .cookie-buttons { width: 100%; justify-content: center; }
}

/* --- TOAST NOTIFICATION --- */
.form-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--white);
    border-left: 4px solid var(--primary); /* Azul por defecto */
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10000;
    transform: translateX(150%); /* Oculto fuera de la pantalla por la derecha */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote */
    max-width: 400px;
}

.form-toast.show { transform: translateX(0); }
.form-toast.success { border-left-color: #34a853; } /* Verde para éxito */
.form-toast.error { border-left-color: #ea4335; } /* Rojo para error */

.toast-content p { margin: 0; font-size: 0.9rem; color: var(--text-dark); line-height: 1.5; }
.toast-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; transition: 0.2s; }
.toast-close:hover { color: var(--text-dark); }

/* Ajuste móvil para el Toast */
@media (max-width: 768px) {
    .form-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* =========================================
   PLAN EMPRESAS (IGUALA JURÍDICA CON PARALLAX)
   ========================================= */
.plan-empresas {
    padding: 8rem 0;
    text-align: center;
    position: relative;
    z-index: 3;
    /* Capa oscura de contraste + Imagen fija (Parallax) */
    background: linear-gradient(rgba(0, 35, 71, 0.85), rgba(0, 35, 71, 0.85)), 
                url('medios/iguala.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Esto crea la magia del paralaje */
}

.plan-empresas-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.plan-empresas h2 {
    color: var(--accent); /* Dorado autoridad */
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.plan-empresas p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* La negrita introductoria toma el color del título y destaca */
.plan-empresas p strong {
    color: var(--accent);
    font-weight: 700;
}

/* Blindaje Móvil */
@media (max-width: 768px) {
    .plan-empresas { 
        padding: 5rem 1.5rem; 
        /* En algunos móviles antiguos el fixed da saltos, lo pasamos a scroll por seguridad UX */
        background-attachment: scroll; 
    }
    .plan-empresas h2 { font-size: 2rem; }
    .plan-empresas p { font-size: 1.05rem; }
}

/* --- FIRMA DE DESARROLLO WEB EXACTA (COSMIA) --- */
.firma-cosmia {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.firma-cosmia a {
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Separación exacta entre texto, icono y marca */
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.firma-cosmia a:hover {
    opacity: 0.7; /* Efecto hover sutil en toda la firma */
}

.cosmia-pre {
    font-size: 0.8rem;
    color: var(--text-muted); /* Gris sutil para no restar protagonismo al cliente */
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.cosmia-icono {
    height: 14px; /* Tamaño ajustado para alinear con el texto. Modifícalo si tu icono es más alto */
    width: auto;
    display: block;
}

.cosmia-marca {
    font-size: 0.85rem;
    color: #000000; /* NEGRO SÓLIDO SOLICITADO */
    font-weight: 700;
    letter-spacing: 1px; /* Espaciado premium para el nombre de la agencia */
    /* Si tienes una fuente específica cargada en el <head> para Cosmia, añádela aquí. Ej: font-family: 'Inter', sans-serif; */
}