/* --- CONFIGURACIÓN DE TIPOGRAFÍAS Y COLORES --- */
:root {
    --titulos-font: 'Neue Haas Grotesk', 'Helvetica Neue', Arial, sans-serif;
    --texto-font: 'Garamond', Georgia, serif;
    
    --color-verde-nosotros: #6d602b; 
    --color-crema-texto: #fffbf3;
    --color-cafe-oscuro: #35321e;
    --color-beige-servicios: #d6c7ae;
    --color-beige-blog: #fcf1da;
    --color-fondo-contacto: #4d3f30;
    --color-oval-nav: #2d5a27; 
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--texto-font);
    color: var(--color-cafe-oscuro);
    background-color: var(--color-crema-texto);
    line-height: 1.6;
}

/* --- BARRA DE NAVEGACIÓN --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    position: relative;
}

.nav-menu a {
    font-family: var(--texto-font);
    text-decoration: none;
    color: var(--color-cafe-oscuro);
    padding: 8px 18px;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
    z-index: 2;
}

.nav-indicator {
    position: absolute;
    height: 100%;
    background-color: var(--color-oval-nav);
    border-radius: 25px;
    z-index: 1;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.nav-menu a.active {
    color: #ffffff;
}

/* --- SECCIÓN INICIO / HERO --- */
#inicio {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    overflow: hidden;
}

/* REQUISITO: Imagen que ocupa toda la pantalla de inicio */
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Capa de contraste opcional para que tus letras crema resalten más sobre cualquier foto */
#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25); 
    z-index: 2;
}

.hero-content {
    position: relative;
    text-align: left;
    z-index: 3; /* Por encima de la imagen y la capa de contraste */
}

#inicio h1 {
    font-family: var(--titulos-font);
    font-size: 4.5rem;
    color: var(--color-crema-texto);
    line-height: 1.1;
    margin-bottom: 30px;
}

.btn-conocenos {
    display: inline-block;
    font-family: var(--texto-font);
    color: var(--color-crema-texto);
    text-decoration: none;
    border: 1.5px solid var(--color-crema-texto);
    padding: 10px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-conocenos:hover {
    background-color: var(--color-crema-texto);
    color: var(--color-cafe-oscuro);
}

/* --- SECCIÓN NOSOTROS --- */
#nosotros {
    /* REQUISITO: Espacio de separación amplio entre Home y Nosotros */
    padding: 140px 50px 80px 50px; 
}

.nosotros-container {
    background-color: var(--color-verde-nosotros);
    border-radius: 15px;
    display: flex;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    /* REQUISITO: Rectángulo un poco menos alto */
    min-height: 480px; 
}

.nosotros-col-img {
    width: 50%;
}

.nosotros-col-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nosotros-col-text {
    width: 50%;
    padding: 45px 50px; /* Reduje el colchón interno para estilizar la altura */
    color: var(--color-crema-texto);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nosotros-col-text h2 {
    font-family: var(--titulos-font);
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.nosotros-col-text p {
    font-family: var(--texto-font);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.nosotros-stats {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 251, 243, 0.2);
    padding-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--titulos-font);
    font-size: 2.3rem;
    font-weight: bold;
}

.stat-label {
    font-family: var(--texto-font);
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- SECCIÓN PROYECTOS --- */
#proyectos {
    padding: 80px 50px;
}

#proyectos h2 {
    font-family: var(--titulos-font);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--color-cafe-oscuro);
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 0; /* Espacio para que el escalado no corte las tarjetas */
}

.carousel-track {
    display: flex;
    align-items: flex-start; /* Alinea los elementos arriba para que los textos no bailen */
    transition: transform 0.5s ease-in-out;
    width: calc(33.333% * 6); 
}

.carousel-item {
    width: calc(100% / 6);
    padding: 0 15px;
    text-align: center;
    /* REQUISITO: Los elementos no seleccionados se ven más pequeños de base */
    transform: scale(0.9); 
    opacity: 0.4;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* REQUISITO: El proyecto seleccionado se ve un poco más grande */
.carousel-item.center-item {
    transform: scale(1.05); 
    opacity: 1;
    z-index: 10;
}

/* REQUISITO: Imágenes poco menos altas en el carrusel */
.carousel-img-wrapper {
    width: 100%;
    height: 320px; /* Reducido de 400px a 320px */
    overflow: hidden;
    border-radius: 8px;
}

.carousel-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* REQUISITO: El texto se mantiene perfectamente abajo y visible al agrandar */
.carousel-item h3 {
    margin-top: 15px;
    font-family: var(--texto-font);
    font-size: 1.15rem;
    font-weight: normal;
    color: var(--color-cafe-oscuro);
    line-height: 1.3;
}

.carousel-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.btn-prev { left: 10px; }
.btn-next { right: 10px; }

/* --- SECCIÓN SERVICIOS --- */
#servicios {
    padding: 80px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hace que el contenedor del enlace se comporte correctamente y muestre la mano al pasar el cursor */
.servicio-link {
    display: block;
    cursor: pointer;
    text-decoration: none;
}

/* Opcional: Un sutil efecto para que la imagen se aclare un poquito al pasar el cursor, invitando al clic */
.servicio-link:hover .servicio-img-container img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

#servicios h2 {
    font-family: var(--titulos-font);
    font-size: 2.5rem;
    text-align: left;
    margin-bottom: 40px;
    color: var(--color-cafe-oscuro);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.servicio-card {
    background-color: var(--color-beige-servicios);
    padding: 40px;
    border-radius: 8px;
    color: var(--color-cafe-oscuro);
}

.servicio-card h3 {
    font-family: var(--titulos-font);
    font-size: 1.6rem;
    margin-bottom: 20px;
    min-height: 60px;
}

.servicio-img-container {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 4px;
}

.servicio-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.servicio-card p {
    font-family: var(--texto-font);
    font-size: 1.1rem;
}

/* --- SECCIÓN BLOG EDUCATIVO --- */
#blog-section {
    padding: 60px 50px;
}

.blog-container {
    background-color: var(--color-beige-blog);
    border-radius: 15px;
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-container h2 {
    font-family: var(--titulos-font);
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-cafe-oscuro);
}

.blog-sub {
    text-align: center;
    font-family: var(--texto-font);
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: var(--color-cafe-oscuro);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.blog-item {
    text-decoration: none;
    display: block;
}


.blog-img-wrapper {
    width: 100%;
    height: 300px; 
    overflow: hidden;
    border-radius: 6px;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease; /* Transición suave para el zoom */
}

/* REQUISITO: Efecto interactivo al pasar el cursor (Hover) */
.blog-item:hover .blog-img-wrapper img {
    transform: scale(1.08); /* La imagen crece sutilmente dentro de su contenedor */
}

.blog-item h3 {
    margin-top: 15px;
    font-family: var(--texto-font);
    font-weight: normal;
    font-size: 1.25rem;
    color: var(--color-cafe-oscuro);
}

/* --- SECCIÓN CONTACTO / FOOTER --- */
footer {
    background-color: var(--color-fondo-contacto);
    padding: 0;
    overflow: hidden;
}

.contacto-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

.contacto-textos {
    width: 55%;
    padding: 80px 60px;
    color: var(--color-crema-texto);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* REQUISITO: Letras de la frase principal del contacto un poco más pequeñas */
.contacto-titulo-principal {
    font-family: var(--titulos-font);
    font-size: 1.85rem; /* Ajustado a escala más compacta y fina */
    line-height: 1.35;
    margin-bottom: 40px;
    text-align: left;
}

.contact-info {
    text-align: left;
    padding-left: 10%; 
}

.contact-info p {
    font-family: var(--texto-font);
    font-size: 1.2rem;
    margin: 12px 0;
}

.contact-info a {
    color: var(--color-crema-texto);
    text-decoration: none;
}

.contacto-imagen {
    width: 45%;
}

.contacto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- RESPONSIVE / MÓVIL --- */
@media (max-width: 992px) {
    .nosotros-container, .contacto-wrapper { flex-direction: column; }
    .nosotros-col-img, .nosotros-col-text, .contacto-textos, .contacto-imagen { width: 100%; }
    .nosotros-container { min-height: auto; }
    .carousel-track { width: calc(50% * 6); }
    .servicios-grid { grid-template-columns: 1fr; }
    .contact-info { padding-left: 0; }
}

@media (max-width: 768px) {
    header { flex-direction: column; gap: 10px; padding: 10px; position: relative; }
    #inicio h1 { font-size: 2.8rem; }
    .carousel-track { width: calc(100% * 6); }
    .carousel-item { transform: scale(0.95); opacity: 0.5; }
    .carousel-item.center-item { transform: scale(1.02); opacity: 1; }
    .carousel-img-wrapper { height: 260px; }
    .blog-grid { grid-template-columns: 1fr; }
}