/* ========================================
   VARIABLES DE TEMA
======================================== */
:root[data-theme="dark"] {
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --surface: #1e1e2f;
    --surface-hover: #252538;
    
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b8a;
    
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --border: #2d2d44;
    --border-light: #3a3a54;
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(180deg, #0f0f1e 0%, #1a1a2e 100%);
}

:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    
    --accent: #8b5cf6;
    --accent-dark: #7c3aed;
    
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 10px 15px rgba(0, 0, 0, 0.15);
    
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-outline:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========================================
   NAVBAR
======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-brand i {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(180deg);
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: var(--gradient-dark);
    opacity: 0.5;
}

.hero-background::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.2;
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-background::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    bottom: -150px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.highlight {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.stat-item i {
    color: var(--primary);
    font-size: 1.25rem;
}

.stat-item span {
    font-weight: 600;
    color: var(--text-primary);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--text-muted);
    animation: bounce 2s infinite;
}

/* ========================================
   SECTIONS
======================================== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-secondary);
}

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

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.feature-list i {
    color: var(--success);
    font-size: 0.875rem;
}

/* ========================================
   MODULES
======================================== */
.modules-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.module-card {
    background: var(--surface);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.module-header {
    padding: 2rem;
    background: var(--gradient-primary);
    text-align: center;
}

.module-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: white;
}

.module-header h3 {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
}

.module-body {
    padding: 2rem;
    flex: 1;
}

.module-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.module-features {
    display: grid;
    gap: 1rem;
}

.module-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.module-feature i {
    color: var(--primary);
    font-size: 1.25rem;
}

.module-feature span {
    font-weight: 500;
    color: var(--text-primary);
}

.module-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-align: center;
}

.module-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
}

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

.benefit-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 1.25rem;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-color: var(--primary);
    transform: translateX(8px);
}

.benefit-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.benefit-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.benefit-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   TECH STACK
======================================== */
.tech-stack {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 1rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

.tech-item:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
}

.tech-item i {
    font-size: 3rem;
    color: var(--primary);
}

.tech-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   CONTACT
======================================== */
.section-contact {
    background: var(--gradient-dark);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
}

.contact-detail i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.contact-detail h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-detail p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-4px);
}

.contact-form {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 2px solid var(--border);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   FOOTER
======================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand i {
    color: var(--primary);
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* ========================================
   TOAST
======================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-xl);
    transform: translateY(200%);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateY(0);
}

.toast i {
    font-size: 1.5rem;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-logo {
        width: 110px;
        height: 110px;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid,
    .modules-container,
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-logo {
        width: 100px;
        height: 100px;
    }
    
    .hero-title-wrapper {
        gap: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .module-card,
    .benefit-item {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}
