/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- VARIABLES GLOBALES --- */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --secondary-color: #10b981;
    --secondary-hover: #059669;
    --dark-text: #1f2937;
    --light-text: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* --- DARK MODE --- */
body.dark {
    --dark-text: #f1f5f9;
    --light-text: #94a3b8;
    --bg-light: #0f172a;
    --white: #1e293b;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
    --primary-light: rgba(37, 99, 235, 0.15);
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--dark-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- PAGE TRANSITION --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
body { animation: fadeIn 0.4s ease-out; }

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

/* --- BARRA DE NAVEGACIÓN --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(12px);
    background-color: rgba(255,255,255,0.85);
}
body.dark .navbar {
    background-color: rgba(30,41,59,0.85);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.logo-img {
    height: 40px;
    background-color: #ddd;
    border-radius: var(--radius-sm);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.nav-links a:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-text);
}

/* --- BOTONES --- */
.btn-solid, .btn-ghost, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.btn-solid:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-solid:active {
    transform: scale(0.97);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
}

.btn-ghost:hover {
    background-color: var(--primary-light);
}

.btn-ghost:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    color: var(--white) !important;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

.btn-outline:active {
    transform: scale(0.97);
}

.btn-large {
    font-size: 1.05rem;
    padding: 14px 32px;
    border-radius: var(--radius-md);
}

/* --- SECCIÓN HERO --- */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    color: var(--white);
    padding: 160px 20px 100px;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #ffffff;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* --- SECCIÓN BENEFICIOS --- */
.features {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.features h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    letter-spacing: -0.01em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card .icon {
    font-size: 2.8rem;
    margin-bottom: 18px;
    display: block;
}

.feature-interactive {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
}

.feature-interactive:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: transparent;
}

.feature-interactive h3 {
    color: var(--dark-text);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-interactive p {
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-interactive:hover .feature-icon-wrap {
    transform: scale(1.1) rotate(-3deg);
}

.feature-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-8px);
}

.feature-interactive:hover .feature-arrow {
    opacity: 1;
    transform: translateX(0);
}

.feature-interactive:hover .feature-arrow {
    background: var(--primary-color);
    color: white;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-links a {
    display: block;
    color: #B0B8C4;
    text-decoration: none;
    margin-top: 10px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #374151;
    padding-top: 20px;
    color: #B0B8C4;
}

/* --- SKELETON LOADING --- */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(255,255,255,0.4) 50%, var(--border-color) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.8s infinite linear;
    border-radius: var(--radius-sm);
}
body.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 800px 100%;
    animation: shimmer 1.8s infinite linear;
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text-sm { height: 10px; width: 60%; margin-bottom: 6px; }
.skeleton-card { height: 120px; border-radius: var(--radius-md); }
.skeleton-row { display: flex; gap: 12px; margin-bottom: 12px; }
.skeleton-row .skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-row .skeleton-lines { flex: 1; }

/* --- DARK MODE TOGGLE --- */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    color: var(--dark-text);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* --- VALIDATION MESSAGES --- */
.field-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}
.field-error.visible { display: flex; }
.field-success {
    color: #10b981;
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}
.field-success.visible { display: flex; }
.form-group input.error,
.form-group select.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}
.form-group input.success,
.form-group select.success {
    border-color: #10b981;
    background-color: #f0fdf4;
}

/* --- RESPONSIVE BASICO --- */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .hero h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
}
