/* assets/css/style.css - VERSIÓN FINAL (Opción A: Botón Móvil Centrado) */
:root {
    /* --- PALETA DE COLORES --- */
    --primary: #23a369;      /* Verde Logo */
    --primary-dark: #1a7d50; /* Verde Hover */
    --secondary: #1B3A2F;    /* Verde Oscuro Textos */
    --accent: #F4D03F;       /* Amarillo/Dorado */
    --panic: #d9534f;        /* Rojo Urgencia */
    
    --light: #F8F9FA;
    --white: #FFFFFF;
    --text-color: #333333;
    --border-color: #e9ecef;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

/* --- HEADER & NAV --- */
header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(35, 163, 105, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: 1200px;
    margin: 0 auto;
}
.logo img {
    height: 55px;
    width: auto;
    display: block;
}

/* Estilos del Menú Escritorio */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--primary); }

.btn-nav-call {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(35, 163, 105, 0.2);
    transition: background 0.3s, transform 0.2s;
}
.btn-nav-call:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Botón Hamburguesa (Oculto en escritorio) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.bar {
    width: 25px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 5px;
    transition: 0.3s;
}

/* --- SLIDER / HERO --- */
.slider-container {
    position: relative;
    height: 85vh;
    min-height: 550px;
    overflow: hidden;
    background: var(--secondary);
}
.slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.slide.active { opacity: 1; }
.slide-content {
    background: linear-gradient(to right, rgba(27, 58, 47, 0.9), rgba(27, 58, 47, 0.7));
    color: white;
    padding: 50px;
    border-radius: 0 15px 15px 0;
    max-width: 650px;
    margin-left: 5%;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
}
.slide-content h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; font-weight: 800; }
.slide-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(35, 163, 105, 0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* --- SECCIONES GENERALES --- */
.section-padding { padding: 100px 5%; }
.bg-light { background-color: var(--light); }
.text-center { text-align: center; }
.container { max-width: 1200px; margin: 0 auto; }
h2 { 
    color: var(--secondary); 
    font-size: 2.5rem; 
    margin-bottom: 50px; 
    font-weight: 800;
    position: relative;
}
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* --- SERVICIOS GRID --- */
.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 40px rgba(35, 163, 105, 0.15);
    border-color: var(--primary);
}
.icon { font-size: 3rem; margin-bottom: 25px; color: var(--primary); }
.card h3 { color: var(--secondary); margin-bottom: 15px; font-size: 1.4rem; }

/* --- TESTIMONIOS --- */
.review-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary);
    text-align: left;
}
.stars { color: var(--accent); font-size: 1.3rem; margin-bottom: 20px; letter-spacing: 2px; }
.review-text { font-style: italic; color: #666; margin-bottom: 30px; font-size: 1.05rem; line-height: 1.8; }
.review-author { display: flex; align-items: center; gap: 15px; font-weight: bold; color: var(--secondary); }
.user-img { width: 50px; height: 50px; border-radius: 50%; background-color: var(--light); border: 2px solid var(--primary); }

.btn-outline { 
    border: 2px solid var(--primary); 
    color: var(--primary); 
    padding: 12px 30px; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: bold; 
    display: inline-block; 
    transition: all 0.3s;
}
.btn-outline:hover { background: var(--primary); color: white; }

/* --- FAQ --- */
.faq-wrapper { max-width: 850px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-color); margin-bottom: 15px; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.faq-question {
    width: 100%; text-align: left; background: none; border: none;
    padding: 25px; font-size: 1.15rem; font-weight: 700; color: var(--secondary);
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: background 0.3s;
}
.faq-question:hover { background: var(--light); color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding: 0 25px; line-height: 1.7; color: #666; }
.faq-active .faq-answer { max-height: 300px; padding-bottom: 25px; }
.arrow { color: var(--primary); font-size: 0.9rem; }

/* --- CONTACTO --- */
.contact-section { background: var(--secondary); color: white; }
.contact-section h2 { color: white; }
.contact-section h2::after { background: white; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 50px; margin-top: 50px; }
.contact-info, .map-container { flex: 1; min-width: 350px; }
.contact-info h3 { color: var(--primary); margin-bottom: 25px; font-size: 1.5rem; }
.contact-info p { margin-bottom: 20px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.contact-info a { color: white; text-decoration: none; font-weight: bold; transition: color 0.3s; }
.contact-info a:hover { color: var(--primary); }
.map-container iframe { width: 100%; height: 400px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* --- FOOTER --- */
footer { background: #11241d; color: #aaa; padding: 50px 5%; margin-top: auto; font-size: 0.9rem; }
.footer-flex { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; max-width: 1200px; margin: 0 auto; align-items: center; }
.legal-links a { color: #aaa; text-decoration: none; margin-left: 25px; transition: color 0.3s; }
.legal-links a:hover { color: var(--primary); }

/* --- BOTÓN PÁNICO (Escritorio) --- */
.panic-btn {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--panic); color: white;
    padding: 15px 30px; border-radius: 50px;
    font-weight: 800; text-decoration: none;
    box-shadow: 0 5px 20px rgba(217, 83, 79, 0.5);
    z-index: 9990; /* Z-index alto, pero menor que las cookies (10000) */
    display: flex; align-items: center; gap: 12px; font-size: 1.1rem;
    animation: pulse 2s infinite; letter-spacing: 1px;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(217, 83, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0); }
}

/* --- BANNER COOKIES --- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #1B3A2F;
    color: white;
    padding: 20px;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    transition: bottom 0.5s ease-in-out;
}
.cookie-banner.show { bottom: 0; }
.cookie-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

/* --- VERSIÓN MÓVIL (UNIFICADA) --- */
@media (max-width: 768px) {
    /* 1. Menú Desplegable */
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: absolute;
        top: 80px; 
        left: -100%;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        transition: 0.4s;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 998;
    }
    
    .nav-links.active { left: 0; }
    
    /* 2. Slider (ARREGLADO: Ya no borra la foto) */
    .slider-container { 
        height: 60vh; 
        min-height: 400px; 
    }
    
    .slide {
        background-position: center center;
        /* Respetamos la imagen de fondo */
    }

    .slide-content {
        margin: 0;
        padding: 20px;
        background: rgba(27, 58, 47, 0.65) !important;
        box-shadow: none;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        border-radius: 0;
    }

    .slide-content h1 {
        font-size: 1.8rem; 
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 20px;
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
    
    /* 3. Ajustes Generales */
    .btn-primary { padding: 10px 25px; font-size: 1rem; }
    .section-padding { padding: 50px 20px; }
    h2 { font-size: 2rem; }
    
    .contact-info, .map-container { min-width: 100%; }
    
    .cookie-banner { flex-direction: column; text-align: center; gap: 15px;}

/* --- BOTÓN ICONO FLOTANTE (CENTRADO PERFECTO) --- */
    .panic-btn {
        position: fixed;
        bottom: 25px;
        right: 25px;
        left: auto;   
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        z-index: 9990;
        
        /* Hacemos transparente el texto original "🚨 LLAMAR" para que no se vea */
        color: transparent; 
        font-size: 0;
    }

    /* Dibujamos el icono nuevo y lo clavamos en el centro */
    .panic-btn::after {
        content: '📞';
        
        /* Truco para centrar ignorando el texto fantasma */
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* Centra ejes X e Y exactos */
        
        font-size: 28px; /* Tamaño del teléfono */
        color: white;     /* Color del icono */
        line-height: 1;
    }
    
    .panic-btn {
        animation: pulse-mobile 2s infinite;
    }


}

/* --- ESTILOS PARA FOTOS EN SERVICIOS --- */
.service-card {
    padding: 0; /* Quitamos el relleno general de la tarjeta */
    overflow: hidden; /* Para que la imagen respete el borde redondeado */
}

.service-img {
    width: 100%;
    height: 200px; /* Altura fija para todas las imágenes */
    object-fit: cover; /* La imagen se recorta para llenar el espacio sin deformarse */
    border-radius: 20px 20px 0 0; /* Redondeamos solo las esquinas de arriba */
}

.service-card h3 {
    margin-top: 25px; /* Espacio entre la foto y el título */
    padding: 0 20px; /* Relleno lateral para el texto */
}

.service-card p {
    padding: 0 20px 30px 20px; /* Relleno para el párrafo */
}

/* --- SECCIÓN MARCAS / PARTNERS --- */
.brands-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centrados */
    align-items: center;
    gap: 40px; /* Espacio entre logos */
}

.brand-item img {
    max-height: 60px;
    max-width: 150px;
    width: auto;
    
    /* EL TRUCO NUEVO: Hace que el blanco desaparezca */
    mix-blend-mode: multiply; 

    /* Mantenemos el efecto de blanco y negro */
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
    display: block;
}

/* IMPORTANTE: Al pasar el ratón, tenemos que quitar el truco 
   si el logo tiene colores claros, si no se verán raros. 
   Prueba si te gusta más con o sin esta línea extra en el hover. */
.brand-item img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
    /* Opcional: si el logo a color se ve raro, descomenta la siguiente línea: */
    /* mix-blend-mode: normal; */ 
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .brands-grid {
        gap: 20px;
    }
    .brand-item img {
        max-height: 40px; /* Más pequeños en móvil */
        max-width: 100px;
    }
}