/* Free Course (/free-course/) styles.
 * Loaded by /free-course/index.njk and /free-course/{slug}/ pages.
 * Builds on blog.css's .blog-post, .blog-cta, and .cta-button. */

/* ─────────────────────────────────────────────────────────────────────
   Banner that tags every lesson + index as the "free v1" series
   ───────────────────────────────────────────────────────────────────── */
.free-course-banner {
    background: linear-gradient(135deg, #fff7e6 0%, #fde9c4 100%);
    border: 1px solid #f0c674;
    border-left: 4px solid #d68f00;
    border-radius: 8px;
    padding: 1em 1.4em;
    margin: 1.4em 0 2em;
    font-size: 0.95em;
    line-height: 1.55;
    color: #5a4500;
}
.free-course-banner strong {
    color: #3a2d00;
}
.free-course-banner a {
    color: #b67500;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
    margin-left: 0.4em;
}

/* ─────────────────────────────────────────────────────────────────────
   Per-lesson video embed (responsive 16:9)
   ───────────────────────────────────────────────────────────────────── */
.video-embed-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5em 0 2em;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.video-embed-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ─────────────────────────────────────────────────────────────────────
   Lesson metadata (number, label) + centered hero header
   ───────────────────────────────────────────────────────────────────── */
.lesson-number {
    display: inline-block;
    margin-left: 1em;
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Center the lesson title + breadcrumb so the page hero matches the
   index page's centered feel. Body prose below stays left-aligned for
   readability. */
.free-course-lesson .blog-post-header {
    text-align: center;
}
.free-course-lesson .blog-post-header .blog-post-meta {
    justify-content: center;
}
.free-course-lesson .blog-post-header h1 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ─────────────────────────────────────────────────────────────────────
   Key takeaways
   ───────────────────────────────────────────────────────────────────── */
.blog-post-content ul.takeaways {
    list-style: none;
    padding-left: 0;
    margin: 1em 0 1.5em;
}
.blog-post-content ul.takeaways li {
    position: relative;
    padding: 0.6em 0 0.6em 2em;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    line-height: 1.6;
}
.blog-post-content ul.takeaways li:last-child {
    border-bottom: 0;
}
.blog-post-content ul.takeaways li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0.6em;
    color: var(--accent-cyan, #50c0ff);
    font-weight: 700;
    font-size: 1.1em;
}

/* ─────────────────────────────────────────────────────────────────────
   Pull quote
   ───────────────────────────────────────────────────────────────────── */
.blog-post-content blockquote.pull-quote {
    margin: 2em 0;
    padding: 1.4em 1.6em;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef3f7 100%);
    border-left: 5px solid var(--accent-cyan, #50c0ff);
    border-radius: 6px;
    font-size: 1.18em;
    font-style: italic;
    line-height: 1.5;
    color: #2c3e50;
}
.blog-post-content blockquote.pull-quote p {
    margin: 0;
}

/* Newsletter signup styles (.newsletter-inline, .inline-signup-form) moved
   to blog.css since /newsletters/ also uses them and only loads blog.css. */

/* ─────────────────────────────────────────────────────────────────────
   Prev / Next lesson navigation
   ───────────────────────────────────────────────────────────────────── */
.lesson-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    margin: 2em 0;
}
.lesson-nav-prev,
.lesson-nav-next {
    display: flex;
    flex-direction: column;
    padding: 1em 1.2em;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, transform 0.15s;
}
.lesson-nav-prev:hover,
.lesson-nav-next:hover {
    background: #eef3f7;
    transform: translateY(-1px);
}
.lesson-nav-next {
    text-align: right;
    grid-column: 2;
}
.lesson-nav-prev:only-child {
    grid-column: 1;
}
.lesson-nav-label {
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.3em;
}
.lesson-nav-title {
    font-size: 1em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────────────
   Index page: hero + lesson grid
   ───────────────────────────────────────────────────────────────────── */
.free-course-index {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2em 1.5em 4em;
}
.free-course-hero {
    text-align: center;
    margin-bottom: 2.5em;
}
.free-course-hero h1 {
    font-size: 2.6em;
    margin: 0 0 0.4em;
    color: #2c3e50;
    line-height: 1.15;
}
.free-course-hero .subtitle {
    font-size: 1.15em;
    color: #5a6c7d;
    max-width: 700px;
    margin: 0 auto 1em;
    line-height: 1.55;
}
.free-course-hero .free-course-banner {
    max-width: 720px;
    margin: 1.4em auto 0;
    text-align: left;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.4em;
    margin: 2em 0;
}
.lesson-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s, box-shadow 0.18s;
}
.lesson-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.1);
}
.lesson-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0a0a1a;
}
.lesson-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lesson-card-number {
    position: absolute;
    top: 0.8em;
    left: 0.8em;
    padding: 0.3em 0.7em;
    background: rgba(10, 31, 61, 0.92);
    color: white;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
}
.lesson-card-body {
    padding: 1.2em 1.3em 1.4em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}
.lesson-card-body h2 {
    margin: 0;
    font-size: 1.15em;
    line-height: 1.35;
    color: #2c3e50;
}
.lesson-card-body p {
    margin: 0;
    font-size: 0.92em;
    line-height: 1.5;
    color: #5a6c7d;
}
.lesson-card-cta {
    margin-top: auto;
    color: var(--accent-cyan, #50c0ff);
    font-weight: 700;
    font-size: 0.95em;
}

/* ─────────────────────────────────────────────────────────────────────
   Free Course footer (shared by index + lesson pages)
   ───────────────────────────────────────────────────────────────────── */
.free-course-footer {
    margin-top: 3em;
}

/* ─────────────────────────────────────────────────────────────────────
   Mobile
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .free-course-hero h1 {
        font-size: 1.9em;
    }
    .free-course-hero .subtitle {
        font-size: 1.02em;
    }
    .lesson-nav {
        grid-template-columns: 1fr;
    }
    .lesson-nav-next {
        grid-column: 1;
        text-align: left;
    }
    .lesson-number {
        display: block;
        margin-left: 0;
        margin-top: 0.4em;
    }
}
