/* --- Variables de Color --- */
:root {
    --primary: #88B04B;       /* Verde oliva suave */
    --primary-dark: #6A8F3D;  /* Verde más oscuro para hover */
    --secondary: #F0F4F0;     /* Fondo gris verdoso muy claro */
    --accent: #2C3E2C;        /* Verde bosque muy oscuro */
    --text-main: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.8;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--accent);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* --- Components --- */
.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(136, 176, 75, 0.3);
    border: 2px solid transparent;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(136, 176, 75, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* --- Header --- */
header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    margin-right: 1.5rem;
}

.logo img {
    height: 45px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

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

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(44, 62, 44, 0.7), rgba(44, 62, 44, 0.6)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding-top: 80px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
}

/* --- Features / Qué Hacemos --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* --- Image Text Section --- */
.img-text-section {
    background-color: var(--secondary);
    overflow: hidden;
}

.img-text-content {
    padding-right: 2rem;
}

.img-wrapper {
    position: relative;
    height: 100%;
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}

/* --- Tech Cards --- */
.tech-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tech-card:hover {
    transform: translateY(-10px);
}

.tech-icon-bg {
    width: 70px;
    height: 70px;
    background-color: rgba(136, 176, 75, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.tech-icon-bg i {
    font-size: 1.8rem;
    color: var(--primary);
}

/* --- Sectores --- */
.sector-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 350px;
    color: var(--white);
}

.sector-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.sector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.1));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.sector-card:hover .sector-bg {
    transform: scale(1.1);
}

.sector-card h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.sector-card p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* --- Contact --- */
.contact-section {
    background-color: var(--accent);
    color: var(--white);
}

.contact-section .section-title {
    color: var(--white);
}

.contact-section .section-title::after {
    background-color: var(--primary);
}

.contact-section .subtitle {
    color: rgba(255,255,255,0.7);
}

.form-box {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

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

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
}

textarea.form-control {
    resize: vertical;
}

/* --- Footer --- */
footer {
    background-color: #1a261a;
    color: rgba(255,255,255,0.6);
    padding: 3rem 0;
    font-size: 0.9rem;
}

/* --- Language Dropdown --- */
.lang-dropdown {
    position: relative;
    list-style: none; /* Ensure no bullet points */
}

.lang-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lang-dropdown .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 60px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1001; /* Ensure it's above other header elements */
    border-radius: 4px;
    overflow: hidden;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    margin: 0;
}

.lang-dropdown:hover .dropdown-content {
    display: block;
}

.lang-dropdown .dropdown-content li {
    text-align: center;
}

.lang-dropdown .dropdown-content a {
    color: var(--text-main);
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    white-space: nowrap; /* Prevent wrapping */
}

.lang-dropdown .dropdown-content a:hover {
    background-color: var(--secondary);
    color: var(--primary);
}

/* --- Legal Page Specifics --- */
.legal-content h1 { font-size: 2.5rem; margin-bottom: 2rem; }
.legal-content h2 { font-size: 1.8rem; margin-top: 2rem; border-bottom: 2px solid var(--primary); padding-bottom: 0.5rem; display: inline-block; }
.legal-content h3 { font-size: 1.4rem; margin-top: 1.5rem; }
.legal-content ul { list-style: disc; margin-left: 2rem; margin-bottom: 1rem; }
.legal-content p { margin-bottom: 1rem; }

/* --- Button Small (Shared) --- */
.btn-sm {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(136, 176, 75, 0.3);
    border: 2px solid transparent;
}

.btn-sm:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(136, 176, 75, 0.4);
}

/* --- Responsive Queries --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 3rem; }
    .img-wrapper { height: 300px; min-height: auto; }
    .order-mobile-top { order: -1; }
}

@media (max-width: 768px) {
    .hero { background-attachment: scroll; } /* Better performance on mobile */
    .hero h1 { font-size: 2.2rem; }
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        text-align: center;
        align-items: center; /* Center items in mobile menu */
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .section-padding { padding: 4rem 0; }

    .lang-dropdown .dropdown-content {
        position: static;
        box-shadow: none;
        transform: none;
        background-color: transparent;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        margin-top: 1rem;
        min-width: auto;
    }
    .lang-dropdown:hover .dropdown-content {
        display: flex;
    }
}