/* --- VARIABLES & GLOBAL STYLES --- */
:root {
    --primary-color: #D35400; /* Naranja más oscuro */
    --accent-color-gold: #af9609;  /* Dorado para acentos */
    --leaf-green-color: #3B7A57; /* Verde específico para hoja */
    --white-color: #FFFFFF;
    --dark-gray-color: #333333;
    --light-gray-color: #f4f4f4;
    --font-title: 'Bebas Neue', sans-serif;
    --font-text: 'Open Sans', sans-serif;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-text);
    color: var(--dark-gray-color);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-family: var(--font-title);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title h2 {
    margin-bottom: 0.5rem;
}
.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #A84300; /* Naranja más oscuro (hover) */
    transform: translateY(-2px);
}

/* --- UTILITIES --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- HEADER & NAVIGATION --- */
.header {
    background-color: var(--primary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between; /* Cambiado para separar logo y menú */
    align-items: center;
    height: 80px;
}

.nav-logo {
    display: block; /* Hacer visible el logo */
    height: 60px; /* Altura proporcional a la barra */
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--white-color); /* Texto blanco para contraste */
    text-decoration: none;
    font-weight: bold;
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--white-color); /* Subrayado blanco */
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white-color); /* Barras blancas */
    transition: all 0.3s ease-in-out;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 56.25vw; /* 16:9 aspect ratio */
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* --- SERVICES SECTION --- */
#servicios { background-color: var(--white-color); }

.services-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    text-align: left;
}

.services-title-image {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
}

.services-title-text {
    max-width: 500px;
}

.services-grid-updated {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.service-card-updated {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-card-updated:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.service-icon-updated {
    font-size: 2.5rem;
    color: var(--primary-color);
    background-color: var(--white-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-text-updated h3 {
    margin-bottom: 0.5rem;
}

.service-highlights {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--white-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.highlight-item .fa-certificate {
    color: var(--accent-color-gold);
}

.highlight-item .fa-leaf {
    color: var(--leaf-green-color);
}

.professional-note {
    background-color: #fff3e0; /* Naranja muy claro */
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem auto 0;
    max-width: 800px;
    text-align: center;
    border-radius: 0 8px 8px 0;
}

/* --- BLOG SECTION (from blog.html) --- */
.blog-page-main {
    padding: 4rem 0;
}

.blog-layout {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article {
    background-color: var(--white-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 4rem;
    overflow: hidden;
}

.blog-article-header img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.blog-article-header h2 {
    padding: 2rem 2rem 0 2rem;
    font-size: 2rem;
}

.blog-article-content {
    padding: 2rem;
}

.blog-article-content h3 {
    font-size: 1.6rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-article-content h4 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-article-content ul {
    list-style-position: inside;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.blog-article-conclusion {
    background-color: var(--light-gray-color);
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    border-radius: 8px;
}

.blog-article-conclusion p {
    margin-bottom: 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

/* --- FAQ SECTION --- */
#faq { background-color: var(--light-gray-color); }

.faq-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    text-align: left;
}

.faq-title-image {
    max-width: 80px;
    height: auto;
    border-radius: 10px;
}

.faq-title-text {
    max-width: 500px;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white-color);
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--light-gray-color);
}

/* --- CONTACT SECTION --- */
#contacto { background-color: var(--light-gray-color); }

/* --- CTA SECTION --- */
.section-cta {
    background-color: var(--dark-gray-color);
    color: var(--white-color);
    padding: 4rem 0;
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    color: var(--white-color);
    font-size: 2.2rem;
}

.cta-content p {
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.cta-content .btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    font-weight: bold;
}

.cta-content .btn:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

.contact-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white-color);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-top: -3.75rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.contact-info a {
    color: var(--dark-gray-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.garantia-exito {
    font-family: var(--font-title);
    font-weight: bold;
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    border-top: 2px solid var(--light-gray-color);
    padding-top: 2rem;
}

.contact-info .btn-whatsapp {
    background-color: #25D366;
    color: var(--white-color) !important; /* Asegura que el texto sea blanco */
    margin-top: 1rem;
}

.contact-info .btn-whatsapp i {
    color: var(--white-color); /* El ícono también será blanco */
}

.btn-whatsapp:hover {
    background-color: #1EBE57;
    transform: translateY(-2px);
}


/* --- FOOTER --- */
.footer {
    background-color: var(--dark-gray-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .services-grid-updated {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    section { padding: 3rem 0; }

    .navbar {
        justify-content: space-between; /* Alinear logo y hamburguesa */
        position: relative; /* Ancla para elementos hijos */
    }

    .nav-logo {
        height: 50px; /* Reducir tamaño del logo en móvil */
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--dark-gray-color); /* Fondo oscuro para menú móvil */
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        gap: 1.5rem;
        padding-top: 2rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: block; /* Mostrar la hamburguesa */
        cursor: pointer;
    }

    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-motto {
        font-size: 1.4rem;
    }

    .service-highlights {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .services-title-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .faq-title-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .hero h1, .hero-motto {
        word-break: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }

    .hero {
        height: 49vh; /* Adjusted from 54vh */
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url('../portada/limpio_movil.png');
    }

    .hero::before {
        background-image: url('../portada/plaga_movil.png');
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-motto {
        font-size: 1.2rem;
    }
}

/* --- TEXT ALIGNMENT --- */
.services-title-text p,
.service-text-updated p,
.faq-answer,
.blog-article-content,
.professional-note p {
    text-align: justify;
}

@media (max-width: 768px) {
    .services-title-text p,
    .service-text-updated p,
    .faq-answer,
    .blog-article-content,
    .professional-note p {
        text-align: left;
    }
}

/* --- INSECT ANIMATION --- */
.animated-insect {
    position: fixed;
    width: 25px;
    height: 25px;
    z-index: 99; /* Debajo del header pero encima de casi todo */
    pointer-events: none; /* No interfiere con los clics */
    opacity: 0;
    will-change: transform, opacity; /* Optimización para navegadores */
}

.animated-insect svg {
    width: 100%;
    height: 100%;
}

.move-style-1 {
    animation: zigzag1 10s linear forwards;
}

.move-style-2 {
    animation: zigzag2 10s linear forwards;
}

@keyframes zigzag1 {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    25% { transform: translate(80px, -50px) rotate(45deg); }
    50% { transform: translate(-30px, 60px) rotate(-30deg); }
    75% { transform: translate(100px, -40px) rotate(60deg); }
    90% { opacity: 1; }
    100% { transform: translate(20px, 80px) rotate(0deg); opacity: 0; }
}

@keyframes zigzag2 {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    25% { transform: translate(-60px, 40px) rotate(-25deg); }
    50% { transform: translate(40px, -70px) rotate(50deg); }
    75% { transform: translate(-80px, 30px) rotate(-40deg); }
    90% { opacity: 1; }
    100% { transform: translate(-20px, -90px) rotate(0deg); opacity: 0; }
}

/* --- MOBILE EMAIL FIX --- */
@media (max-width: 480px) {
  .contact-email a {
    word-wrap: break-word;
    word-break: break-all;
  }
}

/* --- MOBILE LANDSCAPE VIDEO FIX --- */
@media (max-width: 926px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }
}
