/* VARIABLES Y RESET */
:root {
    --primary-color: #8b0000;
    --secondary-color: #c41e3a;
    --accent-color: #d4af37;
    --dark-bg: #1a1a1a;
    --light-bg: #f9f9f9;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --spacing-unit: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    color: #555;
    line-height: 1.9;
    font-size: 1.15rem;
    background-color: white;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: #4a934a;
}

main p {
    text-align: justify;
    margin-bottom: 1.5rem;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-spacing {
    padding: 4rem 0;
}

/* HEADER */
.main-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    gap: 2rem;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #4a934a;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo img {
    height: 50px;
    width: auto;
}

/* LOGOS HEADER (Global) */
.logo-left img {
    height: 85px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-right img {
    height: 170px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-left:hover img,
.logo-right:hover img {
    transform: scale(1.05);
}

.header-content {
    padding: 1.2rem 2rem;
}

/* NAVEGACIÓN PRINCIPAL */
.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1;
    justify-content: space-evenly;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #4a934a;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #3a7a3a;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #4a934a;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.main-nav .btn-cta {
    background-color: #4a934a;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(74, 147, 74, 0.2);
    transition: all 0.3s ease;
}

.main-nav .btn-cta:hover {
    background-color: #3a7a3a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 147, 74, 0.3);
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
}

/* FOOTER */
.main-footer {
    background: white;
    color: var(--text-dark);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 2px solid #4a934a;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #d4af37;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #d4af37;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 2rem;
    text-align: center;
    opacity: 0.8;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, rgba(74, 147, 74, 0.1) 0%, rgba(58, 122, 58, 0.1) 100%);
    padding: 6rem 0;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    color: #4a934a;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.9;
    margin-bottom: 2rem;
    text-align: justify;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* FEATURES SECTION */
.features-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #4a934a;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-card h3 {
    color: #4a934a;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #555;
    line-height: 1.9;
    text-align: justify;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: transparent;
    color: #4a934a;
    border: 2px solid #4a934a;
}

.btn-primary:hover {
    background-color: #4a934a;
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: #4a934a;
    border: 2px solid #4a934a;
}

.btn-secondary:hover {
    background-color: #4a934a;
    color: white;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .mobile-nav-toggle {
        display: block;
        font-size: 1.5rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-dark);
        padding: 0.5rem;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 999;
        
        /* Estado oculto con transición */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        text-align: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .logo-left img,
    .logo-right img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }
}

/* FOOTER MODERNO (Index) */
.footer-modern-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    padding: 1rem 2rem 2rem;
    max-width: 100%;
}

.footer-side {
    flex: 0 0 320px; /* Ancho aumentado para logos más grandes */
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.footer-side:hover .footer-logo-img {
    transform: scale(1.05);
}

.footer-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.footer-columns-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.footer-col h3 {
    color: #4a934a;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.6rem;
}

.footer-col p {
    color: #4a934a;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-col a {
    color: #4a934a;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #3a7a3a;
    padding-left: 5px;
}

.footer-social-row {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    width: 80%;
    justify-content: center;
}

.footer-social-row a {
    color: #4a934a;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    background: rgba(74, 147, 74, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.footer-social-row a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-modern-layout {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-columns-row {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-side {
        order: -1; /* Logos arriba en móvil */
    }
    
    .footer-left { order: 1; }
    .footer-right { order: 3; }
    .footer-center { order: 2; width: 100%; }
    
    .footer-col a:hover {
        padding-left: 0;
    }

    .footer-logo-img {
        max-height: 150px;
    }
}