/* ===========================
   ESTILOS GENERALES
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d5016;
    --secondary-color: #4a7c2c;
    --accent-color: #7cb342;
    --light-bg: #f5f5f5;
    --dark-text: #333333;
    --light-text: #666666;
    --border-color: #ddd;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden; /* Previene el scroll horizontal si un elemento se sale */
}

/* ===========================
   NAVEGACIÓN
   =========================== */

.navbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 5px;
}

.logo-text {
    color: var(--white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-direction: row;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.menu-toggle.active {
    transform: rotate(90deg);
}

/* ===========================
   BOTÓN FLOTANTE DE CONTACTO
   =========================== */

.floating-contact-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    font-weight: bold;
    flex-direction: column;
    gap: 2px;
    animation: pulse 2s infinite;
}

.floating-contact-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(45, 80, 22, 0.6);
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-text {
    font-size: 0.7rem;
    text-align: center;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(45, 80, 22, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(45, 80, 22, 0.7);
    }
}

/* ===========================
   HERO SECTION - RESPONSIVE CON RELACIÓN DE ASPECTO
   =========================== */

.hero {
    position: relative;
    overflow: hidden;
}

.hero-banner {
    width: 100%;
    padding-top: 41.66%; /* Relación de aspecto 1440:600 (600/1440 = 0.4166) */
    height: 0;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--accent-color);
    position: relative;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(45, 80, 22, 0.9), transparent);
    padding: 3rem 0;
    text-align: center;
    color: var(--white);
    z-index: 10;
}

.hero-overlay h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
}

/* ===========================
   INTRO SECTION
   =========================== */

.intro-section {
    background-color: var(--light-bg);
    padding: 3rem 0;
    text-align: center;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===========================
   MAIN SERVICES - RESPONSIVE
   =========================== */

.main-services {
    padding: 4rem 0;
    background-color: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.service-banner {
    width: 100%;
    max-width: 300px;
    height: 150px;
    background-color: var(--light-bg);
    overflow: hidden;
    margin: 0 auto;
}

.service-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.service-content p {
    color: var(--light-text);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.service-content .service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-content .service-list li {
    color: var(--light-text);
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
}

.service-content .service-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* ===========================
   CTA SECTION
   =========================== */

.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #9ccc65;
    transform: scale(1.05);
}

/* ===========================
   ABOUT SECTION
   =========================== */

.about-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.about-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.about-content p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
    font-size: 1rem;
}

.mission-vision-box {
    background-color: #f0f7e8;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    border-left: 4px solid var(--accent-color);
}

.mission-vision-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.mission-vision-box p {
    color: var(--light-text);
    line-height: 1.8;
}

/* ===========================
   SERVICIOS SECTION
   =========================== */

.services-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.services-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    color: var(--light-text);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.services-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-category {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.service-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    color: var(--light-text);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.6;
}

.service-list li:last-child {
    border-bottom: none;
}

.quote-button-container {
    text-align: center;
    margin: 2rem 0;
}

.quote-button {
    display: inline-block;
    margin: 0;
}

.additional-text {
    background-color: #f0f7e8;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    text-align: center;
    margin-top: 2rem;
}

.additional-text p {
    color: var(--light-text);
    line-height: 1.8;
}

/* ===========================
   FINAL BANNER SECTION - RESPONSIVE
   =========================== */

.final-banner-section {
    width: 100%;
    height: 300px;
    background-color: var(--light-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===========================
   CONTACT SECTION
   =========================== */

.contact-section {
    padding: 4rem 0;
    background-color: var(--white);
}

.contact-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form-container h3,
.contact-info-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.contact-form {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    width: 100%; /* Asegura que el formulario no exceda el ancho de su contenedor */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(124, 179, 66, 0.3);
}

.captcha-group {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 5px;
    border: 2px solid var(--accent-color);
}

.captcha-group label {
    font-size: 0.95rem;
}

.captcha-group input {
    margin-top: 0.5rem;
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.submit-button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.02);
}

.form-note {
    margin-top: 1rem;
    color: var(--light-text);
    font-size: 0.85rem;
    line-height: 1.6;
}

.contact-info-container {
    display: flex;
    flex-direction: column;
}

.contact-info {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--light-text);
    line-height: 1.6;
}

.info-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.map-placeholder {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center; /* Centra el contenido del placeholder (el iframe) */
}

.map-note {
    margin-top: 1rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
}

/* ===========================
   RESPONSIVE DESIGN - TABLETS
   =========================== */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Cuando se muestre el menú (via JavaScript), se mostrará como columna */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 1rem 0;
        gap: 0;
        z-index: 998;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 1.5rem;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-overlay h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cta-section h2 {
        font-size: 1.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-container {
        order: 1;
    }

    .contact-info-container {
        order: 2;
    }

    .services-grid-detailed {
        grid-template-columns: 1fr;
    }

    .floating-contact-btn {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
        padding: 5px;
    }

    .contact-icon {
        font-size: 1.3rem;
    }

    .contact-text {
        font-size: 0.65rem;
    }

    .final-banner-section {
        height: 200px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-info {
        padding: 1.5rem;
    }
}

/* ===========================
   RESPONSIVE DESIGN - MÓVILES
   =========================== */

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .nav-links {
        top: 50px;
    }

    .hero-overlay h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .about-section h2,
    .services-section h2,
    .contact-section h2 {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .floating-contact-btn {
        width: 50px;
        height: 50px;
        bottom: 10px;
        right: 10px;
        padding: 5px;
    }

    .contact-icon {
        font-size: 1.2rem;
    }

    .contact-text {
        font-size: 0.6rem;
    }

    .mission-vision-box {
        padding: 1.5rem;
    }

    .mission-vision-box h3 {
        font-size: 1.1rem;
    }

    .service-category {
        padding: 1.5rem;
    }

    .final-banner-section {
        height: 150px;
    }

    .contact-form {
        padding: 1.5rem;
        width: 100%;
    }

    .contact-info {
        padding: 1.5rem;
        width: 100%;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }

    .submit-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ===========================
   RESPONSIVE DESIGN - ULTRA PEQUEÑOS
   =========================== */

@media (max-width: 360px) {
    .hero-overlay h1 {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .services-grid {
        gap: 1rem;
    }

    .service-banner {
        height: 80px;
    }

    .service-content {
        padding: 1rem;
    }

    .service-content h3 {
        font-size: 1rem;
    }

    .service-content p {
        font-size: 0.9rem;
    }

    .final-banner-section {
        height: 120px;
    }
}
