/* ========================================
   HEADER STYLES - Academia Finanzas
   ======================================== */

:root {
    /* Colores principales (alineados con landing page) */
    --primary-orange: #FF8C00;
    --primary-orange-light: #FFA500;
    --primary-orange-dark: #FF6B00;
    --gold-primary: #D4AF37;
    --gold-light: #F5DEB3;
    --gold-dark: #B8860B;
    --primary-orange-gradient: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);

    /* Colores complementarios */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #E9ECEF;
    --dark-gray: #6C757D;
    --black: #1a1a1a;
    --text-primary: #2D3436;
    --text-secondary: #636E72;

    /* Sombras */
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-orange: 0 4px 20px rgba(255, 140, 0, 0.15);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.2);

    /* Transiciones */
    --transition-medium: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header {
    background: var(--gradient-gold) !important;
    padding: 0;
    box-shadow: var(--shadow-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

/* Logo/Brand Section */
.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px 40px 15px;
}

.header-brand img {
    height: 40px;
    width: auto;
}

header h1 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    padding: 25px 40px 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

/* Navigation */
header nav {
    display: flex;
    gap: 5px;
    padding: 0 40px 20px;
    flex-wrap: wrap;
    align-items: center;
}

header nav a {
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition-medium);
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en hover */
header nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-orange-gradient);
    transition: left 0.5s ease;
}

header nav a:hover::before {
    left: 100%;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

header nav a:active {
    transform: translateY(0);
}

/* Active State */
header nav a.active {
    background-color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

/* Special Buttons (Login/Register) */
header nav a.btn-login {
    border: 2px solid var(--white);
    padding: 8px 18px;
}

header nav a.btn-login:hover {
    background-color: var(--white);
    color: var(--primary-orange);
    font-weight: 600;
}

header nav a.btn-register {
    background-color: var(--white);
    color: var(--primary-orange);
    font-weight: 600;
    padding: 10px 24px;
    box-shadow: var(--shadow-light);
}

header nav a.btn-register:hover {
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Separador visual */
header nav .nav-separator {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
}


/* User Info (cuando está logueado) */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--gold-primary);
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 8px;
    overflow: hidden;
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 20px;
    display: block;
    transition: all 0.2s ease;
    font-weight: 500;
    border-radius: 0;
}

.dropdown-content a:hover {
    background-color: #FFF3CD;
    color: var(--gold-primary);
    transform: translateX(5px);
}

/* Badge de notificaciones */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #EF4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 22px;
        padding: 20px 20px 12px;
    }

    header nav {
        padding: 0 20px 15px;
        gap: 8px;
    }

    header nav a {
        padding: 8px 14px;
        font-size: 14px;
    }

    .header-brand {
        padding: 20px 20px 12px;
    }

    /* Ocultar algunos elementos en móvil */
    .nav-separator {
        display: none;
    }
}

@media (max-width: 640px) {
    .mobile-menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: 0;
    }

    header nav.active {
        display: flex;
    }

    header nav a {
        width: 100%;
        text-align: left;
        padding: 15px 20px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    header nav a:hover {
        transform: none;
        padding-left: 30px;
    }

    .user-info {
        margin-left: 0;
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sticky Header Effect */
header.scrolled {
    box-shadow: 0 6px 30px rgba(255, 184, 0, 0.4);
}

header.scrolled h1 {
    padding: 15px 40px 10px;
    font-size: 24px;
}

header.scrolled nav {
    padding: 0 40px 12px;
}

/* Loading State */
header.loading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, white, transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   ESTILOS ADICIONALES PARA CURSOS
   ======================================== */

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 215, 0, 0.08) 50%, rgba(255, 140, 0, 0.08) 100%);
    border-radius: 20px;
    margin-bottom: 50px;
}

.hero-section h1 {
    font-size: 48px;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.hero-section p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.stat-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition-medium);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Filters Section */
.filters-section {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 25px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-light);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.filter-group select {
    padding: 10px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    font-size: 14px;
    background: var(--white);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-medium);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition-medium);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    bottom: 12px;
    font-size: 18px;
    pointer-events: none;
}

/* Section Title */
.section-title {
    font-size: 32px;
    color: #1F2937;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Course Image Wrapper */
.course-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.course-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image-wrapper img {
    transform: scale(1.1);
}

/* Badges */
.badge-free,
.badge-featured {
    position: absolute;
    top: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 1;
}

.badge-free {
    left: 15px;
    background: #10B981;
    color: white;
}

.badge-featured {
    right: 15px;
    background: linear-gradient(135deg, #FFD000, #FFB800);
    color: white;
}

/* Course Meta */
.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.meta-item {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--light-gray);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Course Description */
.course-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Course Rating */
.course-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.stars {
    font-size: 16px;
    color: var(--primary-orange);
}

.rating-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Price Section */
.price-section .price.free {
    color: #10B981;
    font-weight: 700;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-gold);
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    margin: 60px 0 40px;
    box-shadow: var(--shadow-gold);
}

.cta-section h2 {
    color: var(--white);
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-medium);
    display: inline-block;
}

.cta-button.primary {
    background: var(--white);
    color: var(--primary-orange);
    box-shadow: var(--shadow-medium);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-orange);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-orange);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-orange-gradient);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out;
}

.footer-left,
.footer-center,
.footer-right {
    flex: 1;
    min-width: 250px;
    animation: fadeIn 1s ease-out;
    animation-fill-mode: both;
}

.footer-left {
    animation-delay: 0.2s;
}

.footer-center {
    animation-delay: 0.4s;
}

.footer-right {
    animation-delay: 0.6s;
}

.logo-footer {
    font-size: 36px;
    font-weight: bold;
    background: var(--primary-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    display: inline-block;
    animation: glow 3s ease-in-out infinite;
}

.footer-left p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-left a {
    color: var(--primary-orange-light);
    text-decoration: none;
    transition: var(--transition-medium);
    position: relative;
}

.footer-left a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-orange);
    transition: width 0.3s ease;
}

.footer-left a:hover::after {
    width: 100%;
}

.footer-left a:hover {
    color: var(--primary-orange);
    transform: translateX(5px);
}

.footer-center h3,
.footer-right h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-orange);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-center h3::after,
.footer-right h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-orange-gradient);
}

.footer-center a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition-medium);
    position: relative;
    padding-left: 15px;
}

.footer-center a::before {
    content: '→';
    position: absolute;
    left: 0;
    opacity: 0;
    transition: var(--transition-medium);
}

.footer-center a:hover::before {
    opacity: 1;
}

.footer-center a:hover {
    color: var(--primary-orange);
    padding-left: 25px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #333 0%, #444 100%);
    color: var(--white);
    transition: all 0.4s ease;
    animation: scaleIn 0.6s ease-out;
    animation-fill-mode: both;
}

.social-icon:nth-child(1) {
    animation-delay: 0.8s;
}

.social-icon:nth-child(2) {
    animation-delay: 0.9s;
}

.social-icon:nth-child(3) {
    animation-delay: 1s;
}

.social-icon:hover {
    background: var(--primary-orange-gradient);
    color: var(--white);
    transform: scale(1.2) rotate(360deg);
    box-shadow: var(--shadow-orange);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.footer-newsletter {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.footer-newsletter h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-orange);
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #555;
    border-radius: 25px;
    font-size: 14px;
    background-color: #333;
    color: var(--white);
    transition: var(--transition-medium);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: #404040;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.3);
}

.newsletter-btn {
    background: var(--primary-orange-gradient);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-orange);
}

.newsletter-btn:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FFD700 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(243, 156, 18, 0.6);
}

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

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--medium-gray);
    border-top-color: var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

.menu-icon {
    font-size: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 32px;
    }

    .hero-section p {
        font-size: 16px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-section {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .cta-section {
        padding: 40px 25px;
    }

    .cta-section h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
    }

    .footer {
        padding: 40px 20px;
    }
}

/* Course Card */
.course-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-orange-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.course-card:hover::before {
    transform: scaleX(1);
}

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

.course-card-content {
    padding: 25px;
    flex-grow: 1;
}

.course-card-content h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.course-card-footer {
    padding: 20px 25px;
    background: linear-gradient(to bottom, transparent, var(--light-gray));
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-orange);
}