:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6f42c1;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1);
    --border-radius: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-bg);
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.header-main {
    transition: all 0.3s ease;
}

.navbar {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-link {
    font-weight: 600;
    color: var(--text-main) !important;
    transition: color 0.3s ease;
}

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

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hover-up {
    transition: transform 0.3s ease;
}

.hover-up:hover {
    transform: translateY(-5px);
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
    background: radial-gradient(circle at top right, rgba(13, 110, 253, 0.05), transparent);
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    position: absolute;
}

.stat-card-1 { top: 20%; left: -50px; }
.stat-card-2 { bottom: 20%; right: -30px; }

/* Cards */
.card-premium {
    border: none;
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 2rem;
}

.card-premium:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Dashboard Mockup */
.dashboard-mockup {
    background: var(--dark-bg);
    border-radius: 24px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}

.mockup-inner {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 20px;
    min-height: 400px;
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.question-box {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.option-item {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.02);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

/* Results Section */
.results-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

/* Testimonials */
.testimonial-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: rgba(13, 110, 253, 0.05);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1e293b 100%);
    padding: 80px 0;
    color: var(--white);
    border-radius: 32px;
    margin: 60px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.1), transparent);
    border-radius: 50%;
}

/* Footer Links */
.footer-links a, .footer-contact span {
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

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

.animate-bounce {
    animation: bounce 3s infinite ease-in-out;
}

.icon-circle {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.bg-primary-subtle { background-color: rgba(13, 110, 253, 0.1) !important; }
.bg-success-subtle { background-color: rgba(16, 185, 129, 0.1) !important; }

/* DASHBOARD DASHBOARD REDESIGN */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #071326;
    color: var(--white);
    overflow: hidden;
}

/* SIDEBAR */
.sidebar-modern {
    width: 280px;
    background: #0b1f3a;
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: 100;
    transition: all 0.3s ease;
}

.brand-text {
    letter-spacing: -0.5px;
}

.text-cyan { color: #00f2ff !important; }
.bg-cyan { background-color: #00f2ff !important; }
.bg-cyan-subtle { background-color: rgba(0, 242, 255, 0.1) !important; }
.bg-purple-subtle { background-color: rgba(111, 66, 193, 0.1) !important; }
.text-purple { color: #6f42c1 !important; }

.nav-link-modern {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link-modern:hover, .nav-link-modern.active {
    background: rgba(0, 242, 255, 0.05);
    color: #00f2ff;
}

.nav-link-modern i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-link-modern:hover i {
    transform: scale(1.1);
}

/* MAIN DASHBOARD */
.main-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

/* TOPBAR */
.topbar-modern {
    height: 80px;
    background: rgba(11, 31, 58, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-bar {
    background: rgba(255,255,255,0.03);
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 300px;
    border: 1px solid rgba(255,255,255,0.05);
}

.search-bar input::placeholder { color: #64748b; }
.search-bar input:focus { outline: none; }

.avatar-img {
    width: 40px;
    height: 40px;
    border: 2px solid #00f2ff;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #0b1f3a;
}

/* DASHBOARD CONTENT */
.dashboard-content {
    padding: 40px;
    position: relative;
}

.glow-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.glow-1 { top: -100px; right: -100px; background: #00f2ff; }
.glow-2 { bottom: -100px; left: -100px; background: #6f42c1; }

/* STAT CARDS */
.stat-card-premium {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card-premium:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-5px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* SIMULACRO CARDS */
.simulacro-card-premium {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.simulacro-card-premium:hover {
    transform: translateY(-12px);
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at top right, rgba(0, 242, 255, 0.1), transparent 70%);
    pointer-events: none;
}

.badge-modern {
    background: rgba(0, 242, 255, 0.1);
    color: #00f2ff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-icon {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.sim-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.sim-meta {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.8rem;
}

.btn-start-sim {
    background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
    color: var(--white);
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

.btn-start-sim:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 114, 255, 0.5);
    color: var(--white);
}

.btn-dark-modern {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-dark-modern:hover, .btn-dark-modern.active {
    background: #00f2ff;
    color: #071326;
    border-color: #00f2ff;
}

/* RESPONSIVE DASHBOARD */
@media (max-width: 991px) {
    .sidebar-modern {
        width: 80px;
        padding: 30px 15px;
    }
    .brand-text, .nav-link-modern span {
        display: none;
    }
    .nav-link-modern {
        justify-content: center;
        padding: 14px;
    }
    .nav-link-modern i {
        margin: 0 !important;
    }
}

@media (max-width: 768px) {
    .sidebar-modern {
        display: none;
    }
    .dashboard-content {
        padding: 20px;
    }
    .topbar-modern {
        padding: 0 20px;
    }
    .search-bar {
        width: 150px;
    }
}

/* EXAM CATALOG REDESIGN (REF: IMAGE) */
.dashboard-top-nav {
    background: #0046a1; /* Azul institucional similar a la imagen */
    padding: 0;
    margin-bottom: 30px;
}

.dashboard-top-nav .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 15px 20px !important;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.dashboard-top-nav .nav-link:hover, 
.dashboard-top-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
    border-bottom-color: #fff;
}

.exam-card-ref {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.exam-card-ref:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.exam-card-banner {
    background: #f1f5f9;
    padding: 20px;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.exam-card-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: #cbd5e1;
}

.exam-card-banner h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 800;
}

.exam-card-banner h5 {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.4;
}

.exam-card-body {
    padding: 20px;
    flex-grow: 1;
}

.exam-card-category {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 15px;
    font-weight: 500;
}

.exam-card-title {
    font-size: 0.95rem;
    color: #0046a1;
    font-weight: 700;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exam-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.exam-card-meta span {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.exam-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.exam-card-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.exam-card-footer {
    padding: 0 20px 20px;
}

.btn-start-exam-blue {
    background: #0069ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s ease;
}

.btn-start-exam-blue:hover {
    background: #0056d2;
    color: #fff;
}

/* RESPONSIVE OPTIMIZATION (MAXIMUM PRECISION) */
@media (max-width: 1200px) {
    .exam-card-ref {
        margin-bottom: 10px;
    }
}

@media (max-width: 991px) {
    .dashboard-top-nav .nav {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        scrollbar-width: none; /* Firefox */
    }
    .dashboard-top-nav .nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .dashboard-top-nav .nav-link {
        padding: 12px 15px !important;
        font-size: 0.85rem;
    }
    .topbar-right {
        padding-left: 10px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 768px) {
    .dashboard-top-nav .container-fluid {
        flex-direction: column;
        padding: 10px 0;
    }
    .topbar-right {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 10px;
        margin-top: 5px;
    }
    .exam-card-banner {
        padding: 15px;
    }
    .exam-card-banner h5 {
        font-size: 0.9rem;
    }
    .exam-card-body {
        padding: 15px;
    }
    .exam-card-title {
        font-size: 0.85rem;
        height: 2.4em; /* Ensure consistent height for 2 lines */
    }
    .dashboard-content {
        padding-top: 20px !important;
    }
}

@media (max-width: 576px) {
    .exam-card-meta {
        gap: 8px;
    }
    .exam-card-meta span {
        font-size: 0.75rem;
    }
    .btn-start-exam-blue {
        padding: 12px;
        font-size: 0.85rem;
    }
    .dashboard-top-nav .nav-link {
        padding: 10px 12px !important;
    }
    .user-info h6 {
        font-size: 0.75rem;
    }
    .user-info small {
        font-size: 0.65rem;
    }
}

/* Fix for horizontal scroll on body */
body {
    overflow-x: hidden;
    width: 100%;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

.glow-bg {
    animation: glow-pulse 5s infinite alternate ease-in-out;
}

    background: #f8fafc;
    padding: 100px 0;
}

.demo-container {
    background: var(--white);
    border-radius: 32px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.demo-sidebar-ai {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
    padding: 30px;
}

.ai-assistant-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(13, 110, 253, 0.1);
}

.ai-chat-box {
    background: #f8fafc;
    border-radius: 15px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.ai-message {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: 15px 15px 0 15px;
    margin-bottom: 10px;
    display: inline-block;
}

.ai-response {
    background: var(--white);
    color: var(--text-main);
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.demo-main-exam {
    padding: 40px;
}

.demo-sidebar-nav {
    background: #f1f5f9;
    padding: 30px;
    border-left: 1px solid #e2e8f0;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.question-num {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
    border: 1px solid #e2e8f0;
}

.question-num.answered { background: #10b981; color: var(--white); border-color: #10b981; }
.question-num.marked { background: #f59e0b; color: var(--white); border-color: #f59e0b; }
.question-num.active { border-color: var(--primary-color); color: var(--primary-color); box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1); }

.legend-item {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Custom Scroll */
.demo-scroll {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.demo-scroll::-webkit-scrollbar { width: 5px; }
.demo-scroll::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

@media (max-width: 1200px) {
    .demo-container { flex-direction: column; }
    .demo-sidebar-ai, .demo-sidebar-nav { border: none; width: 100%; }
}

    width: 35px;
    height: 35px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.option-item.selected .option-marker {
    background: var(--primary-color);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

    .hero-section { padding: 60px 0; }
    .stat-card { position: relative; left: 0; right: 0; margin-bottom: 20px; }
    .stat-card-1, .stat-card-2 { top: 0; bottom: 0; }
    .hero-image-wrapper { margin-top: 50px; }
}
