/* ==========================================================================
   LECTURES PAGE STYLESHEET
   Mufti Abdul Rehman Munir — Luxury Editorial Theme
   ========================================================================== */

/* --- Base & Utilities --- */
.lectures-container {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.lectures-hero-section {
    position: relative;
    padding-top: 150px;
    padding-bottom: clamp(4rem, 8vw, 6rem);
    background-color: #F8F5EE;
    background-image: url('../images/muftiabdulrehman-books-hero-background-1.webp');
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    min-height: 480px;
}

.lectures-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Soft gradient so the books on the right remain visible */
    background: linear-gradient(90deg, rgba(248, 245, 238, 0.98) 0%, rgba(248, 245, 238, 0.85) 45%, rgba(248, 245, 238, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

.lectures-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

@media (max-width: 900px) {
    .lectures-hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.lectures-hero-content {
    max-width: 650px;
}

.lectures-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold-accent);
    margin-bottom: 1rem;
    display: block;
}

.lectures-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5.5vw, 4.2rem);
    font-weight: 400;
    line-height: 1.15;
    color: #1C201C;
    margin: 0 0 1rem;
}

.lectures-hero-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #6B6559;
    margin: 0;
    max-width: 450px;
}

.lectures-hero-right {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-right: 2rem;
}

@media (max-width: 900px) {
    .lectures-hero-right {
        width: 100%;
        align-items: flex-start;
        padding-right: 0;
        margin-top: 2rem;
    }
}

.lectures-hero-quote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 400;
    color: #1C201C;
    text-align: center;
    line-height: 1.3;
}

.lectures-hero-quote-line {
    width: 50px;
    height: 1px;
    background: var(--color-gold-accent);
    margin: 1rem auto 0;
}

/* ==========================================================================
   2. FILTER & SEARCH
   ========================================================================== */
.lectures-filter-bar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-bar-inner::-webkit-scrollbar {
    display: none;
}

.lecture-search-wrap {
    position: relative;
    flex-shrink: 0;
    width: 250px;
}

.lecture-search-input {
    width: 100%;
    background: #F8F5EE;
    border: 1px solid var(--color-border);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #1C201C;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lecture-search-input:focus {
    outline: none;
    border-color: var(--color-gold-accent);
    background: #FFFFFF;
}

.lecture-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #8C8477;
}

.lecture-categories {
    display: flex;
    gap: 0.5rem;
}

.cat-pill {
    white-space: nowrap;
    padding: 0.65rem 1.25rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B6559;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cat-pill:hover {
    background: #F8F5EE;
    color: #1C201C;
}

.cat-pill.active {
    background: #1C201C;
    color: #FFFFFF;
    border-color: #1C201C;
}

.mobile-category-select-wrap {
    display: none;
}

@media (max-width: 768px) {
    .lectures-filter-bar {
        position: relative;
        top: auto;
        z-index: 10;
        margin: 1.5rem 0 2rem;
        border-radius: 8px;
        border: 1px solid var(--color-border);
        box-shadow: 0 4px 16px rgba(42,36,28,0.03);
    }
    .filter-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem 0;
        overflow-x: visible;
    }
    .lecture-search-wrap {
        width: 100%;
        flex-shrink: 1;
    }
    .desktop-only-categories {
        display: none !important;
    }
    .mobile-category-select-wrap {
        display: block !important;
        position: relative;
        width: 100%;
    }
    .mobile-category-select {
        width: 100%;
        height: 44px;
        padding: 0.65rem 2.5rem 0.65rem 1rem;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        background: #F8F5EE;
        font-size: 0.85rem;
        font-weight: 600;
        color: #1C201C;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
        font-family: inherit;
        transition: border-color 0.2s ease, background-color 0.2s ease;
    }
    .mobile-category-select:focus {
        outline: none;
        border-color: var(--color-gold-accent);
        background: #FFFFFF;
    }
    .mobile-select-arrow {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        color: #8C8477;
        width: 16px;
        height: 16px;
    }
    .lectures-list-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.85rem !important;
        padding-bottom: 0.85rem !important;
        margin-bottom: 1.5rem !important;
    }
    .lectures-list-header h2 {
        font-size: 1.55rem !important;
        line-height: 1.25 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .sort-wrap {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
    }
    .sort-wrap > span {
        font-size: 0.85rem !important;
        color: #6B6559 !important;
        white-space: nowrap !important;
    }
    .custom-dropdown-component {
        flex: 1 !important;
        max-width: 220px !important;
    }
}

/* ==========================================================================
   3. MAIN CONTENT LAYOUT
   ========================================================================== */
.lectures-main-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: #FAF8F3;
}

.lectures-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .lectures-grid {
        grid-template-columns: 1fr;
    }
}

/* --- FEATURED LECTURE --- */
.featured-lecture-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    background: #FFFFFF;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-bottom: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .featured-lecture-card {
        grid-template-columns: 1fr;
    }
}

.featured-image-wrap {
    position: relative;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.featured-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-btn-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    cursor: pointer;
}

.play-btn-overlay:hover {
    background: rgba(0,0,0,0.4);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1C201C;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.play-btn-overlay:hover .play-icon {
    transform: scale(1.1);
}

.featured-content .badge {
    display: inline-block;
    background: #C5A059;
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 2.8vw, 2.2rem);
    font-weight: 400;
    color: #1C201C;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.lecture-meta {
    font-size: 0.8rem;
    color: #8C8477;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lecture-meta .dot {
    font-size: 0.5rem;
    color: #DCD5C9;
}

.featured-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6B6559;
    margin: 0 0 1.5rem;
}

.featured-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #1C201C;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.action-btn:hover {
    background: #F8F5EE;
    border-color: #C5A059;
}

.action-btn.primary {
    background: #1C201C;
    color: #FFFFFF;
    border-color: #1C201C;
}

.action-btn.primary:hover {
    background: var(--color-gold-accent);
    border-color: var(--color-gold-accent);
}

/* --- ALL LECTURES LIST --- */
.lectures-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.lectures-list-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    color: #1C201C;
    margin: 0;
}

.sort-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #6B6559;
}

/* CUSTOM LUXURY DROPDOWN COMPONENT */
.custom-dropdown-component {
    position: relative;
    display: inline-block;
    min-width: 165px;
    font-family: inherit;
}

.custom-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0.55rem 0.95rem;
    border: 1px solid #DCD5C9;
    border-radius: 6px;
    background-color: #FFFFFF;
    font-size: 0.84rem;
    color: #1C201C;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    user-select: none;
}

.custom-dropdown-trigger:hover,
.custom-dropdown-component.open .custom-dropdown-trigger {
    border-color: #C5A059;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.15);
}

.custom-dropdown-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.custom-dropdown-arrow {
    flex-shrink: 0;
    color: var(--color-olive-accent, #8F672C);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown-component.open .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 100%;
    background: #FFFFFF;
    border: 1px solid #E5DEC9;
    border-radius: 8px;
    box-shadow: 0 10px 28px -4px rgba(34, 30, 24, 0.12), 0 3px 8px -2px rgba(34, 30, 24, 0.04);
    padding: 6px;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.custom-dropdown-component.open .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.83rem;
    font-weight: 500;
    color: #3A352D;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.custom-dropdown-option:hover {
    background: #F4EFE6;
    color: #8F672C;
}

.custom-dropdown-option.active {
    background: #FAF3E3;
    color: #8F672C;
    font-weight: 700;
}

.option-check-icon {
    opacity: 0;
    color: #8F672C;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.custom-dropdown-option.active .option-check-icon {
    opacity: 1;
}

/* Legacy Native Select Fallback */
.custom-select-wrap {
    position: relative;
    display: inline-block;
}

.select-arrow-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--color-olive-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-arrow-icon svg {
    width: 14px;
    height: 14px;
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.55rem 2.4rem 0.55rem 0.95rem;
    border: 1px solid #DCD5C9;
    border-radius: 6px;
    background-color: #FFFFFF;
    font-size: 0.84rem;
    color: #1C201C;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.sort-select option {
    background-color: #FFFFFF;
    color: #1C201C;
    padding: 8px 12px;
}

.sort-select::-ms-expand {
    display: none;
}

.sort-select:hover {
    border-color: #8C8477;
}

.sort-select:focus {
    outline: none;
    border-color: var(--color-gold-accent);
}

.lecture-row {
    display: grid;
    grid-template-columns: 230px 1fr;
    grid-template-areas:
        "thumb content"
        "thumb actions";
    column-gap: 1.75rem;
    row-gap: 0.75rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--color-border);
    align-items: start;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.lecture-thumb {
    grid-area: thumb;
}

.lecture-row-content {
    grid-area: content;
}

@media (max-width: 768px) {
    .lecture-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "thumb"
            "content"
            "actions";
        gap: 1rem;
    }
}

@media (max-width: 700px) {
    .lecture-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.lecture-thumb {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.lecture-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
}

.lecture-row-content .cat-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #C5A059;
    margin-bottom: 0.5rem;
    display: block;
}

.lecture-row-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: #1C201C;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.lecture-row-meta {
    font-size: 0.8rem;
    color: #8C8477;
}

@media (max-width: 900px) {
    .lecture-row-actions {
        grid-column: 1 / -1;
        width: 100% !important;
        min-width: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 0.5rem !important;
    }
}

@media (max-width: 700px) {
    .lecture-row-actions {
        grid-column: 1 / -1;
        width: 100% !important;
        min-width: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    .lecture-row-actions .row-btn:last-child:nth-child(odd) {
        grid-column: span 2;
    }
    .row-btn {
        height: 38px !important;
        font-size: 0.8rem !important;
    }
}

.row-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6B6559;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.row-action:hover {
    color: #1C201C;
}

/* --- SIDEBAR --- */
.sidebar-widget {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: #1C201C;
    margin: 0 0 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-list li {
    margin-bottom: 0.75rem;
}

.topic-list li:last-child {
    margin-bottom: 0;
}

.topic-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    font-size: 0.85rem;
    color: #6B6559;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.topic-link:hover, .topic-link.active {
    background: #F8F5EE;
    color: #1C201C;
    font-weight: 500;
}

.topic-link .count {
    background: #EBE5DA;
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
    font-size: 0.7rem;
    color: #6B6559;
}

.popular-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.popular-item:last-child {
    margin-bottom: 0;
}

.popular-thumb {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-thumb .play-mini {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
}

.popular-title {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    color: #1C201C;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.popular-meta {
    font-size: 0.75rem;
    color: #8C8477;
}

.newsletter-widget {
    background: #F8F5EE;
    text-align: center;
    padding: 2rem 1.5rem;
}

.newsletter-icon {
    width: 32px;
    height: 32px;
    color: #C5A059;
    margin: 0 auto 1rem;
}

.newsletter-widget h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    color: #1C201C;
    margin: 0 0 0.5rem;
}

.newsletter-widget p {
    font-size: 0.85rem;
    color: #6B6559;
    margin: 0 0 1.25rem;
}

.newsletter-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-family: inherit;
}

.btn-full {
    width: 100%;
    display: inline-flex;
    justify-content: center;
}

/* ==========================================================================
   4. PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #6B6559;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: #1C201C;
    color: #1C201C;
}

.page-link.active {
    background: #1C201C;
    color: #FFFFFF;
    border-color: #1C201C;
}

/* ==========================================================================
   5. AUTHORED BOOKS CAROUSEL SECTION (Replaces Old Static CTA)
   ========================================================================== */
.book-carousel-section {
    padding: clamp(3.5rem, 6vw, 5.5rem) 0;
    background: #F8F5EE;
    border-top: 1px solid var(--color-border);
    position: relative;
}

.book-carousel-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.book-carousel-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold-accent, #C5A059);
    margin-bottom: 0.5rem;
    display: block;
}

.book-carousel-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 400;
    color: #1C201C;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.book-carousel-header .accent-divider-diamond {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.85rem auto 1rem;
}

.book-carousel-header .accent-divider-diamond .line {
    width: 50px;
    height: 1px;
    background: rgba(197, 160, 89, 0.4);
}

.book-carousel-header .accent-divider-diamond .diamond {
    font-size: 0.65rem;
    color: #C5A059;
    line-height: 1;
}

.book-carousel-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #6B6559;
    margin: 0.75rem auto 0;
}

/* Slider Wrap & Controls */
.more-books-slider-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin: 1.5rem 0 0;
}

.slider-viewport {
    overflow: hidden;
    width: 100%;
    padding: 10px 4px 18px;
    border-radius: 8px;
}

.more-books-slider-track {
    display: flex;
    gap: 24px;
    transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.more-book-card.slider-card {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    box-sizing: border-box;
}

@media (max-width: 960px) {
    .more-book-card.slider-card {
        flex: 0 0 calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}

@media (max-width: 600px) {
    .more-book-card.slider-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .slider-arrow {
        display: none !important;
    }
}

.slider-arrow {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid rgba(197, 160, 89, 0.4);
    color: #1C201C;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(42, 36, 28, 0.08);
    transition: all 0.25s ease;
}

.slider-arrow-prev {
    margin-right: 12px;
}

.slider-arrow-next {
    margin-left: 12px;
}

.slider-arrow:hover {
    background: #C5A059;
    color: #FFFFFF;
    border-color: #C5A059;
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(197, 160, 89, 0.35);
}

.slider-arrow svg,
.slider-arrow .icon-svg {
    width: 18px;
    height: 18px;
}

.slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.25rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #DCD5C8;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.slider-dot.active {
    width: 24px;
    background: #C5A059;
}

/* Book Card Styling */
.more-book-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.more-book-card:hover {
    border-color: #C5A059;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(42, 36, 28, 0.08);
}

.more-book-frame {
    background: linear-gradient(180deg, #FAF7F2 0%, #F0E9DC 100%);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 1.15rem;
    text-decoration: none;
}

.more-book-img {
    height: 170px;
    width: auto;
    object-fit: contain;
    border-radius: 2px 5px 5px 2px;
    box-shadow: -4px 6px 16px rgba(0, 0, 0, 0.16);
    transition: transform 0.3s ease;
}

.more-book-card:hover .more-book-img {
    transform: scale(1.04) rotate(-1deg);
}

.more-book-cat {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8C8477;
    margin-bottom: 0.35rem;
    display: block;
}

.more-book-title {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    line-height: 1.35;
    color: #1C201C;
    margin: 0 0 0.5rem;
}

.more-book-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.more-book-title a:hover {
    color: #C5A059;
}

.more-book-desc {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #6B6559;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.more-book-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-shelf-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 4px;
    border: 1px solid #1C201C;
    background: #1C201C;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-shelf-action:hover {
    background: #C5A059;
    border-color: #C5A059;
    color: #1C201C;
}

.btn-shelf-icon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #1C201C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-shelf-icon svg,
.btn-shelf-icon .icon-svg {
    width: 15px;
    height: 15px;
}

.btn-shelf-icon:hover {
    background: #FAF7F2;
    border-color: #C5A059;
    color: #C5A059;
}

/* ==========================================================================
   6. VIDEO MODAL, AUDIO PLAYER DOCK & 1-CLICK SHARE SYSTEM
   ========================================================================== */

/* --- Action Buttons Brand Accents --- */
.action-btn.btn-action-yt {
    color: #CC0000;
    border-color: rgba(204, 0, 0, 0.25);
}
.action-btn.btn-action-yt:hover {
    background: #CC0000;
    color: #FFFFFF;
    border-color: #CC0000;
}
.action-btn.btn-action-fb {
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.25);
}
.action-btn.btn-action-fb:hover {
    background: #1877F2;
    color: #FFFFFF;
    border-color: #1877F2;
}
.action-btn.btn-action-audio {
    background: #1C201C;
    color: #F8F5EE;
    border-color: #1C201C;
}
.action-btn.btn-action-audio:hover {
    background: #C5A059;
    border-color: #C5A059;
    color: #1C201C;
}
.action-btn.btn-action-share {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.35);
}
.action-btn.btn-action-share:hover {
    background: #25D366;
    color: #FFFFFF;
    border-color: #25D366;
}

/* --- LECTURE ROW ACTIONS (Perfect Uniform Alignment & Symmetrical Widths) --- */
.lecture-row-actions {
    grid-area: actions;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    width: auto;
    min-width: 0;
    margin-top: 0.25rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(220, 213, 201, 0.6);
}
.row-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    height: 36px;
    padding: 0 1.1rem;
    box-sizing: border-box;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #1C201C;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    text-align: center;
}
.row-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.row-btn:hover {
    background: #F8F5EE;
    border-color: #C5A059;
    color: #C5A059;
    transform: translateY(-1px);
}
.row-btn.row-btn-primary {
    background: #1C201C;
    color: #FFFFFF;
    border-color: #1C201C;
}
.row-btn.row-btn-primary:hover {
    background: #C5A059;
    border-color: #C5A059;
    color: #1C201C;
}
.row-btn.row-btn-yt {
    color: #CC0000;
    border-color: rgba(204, 0, 0, 0.25);
}
.row-btn.row-btn-yt:hover {
    background: rgba(204, 0, 0, 0.08);
    border-color: #CC0000;
}
.row-btn.row-btn-fb {
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.3);
}
.row-btn.row-btn-fb:hover {
    background: rgba(24, 119, 242, 0.08);
    border-color: #1877F2;
    color: #1877F2;
}
.row-btn.row-btn-share {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.35);
}
.row-btn.row-btn-share:hover {
    background: rgba(37, 211, 102, 0.08);
    border-color: #25D366;
}

/* Key Topics Badges / Bullets on Cards */
.lecture-topics-preview {
    margin: 0.6rem 0 0.8rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.lecture-topics-preview li {
    font-size: 0.72rem;
    color: #6B6559;
    background: #F4EFE6;
    border: 1px solid rgba(197, 160, 89, 0.25);
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Deep-Linked Highlight Glow for Shared Bayan */
.bayan-highlighted {
    border: 2px solid #C5A059 !important;
    background: #FFFDF8 !important;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.28) !important;
    animation: bayanGlowPulse 2.4s ease-in-out infinite alternate;
}
@keyframes bayanGlowPulse {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5); }
    100% { box-shadow: 0 0 0 12px rgba(197, 160, 89, 0); }
}

/* --- LIGHTBOX MODAL (Zero-Lag Fast Dark Overlay, No GPU Blur) --- */
.bayan-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 10, 0.86); /* Fast pure overlay, zero device lag */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.bayan-modal-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}
.bayan-modal-box {
    background: #FFFFFF;
    border-radius: 8px;
    width: 100%;
    max-width: 860px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bayan-modal-backdrop.is-active .bayan-modal-box {
    transform: translateY(0) scale(1);
}
.bayan-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #1C201C;
    color: #FFFFFF;
}
.bayan-modal-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 400;
    color: #F8F5EE;
    margin: 0;
    padding-right: 1rem;
    line-height: 1.3;
}
.bayan-modal-close {
    background: transparent;
    border: none;
    color: #DCD5C9;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}
.bayan-modal-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}
.bayan-video-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000000;
}
.bayan-video-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.bayan-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #FAF8F3;
    border-top: 1px solid var(--color-border);
}
.bayan-modal-footer-meta {
    font-size: 0.8rem;
    color: #8C8477;
}

/* --- SHARE MODAL BOX --- */
.share-modal-box {
    max-width: 520px;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(197, 160, 89, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bayan-modal-backdrop.is-active .share-modal-box {
    transform: translateY(0) scale(1);
}
.share-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.share-modal-heading {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: #1C201C;
    margin: 0 0 0.3rem;
}
.share-modal-sub {
    font-size: 0.82rem;
    color: #7A7265;
    margin: 0;
}
.share-modal-close-btn {
    background: none;
    border: none;
    color: #8C8477;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
}
.share-modal-close-btn:hover {
    color: #1C201C;
}
.share-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.share-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: #1C201C;
    transition: all 0.2s ease;
    background: #FAF8F3;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.5rem;
}
.share-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.share-tile.tile-wa {
    border-color: rgba(37, 211, 102, 0.4);
    background: rgba(37, 211, 102, 0.06);
    color: #1D8A46;
}
.share-tile.tile-wa:hover {
    background: #25D366;
    color: #FFFFFF;
}
.share-tile.tile-fb {
    border-color: rgba(24, 119, 242, 0.4);
    background: rgba(24, 119, 242, 0.06);
    color: #1877F2;
}
.share-tile.tile-fb:hover {
    background: #1877F2;
    color: #FFFFFF;
}
.share-tile.tile-x {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.04);
    color: #1C201C;
}
.share-tile.tile-x:hover {
    background: #000000;
    color: #FFFFFF;
}
.share-copy-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: #FAF8F3;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 0.35rem 0.4rem 0.35rem 0.85rem;
}
.share-copy-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.82rem;
    color: #1C201C;
    font-family: inherit;
    outline: none;
}
.share-copy-btn {
    background: #1C201C;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 0.55rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.share-copy-btn:hover {
    background: #C5A059;
}

/* Modal Cursor Precision & Hover Isolation */
.bayan-modal-backdrop,
.bayan-modal-backdrop * {
    cursor: auto !important;
}

.bayan-modal-backdrop button,
.bayan-modal-backdrop a,
.bayan-modal-close,
.share-modal-close-btn,
.share-tile,
.share-copy-btn,
.row-btn {
    cursor: pointer !important;
}

.share-copy-input {
    cursor: text !important;
}

body:has(.bayan-modal-backdrop.is-active) #cursorDot,
body:has(.bayan-modal-backdrop.is-active) #cursorRing {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* --- STICKY AUDIO PLAYER DOCK --- */
.bayan-audio-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1C201C;
    border-top: 2px solid #C5A059;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
    padding: 0.85rem 1.5rem;
    color: #FFFFFF;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.bayan-audio-dock.is-active {
    transform: translateY(0);
}
.audio-dock-inner {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.audio-dock-track {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 240px;
    max-width: 340px;
}
.audio-dock-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #C5A059;
    color: #1C201C;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.audio-dock-meta {
    overflow: hidden;
}
.audio-dock-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 0.15rem;
}
.audio-dock-artist {
    font-size: 0.72rem;
    color: #A39E93;
    margin: 0;
}
.audio-dock-player-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
}
.audio-dock-player-wrap audio {
    width: 100%;
    height: 38px;
    filter: invert(0.92) hue-rotate(180deg);
    border-radius: 4px;
}
.audio-dock-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.audio-dock-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    cursor: pointer;
}
.audio-dock-btn:hover {
    background: #C5A059;
    border-color: #C5A059;
    color: #1C201C;
}
.audio-dock-close {
    background: none;
    border: none;
    color: #A39E93;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.audio-dock-close:hover {
    color: #FFFFFF;
}

@media (max-width: 820px) {
    .audio-dock-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .audio-dock-track {
        max-width: 100%;
    }
    .audio-dock-player-wrap {
        max-width: 100%;
    }
    .audio-dock-actions {
        justify-content: space-between;
    }
}

/* --- TOAST NOTIFICATION --- */
.bayan-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1C201C;
    color: #FFFFFF;
    border: 1px solid #C5A059;
    padding: 0.75rem 1.4rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bayan-toast.is-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.bayan-toast svg {
    color: #25D366;
    width: 16px;
    height: 16px;
}



/* ==========================================================================
   FEATURED BAYAN CARD REFACTOR (Top-aligned, Clean Topics, Grouped Buttons)
   ========================================================================== */
.featured-lecture-card {
    align-items: flex-start !important;
    padding: 1.75rem !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 24px rgba(42, 36, 28, 0.05);
}

.featured-key-topics-list {
    margin: 0.85rem 0 1.25rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.featured-key-topics-list li {
    font-size: 0.85rem;
    color: #4A453E;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    line-height: 1.4;
}

.featured-key-topics-list li .topic-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.15);
    color: #9A7B38;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.featured-actions-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.featured-actions-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.featured-actions-primary .action-btn {
    padding: 0.7rem 1.15rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.featured-actions-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0.35rem;
}

.action-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: #FFFFFF;
    color: #4A453E;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn-sm:hover {
    background: #F8F5EE;
    border-color: #C5A059;
    color: #1C201C;
}

.action-btn-sm.btn-action-yt:hover {
    background: rgba(255, 0, 0, 0.08);
    border-color: #FF0000;
    color: #CC0000;
}

.action-btn-sm.btn-action-fb:hover {
    background: rgba(24, 119, 242, 0.08);
    border-color: #1877F2;
    color: #1877F2;
}

.action-btn-sm.btn-action-share:hover {
    background: rgba(37, 211, 102, 0.08);
    border-color: #25D366;
    color: #1D8A46;
}
