/* Variables CSS */
:root {
    --primary-color: #4CAF50; /* Verde del logo */
    --secondary-color: #2196F3; /* Azul del logo */
    --text-color: #333;
    --light-bg: #f8f8f8;
    --dark-bg: #2c3e50; /* Azul oscuro para el footer */
    --white: #fff;
    --font-family: 'Roboto', sans-serif;
    --header-height: 80px; /* Altura del header fijo */
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    scroll-behavior: smooth;
    padding-top: var(--header-height); /* Espacio para el header fijo */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--dark-bg);
    text-align: center;
}

h1 { font-size: 3.5em; }
h2 { font-size: 2.5em; }
h3 { font-size: 1.8em; }

p {
    margin-bottom: 15px;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Botones */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #1a7bc8; /* Azul ligeramente más oscuro */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: #3b8e3f; /* Verde ligeramente más oscuro */
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9em;
    margin-top: 15px;
}

/* Header */
.header {
    background-color: var(--white);
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 60px; /* Ajusta el tamaño de tu logo */
    vertical-align: middle;
}

.nav-list {
    list-style: none;
    display: flex;
}

.nav-list li {
    margin-left: 35px;
    position: relative; /* Para el submenu */
}

.nav-list a {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
    display: block; /* Para que el padding y hover funcionen mejor en el menú desplegable */
}

.nav-list a:hover {
    color: var(--primary-color);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

/* Dropdown Menu (Submenu) */
.nav-list .dropdown .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    min-width: 220px;
    z-index: 100;
    list-style: none;
    padding: 10px 0;
    border-radius: 5px;
}

.nav-list .dropdown:hover .submenu {
    display: block;
}

.nav-list .dropdown .submenu li {
    margin: 0;
}

.nav-list .dropdown .submenu li a {
    padding: 10px 20px;
    color: var(--text-color);
    white-space: nowrap;
}

.nav-list .dropdown .submenu li a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.nav-list .dropdown .submenu li a::after { /* Eliminar el subrayado en el submenu */
    display: none;
}

.nav-list .dropdown i.fa-chevron-down {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-list .dropdown:hover i.fa-chevron-down {
    transform: rotate(180deg);
}


.hamburger {
    display: none; /* Oculto por defecto en desktop */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    
}

.hamburger .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Hero Slider Section (Index Page) */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height)); /* Ajusta la altura */
    overflow: hidden;
}

.slider-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    z-index: 1;
}

.slider-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Overlay */
    z-index: -1;
}

.slider-image.active {
    opacity: 1;
    z-index: 2;
}

.slider-content {
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.slider-content h1 {
    font-size: 4.5em;
    margin-bottom: 25px;
    color: var(--white);
}
.slider-content h2 {
    font-size: 2.5em;
    margin-bottom: 25px;
    color: #d6d4d1;
}

.slider-content p {
    font-size: 1.8em;
    margin-bottom: 30px;
    color: var(--white);
}

.slider-nav-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background-color: var(--white);
    transform: scale(1.2);
}


/* Hero de Páginas Internas */
.hero-internal {
    background-size: cover;
    background-position: center;
    height: 40vh; /* Altura más pequeña para páginas internas */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
    padding-top: var(--header-height); /* Para que el hero no quede bajo el header */
}

.hero-internal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* Overlay */
}

.hero-internal .hero-content {
    position: relative; /* Para que el texto esté sobre el overlay */
    z-index: 1;
    padding-top: 0; /* Eliminar padding extra del slider content */
}

.hero-internal .hero-content h1 {
    font-size: 3.5em;
    color: var(--white);
}

.hero-internal .hero-content p {
    font-size: 1.5em;
    color: var(--white);
}


/* Secciones de Contenido General (para todas las páginas) */
.content-section .text-block {
    max-width: 900px;
    margin: 0 auto 50px auto;
    text-align: center;
}

.content-section .text-block p {
    font-size: 1.1em;
    line-height: 1.8;
}

/* Company Features (Index Page) */
.company-features {
    list-style: none;
    text-align: center;
    margin-bottom: 50px;
}

.company-features li {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.company-features li strong {
    color: var(--primary-color);
}

.mission-vision-grid {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.mission, .vision {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.mission h3, .vision h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.mission p, .vision p {
    color: #666;
}

/* Cuadrículas de Items/Features/Productos */
.solution-grid, .feature-grid, .product-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.solution-item, .feature-item, .product-category-item {
    background-color: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.solution-item:hover, .feature-item:hover, .product-category-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.solution-item .icon {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.feature-item img, .product-category-item img {
    max-width: 100%;
    height: 200px; /* Altura fija para las imágenes */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.solution-item h3, .feature-item h3, .product-category-item h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-size: 1.6em;
}

.solution-item p, .feature-item p, .product-category-item p {
    font-size: 1em;
    color: #666;
    flex-grow: 1; /* Permite que el párrafo ocupe el espacio disponible */
}

/* Product Detail Section (F100, F200 pages) */
.product-detail-section .product-features {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 50px;
}

.product-detail-section .feature-row {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Para responsividad */
}

.product-detail-section .feature-row.reverse {
    flex-direction: row-reverse;
}

.product-detail-section .feature-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.product-detail-section .feature-text h2,
.product-detail-section .feature-text h3 {
    text-align: left;
    color: var(--primary-color);
}
.product-detail-section .feature-text h3 {
    margin-bottom: 10px;
    font-size: 1.6em;
    color: var(--secondary-color);
}
.product-detail-section .feature-text h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: #555;
}


.product-detail-section .feature-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.product-detail-section .feature-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-detail-section .grid-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.product-detail-section .feature-item-small {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.product-detail-section .feature-item-small h3 {
    font-size: 1.2em;
    margin: 0;
    color: var(--primary-color);
    text-align: center;
}


/* Especificaciones Técnicas */
.specifications-section {
    margin-top: 80px;
    text-align: center;
}

.specifications-section h2 {
    color: var(--primary-color);
    margin-bottom: 40px;
}

.specifications-section .specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: left;
}

.specifications-section .spec-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.specifications-section .spec-item h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-align: left;
}

.specifications-section .spec-item ul {
    list-style: none;
}

.specifications-section .spec-item ul li {
    margin-bottom: 10px;
    color: #555;
}

.specifications-section .spec-item ul li strong {
    color: var(--dark-bg);
}


/* Call to Action Small (dentro de secciones) */
.call-to-action-small {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 8px;
}

.call-to-action-small p {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--white);
}

.call-to-action-small .btn {
    background-color: var(--secondary-color);
    color: var(--white);
}

.call-to-action-small .btn:hover {
    background-color: #1a7bc8;
}


/* Sección de CTA Final (Index Page) */
.cta-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('assets/images/agro_maquinaria.webp') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    font-size: 3em;
}

.cta-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: var(--white);
}

/* Contact Section */
.contact-section .contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin-top: 40px;
}

.contact-section .contact-form,
.contact-section .contact-info-block {
    flex: 1;
    min-width: 300px;
    max-width: 550px;
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-section .contact-form h3,
.contact-section .contact-info-block h3 {
    text-align: left;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.contact-section .contact-form input,
.contact-section .contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1em;
}

.contact-section .contact-form textarea {
    resize: vertical;
}

.contact-section .contact-form button {
    width: auto;
    padding: 14px 30px;
    font-size: 1.1em;
}

.contact-section .contact-info-block p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    color: #555;
}

.contact-section .contact-info-block p i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.3em;
    line-height: 1.6; /* Align icon vertically with text */
}

.contact-section .contact-info-block p a {
    color: #555;
}

.contact-section .social-links-contact {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    text-align: left;
}

.contact-section .social-links-contact h4 {
    margin-bottom: 15px;
    color: var(--dark-bg);
    font-size: 1.2em;
}

.contact-section .social-links-contact a {
    font-size: 2em;
    margin-right: 20px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.contact-section .social-links-contact a:hover {
    color: var(--primary-color);
}

.map-container {
    width: 100%;
    height: 450px;
    margin-top: 60px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}


/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 50px 0 20px 0;
    font-size: 0.95em;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 30px;
    text-align: left;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin: 20px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: left;
}

.footer-section p, .footer-section ul {
    color: #bbb;
    list-style: none;
}

.footer-section p i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.1em;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bbb;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.social-icons a {
    color: var(--white);
    font-size: 1.8em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    width: 100%;
    text-align: center;
    font-size: 0.85em;
    color: #999;
}


/* Responsive Design */
@media (max-width: 992px) {
    /* Ajustes para tabletas y pantallas medianas */
    .header .container {
        flex-wrap: wrap; /* Permite que los elementos del header se envuelvan */
    }
    .nav-menu {
        /* ... tus estilos existentes ... */
        width: 100%;
        order: 3;
        max-height: 0; /* Oculta el menú por defecto en pantallas pequeñas */
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        background-color: #f8f8f8; /* Un fondo para el menú desplegado */
        position: absolute; /* Posiciona el menú debajo del header */
        top: 100%; /* Justo debajo del header */
        left: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }
    .nav-menu.active {
        max-height: 400px; /* Muestra el menú cuando está activo (clic en hamburguesa) */
    }
    .nav-list {
        flex-direction: column; /* Apila los elementos del menú verticalmente */
        padding: 20px 0;
    }
    .nav-list li {
        margin: 10px 0; /* Espaciado vertical para los ítems del menú */
    }
    .nav-list a {
        display: block;
        padding: 10px 20px;
        color: #333;
    }
    .nav-list a:hover {
        background-color: #e9e9e9;
    }

    /* Estilos para el submenú en pantallas pequeñas */
    .nav-list .dropdown .submenu {
        position: static; /* Importante para que no flote y ocupe su espacio en el flujo del documento */
        box-shadow: none; /* Elimina la sombra que podría tener en desktop */
        background-color: transparent; /* Fondo transparente o el que prefieras para el submenú móvil */
        padding: 0;
        margin-top: 5px;
        max-height: 0; /* Por defecto oculto en móvil */
        overflow: hidden; /* Para que no se vea el contenido cuando está oculto */
        transition: max-height 0.3s ease-in-out; /* Animación para el despliegue */
        width: 100%; /* Asegura que ocupe todo el ancho disponible */
        text-align: center; /* Centra los elementos del submenú */
    }
    .nav-list .dropdown .submenu.active { /* Clase activada por JS para mostrar submenú */
        max-height: 200px; /* Suficiente altura para mostrar todos los ítems */
    }
    .nav-list .dropdown .submenu li a {
        padding: 10px 0; /* Ajusta el padding vertical */
        color: #555; /* Color del texto para los ítems del submenú */
        font-size: 0.9em; /* Un poco más pequeño si lo deseas */
        border-bottom: 1px solid #eee; /* Separador entre ítems */
    }
    .nav-list .dropdown .submenu li:last-child a {
        border-bottom: none; /* No poner borde en el último ítem */
    }

    .nav-list .dropdown .submenu li a:hover {
        background-color: #f0f0f0; /* Color al pasar el ratón */
    }
    .nav-list .dropdown:hover i.fa-chevron-down {
        transform: rotate(0deg); /* Desactiva la rotación de la flecha en móviles */
    }

    /* Hamburguesa: visible en pantallas pequeñas */
    .hamburger {
        display: flex;
        margin-left: auto; /* Empuja el botón a la derecha */
    }
    /* Animación del botón de hamburguesa al hacer clic */
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Ajustes de tamaño de fuente para el slider y héroes */
    .slider-content h1 { font-size: 3.5em; }
    .slider-content p { font-size: 1.4em; }
    .hero-internal .hero-content h1 { font-size: 3em; }
    .hero-internal .hero-content p { font-size: 1.2em; }

    /* Columnas se apilan en una sola columna */
    .solution-grid, .feature-grid, .product-category-grid, .mission-vision-grid, .product-detail-section .feature-row, .product-detail-section .grid-columns, .specifications-section .specs-grid, .contact-section .contact-content {
        grid-template-columns: 1fr; /* Una sola columna */
        flex-direction: column; /* Apila los elementos verticalmente para flexbox */
    }
    .product-detail-section .feature-row.reverse {
        flex-direction: column; /* Resetea la dirección inversa para que se apilen */
    }
    .footer-content {
        flex-direction: column; /* Apila las secciones del footer */
        align-items: center; /* Centra las secciones del footer */
    }
    .footer-section {
        text-align: center; /* Centra el texto en las secciones del footer */
        margin-bottom: 30px;
    }
    .footer-section h3 {
        text-align: center; /* Centra el título en las secciones del footer */
    }
}

@media (max-width: 768px) {
    /* Ajustes adicionales para pantallas más pequeñas (teléfonos grandes) */
    h1 { font-size: 2.8em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
    .slider-content h1 { font-size: 2.8em; }
    .slider-content p { font-size: 1.2em; }
    .hero-internal .hero-content h1 { font-size: 2.5em; }
    .hero-internal .hero-content p { font-size: 1em; }
    .section-padding { padding: 50px 0; } /* Menor padding para las secciones */
    .btn { padding: 10px 20px; font-size: 0.9em; } /* Botones más pequeños */
}

@media (max-width: 480px) {
    /* Ajustes para teléfonos pequeños */
    .logo img { height: 50px; } /* Logo más pequeño */
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    .slider-content h1 { font-size: 2.2em; }
    .slider-content p { font-size: 1em; }
    .hero-internal .hero-content h1 { font-size: 2em; }
    .hero-internal .hero-content p { font-size: 0.9em; }
    .footer-section p i { font-size: 1em; }
    .social-icons a { font-size: 1.5em; }
}

/* Imagenes Responsivas */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.product-features.grid-columns .feature-item-small {
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    padding: 16px;
    text-align: center;
}

.product-features.grid-columns .feature-item-small:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    transform: translateY(-6px) scale(1.05);
    background: #e2e6f1;
}

.product-features.grid-columns .feature-item-small img {
    transition: transform 0.3s;
    max-width: 80px;
}

.product-features.grid-columns .feature-item-small:hover img {
    transform: scale(1.15) rotate(-4deg);
}