/* ============================================
   ALLSAFE ARENA - Course Detail Pages Styles
   Premium Redesign — Shared across all courses
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ──────────────────────────────────────────
   NAV OVERRIDE
────────────────────────────────────────── */
.cyber-nav-link {
    background: none !important;
    background-color: transparent !important;
}

/* ──────────────────────────────────────────
   HERO SECTION — Premium Cinematic Redesign
────────────────────────────────────────── */
@keyframes hero-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -40px) scale(1.05); }
    66%       { transform: translate(-20px, 25px) scale(0.97); }
}

@keyframes hero-orb-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%       { transform: translate(-40px, 30px) scale(1.08); }
    70%       { transform: translate(25px, -20px) scale(0.95); }
}

/* ── HERO ─────────────────────────────── */
.course-hero {
    background: #020917;
    padding: 5.5rem 0 4rem;
    margin-top: 0.5rem; /* space below navbar */
    color: #fff;
    text-align: left;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Premium circuit / dot-grid pattern overlay */
.course-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        /* Bright dot nodes */
        radial-gradient(circle, rgba(96,165,250,0.55) 1.2px, transparent 1.2px),
        /* Horizontal circuit lines */
        linear-gradient(0deg,   rgba(96,165,250,0.07) 1px, transparent 1px),
        /* Vertical circuit lines */
        linear-gradient(90deg,  rgba(96,165,250,0.07) 1px, transparent 1px),
        /* Larger faint grid */
        linear-gradient(0deg,   rgba(139,92,246,0.04) 1px, transparent 1px),
        linear-gradient(90deg,  rgba(139,92,246,0.04) 1px, transparent 1px);
    background-size:
        32px 32px,
        32px 32px,
        32px 32px,
        128px 128px,
        128px 128px;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    animation: hero-pattern-drift 20s linear infinite;
}

@keyframes hero-pattern-drift {
    0%   { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
    100% { background-position: 32px 32px, 32px 32px, 32px 32px, 128px 128px, 128px 128px; }
}

/* Layered ambient glow — left blue, right purple */
.course-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 80% at 5% 50%, rgba(37, 99, 235, 0.28) 0%, transparent 65%),
        radial-gradient(ellipse 45% 60% at 95% 50%, rgba(139, 92, 246, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(14, 165, 233, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Scan line removed */

.course-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

/* ── LEFT: Title & Description (no bg) ── */
.course-header,
.course-hero .course-header,
section.course-hero .course-container .course-header {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 580px;
    flex: 1.2;
    position: relative;
    z-index: 3;
    text-align: left;
}

/* Eyebrow badge */
.course-header::before {
    content: 'ALLSAFE ARENA';
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #60a5fa;
    border: 1px solid rgba(96,165,250,0.35);
    border-radius: 50px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1.2rem;
    background: rgba(37,99,235,0.1);
}

.course-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #bfdbfe 60%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.12;
    letter-spacing: -0.025em;
    display: block;
}

.course-header p {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 100%;
    margin: 0 0 2rem 0;
    line-height: 1.75;
}

/* CTA strip */
.course-hero-cta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.course-hero-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(37,99,235,0.4);
}
.course-hero-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37,99,235,0.55);
    color: #fff;
    text-decoration: none;
}
.course-hero-cta .meta-chips {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.meta-chip {
    font-size: 0.8rem;
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.25);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.meta-chip i { color: #60a5fa; font-size: 0.75rem; }

/* ── RIGHT: Course image ─────────────── */
.course-hero-img {
    flex: 1;
    min-width: 400px;
    height: 300px;
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;

    /* Premium layered dark background */
    background-color: #060e24;

    /* Layered background: image on top of rich gradient + dot nodes */
    background-image:
        var(--course-img, none),
        radial-gradient(circle, rgba(96,165,250,0.18) 1px, transparent 1px),
        radial-gradient(ellipse 80% 70% at 20% 30%, rgba(37,99,235,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 70%, rgba(139,92,246,0.25) 0%, transparent 55%),
        linear-gradient(135deg, #060e24 0%, #0d1b3e 50%, #10102e 100%);
    background-size:
        60%, /* course logo */
        24px 24px, /* dot grid */
        100% 100%,
        100% 100%,
        100% 100%;
    background-position:
        center,
        0 0,
        0 0,
        0 0,
        0 0;

    border: 1px solid rgba(96,165,250,0.18);
    border-radius: 20px;
    position: relative;
    z-index: 2;
    transform: perspective(1000px) rotateY(-8deg) translateY(-8px);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.75),
        0 0 0 1px rgba(96,165,250,0.08),
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.4);
    overflow: hidden;
}

/* Glowing inner top border */
.course-hero-img::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(160deg,
        rgba(96,165,250,0.12) 0%,
        transparent 40%,
        rgba(139,92,246,0.08) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Corner accent glow */
.course-hero-img::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 60%;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(180deg,
        rgba(96,165,250,0.1) 0%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}
.course-hero-img:hover,
.course-container:hover .course-hero-img {
    transform: perspective(1000px) rotateY(0deg) translateY(0);
}

.course-hero .course-meta {
    display: none !important;
}

/* ── Responsive ─────────────────────── */
@media (max-width: 960px) {
    .course-container {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }
    .course-header {
        text-align: center;
        max-width: 100%;
    }
    .course-hero-img {
        min-width: 100%;
        height: 260px;
        transform: none;
    }
    .course-hero-cta {
        justify-content: center;
    }
}

/* ──────────────────────────────────────────
   MAIN CONTENT LAYOUT
────────────────────────────────────────── */
.course-page-wrapper {
    background: #f1f5f9;
    min-height: 100vh;
    padding: 3rem 0 4rem;
}

/* ── Section top-spacing ───────────────── */
.course-details h2 {
    margin-top: 2.5rem;
}

.course-details h2:first-child {
    margin-top: 0;
}

.benefits-section {
    margin-top: 2.5rem;
}

.course-blog-section {
    margin-top: 3.5rem;
}

/* We'll use the existing .container class from main styles */
.container {
    background: transparent !important;
}

.course-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
    padding: 0;
    margin: 0;
}

/* ──────────────────────────────────────────
   COURSE DETAILS (Left Column)
────────────────────────────────────────── */
.course-details {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 20px rgba(0,0,0,0.04);
}

.course-details h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.course-details h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 3.5rem;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 2px;
}

.course-details > p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 0.97rem;
}

/* ──────────────────────────────────────────
   BENEFITS SECTION
────────────────────────────────────────── */
.benefits-section {
    margin: 1.5rem 0;
    background: transparent;
    padding: 0;
    border: none;
    position: relative;
    overflow: hidden;
}

.benefits-section h3 {
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.benefits-section > p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.93rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.benefit-item {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    background: transparent;
    padding: 0.3rem 0;
    border: none;
}

.benefit-item:hover {
    transform: translateX(3px);
}

.benefit-icon {
    color: #22c55e; /* Green checkmark color */
    font-size: 1rem;
    margin-top: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Override whatever icon was there with a checkmark */
.benefit-icon::before {
    content: "\f00c" !important; /* fa-check */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

.benefit-item h4 {
    margin: 0;
    color: #1e293b;
    font-size: 0.92rem;
    font-weight: 500;
}

.benefit-item p {
    display: none;
}

.career-note {
    margin-top: 1.5rem;
    font-style: italic;
    color: #64748b;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    background: rgba(37, 99, 235, 0.04);
    border-radius: 8px;
    border-left: 3px solid #93c5fd;
}

/* ──────────────────────────────────────────
   COURSE OUTLINE — COUNTER RESET
────────────────────────────────────────── */
.course-details {
    counter-reset: module-count;
}

/* ──────────────────────────────────────────
   COURSE MODULES / OUTLINE (Professional & Simple)
────────────────────────────────────────── */
.module {
    margin-bottom: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

/* ── Module Header ───────────────────── */
.module-header {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    transition: background 0.15s ease;
    user-select: none;
}

.module-header:hover {
    background: #f8fafc;
}

.module.active .module-header {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* h3 title */
.module-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex: 1;
    line-height: 1.4;
}

/* Plain text numbering via CSS counter */
.module-header h3::before {
    content: counter(module-count, decimal) ". ";
    counter-increment: module-count;
    margin-right: 0.5rem;
    color: #475569;
    font-weight: 500;
}

/* Chevron toggle icon */
.module-header > i,
.module-header .fa-chevron-down,
.module-header .fa-chevron-up {
    color: #64748b;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    margin-left: 1rem;
}

.module.active .module-header > i,
.module.active .module-header .fa-chevron-down,
.module.active .module-header .fa-chevron-up {
    transform: rotate(180deg);
}

/* ── Module Content ──────────────────── */
.module-content {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    position: relative;
    z-index: 2;
}

.module.active .module-content {
    padding: 0.8rem 1.4rem 1.2rem 1.4rem;
    max-height: 2000px;
}

.module-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.module-content li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

/* Simple list bullet */
.module-content li::before {
    content: '•';
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
    margin-right: 0.5rem;
}

.module-content li:last-child {
    border-bottom: none;
}

/* ──────────────────────────────────────────
   SIDEBAR (Right Column)
────────────────────────────────────────── */
.course-sidebar {
    position: sticky;
    top: 5rem;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.course-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.6rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 20px rgba(0,0,0,0.04);
    margin-bottom: 0;
}

.course-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1.2rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

/* ── Course Details Card ─────────────── */
.course-card .course-meta {
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    display: flex !important;
}

.course-card .meta-item {
    padding: 0.4rem 0.2rem;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
    font-size: 0.82rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.course-card .meta-item:last-child {
    border-bottom: none;
}

/* Hide icons in Course Details sidebar */
.course-card .meta-item i {
    display: none;
}

.course-card .meta-item strong {
    color: #0f172a;
    margin-right: 0.15rem;
    font-size: 0.82rem;
}

/* ── Enroll Button ───────────────────── */
.enroll-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.95rem 1rem;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
    color: white;
    text-align: center;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-top: 1.2rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.enroll-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    transition: opacity 0.3s;
    opacity: 0;
}

.enroll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
    text-decoration: none;
    color: white;
}

.enroll-btn:hover::before {
    opacity: 1;
}

.enroll-btn:active {
    transform: translateY(0);
}

/* ── Download Outline Button ── */
.download-outline-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: #0B192C;
    color: #ffffff;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
    border: 1.5px solid #1e3a8a;
    cursor: pointer;
    margin-top: 0.75rem;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 12px rgba(11, 25, 44, 0.2);
}

.download-outline-btn i {
    color: #00D2DF;
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.download-outline-btn:hover {
    background: #112240;
    color: #38bdf8;
    border-color: #00D2DF;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 210, 223, 0.35);
    text-decoration: none;
}

.download-outline-btn:hover i {
    transform: translateY(2px);
}

.download-outline-btn:active {
    transform: translateY(0);
}

/* ── What You'll Learn & Prerequisites List ─ */
.course-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-card ul li {
    padding: 0.55rem 0;
    border-bottom: 1px solid #f8fafc;
    color: #334155;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.5;
}

.course-card ul li:last-child {
    border-bottom: none;
}

.course-card ul li i {
    color: #22c55e;
    margin-top: 0.15rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* ── Course Blog Section ───────────────── */
.course-blog-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 2px solid #e2e8f0;
}

.course-blog-section h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.course-blog-section p {
    color: #475569;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ──────────────────────────────────────────
   COURSE PAGE WRAPPER (wraps .container)
────────────────────────────────────────── */
body.inner-page {
    background: #ffffff;
}

/* Container on course pages gets light bg + top padding */
.course-hero ~ .container,
.course-hero + .container,
div.container:has(.course-content) {
    background: #ffffff !important;
    padding-top: 3.5rem !important;
    padding-bottom: 4rem !important;
    max-width: 1140px !important;
}

/* ──────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────── */
@media (max-width: 900px) {
    .course-content {
        grid-template-columns: 1fr;
    }
    .course-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .course-hero {
        padding: 5rem 0 2rem;
    }
    .course-header {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    .course-header h1 {
        font-size: 1.8rem;
    }
    .course-meta {
        gap: 0.5rem;
    }
    .meta-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    .course-details {
        padding: 1.5rem;
    }
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
