/* Miranda Ruiz & Asociados - ESTILO MAESTRO V19 */
/* CORRECCIÓN: Barra de navegación perfecta en celulares */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:wght@400;500&display=swap');

:root {
    --primario: #634b35; 
    --gris-fondo: #E6E8EB;
    --negro-footer: #1a1a1a;
    --blanco: #ffffff;
    --texto: #2c3e50;
    --fuente-titulos: 'Montserrat', sans-serif;
    --fuente-texto: 'Roboto', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* El cuerpo baja 70px para que la barra fija no tape el contenido */
body { 
    font-family: var(--fuente-texto); 
    color: var(--texto); 
    line-height: 1.6; 
    padding-top: 70px; 
}

/* --- NAVBAR (BARRA FIJA) --- */
.navbar {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 9999;
    height: 70px; 
    padding: 0 5%;
    background: var(--blanco); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: all 0.3s ease;
}

.logo-area { position: relative; height: 100%; display: flex; align-items: center; }

/* Enlace del Logo */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    cursor: pointer;
}

/* Logo Flotante */
.logo-img { 
    height: 100px; 
    width: auto; 
    position: absolute; 
    top: -15px; 
    left: 0;
    z-index: 10001; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    transition: all 0.3s ease;
}

.brand-name { 
    margin-left: 110px; 
    font-family: var(--fuente-titulos); 
    font-size: 1.2rem; 
    color: var(--primario); 
    font-weight: bold; 
    line-height: 1.2;
}

/* --- MENÚ DE NAVEGACIÓN --- */
.nav-links { display: flex; list-style: none; }
.nav-links li { position: relative; margin-left: 25px; }
.nav-links a { text-decoration: none; color: var(--texto); font-weight: 500; font-family: var(--fuente-titulos); transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primario); }

/* DROPDOWN */
.dropdown-content {
    display: none; position: absolute; background: var(--blanco); min-width: 200px;
    top: 100%; left: 0; box-shadow: 0 8px 16px rgba(0,0,0,0.1); border-top: 3px solid var(--primario); z-index: 10000;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { padding: 12px 20px; display: block; font-size: 0.9rem; border-bottom: 1px solid #eee; }

/* --- SECCIONES GENERALES --- */
section { padding: 80px 5%; }
.bg-gris { background-color: var(--gris-fondo); }
.container-flex { display: flex; gap: 50px; align-items: center; flex-wrap: wrap; }
.col { flex: 1 1 400px; } 
.titulo-seccion { font-family: var(--fuente-titulos); font-size: 2.2rem; margin-bottom: 20px; color: var(--primario); }
.centrado { text-align: center; }

/* --- PORTADAS --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../img/portada-inicio.png');
    background-size: cover; background-position: center center;
    display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; text-align: center;
}

.hero-banner {
    height: 50vh; 
    min-height: 400px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/portada-servicios.png'); 
    background-size: cover; background-position: center center;
    display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; text-align: center;
}

.hero-content h1 { font-size: 3.5rem; font-family: var(--fuente-titulos); margin-bottom: 10px; }
.hero-content p { font-size: 1.5rem; margin-bottom: 30px; font-weight: 300; }

/* BOTONES */
.botones-container { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.btn-main { background: var(--primario); color: white; padding: 15px 35px; text-decoration: none; border-radius: 5px; font-weight: bold; font-family: var(--fuente-titulos); transition: 0.3s; }
.btn-secundario { background: transparent; color: white; padding: 13px 33px; text-decoration: none; border-radius: 5px; font-weight: bold; font-family: var(--fuente-titulos); transition: 0.3s; border: 2px solid white; }
.btn-main:hover { transform: scale(1.05); background: #4a3828; }
.btn-secundario:hover { background: white; color: var(--primario); }

/* COMPONENTES */
.carrete-contenedor { position: relative; width: 100%; height: 450px; overflow: hidden; border-radius: 15px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.foto-slide { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: crossfade 15s infinite; }
.foto-slide:nth-child(1) { animation-delay: 0s; }
.foto-slide:nth-child(2) { animation-delay: 5s; }
.foto-slide:nth-child(3) { animation-delay: 10s; }
@keyframes crossfade { 0% { opacity: 0; } 10% { opacity: 1; } 33% { opacity: 1; } 43% { opacity: 0; } 100% { opacity: 0; } }

.grid-objetivos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 40px; }
.obj-card { background: white; padding: 30px; border-radius: 15px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.4s; }
.obj-card:hover { transform: translateY(-15px) scale(1.05); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.obj-icon { font-size: 3.5rem; margin-bottom: 15px; display: block; }

/* TESTIMONIOS */
.slider-container { position: relative; max-width: 800px; margin: 0 auto; overflow: hidden; padding: 20px; }
.testimonio-card { display: none; text-align: center; padding: 40px; background: white; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.testimonio-card.active { display: block; animation: fadeIn 0.5s; }
.texto-opinion { font-style: italic; font-size: 1.2rem; margin-bottom: 15px; }
.cliente-nombre { font-weight: bold; color: var(--primario); }
.estrellas { color: #f1c40f; font-size: 1.2rem; margin-top: 10px; }
.prev-btn, .next-btn { position: absolute; top: 50%; transform: translateY(-50%); background: var(--primario); color: white; border: none; padding: 15px; cursor: pointer; border-radius: 50%; z-index: 10; opacity: 0.8; }
.prev-btn { left: 0; } .next-btn { right: 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* SERVICIOS */
.servicios-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.servicio-card { background: white; width: 45%; min-width: 320px; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.1); text-decoration: none; color: var(--texto); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.servicio-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.servicio-img { width: 100%; height: 350px; object-fit: cover; transition: transform 0.5s ease; }
.servicio-card:hover .servicio-img { transform: scale(1.05); }
.servicio-info { padding: 30px; text-align: center; border-top: 5px solid var(--primario); }
.servicio-info h3 { font-family: var(--fuente-titulos); font-size: 1.8rem; color: var(--primario); margin-bottom: 10px; }
.servicio-info p { font-size: 1rem; color: #666; }

/* ESTILOS INTERNOS (LISTAS Y CAJAS) */
.lista-check { list-style: none; padding: 0; }
.lista-check li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.lista-check li::before { content: "✔"; color: var(--primario); position: absolute; left: 0; font-weight: bold; }

.caja-texto { 
    background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    height: 100%; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.caja-texto:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.subtitulo { color: var(--primario); font-weight: bold; margin-bottom: 15px; font-size: 1.3rem; border-bottom: 2px solid var(--gris-fondo); padding-bottom: 10px; }

/* FOOTER */
.footer { background: #1a1a1a; color: #ffffff; padding: 70px 5% 30px; }
.container-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; max-width: 1200px; margin: 0 auto; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h3 { font-family: 'Montserrat', sans-serif; margin-bottom: 20px; color: #ffffff; border-left: 3px solid #634b35; padding-left: 10px; }
.link-interactivo { display: block; color: #ffffff; text-decoration: none; margin-bottom: 12px; opacity: 0.9; transition: opacity 0.3s; }
.link-interactivo:hover { opacity: 1; text-decoration: underline; }
.social-links a { display: block; color: #ffffff; text-decoration: none; margin-bottom: 10px; opacity: 0.7; transition: 0.3s; }
.social-links a:hover { opacity: 1; }
.qr-link { display: inline-block; transition: transform 0.3s; }
.qr-link:hover { transform: scale(1.02); }
.qr-img { margin-top: 15px; border-radius: 10px; }
.footer-bottom { text-align: center; border-top: 1px solid #333; margin-top: 50px; padding-top: 25px; font-size: 0.9rem; opacity: 0.8; }
.img-static { width: 100%; max-height: 450px; border-radius: 15px; object-fit: cover; }


/* =========================================
   MEDIA QUERIES (VERSIÓN MÓVIL CORREGIDA)
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Ajuste TOTAL de la Barra */
    .navbar {
        height: auto; 
        flex-direction: column;
        justify-content: center;
        padding: 10px;
        position: relative; /* Cambia a relativo para que no tape si es muy alto */
        position: fixed; /* O mantenemos fijo pero controlando el padding body */
    }

    /* 2. El área del Logo ahora apila todo verticalmente */
    .logo-area {
        flex-direction: column; /* Logo arriba, Texto abajo */
        margin-bottom: 15px;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .logo-link {
        flex-direction: column; /* Asegura que el link interno también sea columna */
    }

    /* 3. Logo más pequeño y reseteado (ya no flota) */
    .logo-img {
        position: relative; 
        top: 0; left: 0;
        height: 70px; 
        margin-bottom: 5px;
    }

    /* 4. EL NOMBRE: AQUÍ ESTABA EL ERROR */
    /* Quitamos el margen izquierdo de 110px */
    .brand-name {
        margin-left: 0 !important; 
        display: block;
        text-align: center;
        font-size: 1.1rem;
    }

    /* 5. Menú centrado abajo */
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 15px;
        padding-bottom: 5px;
    }
    .nav-links li { margin: 0; }
    
    .dropdown-content { position: relative; border: 1px solid #eee; text-align: center; }

    /* 6. Ajuste del cuerpo para que no se oculte nada */
    /* Como el menú ahora es más alto, bajamos más el contenido */
    body { padding-top: 190px; }

    /* 7. Ajustes generales de texto y columnas */
    .hero h1, .hero-content h1 { font-size: 2rem; }
    .hero p, .hero-content p { font-size: 1rem; }
    
    .hero { min-height: 50vh; height: auto; padding: 100px 20px 50px; }
    .hero-banner { height: auto; min-height: 250px; padding: 40px 20px; }

    .container-flex { flex-direction: column; gap: 30px; }
    .col { width: 100%; flex: 1 1 100%; }
    .servicio-card { width: 100%; }
    .img-static { height: auto; max-height: 250px; }

    .container-footer { flex-direction: column; text-align: center; }
    .footer-col h3 { border-left: none; border-bottom: 3px solid var(--primario); display: inline-block; padding-bottom: 5px; padding-left: 0; }
}