/* MACONPART Industrial Design System */
:root {
    --primary: #EF933C;
    /* Industrial Orange */
    --primary-hover: #D87D2A;
    --dark-bg: #0F1115;
    --card-bg: #1A1D23;
    --text-main: #FFFFFF;
    --text-muted: #A0AEC0;
    --accent-gray: #2D3748;
    --white: #FFFFFF;
    --border-color: rgba(45, 55, 72, 0.5);
    --nav-bg: rgba(15, 17, 21, 0.8);
    --input-bg: rgba(45, 55, 72, 0.3);
    --input-focus-bg: rgba(45, 55, 72, 0.5);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Overrides */
html[data-theme='light'],
body.light-theme {
    --dark-bg: #F1F5F9;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --accent-gray: #E2E8F0;
    --border-color: rgba(203, 213, 225, 1);
    --nav-bg: rgba(255, 255, 255, 0.9);
    --input-bg: #F8FAFC;
    --input-focus-bg: #FFFFFF;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

html[data-theme='light'] .nav-logo,
body.light-theme .nav-logo {
    filter: none;
}

html[data-theme='light'] .card-icon img,
body.light-theme .card-icon img {
    filter: none !important;
}

html[data-theme='light'] .hero-overlay,
body.light-theme .hero-overlay {
    background: linear-gradient(rgba(248, 250, 252, 0.4), rgba(248, 250, 252, 0.85));
}

html[data-theme='light'] .hero-video,
body.light-theme .hero-video {
    opacity: 0.7;
    filter: grayscale(0.2);
}

html[data-theme='light'] footer,
body.light-theme footer {
    background: #EDF2F7;
    border-top: 1px solid var(--accent-gray);
}

html[data-theme='light'] .menu-toggle .bar,
body.light-theme .menu-toggle .bar {
    background-color: var(--text-main);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
    /* Makes the logo white for dark theme */
    transition: var(--transition);
}

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

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

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    transition: var(--transition);
}

.nav-link:hover {
    background: rgba(239, 147, 60, 0.1);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 2000;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 3px;
}

/* Hero Section */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 17, 21, 0.7), rgba(15, 17, 21, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    background: linear-gradient(transparent, var(--dark-bg));
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1rem;
    max-width: 900px;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 147, 60, 0.2);
}

/* Sections */
section {
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title .accent {
    color: var(--primary);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,0.3));
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary);
    /* Cambiado a naranja para que contraste con el fondo gris oscuro */
}

.timeline::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid var(--primary);
    /* Naranja */
    filter: drop-shadow(0px 2px 0px black) drop-shadow(0px -2px 0px black) drop-shadow(2px 0px 0px black) drop-shadow(-2px 0px 0px black);
    /* Crea un borde negro alrededor del triángulo */
}

/* Connecting lines */
.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 3rem;
    height: 2px;
    background: var(--primary);
    /* Aseguramos que se vea en el fondo gris oscuro */
    z-index: 0;
}

.timeline-item:nth-child(odd)::before {
    right: 0;
}

.timeline-item:nth-child(even)::before {
    left: 0;
}

.timeline-item {
    padding: 2rem 0;
    width: 50%;
    position: relative;
}

.timeline-item:nth-child(odd) {
    padding-right: 3rem;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid var(--dark-bg);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-year {
    font-weight: 900;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 4px rgba(239, 147, 60, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.card,
.timeline-item {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Footer */
footer {
    padding: 5rem 0;
    background: #080a0c;
    border-top: 1px solid var(--accent-gray);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}

/* Responsive */
@media (max-width: 768px) {

    .grid-2,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 0;
    }
    
    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .section-title h2 {
        font-size: 2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        flex-direction: column;
        background: var(--nav-bg);
        backdrop-filter: blur(15px);
        padding-top: 7rem;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        border-left: 1px solid var(--border-color);
        gap: 2rem;
    }

    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        border-radius: 0;
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .timeline::before,
    .timeline::after {
        left: 0;
    }

    .timeline-item {
        width: 100%;
        text-align: left !important;
        padding-left: 2rem !important;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: -10px !important;
    }

    .timeline-item::before {
        left: 0 !important;
        width: 2rem;
    }
    
    .footer-grid {
        gap: 2.5rem;
    }
}

/* WhatsApp Float Button */
.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: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
}

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

    .whatsapp-icon {
        width: 30px;
        height: 30px;
    }
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
    display: inline-block;
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    cursor: pointer;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.theme-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    display: none;
    flex-direction: column;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2000;
}

.theme-dropdown.active,
.theme-dropdown.show {
    display: flex;
    animation: fadeInUp 0.2s ease-out forwards;
}

.theme-option {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    font-family: var(--font-family);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-option:hover {
    background: var(--accent-gray);
    color: var(--primary);
}

.theme-option.active {
    color: var(--primary);
    font-weight: 600;
}