/* 1. Reset Básico y Tipografía Global */
body {
    margin: 0; 
    font-family: 'Montserrat', Arial, Helvetica, sans-serif ;
    background-color: #ffffff; 
    color: #555555; 
    padding-top: 200px; /* Compensa header fijo con logo grande */
}

/* 2. Encabezado */
header {
    background-color: #ffffff;
    color: #555555;      
    padding: 20px;
    margin-bottom: 200px; 
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%; 
    z-index: 1000; 
    transition: padding 0.3s ease, all 0.3s ease; 
    box-sizing: border-box;
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
}

.header-small {
    padding-top: 10px;
    padding-bottom: 10px;
}


/* Logo */
.logo img {
    height: 160px; 
    transition: height 0.3s ease; 
    width: auto;  
    display: block; 
}

.header-small .logo img {
    height: 60px; 
}

.header-small nav a {
    padding: 5px 5px; 
}

.logo a {
    text-decoration: none; 
    display: block; 
}

.logo {
    margin: 0; 
}

/* 3. Navegación */
nav ul {
    list-style: none; 
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none; 
    color: inherit; 
    text-transform: uppercase;
    display: block; 
    padding: 5px 10px;
    border-bottom: 3px solid transparent;
}

nav a:hover {
    border-bottom: 3px solid #87aa1f;
    text-decoration-color:#87aa1f;
}

/* 4. Contenido principal */
main {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 0px rgba(0, 0, 0, 0.1);
    border-radius: 0%;
}

/* 6. Portada (Hero Section) */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 600px;
    margin-bottom: 0px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    opacity: 0.65; 
    transition: opacity 1.5s ease-in;
    padding-bottom: 30px;
}

.hero-content {
    position: absolute;
    top: 0%;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; 
    transform: translateY(30px);
    transition: opacity 1s ease-out 0.3s, transform 1s ease-in 0.3s; 
    background-color: rgba(0, 0, 0, 0.65);
    padding: 120px 40px;
    padding-right: 50%;
    padding-top: 15%;
    padding-bottom: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    text-align: left;
    font-weight: 700;
    z-index: 2;
}

#Portada.is-loaded {
    opacity: 1;
}

.hero-content.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Carrusel portada */
.portada-carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.portada-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.hero-content-wrapper {
    max-width: 800px;
    padding: 10px;
    background-color: rgba(0, 100, 0, 0.7);
    border-radius: 10px;
    opacity: 0; 
    transform: translateY(20px);
    transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.5s; 
}

.hero-content-wrapper.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.portada-carousel-wrapper {
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    display: flex;
}

.hero-content h3 {
    margin: 0 0 10px 0;
    line-height: 1.2;
    text-transform: uppercase;
    font-size: 2em;
}

.hero-content h2 {
    font-size: 3em;
}

.hero-content p {
    font-size: 1.1em;
    margin-top: 20px;
    line-height: 1.5;
    max-width: 80%;
}

/* Puntos de navegación portada */
#Portada .slider-nav {
    position: absolute;
    z-index: 3;
    display: flex;
    gap: 10px;
    padding-bottom: 1%;
}

#Proyectos .slider-nav,
#Productos .slider-nav,
#Nosotros .slider-nav {
    position: absolute;
    top: 95%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: auto;
    right: auto;
    z-index: 3;
    display: flex;
    gap: 10px;
    padding-bottom: 0;
}

.dot {
    width: 20px;
    height: 20px;
    background-color: #555555;
    border-radius: 100%;
    cursor: pointer;
}

.dot.active {
    background-color: #87aa1f;
    border-color: #87aa1f;
}

/* Main sin márgenes para hero full width */
main {
    margin: 0;
    max-width: 100%;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

/* 8. Secciones de contenido (Proyectos, Productos, Nosotros) */
.content-section {
    padding-top: 80px;
    padding-bottom: 0px;
    min-height: 650px;
    display: flex;
    align-items: center;
    margin-top: 0;
    margin-bottom: 0;
    background-color: #ffffff;
    border-radius: 0;
    padding-left: 3%;
    padding-right: 3%;
    box-sizing: border-box;

    /* Animación de aparición */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.reveal {
    opacity: 1;
    transform: translateY(0);
}

.content-section .image-half {
    flex: 1;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    background-color: white;
    padding-bottom: 40px;
    padding-top: 10px;
}

.content-section .image-half img {
    height: 100%;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

.content-section .text-half {
    flex: 1;
    max-width: 50%;
    padding: 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.content-section .text-half h2 {
    font-size: 3.5em;
    margin-top: 0;
    margin-bottom: 15px;
    color: #555555;
    text-transform: uppercase;
}

.content-section .text-half p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #555555;
    max-width: 80%;
}

/* Botón */
.button {
    display: inline-block;
    background-color: #87aa1f;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #87aa1f;
}

/* Carrusel Proyectos/Productos/Nosotros */
.carousel-container {
    max-width: 100%; 
    height: 650px;
    position: relative;
    margin: auto;
    overflow: visible; 
}

.carousel-slide {
    display: none; 
    height: 100%;
}

.carousel-container img {
    width: 100%; 
    height: 100%; 
    display: block;
    object-fit: cover; 
}

/* Animación de deslizamiento de imágenes de proyectos */
.slide-in {
    -webkit-animation-duration: 0.5s; 
    animation-duration: 0.5s;
    -webkit-animation-name: slideInFromRight;
    animation-name: slideInFromRight;
}

@-webkit-keyframes slideInFromRight {
    from {
        -webkit-transform: translateX(100%);
        opacity: 0.8;
    } 
    to {
        -webkit-transform: translateX(0);
        opacity: 1;
    }
}
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0.8;
    } 
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================== */
/* 12. CARRUSEL DE LOGOS CLIENTES */
/* ============================== */

#Clientes h2 {
    font-size: 0;
    margin: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
}

#Clientes p {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 60px;
}

.clientes-full-width {
    max-width: 100%;
}

/* Sección Clientes */
#Clientes {
    margin-top: 0;
    margin-bottom: 40px;
    padding: 20px 50px;
}

/* Contenedor de cada línea de logos */
.logos-slider-container {
    width: 100%;
    overflow: hidden;
    margin-bottom: 24px;
}

/* Track de logos que se desplaza */
.logos-slide {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    animation: slide-logos 50s linear infinite;
}

/* Línea central en sentido inverso */
.linea-2 .logos-slide {
    animation-direction: reverse;
}

/* Tamaño y espaciado de los logos */
.logos-slide img {
    height: 80px;
    margin: 0 40px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Animación infinita sin corte (mitad del track) */
@keyframes slide-logos {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* 13. Animación general de revelado portada */
.fade-out-start {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease-out, visibility 1.5s ease-out;
}

.fade-in-end {
    opacity: 1;
    visibility: visible;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Ajuste de scroll para secciones ancladas desde el menú */
#Productos,
#Proyectos,
#Nosotros,
#Contacto {
    scroll-margin-top: 150px;
}

footer {
    background-color: #87aa1f;
    color: #ffffff;
    text-align: center;
    padding: 10px;
    position: relative; 
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

/* ================================================= */
/* ================ FOOTER 2 COLUMNAS ============== */
/* ================================================= */

/* CONTENEDOR GENERAL */
.footer-container {
    display: flex;
    justify-content: center;      /* centramos el formulario */
    align-items: flex-start;
    gap: 60px;
    flex-wrap: wrap;
    padding: 20px 3%;             /* margen lateral */
}

/* Columnas */
.footer-col {
    flex: 1;
    min-width: 300px;
}

/* ================================================= */
/* ================ COLUMNA CONTACTO =============== */
/* ================================================= */

.footer-info {
    text-align: left;
    margin-left: 3%;              /* 🔧 nuevo: margen izquierdo solicitado */
}

.footer-info h2 {
    margin-bottom: 15px;
}

/* Texto + íconos */
.footer-info p {
    margin: 6px 0;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Íconos SVG */
.footer-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.footer-icon svg {
    width: 100%;
    height: 100%;
    fill: #ffffff; /* blanco o cambia a #A0C430 si quieres */
}

/* ================================================= */
/* =================== FORMULARIO ================== */
/* ================================================= */

.footer-form {
    display: flex;
    flex-direction: column;
    align-items: center;          /* 🔧 nuevo: centra formulario */
    text-align: center;
}

.footer-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 600px;             /* 🔧 nuevo: tamaño más armónico */
}

.footer-form input,
.footer-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    background-color: #ffffff;
    color: #000;
    font-size: 0.95em;
}

.footer-form textarea {
    min-height: 90px;
    resize: vertical;
}

.footer-form button {
    padding: 12px;
    background-color: #A0C430;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.footer-form button:hover {
    background-color: #7a9a23;
}

/* ================================================= */
/* =================== LÍNEA FINAL ================= */
/* ================================================= */

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.85em;
    opacity: 0.7;
}

/* ================================================= */
/* ==================== RESPONSIVE ================= */
/* ================================================= */

@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 50px;
    }

    .footer-info {
        margin-left: 0;   /* centra en móvil */
        text-align: center;
    }

    .footer-info p {
        justify-content: center;
    }
}