/* ============================================
   MIGRATED DESIGN STYLES
   Combines current PHP header with HTML design body
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Lora:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   BODY & BASE STYLES (from HTML design)
   ============================================ */
body,
html {
    font-family: 'Open Sans', sans-serif;
    background-color: #fafaf8;
    background-image:
        radial-gradient(at 40% 20%, rgba(13, 42, 79, 0.008) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(13, 42, 79, 0.005) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(13, 42, 79, 0.004) 0px, transparent 50%);
    color: #2d2d2d;
    line-height: 1.7;
    min-height: 100vh;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

.container {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
    background-color: transparent;
    min-height: 100vh;
}

/* ============================================
   HEADER STYLES (KEEP CURRENT PHP DESIGN)
   ============================================ */
header {
    background-color: #000000;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo-container {
    margin: 0 auto;
    max-width: 200px;
}

header .logo {
    width: 100%;
    height: auto;
    display: block;
    opacity: 100%;
}

/* Tagline (H1 in header) */
header h1 {
    font-family: 'Merriweather', 'Lora', serif;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    font-size: 2.5em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

/* Main Navigation (KEEP CURRENT DESIGN) */
.main-nav {
    background-color: #003366;
    padding: 15px 0;
    /* Moderate height matching reference */
    margin-top: 0;
    /* No gap between header and nav */
    width: 100%;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 auto;
    list-style: none;
    max-width: 100%;
}

.main-nav ul li {
    margin: 0 20px;
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: inline-block;
    white-space: nowrap;
}

.main-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.main-nav ul li a svg {
    vertical-align: middle;
}

.main-nav ul li a.donate-btn {
    background-color: #4CAF50;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 700;
}

.main-nav ul li a.donate-btn:hover {
    background-color: #45a049;
}

/* ============================================
   TYPOGRAPHY (from HTML design)
   ============================================ */
h1,
h2,
h3 {
    font-family: 'Merriweather', 'Lora', serif;
    font-weight: 700;
    color: #0a1f3a;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5em;
    margin-bottom: 1rem;
    line-height: 1.15;
    color: #0a1f3a;
}

h2 {
    font-size: 2.1em;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.6em;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

p {
    font-size: 1.05em;
    line-height: 1.8;
    margin-bottom: 1.5em;
    color: #4a4a4a;
    letter-spacing: 0.3px;
}

/* ============================================
   MAIN CONTENT AREA (from HTML design)
   ============================================ */
.main-content {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    min-width: 0;
}

.main-content h2 {
    color: #0a1f3a;
    font-family: 'Merriweather', serif;
    border-bottom: none;
    padding-bottom: 0.75rem;
    margin-top: 3.5rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
    font-size: 2em;
    position: relative;
}

.home-page .main-content h2 {
    margin-top: 2.5rem;
}

.main-content h2::after {
    content: none;
}

.main-content>p {
    font-size: 1.1em;
    line-height: 1.85;
    color: #4a4a4a;
    margin-bottom: 2.5rem;
    letter-spacing: 0.3px;
}

/* ============================================
   HERO SECTION (from HTML design)
   ============================================ */
/* ============================================
   MAGAZINE-STYLE HERO SECTION
   ============================================ */
.hero-magazine-section {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
    padding: 3rem 0 1.5rem;
    margin-bottom: 1rem;
    align-items: start;
}

.hero-tagline-block {
    padding: 2rem 1.5rem 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Magazine Grid Layout */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 1rem;
}

/* Magazine Card Base Styles */
.magazine-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-decoration: none;
}

.magazine-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.magazine-card:hover img {
    transform: scale(1.08);
}

.magazine-card-overlay {
    position: absolute;
    inset: 0;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 2;
    transition: background 0.3s ease;
}

.magazine-card:hover .magazine-card-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
}

.magazine-card h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    line-height: 1.3;
}

.magazine-card .category-description {
    color: #f0f0f0;
    font-size: 0.82rem;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Magazine Card Sizes */
.magazine-card-large {
    grid-column: span 2;
    grid-row: span 2;
}

.magazine-card-large h4 {
    font-size: 1.4rem;
}

.magazine-card-large .category-description {
    font-size: 0.92rem;
    -webkit-line-clamp: 3;
}

.magazine-card-small {
    grid-column: span 1;
    grid-row: span 1;
}

.magazine-card-small .category-description {
    display: none;
    /* Hide description on smallest cards */
}

.magazine-card-medium {
    grid-column: span 2;
    grid-row: span 1;
}


.hero-title {
    font-family: 'Merriweather', serif;
    font-size: 2.2em;
    font-weight: 700;
    color: #0a1f3a;
    line-height: 1.3;
    margin: 0 0 1rem 0;
}

.scripture-ref {
    font-size: 0.7em;
    font-weight: 400;
    color: #1f5a9f;
    font-style: italic;
    display: inline;
    margin-left: 0.5rem;
}

.hero-manifesto {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a4a4a;
    margin-bottom: 2.5rem;
}

.pillars-of-exploration {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.pillar {
    padding-left: 1.5rem;
    border-left: 3px solid #1f5a9f;
}

.pillar h4 {
    font-family: 'Merriweather', serif;
    font-size: 1.2em;
    font-weight: 700;
    color: #0a1f3a;
    margin: 0 0 0.3rem 0;
}

.pillar p {
    margin: 0;
    font-size: 0.95rem;
    color: #5a5a5a;
    line-height: 1.6;
}

.hero-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}

.featured-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafaf8 100%);
    border: 1.5px solid #e8e4dd;
    border-radius: 14px;
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(15, 58, 106, 0.12);
    border-color: rgba(15, 58, 106, 0.1);
}

.featured-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #1f5a9f;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.featured-card h3 {
    font-size: 1.5em;
    margin: 0 0 0.75rem 0;
    color: #0a1f3a;
}

.featured-card p {
    font-size: 0.95rem;
    color: #5a5a5a;
    margin: 0 0 1.5rem 0;
    line-height: 1.7;
}

.featured-link {
    color: #1f5a9f;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    letter-spacing: 0.2px;
}

.featured-link:hover {
    color: #0f3a6a;
    transform: translateX(4px);
}

.featured-cards-scroll {
    display: grid;
    grid-template-rows: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.2rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    max-height: 500px;
}

.featured-cards-scroll::-webkit-scrollbar {
    width: 6px;
}

.featured-cards-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.featured-cards-scroll::-webkit-scrollbar-thumb {
    background: #d4cec5;
    border-radius: 3px;
}

.featured-cards-scroll::-webkit-scrollbar-thumb:hover {
    background: #bbb5ac;
}

.featured-scroll-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 0;
    display: flex;
    align-items: flex-start;
    padding: 1.15rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e8e4dd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.featured-scroll-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
    filter: saturate(0.65);
    transform: scale(1.04);
    transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-scroll-item:hover img {
    opacity: 0.32;
    transform: scale(1.06);
}

/* Category text container */
.category-text {
    position: relative;
    z-index: 2;
    width: 100%;
}

.featured-scroll-item h4 {
    position: relative;
    z-index: 2;
    color: #0a1f3a;
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    text-shadow: none;
    line-height: 1.3;
}

/* Category description styling */
.category-description {
    position: relative;
    z-index: 2;
    color: #555555;
    font-size: 0.86rem;
    line-height: 1.5;
    margin: 0;
    text-shadow: none;
    font-weight: 400;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.featured-scroll-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 243, 236, 0.96) 100%);
    z-index: 1;
}

/* Soft hover emphasis without overpowering the hero */
.featured-scroll-item:hover::after {
    box-shadow: 0 16px 32px rgba(15, 58, 106, 0.12);
}

/* ============================================
   TOPIC GRID & CARDS (from HTML design)
   ============================================ */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0 3rem 0;
}

.topic-card {
    background-color: #ffffff;
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e4dd;
    position: relative;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 58, 106, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.topic-card:hover::before {
    opacity: 1;
}

.topic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(15, 58, 106, 0.13);
    border-color: rgba(15, 58, 106, 0.1);
}

.topic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    border-bottom: none;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.topic-card:hover img {
    transform: scale(1.06);
}

.topic-card-content {
    padding: 1.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.topic-card h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.35em;
    color: #1a1a1a;
    margin-bottom: 0.85rem;
    font-weight: 700;
}

.topic-card h3 a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topic-card:hover h3 a {
    color: #1f5a9f;
    transition: color 0.3s ease;
}

.topic-card p {
    margin: 0;
    color: #5a5a5a;
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
    letter-spacing: 0.2px;
}

/* ============================================
   PAGE HEADER (for subpages)
   ============================================ */
.page-header {
    text-align: center;
    padding: 4.5rem 2rem;
    background: #ffffff;
    border-bottom: 1px solid #e8e4dd;
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(15, 58, 106, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(15, 58, 106, 0.015) 0%, transparent 50%);
    pointer-events: none;
}

.page-header h1 {
    font-size: 3.2em;
    margin-bottom: 0.5rem;
    position: relative;
    animation: fadeInUp 0.8s ease;
}

.page-header p {
    font-size: 1.2em;
    max-width: 700px;
    margin: 0 auto;
    color: #5a5a5a;
    position: relative;
    animation: fadeInUp 0.8s ease 0.1s backwards;
    letter-spacing: 0.3px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FOOTER
   ============================================ */
/* Footer styles moved to enhanced_pages.css for better organization */
/* Legacy footer fallback - will be overridden by .site-footer styles */
footer:not(.site-footer) {
    background: #0f0f0f;
    color: #fff;
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer:not(.site-footer) p {
    margin: 0;
    color: #b8b8b8;
    letter-spacing: 0.2px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {

    body,
    html {
        font-size: 16px;
    }

    .container {
        width: 97%;
        padding: 0 1rem;
    }

    h1 {
        font-size: 2.5em;
    }

    /* Magazine Hero Layout - Tablet */
    .hero-magazine-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 0;
    }

    .hero-tagline-block {
        padding: 1.5rem 0;
        min-height: auto;
        text-align: center;
    }

    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 180px);
    }

    .magazine-card-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .magazine-card-small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .magazine-card-medium {
        grid-column: span 1;
        grid-row: span 1;
    }

    .hero-featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 10px;
    }

    .main-nav ul li {
        margin: 0 5px;
    }

    .main-nav ul li a {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .main-nav ul li a.donate-btn {
        font-size: 0.9rem;
        padding: 8px 18px;
    }

    h1 {
        font-size: 2.2em;
    }

    .main-content h2 {
        font-size: 1.6em;
    }

    .topic-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Legacy Mobile grid overrides removed to allow scaled design in mobile_responsive.css */
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero-tagline-block {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 1.6em;
    }

    .magazine-grid {
        grid-template-rows: repeat(5, 140px);
        gap: 0.7rem;
    }

    .magazine-card {
        border-radius: 8px;
    }

    .magazine-card-overlay {
        padding: 1rem;
    }

    .magazine-card h4 {
        font-size: 0.95rem;
    }

    .magazine-card .category-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}

/* ============================================
   COURSES PAGE STYLES
   ============================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.course-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #ffffff;
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e8e4dd;
}

.course-card a:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(15, 58, 106, 0.15);
    border-color: rgba(15, 58, 106, 0.1);
}

.course-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.course-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card a:hover .course-image-container img {
    transform: scale(1.07);
}

.course-level-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.35rem 0.95rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.course-card-content {
    padding: 1.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-card h3 {
    font-size: 1.35em;
    margin: 0 0 0.5rem 0;
}

.course-card p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
    letter-spacing: 0.2px;
}

.course-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #5a5a5a;
    margin-bottom: 1rem;
    letter-spacing: 0.2px;
}

.course-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #f0ebe4;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1f5a9f, #4fa8df);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 0.8rem;
    color: #5a5a5a;
    margin-top: 0.25rem;
    letter-spacing: 0.2px;
}

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: auto;
}

.course-price.free {
    color: #3a9a7f;
}

/* ====== COURSE SINGLE PAGE ====== */
.course-header {
    background-color: #0f0f0f;
    color: #fff;
    padding: 4.5rem 0;
}

.course-header-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.back-to-courses {
    color: #b8b8b8;
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-block;
    transition: color 0.3s ease;
    letter-spacing: 0.2px;
}

.back-to-courses:hover {
    color: #fff;
}

.course-header-content h1 {
    color: #fff;
    font-size: 2.9em;
}

.course-header-subtitle {
    color: #b8b8b8;
    font-size: 1.25em;
    letter-spacing: 0.2px;
}

.course-header-meta {
    margin: 1.75rem 0;
    display: flex;
    gap: 2rem;
    letter-spacing: 0.2px;
}

.course-start-btn {
    background: linear-gradient(135deg, #1f5a9f 0%, #0f3a6a 100%);
    color: #fff;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(31, 90, 159, 0.25);
}

.course-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(31, 90, 159, 0.35);
}

.course-header-image img {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.course-single-container {
    padding-top: 3rem;
    padding-bottom: 3rem;
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 3rem;
}

.course-tabs {
    display: flex;
    border-bottom: 1px solid #e8e4dd;
    margin-bottom: 2.5rem;
}

.tab-link {
    padding: 1.1rem 1.75rem;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #5a5a5a;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.2px;
}

.tab-link::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1f5a9f, #4fa8df);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-link:hover {
    color: #1a1a1a;
    background: rgba(15, 58, 106, 0.04);
}

.tab-link.active {
    color: #1a1a1a;
    border-bottom-color: transparent;
}

.tab-link.active::before {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content h2 {
    font-size: 1.7em;
    margin-bottom: 1rem;
}

.tab-content h3 {
    font-size: 1.4em;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.tab-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    line-height: 1.85;
}

.tab-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.lesson-list .lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    border-bottom: 1px solid #f5f2ed;
    transition: background-color 0.3s ease;
}

.lesson-list .lesson-item:hover {
    background-color: #fafaf8;
}

.lesson-item.completed {
    color: #5a5a5a;
}

.lesson-item.in-progress {
    font-weight: 700;
}

.lesson-icon {
    font-size: 1.2rem;
    color: #1f5a9f;
}

.lesson-item.completed .lesson-icon {
    color: #3a9a7f;
}

.lesson-title {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    transition: color 0.3s ease;
}

.lesson-title:hover {
    color: #1f5a9f;
}

.lesson-duration {
    display: block;
    font-size: 0.9rem;
    color: #5a5a5a;
    letter-spacing: 0.2px;
}

.lesson-details {
    flex: 1;
}

.course-sidebar {
    background-color: #fafaf8;
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid #e8e4dd;
    align-self: start;
    position: sticky;
    top: 2rem;
}

.course-sidebar h3 {
    font-size: 1.4em;
    margin-bottom: 1.5rem;
}

.certificate-link {
    display: block;
    background: linear-gradient(135deg, #3a9a7f 0%, #2d7a65 100%);
    color: #fff;
    text-align: center;
    padding: 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.certificate-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(58, 154, 127, 0.3);
}

.certificate-note {
    font-size: 0.9rem;
    color: #5a5a5a;
    margin-top: 1rem;
    line-height: 1.6;
}

.discussion-post {
    background-color: #fafaf8;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #e8e4dd;
}

.discussion-reply {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e8e4dd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

@media (max-width: 900px) {

    .course-header-content,
    .course-single-container {
        grid-template-columns: 1fr;
    }

    .course-header-image {
        display: none;
    }
}

/* ============================================
   VIDEOS PAGE
   ============================================ */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.9rem;
    background-color: #fff;
    border: 1px solid #e8e4dd;
    border-radius: 14px;
    margin-bottom: 3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-bar {
    padding: 0.85rem 1.1rem;
    border: 1px solid #e8e4dd;
    border-radius: 10px;
    font-size: 1rem;
    min-width: 250px;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
    font-family: 'Open Sans', sans-serif;
}

.search-bar:focus {
    outline: none;
    border-color: #1f5a9f;
    box-shadow: 0 0 0 3px rgba(15, 58, 106, 0.12);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-link {
    padding: 0.6rem 1.2rem;
    color: #4a4a4a;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f0ebe4;
    border: 1px solid #e8e4dd;
    letter-spacing: 0.2px;
    display: inline-block;
}

.category-link:hover,
.category-link.active {
    background: linear-gradient(135deg, #1f5a9f 0%, #0f3a6a 100%);
    color: #ffffff;
    border-color: #1f5a9f;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 58, 106, 0.3);
}

.topic-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0 3rem 0;
}

/* ============================================
   FEATURED ARTICLES SECTION - ENHANCED DESIGN
   ============================================ */

.main-content {
    padding-top: 0;
}

/* Section Headers */
.section-header {
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    position: relative;
    scroll-margin-top: 100px;
    /* For smooth scroll offset */
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1f5a9f, #4fa8df);
    border-radius: 2px;
}

.section-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.2em;
    color: #0a1f3a;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-header:first-of-type {
    margin-top: 1.5rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #5a5a5a;
    margin: 0;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Topic Grid Layout - Magazine Style Masonry */
.main-content .topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    grid-auto-rows: minmax(200px, auto);
    grid-auto-flow: dense;
}

@media (min-width: 768px) {
    .main-content .topic-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .main-content .topic-grid {
        gap: 1.5rem;
    }

    .topic-card-content {
        padding: 1.5rem;
    }

    .topic-card-image-wrapper {
        height: 200px;
    }

    .topic-card-content h3 {
        font-size: 1.15em;
    }

    .topic-card-content p {
        font-size: 0.9rem;
    }

    .section-header {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.8em;
    }
}

.video-card .topic-card-content {
    padding-top: 1rem;
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #1a1a1a;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

.video-thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail-container img {
    transform: scale(1.07);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 58, 106, 0.85);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.video-card:hover .play-icon {
    color: #fff;
    transform: translate(-50%, -50%) scale(1.2);
    background: rgba(15, 58, 106, 0.95);
    box-shadow: 0 0 40px rgba(15, 58, 106, 0.7);
}

.video-duration {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        min-width: 100%;
    }

    .category-filters {
        justify-content: center;
    }

    .topic-cards-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Force Footer Full Width */
.site-footer {
    width: 100%;
    max-width: 100%;
    padding: 3rem 0;
    background: #1a1a1a;
    color: #fff;
    position: relative;
    left: 0;
    right: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}