/* ──────────────────────────────────────────────────────────
   COURSES SECTION – Premium Reproduction
   ────────────────────────────────────────────────────────── */
.eduma-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.sp-pop-courses-section {
    position: relative;
    padding: 3.5rem 0 2.5rem;
    background: #fbfdff;
    overflow: hidden;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    z-index: 1;
}

/* ── Background Elements ── */
.sp-pop-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.sp-pop-mesh {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M-100,300 Q200,100 500,300 T1100,300 T1700,300' fill='none' stroke='url(%23grad1)' stroke-width='1.5' opacity='0.4'/%3E%3Cpath d='M-100,320 Q200,150 500,320 T1100,320 T1700,320' fill='none' stroke='url(%23grad2)' stroke-width='1' opacity='0.3'/%3E%3Cpath d='M-100,280 Q200,50 500,280 T1100,280 T1700,280' fill='none' stroke='url(%23grad1)' stroke-width='0.5' opacity='0.2'/%3E%3Cdefs%3E%3ClinearGradient id='grad1' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%238b5cf6'/%3E%3Cstop offset='100%25' stop-color='%233b82f6'/%3E%3C/linearGradient%3E%3ClinearGradient id='grad2' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%23ec4899'/%3E%3Cstop offset='100%25' stop-color='%238b5cf6'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* Floating 3D Elements */
.sp-pop-orb-white {
    position: absolute;
    top: 10%;
    left: 45%;
    width: 140px;
    height: 140px;
    animation: floatOrb 15s ease-in-out infinite;
}
.sp-pop-orb-white .orb-core {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f1f5f9 60%, #cbd5e1 100%);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05), inset -10px -10px 20px rgba(0,0,0,0.05);
}
.sp-pop-orb-white .orb-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 240px; height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transform: translate(-50%, -50%) rotateX(70deg) rotateY(20deg);
    animation: spinRing 25s linear infinite;
    transform-style: preserve-3d;
}
.sp-pop-orb-white .ring-dot {
    position: absolute;
    width: 8px; height: 8px;
    background: #eab308;
    border-radius: 50%;
    box-shadow: 0 0 15px #eab308;
    top: 0; left: 50%;
    transform: translate(-50%, -50%);
}

/* Bottom decorative blob */
.sp-pop-blob-bottom {
    position: absolute;
    bottom: -60px;
    right: -40px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(236, 72, 153, 0.08), rgba(139, 92, 246, 0.12), transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: -1;
    animation: floatOrb 18s ease-in-out infinite reverse;
}

.sp-pop-blob-left {
    position: absolute;
    bottom: -30px;
    left: -60px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.06), rgba(139, 92, 246, 0.1), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: -1;
    animation: floatOrb 14s ease-in-out infinite;
}

.sp-pop-cube-pink {
    position: absolute;
    top: 20%; right: 30%;
    width: 30px; height: 30px;
    background: linear-gradient(135deg, #f472b6, #db2777);
    border-radius: 8px;
    transform: rotate(45deg);
    box-shadow: 0 10px 20px rgba(219, 39, 119, 0.3);
    animation: floatOrb 12s ease-in-out infinite reverse;
}

/* Particles */
.sp-pop-particles {
    position: absolute; inset: 0;
}
.p-dot {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle 8s ease-in-out infinite alternate;
}
.p-dot.p1 { width: 12px; height: 12px; background: radial-gradient(circle, #fbcfe8, #ec4899); top: 10%; right: 20%; box-shadow: 0 0 10px rgba(236,72,153,0.5); }
.p-dot.p2 { width: 8px; height: 8px; background: #8b5cf6; top: 80%; left: 15%; box-shadow: 0 0 10px rgba(139,92,246,0.5); }
.p-dot.p3 { width: 6px; height: 6px; background: #3b82f6; top: 40%; left: 5%; }
.p-dot.p4 { width: 10px; height: 10px; background: #eab308; top: 90%; right: 10%; }

@keyframes floatOrb {
    0%, 100% { transform: translateY(0) translateX(0) rotate(45deg); }
    50% { transform: translateY(-20px) translateX(10px) rotate(60deg); }
}
@keyframes floatParticle {
    0% { transform: translateY(0); opacity: 0.5; }
    100% { transform: translateY(-15px); opacity: 1; }
}

/* ── Header ── */
.sp-pop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.sp-pop-header-left {
    max-width: 600px;
}

.sp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.sp-eyebrow i { color: #eab308; font-size: 0.9rem; }

.sp-pop-courses-section .sp-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.sp-pop-courses-section .sp-title .text-gradient {
    background: linear-gradient(135deg, #1e40af, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sp-pop-courses-section .sp-subtitle {
    font-size: 1.1rem;
    color: #334155;
    font-weight: 400;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    margin: 0 0 0.5rem;
}
.sp-pop-courses-section .sp-subtitle strong { color: #3b82f6; font-weight: 700; }

.sp-desc {
    font-size: 1.1rem;
    color: #334155;
    font-weight: 600;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    line-height: 1.5;
}

.sp-pop-header {
    margin-bottom: 1.5rem;
}

.sp-pop-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ── Carousel Cards ── */
.sp-pop-slider-wrapper {
    position: relative;
    z-index: 2;
    margin-bottom: 0.75rem;
}

.eduma-courses-swiper {
    padding-bottom: 20px;
    overflow: visible; /* To see side cards */
}

.swiper-slide {
    width: 290px;
    height: auto;
    display: flex;
}
.sp-course-card {
    flex: 1;
    min-height: 0;
}

/* Base Card */
.sp-course-card {
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
}
.sp-course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

/* Image Top Half */
.sp-card-image-wrap {
    position: relative;
    height: 130px;
    width: 100%;
}
.sp-card-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.thumb-placeholder {
    width: 100%; height: 100%;
    background: #cbd5e1;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: #fff;
}

/* Price Tag on Image */
.sp-card-price {
    position: absolute;
    top: 12px; left: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 10;
    backdrop-filter: blur(6px);
    background: rgba(59, 130, 246, 0.88);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.25);
}
.sp-card-price.is-free {
    background: rgba(16, 185, 129, 0.88);
    border-color: rgba(16, 185, 129, 0.4);
}
.sp-card-bookmark {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
    cursor: pointer; z-index: 10;
    transition: background 0.3s;
}
.sp-card-bookmark:hover { background: #fff; color: #0f172a; }

/* Theming (Dark vs Light) */
/* DARK THEME */
.sp-course-card.dark-theme {
    background: linear-gradient(180deg, #1e1b4b 0%, #172554 100%);
    color: #ffffff;
}
.sp-course-card.dark-theme .sp-card-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, #1e1b4b 100%);
}
.sp-course-card.dark-theme .sp-card-cat { color: #93c5fd; }
.sp-course-card.dark-theme .sp-card-title a { color: #ffffff; }
.sp-course-card.dark-theme .sp-card-meta { color: #94a3b8; }
.sp-course-card.dark-theme .meta-item .rating-val { color: #fff; }
.sp-course-card.dark-theme .meta-item .ph-star { color: #eab308; }
.sp-course-card.dark-theme .sp-card-footer { border-top: 1px solid rgba(255,255,255,0.1); }
.sp-course-card.dark-theme .i-name { color: #e2e8f0; }
.sp-course-card.dark-theme .i-role { color: #94a3b8; }
.sp-course-card.dark-theme .sp-card-arrow-btn { background: rgba(255,255,255,0.1); color: #fff; }

/* LIGHT THEME */
.sp-course-card.light-theme {
    background: #ffffff;
    color: #0f172a;
}
.sp-course-card.light-theme .sp-card-img-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 0%, #ffffff 100%);
}
.sp-course-card.light-theme .sp-card-cat { color: #3b82f6; }
.sp-course-card.light-theme .sp-card-title a { color: #0f172a; }
.sp-course-card.light-theme .sp-card-meta { color: #64748b; }
.sp-course-card.light-theme .meta-item .rating-val { color: #0f172a; }
.sp-course-card.light-theme .meta-item .ph-star { color: #eab308; }
.sp-course-card.light-theme .sp-card-footer { border-top: 1px solid rgba(0,0,0,0.05); }
.sp-course-card.light-theme .i-name { color: #0f172a; }
.sp-course-card.light-theme .i-role { color: #64748b; }
.sp-course-card.light-theme .sp-card-arrow-btn { background: #f1f5f9; color: #0f172a; }
.sp-course-card.light-theme .sp-card-arrow-btn:hover { background: #e2e8f0; }

/* Content Layout */
.sp-card-content {
    padding: 0 16px 16px;
    position: relative;
    z-index: 2;
    flex: 1;
}
.sp-card-cat {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.sp-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.3;
}
.sp-card-title a { text-decoration: none; transition: opacity 0.3s; }
.sp-card-title a:hover { opacity: 0.8; }

.sp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
}
.meta-item {
    display: inline-flex; align-items: center; gap: 4px;
}
.meta-item i { font-size: 0.9rem; }

.sp-card-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sp-card-instructor {
    display: flex;
    align-items: center;
    gap: 10px;
}
.instructor-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #cbd5e1;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #94a3b8;
    overflow: hidden;
}
.instructor-info {
    display: flex; flex-direction: column;
}
.i-name { font-size: 0.8rem; font-weight: 700; }
.i-role { font-size: 0.65rem; font-family: 'Inter', sans-serif; }

.sp-card-arrow-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
}
.sp-card-arrow-btn:hover { transform: scale(1.1); }

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.cta-btn-primary {
    position: relative;
    background: linear-gradient(135deg, #2563eb, #4f46e5, #7c3aed);
    color: #fff;
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
    will-change: transform;
    animation: ctaBreatheAggressive 2.4s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
    z-index: 1;
}
.cta-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.25) 45%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.25) 55%, transparent 70%);
    background-size: 300% 100%;
    animation: ctaShine 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}
.cta-btn-primary:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 22px 50px rgba(37, 99, 235, 0.6);
    animation-play-state: paused;
}
.cta-btn-primary:hover::before {
    animation-play-state: paused;
}
.cta-btn-primary:active {
    transform: translateY(0) scale(0.92);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    animation-play-state: paused;
}
.cta-btn-primary i {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta-btn-primary:hover i {
    transform: translateX(8px) scale(1.2);
}

.cta-btn-secondary {
    position: relative;
    background: #ffffff;
    color: #0f172a;
    padding: 14px 28px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    isolation: isolate;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1.5px solid #e2e8f0;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    animation: ctaPulseGlow 2.6s ease-in-out infinite;
    z-index: 1;
}
.cta-btn-secondary::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 42px;
    background: linear-gradient(135deg, #2563eb, #4f46e5, #7c3aed, #4f46e5, #2563eb);
    background-size: 300% 100%;
    animation: ctaBorderGlow 3s ease-in-out infinite;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.cta-btn-secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 38px;
    background: #ffffff;
    z-index: -1;
}
.cta-btn-secondary:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.25);
    border-color: transparent;
    color: #60a5fa;
    animation-play-state: paused;
}
.cta-btn-secondary:hover::before {
    opacity: 1;
}
.cta-btn-secondary:active {
    transform: translateY(0) scale(0.92);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation-play-state: paused;
}
.cta-btn-secondary:active::before {
    opacity: 0.6;
}
.cta-btn-secondary i {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cta-btn-secondary:hover i {
    transform: translateX(6px) scale(1.15);
}

/* ── Loading state ── */
.sp-pop-slider-wrapper.is-loading {
    position: relative;
    min-height: 360px;
}
.sp-pop-slider-wrapper.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(251, 253, 255, 0.7);
    z-index: 10;
    border-radius: 16px;
}
.sp-pop-slider-wrapper.is-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    z-index: 11;
    animation: spLoadSpin 0.8s linear infinite;
}

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

@keyframes ctaBreatheAggressive {
    0%   { transform: translateY(0) scale(1); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45); }
    25%  { transform: translateY(-6px) scale(1.06); box-shadow: 0 28px 55px rgba(37, 99, 235, 0.65); }
    50%  { transform: translateY(-4px) scale(0.97); box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5); }
    70%  { transform: translateY(-5px) scale(1.035); box-shadow: 0 22px 48px rgba(37, 99, 235, 0.6); }
    100% { transform: translateY(0) scale(1); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45); }
}

@keyframes ctaShine {
    0%   { background-position: 200% 0; opacity: 0; }
    10%  { opacity: 1; }
    40%  { background-position: -100% 0; opacity: 1; }
    55%  { opacity: 0; }
    100% { background-position: -100% 0; opacity: 0; }
}

@keyframes ctaPulseGlow {
    0%   { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); }
    50%  { box-shadow: 0 5px 25px rgba(37, 99, 235, 0.18); }
    100% { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); }
}

@keyframes ctaBorderGlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Animations ── */
.sp-animate-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1),
                transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}
.sp-animate-up.is-visible {
    opacity: 1; transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .sp-pop-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .sp-pop-blob-bottom { width: 200px; height: 200px; }
    .sp-pop-blob-left { width: 160px; height: 160px; }
}
@media (max-width: 768px) {
    .sp-pop-courses-section .sp-title { font-size: 2rem; }
    .sp-pop-courses-section { padding: 2.5rem 0 1.5rem; }
    .cta-buttons { flex-direction: column; width: 100%; }
    .cta-buttons a { justify-content: center; font-size: 0.8rem; }
    .sp-pop-blob-bottom { display: none; }
    .sp-pop-blob-left { display: none; }
}

@media (max-width: 480px) {
    .sp-pop-courses-section { padding: 1.5rem 0 1rem; }
    .sp-pop-courses-section .sp-title { font-size: 1.5rem; }
    .sp-pop-header { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .sp-pop-orb-white,
    .sp-pop-cube-pink,
    .p-dot,
    .sp-pop-blob-bottom,
    .sp-pop-blob-left,
    .sp-animate-up,
    .sp-course-card,
    .cta-btn-primary,
    .cta-btn-secondary {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    .sp-animate-up {
        opacity: 1;
        transform: none;
    }
}
