/* --- Estilos Generales y Reset --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Poppins', sans-serif; /* Asume que Poppins está cargada o es la fuente deseada */
    line-height: 1.6; 
    scroll-behavior: smooth; 
}
h2 { 
    font-family: "Libre Baskerville", serif; 
    scroll-margin-top: var(--nav-height); /* Variable debe estar definida en algún lugar o ser eliminada */
}

/* --- Navegación (Header y Navbar) --- */
header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    background: #fff; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    z-index: 1000; 
}
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 1rem 2rem; 
    height: 80px; 
}
/* --- Reglas Base para Escritorio --- */
.logo { 
    font-family: "Libre Baskerville", serif; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

/* Regla NUEVA: Controla el tamaño de la imagen en escritorio */
.logo img {
    height: 41px; /* Tamaño por defecto en escritorio */
    width: auto;
    max-width: 100%; /* Asegura que no se desborde */
}

.logo span { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: #86895d; 
    letter-spacing: 0.5px; 
}

/* --- Media Queries Navegación --- */
@media (max-width: 768px) {
    /* Regla para el menú de hamburguesa */
    /* ... (se mantiene igual) ... */
    
    /* Ajuste de Logo */
    .logo img {
        height: 40px; /* Tamaño de la imagen del ícono en móvil */
    }

    /* ¡CLAVE! Ajustar el tamaño del texto para móviles */
    .logo span { 
        font-size: 1rem; /* Reducir el tamaño de la fuente a 1rem */
        /* Si aun así es demasiado largo en el celular: */
        /* max-width: 150px; 
        overflow: hidden; 
        white-space: nowrap;
        text-overflow: ellipsis; */
    }

    /* Si quieres ocultar el texto en el celular, usa: */
    /* .logo span { display: none; } */
    
    /* ... (resto de las reglas de navegación) ... */
}


.nav-menu { 
    display: flex; 
    list-style: none; 
    gap: 2rem; 
    align-items: center; 
    font-family: "Libre Baskerville", serif; 
}
.nav-menu a { 
    position: relative; 
    text-decoration: none; 
    color: #333; 
    font-weight: 500; 
    transition: color 0.3s ease; 
}
.nav-menu a::after { 
    content: ""; 
    position: absolute; 
    left: 0; 
    bottom: -8px; 
    width: 0; 
    height: 2px; 
    background-color: #86895d; 
    transition: width 0.3s ease; 
}
.nav-menu a:hover { 
    color: #86895d; 
}
.nav-menu a:hover::after { 
    width: 100%; 
}
.nav-menu a.active { 
    color: #86895d; 
}
.nav-menu a.active::after { 
    width: 100%; 
}
.nav-toggle { 
    display: none; 
    flex-direction: column; 
    cursor: pointer; 
    gap: 6px; 
}
.nav-toggle span { 
    width: 28px; 
    height: 3px; 
    background: #86895d; 
    border-radius: 2px; 
    transition: all 0.3s ease; 
}

.social-icons { 
    display: flex; 
    gap: 1rem; 
    margin-left: 1rem; 
}
.social-icons a { 
    color: #86895d; 
    font-size: 1.2rem; 
    transition: color 0.3s; 
}
.social-icons a:hover { 
    color: #333; 
}

/* --- Media Queries Navegación --- */
@media (max-width: 768px) {
    .nav-toggle { 
        display: flex; 
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: #fff;
        transition: right 0.4s ease-in-out;
        gap: 2rem;
    }
    .nav-menu.active { 
        right: 0; 
    }
    .nav-toggle.active span:nth-child(1) { 
        transform: rotate(45deg) translate(5px, 5px); 
    }
    .nav-toggle.active span:nth-child(2) { 
        opacity: 0; 
    }
    .nav-toggle.active span:nth-child(3) { 
        transform: rotate(-45deg) translate(6px, -6px); 
    }

    .social-icons {
        margin: 2rem 0 0 0;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* --- Estilos de Sección y Footer --- */
section { 
    padding: 100px 20px; 
    min-height: 80vh; 

}


/* --- Media Queries de Contacto --- */

@media (max-width: 768px) {
section { 
    padding: 100px 20px; 
    min-height: 100vh; 
}
}


footer { 
    background: #222; 
    color: #fff; 
    text-align: center; 
    padding: 3rem 0; 
}

.whatsapp-float { 
    position: fixed; 
    right: 20px; 
    bottom: 20px; 
    width: 60px; 
    height: 60px; 
    z-index: 10000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: #25D366; 
    border-radius: 50%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    transition: transform 0.3s; 
}
.whatsapp-float:hover { 
    transform: scale(1.1); 
}
.whatsapp-float img { 
    width: 35px; 
    height: 35px; 
}

/* --- SECCIÓN INICIO (Carrusel) --- */
#inicio { 
    position: relative; 
    min-height: 100vh; 
    overflow: hidden; 
    color: #fff; 
    text-align: center; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.slide { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    opacity: 0; 
    transition: opacity 1s ease-in-out; 
}
.slide.active { 
    opacity: 1; 
}
#inicio::before { 
    content: ""; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.55); 
    z-index: 1; 
}
#inicio .content { 
    position: relative; 
    z-index: 2; 
}

/* --- SECCIÓN INICIO: Ajustes para el Logo dentro de .content --- */

/* Regla base: Asegura que la imagen no exceda su contenedor en escritorio y se centre */
#inicio .content img {
    max-width: 300px; /* Ancho máximo para monitores grandes */
    height: auto;
    width: 80%; /* Usa un ancho relativo */
}

/* Adaptación para CELULARES (480px o menos) */
@media (max-width: 480px) {
    #inicio .content img {
        width: 70%; /* Usa un ancho más pequeño en el centro de la pantalla */
        max-width: 200px; /* Limita el tamaño absoluto para evitar que se vea pixelada */
    }
}

/* --- SECCIÓN INICIO --- */
/* Estilo Base (Escritorio) */
#inicio h1 { 
    /* Si el tamaño base de escritorio es muy grande, ajústalo aquí. 
       Manteniendo 2.2rem como ejemplo: */
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
    font-family: "Cormorant Garamond", serif; 
    font-weight: 300;
}

/* Media Query Intermedia (Móviles Grandes / Tablets) */
@media (max-width: 768px) {
    #inicio h1 { 
        font-size: 1.3rem; 
    }
}

/* Media Query Crítica (Celulares Pequeños) */
@media (max-width: 480px) {
    #inicio h1 { 
        font-size: 0.8rem; /* Reducción máxima para asegurar que quepa en el ancho */
        line-height: 1.1; /* Añadir una altura de línea más ajustada para ahorrar espacio vertical */
    }
}
.btn-ghost { 
    display: inline-block; 
    margin-top: 20px; 
    padding: 12px 28px; 
    font-size: 1rem; 
    color: #86895d; 
    border: 2px solid #fff; 
    background-color: #fff; 
    border-radius: 8px; 
    text-decoration: none; 
    transition: all 0.3s ease; 
}
.btn-ghost:hover { 
    background-color: transparent; 
    color: #fff; 
    border: 2px solid #fff; 
}

.controls { 
    position: absolute; 
    width: 100%; 
    top: 50%; 
    display: flex; 
    justify-content: space-between; 
    transform: translateY(-50%); 
    z-index: 3; 
    padding: 0 20px; 
}
.control { 
    cursor: pointer; 
    font-size: 2rem; 
    color: #fff; 
    user-select: none; 
    transition: opacity 0.3s; 
}
.control:hover { 
    opacity: 0.7; 
}

/* --- SECCIÓN NOSOTROS --- */


#nosotros { 
    background: #fff;
    text-align: center;
    padding: 3rem 1rem;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
}

.icono-hoja { 
    text-align: center; 
    margin-top: 20px; 
    color: #86895d; 
}
.icono-hoja i { 
    font-size: 1.8rem; 
    opacity: 0.6; 
    animation: flotar 3s ease-in-out infinite; 
}
@keyframes flotar { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-5px) rotate(-3deg); } 
}

.nosotros-texto { 
    max-width: 1300px; 
    text-align: center; 
    color: #333; 
    line-height: 1.7; 
    margin: 2rem auto 0; 
}
.divider { 
    width: 60px; 
    height: 2px; 
    background-color: #86895d; 
    border: none; 
    margin: 50px auto 20px; 
    border-radius: 2px; 
}
.divider-inicio { 
    width: 60px; 
    height: 1px; 
    background-color: white; 
    border: none; 
    margin: 20px auto 20px; 
    border-radius: 2px; 
}

.texto-final strong { 
    display: inline-block; 
    color: #86895d; 
    font-family: "Libre Baskerville", serif; 
    font-size: 1.3rem !important; 
}
.nosotros-texto p { 
    margin-bottom: 1rem; 
}
.nosotros-texto strong { 
    color: #86895d; 
    font-size: 1.2rem; 
}

/* --- SECCIÓN SERVICIOS --- */
#servicios { 
    background: #f8f8f8; 
    text-align: center; 
    color: #333; 
}
#servicios h2, #nosotros h2 { 
    font-size: 2rem; 
    color: #86895d; 
    margin-bottom: 2rem; 
}

.servicios-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
    max-width: 1100px; 
    margin: 3rem auto; 
    padding: 0 1rem; 
}
.servicio-card { 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border-bottom: 2px solid #86895d; 
}
.servicio-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 8px 16px rgba(0,0,0,0.15); 
}
.servicio-card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
}
.servicio-card h3 { 
    font-size: 1.3rem; 
    color: #86895d; 
    margin: 1rem 0 0.5rem; 
}
.servicio-card p { 
    font-size: 1rem; 
    color: #555; 
    padding: 0 2rem 1.5rem; 
}
#servicios strong { 
    font-size: 1.2rem; 
    color: #86895d; 
    padding: 0 2rem 1.5rem; 
    font-family: "Libre Baskerville", serif; 
}



/* --- SECCIÓN OPINIONES (Estilos movidos del bloque al final) --- */
#opiniones {
    position: relative;
    padding: 220px 0px 220px 0px;
    text-align: center;
    background-image: url('parallax2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
}

/* Overlay negro */
#opiniones::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.58);
    z-index: 1;
}

/* Elevar el contenido por encima del overlay */
#opiniones * {
    position: relative;
    z-index: 2;
}
#opiniones h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
    font-family: "Libre Baskerville", serif;
}

/* --- Modificación en .opiniones-container --- */
.opiniones-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
    max-width: 1100px; 
    margin: 3rem auto; 
    /* Eliminamos el padding lateral aquí, lo manejaremos en la media query si es necesario, 
       o confiamos en el padding lateral de la sección general (#opiniones). */
}

/* --- NUEVA REGLA RESPONSIVE --- */
@media (max-width: 768px) {
    /* Si la sección #opiniones ya tiene padding lateral,
       solo necesitamos asegurarnos de que el contenedor use ese padding.
       Pero para garantizar espacio extra: */
    .opiniones-container {
        padding: 0 2rem; /* Aumentamos el padding lateral a 2rem para separación */
        gap: 1.5rem; /* Reducimos la separación entre tarjetas */
    }
}

@media (max-width: 480px) {
    .opiniones-container {
        padding: 0 1.5rem; /* Mantenemos un padding cómodo en celulares más estrechos */
    }
    
    /* Si el padding de 220px de la sección #opiniones es mucho en móvil,
       también debes reducirlo: */
    #opiniones {
        padding: 100px 0; /* Reduce el padding vertical en móvil */
    }
}

.opinion-card {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    transition: transform .3s ease, box-shadow .3s ease;
}

.opinion-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.18);
}

.opinion-card i {
    font-size: 2rem;
    color: #86895d;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.opinion-card p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
}

.opinion-card h4 {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #86895d;
    font-family: "Libre Baskerville", serif;
}


/* --- SECCIÓN CONTACTO --- */
#contacto {
    background: #f8f8f8;
    padding: 0 20px;
    text-align: center;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
}

/* Normalizar márgenes internos que rompen el centrado */
#contacto *:first-child {
    margin-top: 0 !important;
}

#contacto *:last-child {
    margin-bottom: 0 !important;
}

#contacto h2,
#contacto p {
    margin: 0 0 15px 0;
}
#contacto .icono-hoja { 
    color: #86895d; 
    font-size: 2.2rem; 
}
#contacto h2 { 
    font-size: 2rem; 
    color: #86895d; 
    margin-bottom: 2rem; 
}
.contacto-info { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.2rem; 
}
.contacto-info p { 
    font-size: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    justify-content: center; 
    margin: 0; 
}

.contacto-info a.tel { 
    font-size: 2.2rem; /* Tamaño muy destacado para el teléfono */
}


.contacto-info i { 
    color: #86895d; 
    font-size: 1.4rem; 
}
.contacto-info a { 
    color: #86895d; 
    font-size: 1.4rem; 
    text-decoration: none; 
    /* SOLUCIÓN 1: Fuerza la ruptura de la palabra larga (el email) */
    word-break: break-word;
    overflow-wrap: break-word; /* Soporte para navegadores más antiguos */
}

/* --- Media Queries de Contacto --- */

@media (max-width: 768px) {
    /* Reduce el tamaño general en móvil/tablet */
    .contacto-info p { 
        font-size: 1.2rem; 
    }
    .contacto-info a {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    /* SOLUCIÓN 2: Tamaño crítico para celulares pequeños */
    .contacto-info p { 
        /* Usar font-size: 1rem o incluso 0.9rem si el email sigue siendo muy largo */
        font-size: 1rem;
    }
    .contacto-info a {
        font-size: 1rem;
    }
}


/* --- SECCIÓN CLIENTES --- */
#clientes {
    background: #fff;
    text-align: center;
    padding: 3rem 1rem;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
}

#clientes h2 {
    font-size: 2rem;
    color: #86895d;
    margin-bottom: 1rem;
}
/* --- SECCIÓN CLIENTES (ajustada para centrar 1-4 logos) --- */
.clientes-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
    gap: 2.5rem;
    max-width: 1300px;
    margin: 3rem auto 0;
    padding: 0 1rem;
    justify-content: center;
    justify-items: center;
}

/* Asegurar que cada item no se estire */
.cliente-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    width: 100%;
    max-width: 220px;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Ajustes hover */
.cliente-item:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* La imagen ocupa el ancho disponible dentro del item */
.cliente-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}


/* --- PARALLAX CON ÍTEMS --- */
.parallax-bg { 
    position: relative; 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    color: #fff; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    background-attachment: fixed; 
    transition: background-image 0.3s ease-in-out; 
}
.parallax-bg::before { 
    content: ""; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.4); 
    z-index: 1; 
}
.parallax-items { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 50px; 
    flex-wrap: wrap; 
    position: relative; 
    z-index: 2; 
}
.parallax-items .item { 
    max-width: 280px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    opacity: 0; 
    transform: translateY(20px); 
    transition: opacity 1s ease, transform 1s ease; 
}
.parallax-items .item.show { 
    opacity: 1; 
    transform: translateY(0); 
}
.parallax-items .item i { 
    font-size: 2.5rem; 
    margin-bottom: 15px; 
    color: #fff; 
    text-align: center; 
}
.parallax-items .item h3 { 
    font-size: 1.5rem; 
    margin-bottom: 10px; 
    color: #fff; 
}
.parallax-items .item p { 
    font-size: 1rem; 
    color: #fff; 
    line-height: 1.4; 
}
.parallax-items .line { 
    width: 2px; 
    height: 100px; 
    background-color: #86895d; 
    align-self: center; 
}
.parallax-items .item:nth-child(1).show { 
    transition-delay: 0.2s; 
}
.parallax-items .item:nth-child(3).show { 
    transition-delay: 0.4s; 
}
.parallax-items .item:nth-child(5).show { 
    transition-delay: 0.6s; 
}

/* --- Media Queries Generales --- */
@media (max-width: 1024px) {
    .parallax-items { 
        gap: 30px; 
    }
    .parallax-items .line { 
        display: none; 
    }
    .parallax-items .item h3 { 
        font-size: 1.3rem; 
    }
    .parallax-items .item p { 
        font-size: 0.95rem; 
    }
}

@media (max-width: 768px) {
    #contacto { 
        padding: 80px 20px; 
    }
    #contacto h2 { 
        font-size: 2rem; 
    }
    .contacto-info p { 
        font-size: 1.1rem; 
    }
    .contacto-info i { 
        font-size: 1.2rem; 
    }
    .parallax-bg { 
        height: 100vh; 
        background-attachment: scroll; 
    }
    .parallax-items { 
        flex-direction: column; 
        gap: 40px; 
    }
    .parallax-items .item { 
        max-width: 300px; 
    }
    /* Clientes */

    #clientes {
    background: #fff;
    text-align: center;
     padding: 5rem 1rem;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
}

    .clientes-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }
    #clientes h2 {
    font-size: 2rem;
    color: #86895d;
    margin-bottom: 1rem;
}
    .cliente-item {
        max-width: 150px;
        padding: 12px;
    }
    .cliente-item img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .parallax-bg { 
        height: 70vh; 
    }
    .parallax-items .item h3 { 
        font-size: 1.2rem; 
    }
    .parallax-items .item p { 
        font-size: 0.9rem; 
    }
}