/* =========================================
   VARIABLES & TEMA
   ========================================= */
:root {
    --bg-color: #f4f6fb;
    --surface-color: #ffffff;
    --surface-alt: #eef1f7;
    --surface-deep: #dbe2f0;
    --text-primary: #101826;
    --text-secondary: #475569;
    --border-color: #d6dceb;
    --primary-blue: #2f6fe4;
    --primary-blue-hover: #255fd0;
    --primary-purple: #6e63da;
    --primary-purple-soft: rgba(110, 99, 218, 0.1);
    --primary-blue-soft: rgba(47, 111, 228, 0.2);
    --primary-green: #2e9d46;
    --primary-red: #c23a3c;
    --nav-height: 72px;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.12);
    --radius-md: 16px;
}

body.dark-mode {
    --bg-color: #0a1019;
    --surface-color: #121a25;
    --surface-alt: #0f1722;
    --surface-deep: #182233;
    --text-primary: #e7edf7;
    --text-secondary: #97a5bb;
    --border-color: #233146;
    --primary-blue-soft: rgba(47, 111, 228, 0.24);
    --primary-purple-soft: rgba(110, 99, 218, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

.section-anchor {
    scroll-margin-top: 96px;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.dark-mode .navbar {
    background: rgba(18, 26, 37, 0.86);
}

.logo-container { display: flex; align-items: center; gap: 10px; }
.nav-logo { height: 38px; }
.version-tag {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #4a7ff1 65%, var(--primary-purple) 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
}

.nav-links { display: flex; gap: 10px; align-items: center; }
.nav-link {
    position: relative;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 10px 12px;
    border-radius: 10px;
}
.nav-link:hover {
    color: var(--text-primary);
    background: var(--surface-alt);
}
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #4a7ff1 65%, var(--primary-purple) 100%);
    box-shadow: 0 10px 24px rgba(47, 111, 228, 0.24);
}

.nav-controls { display: flex; align-items: center; gap: 15px; }

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 999px;
    display: flex;
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.icon-btn:hover {
    transform: translateY(-1px);
    background-color: var(--surface-alt);
    border-color: rgba(47, 111, 228, 0.45);
    box-shadow: var(--shadow-sm);
}
.icon-btn img { width: 22px; height: 22px; }

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    padding: 94px 0 84px;
    background:
        radial-gradient(circle at top right, var(--primary-purple-soft), transparent 24%),
        radial-gradient(circle at top left, var(--primary-blue-soft), transparent 32%),
        linear-gradient(180deg, var(--surface-color) 0%, var(--bg-color) 100%);
    text-align: left;
}

.hero-shell {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content { flex: 1; }
.hero h1 {
    font-size: 3rem;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 800;
    max-width: 760px;
}
.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.2rem;
    max-width: 620px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}



.btn {
    padding: 0.82rem 1.5rem;
    border-radius: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }

.btn-blue {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #4a7ff1 65%, var(--primary-purple) 100%);
    color: white;
    border: 1px solid transparent;
}
.btn-blue:hover { filter: brightness(1.04); }

.btn-green { background: var(--primary-green); color: white; border: 1px solid var(--primary-green); }
.btn-green:hover { background: #27843a; border-color: #27843a; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: rgba(47, 111, 228, 0.42);
    color: var(--text-primary);
    background: var(--surface-color);
}
.btn-soft {
    background: linear-gradient(180deg, rgba(47, 111, 228, 0.12) 0%, rgba(110, 99, 218, 0.08) 100%);
    border: 1px solid rgba(47, 111, 228, 0.22);
    color: var(--text-primary);
}
.btn-soft:hover {
    border-color: rgba(47, 111, 228, 0.38);
    background: linear-gradient(180deg, rgba(47, 111, 228, 0.18) 0%, rgba(110, 99, 218, 0.12) 100%);
}
.btn-repo {
    min-width: 184px;
}
.btn-repo-wide {
    min-width: 230px;
}
.btn-icon-img { width: 20px; height: 20px; }

.hero-image { flex: 1; display: flex; justify-content: center; }
.floating-img {
    width: 280px;
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.2));
    animation: float 4.2s ease-in-out infinite;
}

/* =========================================
   SECCIONES GENERALES
   ========================================= */
.section { padding: 82px 0; }
.alt-bg {
    background:
        linear-gradient(180deg, var(--surface-alt) 0%, var(--bg-color) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.highlight-bg {
    background:
        radial-gradient(circle at bottom left, var(--primary-blue-soft), transparent 24%),
        linear-gradient(180deg, var(--surface-color) 0%, var(--bg-color) 100%);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   TIMELINE
   ========================================= */
.timeline {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 111, 228, 0.22) 0%, rgba(110, 99, 218, 0.18) 100%);
    z-index: 0;
    display: none;
}
@media (min-width: 768px) {
    .timeline::before { display: block; }
}

.timeline-item {
    flex: 1;
    min-width: 250px;
    text-align: center;
    position: relative;
    z-index: 1;
    background: transparent;
    padding: 10px 12px;
}
.timeline-number {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #4a7ff1 65%, var(--primary-purple) 100%);
    color: white;
    font-size: 1.45rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 0 8px var(--bg-color);
}
.timeline-content h3 { margin-bottom: 10px; color: var(--text-primary); }
.timeline-content p { color: var(--text-secondary); font-size: 0.95rem; }
.timeline-content code,
.card-body code,
.tool-item code {
    background: var(--surface-alt);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
    border: 1px solid var(--border-color);
}

/* =========================================
   CARDS GRID
   ========================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(180deg, var(--surface-color) 0%, rgba(255, 255, 255, 0.68) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    box-shadow: var(--shadow-sm);
}
body.dark-mode .feature-card {
    background: linear-gradient(180deg, rgba(18, 26, 37, 1) 0%, rgba(18, 26, 37, 0.9) 100%);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(47, 111, 228, 0.3);
}

.card-header { padding: 1.3rem 1.5rem; color: white; }
.card-header h3 { font-size: 1.08rem; font-weight: 700; }

.color-blue { background: linear-gradient(135deg, #255fd0 0%, #4f7ff2 70%, #6e63da 100%); }
.color-green { background: linear-gradient(135deg, #237837 0%, var(--primary-green) 100%); }
.color-red { background: linear-gradient(135deg, #9f2e30 0%, var(--primary-red) 100%); }

.card-body { padding: 1.5rem; min-height: 160px; }
.card-body p { font-size: 0.95rem; color: var(--text-secondary); }

/* =========================================
   TOOLS LIST
   ========================================= */
.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-group {
    background: linear-gradient(180deg, var(--surface-color) 0%, rgba(255, 255, 255, 0.78) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.7rem;
    box-shadow: var(--shadow-sm);
}
body.dark-mode .tool-group {
    background: linear-gradient(180deg, rgba(18, 26, 37, 1) 0%, rgba(18, 26, 37, 0.92) 100%);
}

.tool-group h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tool-item {
    display: flex;
    gap: 15px;
    margin-bottom: 1.35rem;
    align-items: flex-start;
}
.tool-item:last-child {
    margin-bottom: 0;
}

.tool-icon {
    width: 42px;
    height: 42px;
    padding: 8px;
    border-radius: 12px;
    flex-shrink: 0;
}
.bg-dark {
    background: linear-gradient(135deg, #121a25 0%, #26344b 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tool-item h4 { font-size: 1rem; margin-bottom: 4px; color: var(--text-primary); }
.tool-item p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.45; }

/* =========================================
   DESCARGAS
   ========================================= */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.download-card {
    background: linear-gradient(180deg, var(--surface-color) 0%, rgba(255, 255, 255, 0.78) 100%);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1.8rem;
    box-shadow: var(--shadow-md);
    min-height: 100%;
}
body.dark-mode .download-card {
    background: linear-gradient(180deg, rgba(18, 26, 37, 1) 0%, rgba(18, 26, 37, 0.92) 100%);
}

.recommended-card {
    border-color: rgba(47, 111, 228, 0.3);
    box-shadow: 0 24px 48px rgba(75, 105, 209, 0.14);
}

.download-icon img { width: 118px; }

.download-details {
    width: 100%;
    text-align: center;
}

.download-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #4a7ff1 65%, var(--primary-purple) 100%);
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
}

.neutral-badge {
    background: linear-gradient(135deg, #355da6 0%, #5872b2 100%);
}

.download-details h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.download-details p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.specs-list {
    margin-bottom: 2rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.specs-list li {
    background: var(--surface-alt);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.download-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.download-footer-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.download-footer-actions .btn {
    min-width: 210px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: 2rem 0 2.5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}



/* =========================================
   ANIMACIONES
   ========================================= */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 980px) {
    .hero-shell {
        flex-direction: column;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
        gap: 14px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 72px 0 66px;
    }

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

    .hero-buttons {
        width: 100%;
    }

    .hero-buttons .btn,
    .download-actions .btn,
    .download-footer-actions .btn {
        width: 100%;
    }

    .download-card {
        padding: 2rem;
    }

    .tool-group {
        padding: 1.4rem;
    }
}
