/* --- Variables --- */
:root {
    --primary-green: #2E7D32;
    --accent-gold: #F9A825;
    --dark-text: #333333;
    --light-text: #ffffff;
    --bg-light: #f4f7f6;
    --nav-height: 80px;
    --header-scroll-height: 70px;
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-scroll-height) + 20px);
}

body { 
    font-family: 'Open Sans', sans-serif; 
    color: var(--dark-text); 
    background-color: var(--bg-light); 
    line-height: 1.6; 
    overflow-x: hidden; 
}

/* Imágenes responsive por defecto */
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Header --- */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: all 0.3s ease;
}

header.sticky {
    height: var(--header-scroll-height);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo { display: flex; align-items: center; height: 100%; }
.logo img { height: 110px; width: auto; transition: 0.3s; object-fit: contain; }
header.sticky .logo img { height: 110px; }

/* --- Navegación Desktop --- */
.menu-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: var(--dark-text); }
.main-nav { display: flex; height: 100%; align-items: center; }

.main-nav > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.main-nav > li > a {
    padding: 0 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-text);
    text-transform: uppercase;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.main-nav > li > a:hover { color: var(--primary-green); background-color: rgba(46, 125, 50, 0.05); }

/* Utilitarios */
.flex-align { display: flex; align-items: center; gap: 8px; }
.flag-icon { width: 20px; }
.flag-icon-large { width: 30px; display: inline-block; vertical-align: middle; margin-right: 10px; }
.check-icon { color: var(--primary-green); margin-right: 8px; }

/* Descripción de drones JUSTIFICADA */
.drone-description { 
    margin: 20px 0;
    text-align: justify;       /* Justificado */
    -webkit-hyphens: auto;     /* Guiones Safari/iOS */
    -ms-hyphens: auto;         /* Guiones Edge/IE */
    hyphens: auto;             /* Guiones Estándar */
}

/* Dropdown Arrow Desktop */
.has-dropdown > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s;
}

.has-dropdown:hover > a::after { transform: rotate(180deg); }

/* Dropdowns Desktop */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-top: 3px solid var(--primary-green);
    z-index: 999;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
    height: auto;
    text-transform: none;
    white-space: normal;
}

.dropdown li a:hover {
    background-color: #f9f9f9;
    color: var(--primary-green);
    padding-left: 25px;
}

/* --- HERO --- */
.hero {      
    height: 100vh;
    min-height: 600px;
    width: 100%;
    max-width: 100% !important;
    padding: 0 !important;
    display: flex;               
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    position: relative;
    margin: 0;
}

.video-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
}

.video-container video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: -1;
}

.hero-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5%;
    width: 90%;
    max-width: 1200px;
    z-index: 2;
}

.hero-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.3));
}

.hero-text-container { text-align: left; flex: 1; }

.hero h1 { 
    font-size: clamp(2.5rem, 5vw, 4rem); 
    margin-bottom: 15px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); 
}

.hero p { 
    font-size: clamp(1.1rem, 2vw, 1.5rem); 
    margin-bottom: 30px; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7); 
    /* El hero usualmente se ve mejor alineado a la izquierda o centro, no justificado */
}

.btn-cta {
    background-color: var(--primary-green);
    color: white;
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    display: inline-block;
    border: 2px solid var(--primary-green);
}

.btn-cta:hover {
    background-color: transparent;
    border-color: white;
    transform: translateY(-3px);
}

/* --- WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    width: 60px; height: 60px;
    bottom: 30px; right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    font-size: 32px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}
.whatsapp-float:hover { background-color: #20b858; transform: scale(1.1); }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Secciones Generales --- */
section { padding: 80px 20px; max-width: 1200px; margin: 0 auto; width: 100%; }

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-green);
    font-size: clamp(2rem, 4vw, 2.5rem);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 4px;
    background-color: var(--accent-gold);
}

/* GRID SYSTEM */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 30px;
    align-items: stretch;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.12); }

.card img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
}

.card-img {
    height: 200px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}
.card-img img { object-fit: contain; height: 100%; }

.card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 { color: var(--dark-text); margin-bottom: 15px; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.card h3 i { color: var(--accent-gold); }

/* Texto de Cards JUSTIFICADO */
.card p { 
    font-size: 0.95rem; 
    color: #666; 
    margin-bottom: 20px; 
    line-height: 1.5; 
    
    text-align: justify;       /* Justificado */
    -webkit-hyphens: auto;     /* Guiones Safari/iOS */
    -ms-hyphens: auto;         /* Guiones Edge/IE */
    hyphens: auto;             /* Guiones Estándar */
}

.btn-ver-mas, .btn-drones-mas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 50px;
    background-color: var(--primary-green);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
    width: fit-content;
    align-self: center;
}

.grid-container > .btn-ver-mas {
    width: auto;
    max-width: 200px;
    margin: 20px auto 0;
}

.btn-ver-mas:hover, .btn-drones-mas:hover {
    background-color: #1B5E20;
    transform: translateY(-2px);
}

/* Empresa Section - Intro JUSTIFICADO */
.empresa-intro {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 50px;
}
.empresa-intro h2 { text-align: center; color: var(--primary-green); margin-bottom: 20px; }

/* Aplica justificado y guiones a los párrafos de la intro */
.empresa-intro p { 
    font-size: 1.05rem; 
    color: #555; 
    margin-bottom: 15px; 
    
    text-align: justify;       /* Justificado */
    -webkit-hyphens: auto;     /* Guiones Safari/iOS */
    -ms-hyphens: auto;         /* Guiones Edge/IE */
    hyphens: auto;             /* Guiones Estándar */
}

/* Drones Section */
.drones-section { background-color: #e8f5e9; width: 100%; max-width: 100%; }
.drones-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; 
    flex-wrap: wrap; 
    align-items: center; 
    justify-content: space-between;
    gap: 40px;
}
.drone-text { flex: 1 1 500px; } 
.drone-image { flex: 1 1 400px; }
.drone-image img { border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.drone-text ul li { margin-bottom: 10px; display: flex; align-items: center; }

/* Footer */
footer { background-color: #1b1b1b; color: #ccc; padding: 60px 20px 20px; }
.footer-content {
    max-width: 1200px; margin: 0 auto;
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px; margin-bottom: 40px;
}
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.2rem; border-left: 3px solid var(--accent-gold); padding-left: 10px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { display: inline-flex; align-items: center; gap: 10px; }
.footer-col ul li a:hover { color: var(--primary-green); padding-left: 5px; }

.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icons a {
    display: flex; justify-content: center; align-items: center;
    width: 40px; height: 40px;
    background-color: #333; border-radius: 50%;
    color: white; font-size: 1.2rem; transition: 0.3s;
}
.social-icons a:hover { background-color: var(--primary-green); transform: translateY(-3px); }
.copyright { text-align: center; border-top: 1px solid #333; padding-top: 20px; font-size: 0.9rem; }

.btn-compra-granos{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 50px;
    background-color: var(--primary-green);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 40px;
    width: fit-content;
    align-self: center;

    gap: 12px; /* <--- AGREGA ESTA LÍNEA (puedes subir a 15px si quieres más) */

}

.btn-compra-granos:hover{
    background-color: #1B5E20;
    transform: translateY(-2px);
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Tablets y Laptops Pequeñas (max 1024px) */
@media (max-width: 1024px) {
    .menu-toggle { display: block; }

    .main-nav {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .main-nav.active { left: 0; } 

    .main-nav > li {
        width: 100%;
        height: auto;
        display: block; 
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav > li > a {
        padding: 15px 25px;
        width: 100%;
        justify-content: space-between;
        font-size: 1rem;
        color: #333;
    }

    /* Submenús en Móvil */
    .dropdown {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        width: 100%;
        display: none;
        background-color: #f8f9fa;
        padding: 0;
        border-top: none;
        min-width: auto;
    }

    .has-dropdown:hover .dropdown { display: block; }
    
    .dropdown li a {
        padding: 12px 20px 12px 40px; 
        border-bottom: 1px solid #e0e0e0;
        font-size: 0.9rem;
    }

    /* Hero adjustments */
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 20px;
    }
    
    .hero-text-container { text-align: center; width: 100%; }
    .hero-logo { max-width: 180px; margin-bottom: 20px; }
}

/* Móviles (max 768px) */
@media (max-width: 768px) {
    section { padding: 50px 15px; }
    
    .video-container video { display: none; }
    .video-container {
        background-image: url('img/poster-video.jpg'); 
        background-size: cover;
        background-position: center;
    }

    /* Ajustes específicos de secciones */
    .empresa-intro { padding: 25px; } /* Ya está justificado por la regla principal */
    
    .drones-inner { flex-direction: column-reverse; gap: 20px; }
    .drone-text, .drone-image { width: 100%; flex: auto; }
    
    .footer-content { text-align: center; gap: 30px; }
    .footer-col h4 { border-left: none; border-bottom: 2px solid var(--accent-gold); display: inline-block; padding-bottom: 5px; padding-left: 0; }
    .social-icons { justify-content: center; }
    .footer-col ul li a { justify-content: center; }
    
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 26px; }
}

/* Móviles Muy Pequeños (max 380px) */
@media (max-width: 380px) {
    .nav-container { padding: 0 10px; }
    .logo img { height: 40px; } 
    .hero h1 { font-size: 2rem; } 
    .grid-container { grid-template-columns: 1fr; } 
}

/*Móviles (768px)*/
@media (max-width: 768px) {
    .btn-compra-granos {
        display: block;
        margin: 0 auto;   /* 👈 centra el botón */
        width: 100%;
        max-width: 280px;
        padding: 14px 0;
        text-align: center;
        margin-top: 45px;
    }
}
/*Móviles pequeños (480px)*/
@media (max-width: 480px) {
    .btn-compra-granos {
        margin: 0 auto; 
        margin-top: 45px;  
    }
}
/* --- Footer Dominio Sur --- */
.footer-dev-text {
    font-size: 12px;
    color: #4b5563; /* Gris suave */
    margin-top: 10px;
    transition: color 0.3s ease;
}

.footer-dev-text:hover {
    color: #1f2937; /* Gris más oscuro al pasar mouse */
}

.dominio-sur-link {
    font-weight: 700; /* Negrita */
    /* El gradiente de Cyan a Fucsia */
    background: linear-gradient(to right, #22d3ee, #c026d3); 
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    margin-left: 4px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.dominio-sur-link:hover {
    transform: scale(1.05); /* Efecto zoom */
}