/* ==========================================================================
   DYNAMIC PAGE HEADER SECTION (SYNCHRONIZED WITH GLOBAL BRAND VARIABLES)
   ========================================================================== */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    box-sizing: border-box;
}

/* Scoped Box-Sizing Reset */
.page-header *,
.page-header *::before,
.page-header *::after {
    box-sizing: border-box;
}

/* Background Gradient Overlay */
.page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 96, 122, 0.88),
        rgba(15, 23, 42, 0.78)
    );
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.page-header-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-white);
}

.page-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-white);
    letter-spacing: -0.5px;
}

/* Breadcrumb Navigation */
.page-breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-white);
}

.page-breadcrumb a {
    color: var(--color-white);
    opacity: 0.85;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-breadcrumb a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.page-breadcrumb span {
    color: var(--color-white);
    opacity: 0.9;
}

/* Responsive Breakdown */
@media (max-width: 992px) {
    .page-header {
        min-height: 220px;
        padding-top: var(--section-padding-y-mobile);
        padding-bottom: var(--section-padding-y-mobile);
    }

    .page-title {
        font-size: 38px;
    }
}

@media (max-width: 576px) {
    .page-header {
        min-height: 200px;
    }

    .page-title {
        font-size: 30px;
    }

    .page-breadcrumb {
        font-size: 14px;
        gap: 8px;
    }
}


 /* ==========================================================================
   FEATURED COURSES SECTION
   ========================================================================== */
.wc-courses-section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    background-color: var(--color-white);
    overflow: hidden;
}

.courses-container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

/* Base Box Sizing Reset */
.wc-courses-section *,
.wc-courses-section *::before,
.wc-courses-section *::after {
    box-sizing: border-box;
}

/* Section Header (Centered Alignment) */
.courses-header {
    text-align: center;
    margin-bottom: 40px;
}

.courses-header .sub-title {
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 8px;
}

.courses-header .section-heading {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 700;
    color: var(--color-title);
    margin: 0;
    line-height: 1.25;
}

/* Products Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-top: 15px;
}

/* Course Card */
.course-card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: visible;
    position: relative;
    border: 1px solid var(--color-border);
    box-shadow: var(--color-shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Top Right Professional Round Badge */
.top-corner-round-badge {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 65px;
    height: 65px;
    /* ডীপ/গাঢ় ব্যাকগ্রাউন্ড প্রফেশনাল ব্লার ফিল্টার সহ */
    background: #0f172a; 
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-corner-round-badge span {
    color: #ff334b;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 0 2px;
}

.course-card:hover .top-corner-round-badge {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 20px rgba(255, 51, 75, 0.25);
    border-color: #ff334b;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 168, 236, 0.12);
    border-color: var(--color-primary);
}

/* Shine Effect */
.card-shine-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    border-radius: 16px;
}

.card-shine-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0) 30%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0) 70%
    );
    transform: translate(100%, -100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .card-shine-effect::before {
    transform: translate(-100%, 100%);
}

.card-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 62.5%;
    overflow: hidden;
    background-color: var(--color-bg-light);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.card-image-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-image-wrap img.hover-img {
    opacity: 0;
    transform: scale(1.02);
}

.course-card:hover .card-image-wrap img.main-img {
    opacity: 0;
    transform: scale(1.02);
}

.course-card:hover .card-image-wrap img.hover-img {
    opacity: 1;
    transform: scale(1);
}

/* Variant Badges */
.variant-badges {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 2;
    flex-wrap: wrap;
}

.badge {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-white);
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge.offline { background-color: #ff5252; }
.badge.online { background-color: var(--color-primary); }
.badge.recorded { background-color: var(--color-dark-teal); }

/* Card Content */
.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 2;
}

/* Meta Bar: Category Left & Price Right */
.card-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.course-category {
    margin-bottom: 0;
}

.course-category a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    background-color: rgba(0, 168, 236, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.course-category a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.course-category a i {
    font-size: 11px;
}

/* Price Alignment */
.course-price {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-title);
    margin-bottom: 0;
    text-align: right;
    white-space: nowrap;
}

.course-price del {
    color: #a0aec0;
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}

.course-price ins {
    text-decoration: none;
    color: var(--color-primary);
}

.course-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
}

.course-title a {
    color: var(--color-title);
    text-decoration: none;
    transition: color 0.3s ease;
}

.course-title a:hover {
    color: var(--color-primary);
}

.course-short-des {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--color-text);
    text-align: left;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Buttons */
.card-footer-btn {
    margin-top: auto;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 14px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.course-card:hover .view-details-btn {
    background-color: var(--color-dark-teal);
}

.view-details-btn svg {
    transition: transform 0.3s ease;
}

.course-card:hover .view-details-btn svg {
    transform: translateX(3px);
}

/* Bottom Footer Button */
.courses-footer {
    text-align: center;
    margin-top: 50px;
}


/* Responsive Styles */
@media screen and (max-width: 992px) {
    .wc-courses-section {
        padding-top: var(--section-padding-y-mobile);
        padding-bottom: var(--section-padding-y-mobile);
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 640px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    .courses-header .section-heading {
        font-size: 28px;
    }
}


/* ==========================================================================
   COURSES SHOP LAYOUT & RESPONSIVE FILTER CSS
   ========================================================================== */

.courses-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Search Flex System */
.courses-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.courses-header-text {
    flex: 1 1 250px;
}

.courses-top-search-wrap {
    flex: 1 1 300px;
    max-width: 400px;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box input {
    width: 100%;
    padding: 10px 38px 10px 38px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.search-input-box input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 14px;
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
}

.courses-sorting-wrap {
    flex: 0 0 auto;
}

/* Main Grid Layout */
.courses-main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Responsive Styles */
.courses-filter-sidebar {
    flex: 0 0 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 80px; /* স্ক্রল করার সময় ফিক্সড থাকবে */
}

.courses-ajax-wrapper {
    flex: 1;
    min-width: 0; /* Flex Child Overflow Fix */
    position: relative;
    min-height: 400px;
}

/* Sidebar Widgets & Custom Checkboxes */
.sidebar-header-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
}

.sidebar-header-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-filters-btn {
    background: #fff0f0;
    border: 1px solid #ffe0e0;
    color: #ff3b30;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-filters-btn:hover {
    background: #ff3b30;
    color: #ffffff;
}

.filter-widget {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f8fafc;
}

.filter-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    color: #475569;
    font-weight: 500;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #e2e8f0;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .count {
    margin-left: auto;
    font-size: 11px;
    color: #94a3b8;
}

/* Price Range Slider */
.price-slider-wrap input[type=range] {
    width: 100%;
    margin-bottom: 10px;
    accent-color: #007bff;
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

/* Product Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ==========================================================================
   MEDIA QUERIES (BREAKPOINTS)
   ========================================================================== */

/* 1. Medium Screens / Laptops (Max Width: 1024px) */
@media screen and (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-filter-sidebar {
        flex: 0 0 250px;
    }
}

/* 2. Tablets & Mobile Devices (Max Width: 991px) */
@media screen and (max-width: 991px) {
    .courses-header-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .courses-top-search-wrap {
        max-width: 100%;
    }

    .courses-main-layout {
        flex-direction: column;
        gap: 20px;
    }

    .courses-filter-sidebar {
        flex: none;
        width: 100%;
        position: static; /* Top Sticky Removed for Mobile */
    }

    /* Mobile Responsive Filter Accordion Toggle Option */
    .sidebar-header-box {
        margin-bottom: 10px;
        cursor: pointer;
    }

    .sidebar-header-box h3::after {
        content: "\f078";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 12px;
        margin-left: 8px;
        transition: transform 0.3s ease;
    }

    .courses-filter-sidebar.collapsed .sidebar-header-box h3::after {
        transform: rotate(-90deg);
    }

    .courses-filter-sidebar.collapsed .filter-widget {
        display: none;
    }
}

/* 3. Small Mobile Devices (Max Width: 600px) */
@media screen and (max-width: 600px) {
    .courses-grid {
        grid-template-columns: 1fr; /* ১টি কলামে শো করবে */
    }

    .courses-ordering-form {
        width: 100%;
        justify-content: space-between;
    }

    .courses-ordering-form select {
        flex: 1;
        text-align: right;
    }

    .courses-pagination ul.page-numbers li a,
    .courses-pagination ul.page-numbers li span {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

        /* --- Pagination Styles --- */
.courses-pagination {
    margin-top: 50px;
    text-align: center;
}

.courses-pagination ul.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.courses-pagination ul.page-numbers li a,
.courses-pagination ul.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e0e0e0);
    background-color: #ffffff;
    color: var(--text-color, #333333);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.courses-pagination ul.page-numbers li a:hover {
    background-color: var(--primary-color, #4300a8);
    color: #ffffff;
    border-color: var(--primary-color, #4300a8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 0, 168, 0.2);
}

.courses-pagination ul.page-numbers li span.current {
    background-color: var(--primary-color, #4300a8);
    color: #ffffff;
    border-color: var(--primary-color, #4300a8);
    box-shadow: 0 4px 12px rgba(67, 0, 168, 0.25);
}

/* --- Course Header & Sorting Flex Layout --- */
.courses-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    gap: 20px;
}

.courses-header-text {
    text-align: left;
}

.courses-header-text .sub-title {
    color: var(--primary-color, #4300a8);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.courses-header-text .section-heading {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark, #1e293b);
    margin: 0;
}

/* Sorting Dropdown Design */
.courses-sorting-wrap {
    display: flex;
    align-items: center;
}

.courses-ordering-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.courses-ordering-form label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.courses-orderby {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    cursor: pointer;
    padding-right: 5px;
}

/* Responsive for Mobile Devices */
@media screen and (max-width: 768px) {
    .courses-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .courses-sorting-wrap, 
    .courses-ordering-form {
        width: 100%;
        justify-content: space-between;
    }
}


/* --- AJAX Loading Overlay & Animation --- */
.courses-ajax-wrapper {
    position: relative;
    min-height: 400px;
}

.courses-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.courses-ajax-wrapper.is-loading .courses-loader-overlay {
    opacity: 1;
    visibility: visible;
}

/* Spinner Design */
.courses-spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary-color, #4300a8);
    border-radius: 50%;
    animation: courseSpin 0.8s linear infinite;
}

@keyframes courseSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Card Fade-in Animation */
.animate-fade-in {
    animation: courseFadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes courseFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
