/* 
   NUVIA - Global Styles & Tokens 
*/

:root {
    /* Color Palette - NUVIA Brand Manual */
    --bg-dark: #1a2522;       /* Darker shade of Verde Oliva Oscuro */
    --bg-card: #2c3e3a;       /* Verde Oliva Oscuro */
    --bg-light: #ededed;      /* Gris claro */
    --text-primary: #ffffff;
    --text-secondary: #dadada;
    --accent-color: #536863;  /* Verde Oliva claro */
    --accent-hover: #878787;  /* Gris medio */
    --border-subtle: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-family: 'Zen Kaku Gothic New', sans-serif;
    --font-title: 'Oswald', sans-serif; /* Fallback for Special Gothic Condensed */
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 1px;
}

.text-accent {
    color: var(--text-secondary);
}

/* Components: Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--bg-light);
    color: var(--bg-card);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.2rem;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    border: 2px solid var(--bg-light);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background-color: var(--text-secondary);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    border: 2px solid var(--border-subtle);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-primary-outline {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: transparent;
    color: var(--text-primary);
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    border: 1px solid var(--text-primary);
    cursor: pointer;
    letter-spacing: 1px;
}

.btn-primary-outline:hover {
    background-color: var(--text-primary);
    color: var(--bg-card);
}

/* Header / Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(18, 20, 19, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo-text {
    font-size: 2.5rem;
    font-family: var(--font-title);
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.logo-img {
    height: 45px;
    width: auto;
    /* El logo subido es oscuro. Como el fondo de la web es oscuro, aplicamos este filtro para volverlo blanco y que resalte perfectamente */
    filter: brightness(0) invert(1);
    display: block;
}

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

.nav-links a:not(.btn-primary-outline) {
    font-size: 1rem;
    font-family: var(--font-title);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a:not(.btn-primary-outline)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--text-primary);
    transition: width var(--transition-smooth);
}

.nav-links a:not(.btn-primary-outline):hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../images/hero_background_2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18,20,19,0.3) 0%, rgba(18,20,19,0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0.7;
    animation: fadeIn 2s ease forwards 1s;
    opacity: 0;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-primary);
    border-radius: 20px;
    display: block;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

@keyframes fadeIn {
    to { opacity: 0.7; }
}

/* --- MOBILE RESPONSIVE & MENU --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--transition-smooth);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.5rem;
        margin: 1rem 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1000;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .password-group {
        flex-direction: column;
        align-items: center;
    }
    
    #export-password {
        max-width: 100%;
    }
    
    #btn-unlock {
        width: 100%;
    }
}

/* --- FASE 2: LAYOUTS Y SECCIONES --- */

/* Utility Classes */
.section {
    padding: 6rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.bg-card {
    background-color: var(--bg-card);
}

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

.w-100 {
    width: 100%;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-bottom: 1.5rem;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Nosotros Section */
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.nosotros-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.nosotros-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--bg-light);
    margin-bottom: 0.5rem;
}

/* Productos Section */
.section-header {
    margin-bottom: 4rem;
}

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

.producto-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-img {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 50%);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Contacto Section */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
}

.info-item h4 {
    margin-bottom: 0.2rem;
    color: var(--bg-light);
}

.info-item p {
    color: var(--text-secondary);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 3rem;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    text-align: center;
}

.glass-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.glass-panel p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 2rem;
    background-color: #0a0b0a;
}

.text-small {
    font-size: 0.8rem;
}

/* --- FASE 4: EXPANSION DE SECCIONES --- */

/* Marcas / Partners */
.marcas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    align-items: center;
    opacity: 0.6;
}

.marca-item {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.marca-item:hover {
    color: var(--text-primary);
}

/* Servicios Section */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.servicio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.servicio-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.servicio-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.servicio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--bg-light);
}

.servicio-card p {
    color: var(--text-secondary);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle);
}

.faq-item:first-child {
    border-top: 1px solid var(--border-subtle);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem 0;
    font-size: 1.2rem;
    font-family: var(--font-family);
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--bg-light);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform var(--transition-smooth);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
}

.faq-answer p {
    padding-bottom: 1.5rem;
    color: var(--text-secondary);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* --- FASE 5: NUVIA EXPORT --- */

.export-login-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    padding: 4rem 2rem;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    backdrop-filter: blur(15px);
    transition: transform 0.1s ease;
}

.export-login-box.error-shake {
    animation: shake 0.5s;
    border-color: #ff6b6b;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

.password-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

#export-password {
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.5);
    color: var(--text-primary);
    border-radius: 4px;
    width: 100%;
    max-width: 300px;
    font-family: var(--font-family);
}

#export-password:focus {
    outline: none;
    border-color: var(--text-secondary);
}

.export-content {
    /* Removed animation: fadeIn to prevent opacity issues */
}

.bodega-showcase {
    margin-bottom: 6rem;
}

.bodega-info {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin-bottom: 3rem;
}

.bodega-info.reverse {
    flex-direction: row-reverse;
}

.bodega-img {
    flex: 1;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.bodega-text {
    flex: 1;
}

.bodega-text h3 {
    font-size: 2.5rem;
    color: var(--bg-light);
    margin-bottom: 1rem;
}

.bodega-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.bodega-text ul {
    list-style: none;
    color: var(--text-secondary);
}

.bodega-text ul li {
    margin-bottom: 0.5rem;
}

.botellas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.botella-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 8px;
    transition: all var(--transition-smooth);
}

.botella-card h4 {
    color: var(--bg-light);
    margin-bottom: 0.5rem;
}

.botella-cosecha {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.botella-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

/* --- FASE 6: UNIDADES DE NEGOCIO --- */

.unidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.unidad-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.unidad-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.unidad-img {
    height: 150px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
    border-bottom: 1px solid var(--border-subtle);
}

.unidad-img h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.unidad-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.unidad-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* WhatsApp Flotante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1ebe57;
    color: #FFF;
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 25px;
        height: 25px;
    }
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .nosotros-grid, .contacto-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .bodega-info {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.5rem;
    }
    
    .bodega-showcase {
        margin-bottom: 3rem;
    }
    
    .bodega-img {
        flex: none;
        width: 100%;
        height: 250px;
        background-size: contain;
        background-repeat: no-repeat;
    }
    
    .section {
        padding: 3rem 1.2rem;
    }
    
    .bodega-text h3 {
        font-size: 1.8rem;
    }
    
    .bodega-text {
        flex: none;
    }
}
