*/ ===== VARIABLES ===== */
:root {
    /* Colores principales */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-accent: linear-gradient(135deg, var(--accent), #fbbf24);

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);

    /* Transiciones */
    --transition: all 0.3s ease;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

/* ===== LOADER ===== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body.loaded .loader {
    opacity: 0;
    pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark);
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.hero-image {
    animation: fadeInRight 1s ease;
}

.image-wrapper {
    position: relative;
    display: inline-block;
}

.bot-image {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.5s ease;
}

.bot-image:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    filter: blur(20px);
    z-index: -1;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--gray);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { top: 10px; opacity: 1; }
    100% { top: 30px; opacity: 0; }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== ESTADÍSTICAS ===== */
.stats {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8fafc 100%);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray);
    font-weight: 500;
}

/* ===== SECCIONES ===== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary);
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== COMUNIDAD ===== */
.community-cards {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.community-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid transparent;
}

.community-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.whatsapp-icon {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.channel-icon {
    background: linear-gradient(135deg, #075E54, #128C7E);
}

.github-icon {
    background: linear-gradient(135deg, #333, #24292e);
}

.card-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.card-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* BOTONES ESPECÍFICOS */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-channel {
    background: linear-gradient(135deg, #075E54, #128C7E);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-github {
    background: linear-gradient(135deg, #333, #24292e);
    color: white;
    width: 100%;
    justify-content: center;
}

/* ===== DESARROLLADORES ===== */
.developers-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.developer-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.developer-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.dev-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    position: relative;
}

.rufino-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.duarte-avatar {
    background: linear-gradient(135deg, var(--secondary), #059669);
}

.ander-avatar {
    background: linear-gradient(135deg, var(--accent), #f59e0b);
}

.avatar-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    border: 3px solid white;
}

.dev-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.dev-role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.dev-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.dev-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.instagram {
    background: linear-gradient(135deg, #833AB4, #FD1D1D, #FCAF45);
}

.github {
    background: linear-gradient(135deg, #333, #24292e);
}

.social-link:hover {
    transform: scale(1.1);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.footer-logo p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-about {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-btn.instagram {
    background: linear-gradient(135deg, #833AB4, #FD1D1D);
}

.social-btn.github {
    background: linear-gradient(135deg, #333, #24292e);
}

.social-btn.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.social-btn:hover {
    transform: translateY(-5px);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

.footer-heart {
    color: #ef4444;
    margin-top: 0.5rem;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .bot-image {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}