/* ===============================================
   NAVBAR Y HERO - ESTILOS PRINCIPALES
   Basado en el diseño del index.html principal
   =============================================== */

/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #2c5530;
    --secondary-color: #8b4513;
    --accent-color: #d4a574;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --white: #ffffff;
    --cream: #f8f6f3;
    --green-light: #d8fbef;
    --overlay-dark: rgba(44, 85, 48, 0.8);
    
    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 0 1rem;
    --border-radius: 8px;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: var(--font-secondary);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

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

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

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 120rem;
    margin: 0 auto;
    padding: var(--container-padding);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.4rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #6C1739, #8a1f4a);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 23, 57, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 23, 57, 0.4);
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(108, 23, 57, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-smooth);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled {
    background: rgba(108, 23, 57, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 120rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-logo-img {
    height: 4rem;
    width: auto;
    object-fit: contain;
    transition: var(--transition-fast);
    filter: brightness(1.1) contrast(1.1);
}

.nav-logo-img:hover {
    transform: scale(1.05);
    filter: brightness(1.2) contrast(1.2);
}

.nav-menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--white);
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-fast);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 2.5rem;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 60rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1.02);
}

.hero-background img.active {
    opacity: 1;
    animation: heroZoom 12s ease-in-out infinite;
}

@keyframes heroZoom {
    0% {
        transform: scale(1.02);
    }
    50% {
        transform: scale(1.06);
    }
    100% {
        transform: scale(1.02);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 85, 48, 0.6);
    z-index: -1;
}

.hero-content {
    width: 100%;
    text-align: center;
    color: var(--white);
    z-index: 1;
    animation: heroContentFadeIn 1.5s ease-out;
}

@keyframes heroContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logos {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem 3rem;
    border-radius: var(--border-radius);
}

.hero-logo-main {
    height: 12rem;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: var(--transition-smooth);
}

.hero-logo-main:hover {
    transform: scale(1.05);
}

.hero-logo-corfo {
    height: 5rem;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.hero h1 {
    font-family: var(--font-primary);
    font-size: clamp(3.2rem, 6vw, 4.8rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    max-width: 70rem;
    margin: 0 auto 3rem;
    line-height: 1.8;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 2rem;
    height: 2rem;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(225deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-logo {
        padding: 0.3rem 0.8rem;
    }
    
    .nav-logo-img {
        height: 3.5rem;
    }

    .hero-logos {
        padding: 1rem;
    }

    .hero-logo-main {
        height: 10rem;
    }

    .nav-menu {
        position: fixed;
        top: 7rem;
        left: 0;
        width: 100%;
        height: calc(100vh - 7rem);
        background: rgba(108, 23, 57, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 5rem;
        transform: translateX(-100%);
        transition: var(--transition-smooth);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-link {
        font-size: 1.8rem;
        padding: 1.5rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .nav-link::after {
        display: none;
    }

    .hero {
        min-height: 50rem;
    }

    .hero-content {
        padding: 0 2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .btn {
        width: 100%;
        max-width: 30rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-logo-img {
        height: 3rem;
    }

    .hero-logo-main {
        height: 8rem;
    }

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

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

    .scroll-indicator {
        bottom: 2rem;
    }
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex !important;
    }

    .nav-toggle {
        display: none !important;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-background img.active {
        animation: none;
    }

    .scroll-indicator {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .navbar {
        background: rgba(108, 23, 57, 1);
    }

    .nav-link {
        color: var(--white);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    .btn {
        border: 2px solid currentColor;
    }
}
