/* CSS Variables based on "Corporación Costa Verde" aesthetic */
:root {
    --primary-color: #2F4830;
    /* Dark olive green */
    --primary-light: #4A6E4C;
    --secondary-color: #A3B18A;
    /* Soft green */
    --accent-color: #7B8F42;
    /* Highlight green */

    --bg-light: #F9F9F4;
    /* Cream / Bone background */
    --bg-white: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --white: #ffffff;
    --primary-color: #4A5D23;
    --sys-padding: 8rem 0;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: var(--sys-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--primary-color);
}

.bg-primary {
    background-color: #243825;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--bg-white);
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mx-auto {
    margin-inline: auto;
    max-width: 700px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.text-white h2,
.text-white h3,
.text-white h4,
.text-white p,
.bg-dark h2 {
    color: var(--bg-white);
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.section-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.highlight {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 143, 66, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--bg-white);
}

.btn-login {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.8rem !important;
    font-size: 0.9rem !important;
    transition: var(--transition) !important;
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

.navbar.scrolled .btn-login {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    background-color: transparent !important;
}

.navbar.scrolled .btn-login:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}


/* Layout Grids */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.align-center {
    align-items: center;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: transparent;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.navbar.scrolled .nav-link,
.navbar.scrolled .logo-text,
.navbar.scrolled .lang-btn {
    color: var(--primary-color);
}

.navbar.scrolled .divider {
    color: var(--primary-color);
    opacity: 0.5;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 110px;
    width: auto;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.d-none-desktop {
    display: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
    color: var(--accent-color) !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
    transition: var(--transition);
    opacity: 0.7;
}

.lang-btn.active {
    font-weight: 700;
    opacity: 1;
    color: var(--accent-color) !important;
}

.divider {
    color: white;
    opacity: 0.5;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
    padding-top: 10vh; /* Pushes content down from center */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--primary-color);
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: opacity 0.5s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(29, 44, 25, 0.85) 0%, rgba(29, 44, 25, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 4.5rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    text-align: justify;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero .btn-outline {
    border-color: white;
    color: white;
}

.hero .btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Productos */
.product-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: left;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.product-img-wrapper {
    height: 250px;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.product-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.product-link:hover {
    gap: 0.8rem;
}

/* WhatsApp Specific Link Style */
.wsp-product-link {
    color: #25D366 !important;
    /* WhatsApp Green */
    font-weight: 700;
}

h1,
h2,
h3,
h4,
.hero-title,
.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Logo Styles */
.logo-container {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    line-height: 1.1;
    transition: var(--transition);
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #ffffff !important;
    transition: color 0.4s ease;
    display: block;
    will-change: transform, opacity;
}

.logo-sub {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 12px;
    text-transform: uppercase;
    color: #ffffff !important;
    margin-top: 4px;
    margin-left: 0;
    transition: color 0.4s ease;
    display: block;
    opacity: 0.9;
    will-change: transform, opacity;
}

.navbar.scrolled .logo-main,
.navbar.scrolled .logo-sub {
    color: var(--primary-color) !important;
}

.footer-logo .logo-main {
    color: var(--white) !important;
}

.footer-logo .logo-sub {
    color: var(--accent-color) !important;
}

.wsp-product-link i {
    font-size: 1.1rem;
}

/* Historia */
.historia-images {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.img-main {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.quote-box {
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent-color);
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--primary-light);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Beneficios */
.benefits-icons {
    margin-top: 3rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
    font-size: 2rem;
    transition: var(--transition);
}

.benefit-card:hover .icon-circle {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.benefit-card h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
}

/* Experiencia */
.experiencia-visual {
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.exp-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
}

.experiencia-visual:hover .exp-img {
    transform: scale(1.03);
}

.process-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    width: 80%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.process-step {
    position: relative;
    z-index: 1;
    width: 25%;
}

.step-num {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.process-step h4 {
    color: white;
}

/* Footer */
.footer {
    padding-top: 4rem;
    padding-bottom: 1rem;
}

.footer-logo-img {
    height: 50px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    /* makes the logo white */
    opacity: 0.9;
}

.footer-text {
    opacity: 0.8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links,
.footer-contact {
    list-style: none;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact i {
    width: 20px;
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.8rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
}

.newsletter-form button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 0.8rem 1.5rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.8;
}

.legal-links {
    margin-top: 0.8rem;
}

.legal-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.8rem;
    margin: 0 5px;
}

.legal-link:hover {
    color: var(--accent-color);
}

/* Media Queries */
@media (max-width: 900px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .d-none-mobile {
        display: none !important;
    }

    .d-none-desktop {
        display: block !important;
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1001;
        /* Mantener por encima del sidebar */
        position: relative;
    }

    .navbar.scrolled .mobile-menu-btn,
    .mobile-menu-btn.active-menu-btn {
        color: var(--primary-color) !important;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease;
        gap: 1.5rem;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        color: var(--primary-color) !important;
        font-size: 1.1rem;
        opacity: 1;
    }

    .nav-links .btn-login {
        margin-top: 1rem;
        background-color: var(--bg-light) !important;
        border-color: var(--primary-color) !important;
        color: var(--primary-color) !important;
        text-align: center;
        padding: 0.8rem !important;
    }
    
    .nav-links .btn-login:hover {
        background-color: var(--primary-color) !important;
        color: white !important;
    }

    /* LIMPIEZA VISUAL MÓVIL (Menos recargado) */
    .section {
        padding: 4rem 0;
        /* Menos espacio muerto */
    }

    .section-title {
        font-size: 2rem !important;
        margin-bottom: 2rem !important;
    }

    .section-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    p {
        font-size: 0.95rem;
        /* Letra un poco más pequeña */
        line-height: 1.6;
    }

    .card {
        padding: 1.5rem !important;
        /* Tarjetas menos voluminosas */
    }

    .hero {
        height: 100vh;
        min-height: 500px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .process-timeline::before {
        display: none;
    }

    .process-timeline {
        flex-direction: column;
        gap: 2rem;
    }

    .process-step {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    .step-num {
        margin: 0;
    }

    .stats-container {
        flex-direction: column;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s;
}

.whatsapp-float:hover {
    background-color: #1ebe57;
    color: white;
    transform: scale(1.1);
}

/* Cookie / Legal Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(36, 56, 37, 0.95);
    color: white;
    padding: 1rem 0;
    z-index: 2000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.cookie-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
}

.cookie-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Category Themes / Colors */
.theme-negras {
    --accent-color: #333333;
    /* Darker tone for Negras Category */
    --primary-color: #1a1a1a;
}

.theme-negras .highlight {
    color: #999999;
}

.theme-negras .btn-primary {
    background-color: #333333;
}

.theme-negras .btn-primary:hover {
    background-color: #000000;
}

.theme-verdes {
    /* Uses current defaults */
    --accent-color: #7B8F42;
}

/* Specific card accents for index.html */
.product-card.negras-card .btn-primary {
    background-color: #333;
}

.product-card.verdes-card .btn-primary {
    background-color: #5c7247;
}

/* Category card visuals */
.category-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.negras-card:hover {
    border-color: #333;
}

.verdes-card:hover {
    border-color: #5c7247;
}