/* ============================================
   MADERAS AMÉRICA - ESTILOS PRINCIPALES
   ============================================ */

/* CSS Variables */
:root {
    --brand-blue: #3A637A;
    --brand-orange: #CF733D;
    --brand-light-gray: #B0B2B3;
    --brand-dark-gray: #837973;
    --text-light: #FFFFFF;
    --text-dark: #1f2937;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--brand-blue);
    color: var(--text-light);
    overflow-x: hidden;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Layout Components */
.full-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--brand-blue);
    opacity: 0.7;
    z-index: -1;
}

/* ============================================
   NAVIGATION - PLANK MENU
   ============================================ */

.menu-container {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 2rem;
}

.main-nav {
    transform: translateX(150%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: auto;
}

.main-nav.is-open {
    transform: translateX(0);
}

.nav-plank {
    background: linear-gradient(135deg, rgba(131, 121, 115, 0.8) 0%, rgba(88, 78, 72, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.1rem;
    padding: 0.6rem 2rem;
    width: 22rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(50px) scale(0.9);
}

.nav-plank:hover {
    transform: translateX(0) scale(1.05);
    background: linear-gradient(135deg, rgba(207, 115, 61, 0.9) 0%, rgba(180, 90, 40, 0.9) 100%);
    box-shadow: 0 8px 30px rgba(207, 115, 61, 0.3);
}

.menu-toggle-btn {
    z-50;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.menu-toggle-btn span {
    transition: all 0.3s ease-in-out;
    background-color: white;
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 2px;
}

.menu-toggle-btn.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle-btn.is-open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-btn.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   HERO BUTTONS
   ============================================ */

.hero-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
    letter-spacing: 0.5px;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.hero-btn:hover::before {
    left: 100%;
}

.hero-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.hero-btn:hover::after {
    width: 300px;
    height: 300px;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--brand-orange) 0%, #e67e22 100%);
    color: white;
    border: 2px solid transparent;
}

.hero-btn-primary:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(207, 115, 61, 0.4);
    background: linear-gradient(135deg, #e67e22 0%, var(--brand-orange) 100%);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-btn-secondary:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-blue);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.2);
}

.hero-btn-icon {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.hero-btn:hover .hero-btn-icon {
    transform: translateX(5px);
    opacity: 1;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================
   CONTACT BUTTONS
   ============================================ */

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
    word-break: break-word;
    text-align: center;
}

.contact-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #1DA851 0%, #25D366 100%);
}

.email-btn {
    background: linear-gradient(135deg, var(--brand-orange) 0%, #e67e22 100%);
}

.email-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, var(--brand-orange) 100%);
}

.phone-btn {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #2A4F63 100%);
}

.phone-btn:hover {
    background: linear-gradient(135deg, #2A4F63 0%, var(--brand-blue) 100%);
}

/* ============================================
   CARDS - MISSION & VISION
   ============================================ */

.mission-card,
.vision-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mission-card::before,
.vision-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(207, 115, 61, 0.1), transparent);
    transition: left 0.8s ease;
}

.mission-card:hover::before,
.vision-card:hover::before {
    left: 100%;
}

.mission-card:hover,
.vision-card:hover {
    transform: translateY(-10px) scale(1.02);
    background-color: rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4), 0 10px 20px rgba(207, 115, 61, 0.2);
    border-color: rgba(207, 115, 61, 0.3);
}

.mission-card:hover .mission-icon svg,
.vision-card:hover .vision-icon svg {
    transform: scale(1.2) rotate(5deg);
    color: #e67e22;
    filter: drop-shadow(0 4px 8px rgba(207, 115, 61, 0.3));
}

.mission-card:hover p,
.vision-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

.mission-title {
    opacity: 0;
    transform: translateY(30px);
}

.mission-card,
.vision-card {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

/* ============================================
   WHATSAPP FAB & SCROLL BUTTON
   ============================================ */

.whatsapp-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: transform 0.3s ease;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
}

.scroll-down-btn {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
}

.scroll-down-btn svg {
    width: 40px;
    height: 40px;
    color: var(--brand-orange);
    transition: transform 0.3s ease;
}

.scroll-down-btn:hover svg {
    transform: translateY(5px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: #111827;
    color: var(--text-light);
    padding: 4rem 2rem;
}

.footer a:hover {
    color: var(--brand-orange);
}

.social-icon {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: var(--brand-orange);
}

/* ============================================
   HERO PRODUCT LINKS
   ============================================ */

.hero-product-link {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-product-link h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet and Mobile */
@media (max-width: 768px) {
    body .hero-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }

    body #mission {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }

    /* Hero section adjustments */
    body #hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    body #hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    /* Grid de productos responsive */
    body #hero .grid {
        gap: 0.75rem;
        padding: 0 1rem;
    }

    body .hero-product-link {
        padding: 1rem;
        min-height: 70px;
    }

    body .hero-product-link h2 {
        font-size: 1.1rem;
    }

    /* Connect section responsive */
    body #connect .grid {
        max-width: 100%;
    }

    body #connect h2 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    body #connect p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    /* Products section responsive */
    body #products h2 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    body #products p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    body #products .grid {
        gap: 1.5rem;
    }

    body .product-card {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Facilities section responsive */
    body #facilities h2 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    body #facilities p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    body .facility-card {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Email button específico para móvil */
    body .email-btn {
        font-size: 0.85rem;
        padding: 1rem 0.75rem;
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
        line-height: 1.4;
    }

    body .contact-btn svg {
        min-width: 1.5rem;
        flex-shrink: 0;
    }
}

/* Small Mobile */
@media (max-width: 425px) {
    body #hero h1 {
        font-size: 2rem;
    }

    body .hero-product-link h2 {
        font-size: 0.95rem;
    }

    /* Contacto section - mobile small */
    body #connect h2 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    body #connect p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    body .email-btn {
        font-size: 0.75rem;
    }
}
