/* 🎯 General transition for smooth UI */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border 0.3s ease;
}

/* 🎓 CARD DE CURSO */
.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    background: var(--card-bg, #fff);
    color: var(--text-color, #212529);
}

.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 0.3s ease, filter 0.3s ease;
}

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

/* 🔹 UDEMY LOGO */
.udemy-logo {
    height: 20px;
    opacity: 0.85;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

/* 🧠 BOTONES */
.btn:hover i {
    transform: scale(1.2) rotate(-5deg);
    transition: transform 0.2s ease-in-out;
}

.card-footer .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #fff;
}

.btn-primary {
    border-radius: 30px;
}

/* 💫 EFECTOS GENERALES */
.hover-shadow:hover {
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* 🗂️ LISTAS / CATEGORÍAS */
.list-group-item:hover {
    background-color: #f8f9fa;
}

/* 🌐 NAVBAR */
.navbar-nav .nav-link {
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd !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%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #0d6efd;
    transition: width 0.3s ease;
}

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

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

/* 📢 BLOQUES DE PUBLICIDAD */
.bg-light.border.text-center {
    background: #fdfdfd;
    transition: all 0.3s ease;
    border-radius: 8px;
}

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

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

body.dark-mode .navbar,
body.dark-mode .footer {
    background-color: var(--nav-bg);
}

body.dark-mode .card,
body.dark-mode .course-card {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: none;
}

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;
}

body.dark-mode .bg-light.border.text-center {
    background-color: #1f1f1f;
    color: var(--text-color);
    border: 1px solid #333;
}

/* 🌙 Transiciones suaves de modo */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 🔧 Compatibilidad con Bootstrap para modo oscuro */
body.dark-mode {
    background-color: var(--bg-color, #121212) !important;
    color: var(--text-color, #eaeaea) !important;
}

body.dark-mode .navbar {
    background-color: var(--nav-bg, #1c1c1c) !important;
}

body.dark-mode .navbar .nav-link {
    color: var(--text-color, #eaeaea) !important;
}

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

body.dark-mode footer {
    background-color: var(--nav-bg, #1c1c1c) !important;
    color: var(--text-color, #eaeaea) !important;
}

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

/* Estilos neutros compatibles con ambos modos */
.course-link {
    color: var(--text-color, #212529);
}

body.dark-mode .course-link {
    color: #eaeaea;
}

.course-author {
    color: var(--muted-color, #6c757d);
}

body.dark-mode .course-author {
    color: #bbb;
}

.price {
    color: #dc3545 !important;
}

.old-price {
    color: #888;
}

body.dark-mode .old-price {
    color: #aaa;
}

.course-meta {
    color: var(--muted-color, #6c757d);
}

body.dark-mode .course-meta {
    color: #bbb;
}

.course-footer {
    background-color: var(--card-bg, #fff);
}

body.dark-mode .course-footer {
    background-color: #1f1f1f !important;
}

/* 🎨 Colores de descuento */
.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);
}

/* =====================================
   ✨ Badge animado con efecto NEÓN / BLUR (¡Gratis! 🎁)
   ===================================== */
.pulse-badge {
    position: relative;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
    animation: pulse-neon 1.6s infinite;
    box-shadow:
        0 0 8px rgba(255, 60, 60, 0.8),
        0 0 15px rgba(255, 60, 60, 0.6),
        0 0 30px rgba(255, 0, 0, 0.4);
}

/* 🌈 Animación de pulso con blur y glow */
@keyframes pulse-neon {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 6px rgba(255, 80, 80, 0.8),
            0 0 15px rgba(255, 0, 0, 0.7),
            0 0 30px rgba(255, 0, 0, 0.5);
    }

    50% {
        transform: scale(1.1);
        box-shadow:
            0 0 20px rgba(255, 100, 100, 1),
            0 0 40px rgba(255, 0, 0, 0.9),
            0 0 60px rgba(255, 0, 0, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow:
            0 0 10px rgba(255, 80, 80, 0.8),
            0 0 25px rgba(255, 0, 0, 0.6),
            0 0 40px rgba(255, 0, 0, 0.4);
    }
}

/* =====================================
   💥 Badge animado para DESCUENTOS (¡Precio Más Bajo! 🔥)
   ===================================== */
.pulse-badge-discount {
    position: relative;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
    animation: pulse-discount 1.6s infinite;
    box-shadow:
        0 0 8px rgba(255, 165, 0, 0.8),
        0 0 15px rgba(255, 140, 0, 0.6),
        0 0 30px rgba(255, 100, 0, 0.4);
    background: linear-gradient(45deg, #ffb300, #ff6f00);
}

/* 🔶 Animación de pulso cálido (efecto fuego) */
@keyframes pulse-discount {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 6px rgba(255, 180, 0, 0.8),
            0 0 15px rgba(255, 140, 0, 0.7),
            0 0 30px rgba(255, 80, 0, 0.5);
    }

    50% {
        transform: scale(1.1);
        box-shadow:
            0 0 20px rgba(255, 200, 0, 1),
            0 0 40px rgba(255, 150, 0, 0.9),
            0 0 60px rgba(255, 100, 0, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow:
            0 0 10px rgba(255, 170, 0, 0.8),
            0 0 25px rgba(255, 120, 0, 0.6),
            0 0 40px rgba(255, 80, 0, 0.4);
    }
}

/* =====================================
   💙 Badge animado con efecto NEÓN AZUL (Noticias)
   ===================================== */
.pulse-badge-news {
    position: relative;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
    animation: pulse-blue 1.6s infinite;
    background: linear-gradient(45deg, #007bff, #00bfff);
    box-shadow:
        0 0 8px rgba(0, 123, 255, 0.8),
        0 0 15px rgba(0, 191, 255, 0.6),
        0 0 30px rgba(0, 150, 255, 0.4);
}

/* 💫 Animación de pulso azul con efecto glow */
@keyframes pulse-blue {
    0% {
        transform: scale(1);
        box-shadow:
            0 0 6px rgba(0, 123, 255, 0.8),
            0 0 15px rgba(0, 191, 255, 0.7),
            0 0 30px rgba(0, 150, 255, 0.5);
    }

    50% {
        transform: scale(1.1);
        box-shadow:
            0 0 20px rgba(51, 153, 255, 1),
            0 0 40px rgba(0, 123, 255, 0.9),
            0 0 60px rgba(0, 191, 255, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow:
            0 0 10px rgba(0, 123, 255, 0.8),
            0 0 25px rgba(0, 191, 255, 0.6),
            0 0 40px rgba(0, 150, 255, 0.4);
    }
}

/* 🌓 Compatibilidad con modo oscuro */
body.dark-mode .badge {
    color: #fff;
    filter: brightness(1.2);
}

/* ================================
   🖼️ Imagen del curso en show.blade.php
   ================================ */
.course-show-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

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

/* Efecto hover aislado solo para imagen del curso */
.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: all 0.3s ease-in-out;
}

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

body.dark-mode .card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

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

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

body.dark-mode .btn-outline-primary {
    color: #66b3ff;
    border-color: #66b3ff;
}

body.dark-mode .btn-outline-primary:hover {
    background-color: #66b3ff;
    color: #000;
}

.social-links a {
    display: inline-block;
    transition: all 0.3s ease;
}

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

/* 📰 Estilos de los títulos y textos de noticias */
.news-title {
    color: var(--text-color, #212529);
    transition: color 0.3s ease;
}

body.dark-mode .news-title {
    color: var(--text-color, #eaeaea);
}

.news-excerpt {
    color: var(--muted-color, #6c757d);
    transition: color 0.3s ease;
}

body.dark-mode .news-excerpt {
    color: #bbb;
}

/* 🕓 Metadatos de publicación (fecha, hora, etc.) */
.news-meta {
    color: var(--muted-color, #6c757d);
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

body.dark-mode .news-meta {
    color: #bbb;
}

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

/* IMÁGENES RESPONSIVAS (MOBILE FRIENDLY) */
.news-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 14px auto !important;
    border-radius: 6px;
}

/* PORTADA DESTACADA */
.news-content .highlight-cover {
    border: 3px solid #007bff;
    padding: 6px;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    margin: 20px auto;
    height: auto;
    border-radius: 8px;
}

/* RESPONSIVE YOUTUBE VIDEO (IFRAMES) */
.news-content iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    /* Mantiene proporción */
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

/* BLOCKQUOTE MEDIUM STYLE */
.news-content blockquote {
    border-left: 4px solid #0099ff;
    padding-left: 15px;
    margin: 20px 0;
    color: #555;
    font-style: italic;
    background: #f7f9ff;
}

/* CAJA DE ALERTA */
.news-content .alert-box {
    padding: 15px;
    background: #fff3cd;
    border-left: 5px solid #f0ad4e;
    margin: 20px 0;
    border-radius: 5px;
}

/* NOTA DESTACADA */
.news-content .note-box {
    padding: 15px;
    background: #e7f3ff;
    border-left: 5px solid #1e90ff;
    margin: 20px 0;
    border-radius: 5px;
}

/* TITULOS MEDIUM */
.news-content h1 {
    font-size: 32px;
    font-weight: bold;
    margin-top: 25px;
}

.news-content h2 {
    font-size: 26px;
    margin-top: 22px;
}

.news-content h3 {
    font-size: 22px;
    margin-top: 20px;
}

/* TABLAS SCROLLABLE EN MÓVIL */
.news-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

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