/* =====================================================
   🎯 VARIABLES GLOBALES
===================================================== */
:root {
    --primary: #0d6efd;
    --danger: #dc3545;
    --success: #28a745;
    --info: #0dcaf0;

    --text-color: #212529;
    --muted-color: #6c757d;

    --card-bg: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* =====================================================
   🎓 COURSE CARD
===================================================== */
.course-card {
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    transition: transform var(--transition-base),
        box-shadow var(--transition-base);
}

.course-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.course-card img {
    transition: transform var(--transition-base);
}

.course-card:hover img {
    transform: scale(1.05);
}

/* =====================================================
   🔹 UDEMY LOGO
===================================================== */
.udemy-logo {
    height: 20px;
    opacity: 0.85;
    transition: transform var(--transition-fast),
        opacity var(--transition-fast);
}

.course-card:hover .udemy-logo {
    transform: scale(1.1);
    opacity: 1;
}

/* =====================================================
   🧠 BOTONES
===================================================== */
.btn-primary {
    border-radius: 30px;
}

.btn i {
    transition: transform var(--transition-fast);
}

.btn:hover i {
    transform: scale(1.2) rotate(-5deg);
}

.card-footer .btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

/* =====================================================
   💫 EFECTOS GENERALES
===================================================== */
.hover-shadow {
    transition: transform var(--transition-base);
}

.hover-shadow:hover {
    transform: scale(1.02);
}

/* =====================================================
   🗂️ LISTAS
===================================================== */
.list-group-item:hover {
    background-color: var(--bg-light);
}

/* =====================================================
   🌐 NAVBAR
===================================================== */
.navbar-nav .nav-link {
    font-weight: 500;
    transition: color var(--transition-base),
        transform var(--transition-base);
}

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

.navbar-nav .nav-link i {
    margin-right: 5px;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transform: translateX(-50%);
    transition: width var(--transition-base);
}

.navbar-nav .nav-item:hover::after {
    width: 60%;
}

/* =====================================================
   ⚙️ ICONOS GRANDES
===================================================== */
.bi-tools {
    font-size: 5rem;
}

/* =====================================================
   📢 BLOQUES PUBLICIDAD
===================================================== */
.bg-light.border.text-center {
    background: #fdfdfd;
    border-radius: 8px;
    transition: transform var(--transition-base),
        background var(--transition-base);
}

.bg-light.border.text-center:hover {
    background: var(--bg-light);
    transform: scale(1.02);
}

/* =====================================================
   🌗 DARK MODE
===================================================== */
body.dark-mode {
    --card-bg: #1f1f1f;
    --text-color: #eaeaea;
    --muted-color: #bbb;
    --border-color: #333;
    background-color: #121212;
    color: var(--text-color);
}

body.dark-mode .navbar,
body.dark-mode footer {
    background-color: #1c1c1c !important;
}

body.dark-mode .card,
body.dark-mode .course-card {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

body.dark-mode .list-group-item {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

body.dark-mode .list-group-item:hover {
    background-color: #2a2a2a;
}

body.dark-mode .navbar-nav .nav-link:hover {
    color: #66b3ff !important;
}

/* =====================================================
   🏷️ BADGES
===================================================== */
.badge.bg-danger {
    background: linear-gradient(45deg, #dc3545, #ff4d6d);
}

.badge.bg-primary {
    background: linear-gradient(45deg, #007bff, #3399ff);
}

.badge.bg-info {
    background: linear-gradient(45deg, #0dcaf0, #66d9ff);
}

.badge.bg-success {
    background: linear-gradient(45deg, #28a745, #43d26c);
}

/* =====================================================
   ✨ BADGES ANIMADOS (CONTROLADOS)
===================================================== */
.pulse-badge,
.pulse-badge-discount,
.pulse-badge-news {
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
}

@media (prefers-reduced-motion: no-preference) {

    .pulse-badge {
        animation: pulse-neon 1.6s infinite;
    }

    .pulse-badge-discount {
        animation: pulse-discount 1.6s infinite;
        background: linear-gradient(45deg, #ffb300, #ff6f00);
    }

    .pulse-badge-news {
        animation: pulse-blue 1.6s infinite;
        background: linear-gradient(45deg, #007bff, #00bfff);
    }
}

/* =====================================================
   🖼️ COURSE SHOW IMAGE
===================================================== */
.course-show-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.course-show-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.4s ease;
}

.course-show-image-container:hover .course-show-image {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.2);
}

/* =====================================================
   🪶 LOGIN / REGISTER
===================================================== */
.card {
    border-radius: 12px;
    transition: transform var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
}

body.dark-mode input,
body.dark-mode .form-control {
    background-color: #1f1f1f;
    color: #fff;
    border-color: #333;
}

body.dark-mode input::placeholder {
    color: #aaa;
}

/* =====================================================
   🔗 SOCIAL LINKS
===================================================== */
.social-links a {
    display: inline-block;
    transition: transform var(--transition-base),
        color var(--transition-base);
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.2);
    color: #ffd43b !important;
}

/* =====================================================
   📰 NEWS CONTENT
===================================================== */
.news-title {
    color: var(--text-color);
}

.news-excerpt,
.news-meta {
    color: var(--muted-color);
}

.news-content {
    font-family: Georgia, serif;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}

.news-content img,
.news-content iframe {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.news-content iframe {
    aspect-ratio: 16 / 9;
}

/* =====================================================
   📊 TABLAS
===================================================== */
.news-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
}

.news-content table td,
.news-content table th {
    padding: 10px;
    border: 1px solid #ddd;
}

/* =====================================
   FOOTER FIX - TEXT COLORS ON DARK BG
===================================== */
footer.bg-dark {
    color: #eaeaea;
}

footer.bg-dark .text-muted {
    color: #bfc5cc !important;
}

footer.bg-dark a.text-muted {
    color: #bfc5cc !important;
}

footer.bg-dark a.text-muted:hover {
    color: #ffffff !important;
}

/* =====================================
   📂 SIDEBAR CATEGORÍAS – LISTA COMPLETA
===================================== */
.category-sidebar-full {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 14px;
    border: 1px solid #e9ecef;
}

/* Título */
.category-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: #6c757d;
}

/* Lista completa */
.category-list-full {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Items compactos */
.category-item-full {
    display: block;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.4;
    color: #495057;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

/* Hover */
.category-item-full:hover {
    background: #f1f4ff;
    color: #0d6efd;
}

/* Activo */
.category-item-full.active {
    background: #0d6efd;
    color: #ffffff;
    font-weight: 500;
}

/* Dark mode */
body.dark-mode .category-sidebar-full {
    background: #1f1f1f;
    border-color: #2f2f2f;
}

body.dark-mode .category-title {
    color: #aaa;
}

body.dark-mode .category-item-full {
    color: #ccc;
}

body.dark-mode .category-item-full:hover {
    background: #2a2a2a;
}

body.dark-mode .category-item-full.active {
    background: #0d6efd;
    color: #fff;
}

/* ===============================
        CTA NEON – SIN BOOTSTRAP
        ================================ */
.btn-neon {
    display: inline-flex;
    align-items: center;
    gap: .5rem;

    padding: 1rem 2rem;
    font-size: 1.1rem;

    color: #fff;
    text-decoration: none;

    border-radius: .65rem;
    cursor: pointer;

    position: relative;

    animation: neonPulse 2.8s ease-in-out infinite;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-neon:hover {
    animation-play-state: paused;
    transform: scale(1.05);
    color: #fff;
}

/* ===============================
        HOTMART – NARANJA NEON
        ================================ */
.btn-neon-hotmart {
    background: #ff6a00;
    box-shadow:
        0 0 12px rgba(255, 106, 0, .6),
        0 0 28px rgba(255, 106, 0, .45);
}

.btn-neon-hotmart:hover {
    box-shadow:
        0 0 22px rgba(255, 106, 0, .9),
        0 0 48px rgba(255, 106, 0, .7);
}

/* ===============================
        UDEMY – AZUL NEON
        ================================ */
.btn-neon-udemy {
    background: #5624d0;
    box-shadow:
        0 0 12px rgba(86, 36, 208, .6),
        0 0 28px rgba(86, 36, 208, .45);
}

.btn-neon-udemy:hover {
    box-shadow:
        0 0 22px rgba(86, 36, 208, .9),
        0 0 48px rgba(86, 36, 208, .7);
}

/* ===============================
        ANIMACIÓN REAL (VISIBLE)
        ================================ */
@keyframes neonPulse {
    0% {
        box-shadow:
            0 0 10px rgba(255, 255, 255, .25),
            0 0 20px rgba(255, 255, 255, .15);
    }

    50% {
        box-shadow:
            0 0 22px rgba(255, 255, 255, .55),
            0 0 45px rgba(255, 255, 255, .35);
    }

    100% {
        box-shadow:
            0 0 10px rgba(255, 255, 255, .25),
            0 0 20px rgba(255, 255, 255, .15);
    }
}

/* ===============================
        HALO NEON REAL (VISIBLE)
        ================================ */
.btn-neon::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    z-index: -1;
    opacity: .6;
    filter: blur(14px);
    animation: neonHalo 2.8s ease-in-out infinite;
    pointer-events: none;
}

/* HOTMART */
.btn-neon-hotmart::after {
    background: rgba(255, 106, 0, 0.75);
}

/* UDEMY */
.btn-neon-udemy::after {
    background: rgba(86, 36, 208, 0.75);
}

/* ===============================
        ANIMACIÓN DEL HALO
        ================================ */
@keyframes neonHalo {
    0% {
        opacity: .4;
        transform: scale(.95);
    }

    50% {
        opacity: .85;
        transform: scale(1.05);
    }

    100% {
        opacity: .4;
        transform: scale(.95);
    }
}

/* ===============================
        BADGES OVERLAY (SIN BOOTSTRAP)
        ================================ */
.mlf-badge {
    position: absolute;
    top: 12px;
    padding: 6px 10px;
    font-size: .85rem;
    border-radius: 20px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2;

    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Rating izquierda */
.badge-rating {
    left: 12px;
}

.badge-rating i {
    color: #ffc107;
}

/* Precio derecha */
.badge-price {
    right: 12px;
}

/* Colores por plataforma */
.badge-price-hotmart {
    background-color: rgba(255, 106, 0, 0.85);
}

.badge-price-udemy {
    background-color: rgba(86, 36, 208, 0.85);
}

.badge-price-default {
    background-color: rgba(0, 0, 0, 0.7);
}

/* ==================================================
   CONTENIDO DE NOTICIAS / TINYMCE
   Clase: .news-content
================================================== */

.news-content {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.75;
    color: #1f2937;
    /* gris oscuro legible */
    max-width: 880px;
    margin: 0 auto;
}

/* --------------------
   TÍTULOS
-------------------- */
.news-content h1,
.news-content h2,
.news-content h3,
.news-content h4 {
    font-weight: 700;
    line-height: 1.3;
    margin: 2.2rem 0 1.2rem;
    color: #111827;
}

.news-content h1 {
    font-size: 2.2rem;
}

.news-content h2 {
    font-size: 1.8rem;
}

.news-content h3 {
    font-size: 1.4rem;
}

.news-content h4 {
    font-size: 1.2rem;
}

/* --------------------
   PÁRRAFOS
-------------------- */
.news-content p {
    margin-bottom: 1.3rem;
}

/* --------------------
   ENLACES
-------------------- */
.news-content a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.news-content a:hover {
    color: #1d4ed8;
}

/* --------------------
   LISTAS
-------------------- */
.news-content ul,
.news-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.news-content li {
    margin-bottom: 0.5rem;
}

/* --------------------
   CITAS
-------------------- */
.news-content blockquote {
    border-left: 4px solid #2563eb;
    padding: 1rem 1.2rem;
    margin: 2rem 0;
    background: #f9fafb;
    color: #374151;
    font-style: italic;
    border-radius: 6px;
}

/* --------------------
   IMÁGENES
-------------------- */
.news-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2.5rem auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Imagen destacada (coverButton) */
.news-content .highlight-cover {
    border: 4px solid #2563eb;
    padding: 6px;
    border-radius: 12px;
}

/* --------------------
   CAJAS PERSONALIZADAS
-------------------- */
.news-content .alert-box {
    background: #fff7ed;
    border-left: 6px solid #f97316;
    padding: 1.2rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-weight: 500;
}

.news-content .note-box {
    background: #eff6ff;
    border-left: 6px solid #2563eb;
    padding: 1.2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

/* --------------------
   IFRAME / YOUTUBE
-------------------- */
.news-content iframe {
    width: 100%;
    min-height: 420px;
    border-radius: 12px;
    margin: 2.5rem 0;
}

/* --------------------
   TABLAS
-------------------- */
.news-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.news-content th,
.news-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
}

.news-content th {
    background: #f3f4f6;
    font-weight: 600;
}

/* --------------------
   CÓDIGO
-------------------- */
.news-content pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 1.2rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.news-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* ==================================================
   DARK MODE
================================================== */

body.dark-mode .news-content {
    color: #e5e7eb;
}

body.dark-mode .news-content h1,
body.dark-mode .news-content h2,
body.dark-mode .news-content h3,
body.dark-mode .news-content h4 {
    color: #f9fafb;
}

body.dark-mode .news-content blockquote {
    background: #020617;
    color: #d1d5db;
    border-left-color: #60a5fa;
}

body.dark-mode .news-content a {
    color: #93c5fd;
}

body.dark-mode .news-content table th {
    background: #020617;
}

body.dark-mode .news-content code {
    background: #020617;
    color: #e5e7eb;
}
