/* ================================================================
   OMRAN LECTURES  —  lectures.css
   Loaded on every page via web.assets_frontend
================================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
    --lp-dark:   #2a1a10;
    --lp-green:  #5c3520;
    --lp-mid:    #8f6040;
    --lp-light:  #8f6040;
    --lp-pale:   #e8cdb8;
    --lp-gold:   #b5891a;
    --lp-goldf:  #f4e0a0;
    --lp-txt:    #1c1c1c;
    --lp-muted:  #5a6a60;
    --lp-hint:   #8a9e91;
    --lp-bg:     #f7f9f7;
    --lp-white:  #ffffff;
    --lp-border: #d4e6d9;
    --lp-rcard:  14px;
    --lp-rbtn:   8px;
    --lp-shcard: 0 2px 16px rgba(30,80,50,.08);
    --lp-shover: 0 6px 28px rgba(30,80,50,.14);
}

/* ── Shared page font ──────────────────────────────────────────── */
.lec-hero,
.lec-main,
.lec-filter,
.lec-grid,
.lec-detail-page {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
}

/* ══════════════════════════════════════════════════════════════
   HERO BANNER
══════════════════════════════════════════════════════════════ */
.lec-hero {
     background: linear-gradient(135deg, #2a1a10 0%, #5c3520 55%, #8f6040 100%);
    padding: 3.5rem 2.5rem 3rem;
    position: relative;
    overflow: hidden;
}
.lec-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 1px,
        transparent 1px, transparent 20px
    );
    pointer-events: none;
}
.lh-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}
.lh-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: var(--lp-goldf);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: .9rem;
}
.lh-crumb {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,.6);
    margin-bottom: .8rem;
    flex-wrap: wrap;
}
.lh-crumb a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: color .2s;
}
.lh-crumb a:hover,
.lh-crumb .lh-active { color: var(--lp-light); }
.lec-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,.2);
    line-height: 1.3;
}
.lec-hero > .lh-inner > p {
    font-size: 15px;
    color: rgba(255,255,255,.72);
    max-width: 520px;
    line-height: 1.7;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   MAIN WRAPPER
══════════════════════════════════════════════════════════════ */
.lec-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* ══════════════════════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════════════════════ */
.lec-filter {
    background: var(--lp-white);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-rcard);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    box-shadow: var(--lp-shcard);
}
.lec-fg {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 180px;
}
.lec-fg label {
    font-size: 12px;
    font-weight: 600;
    color: var(--lp-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.lec-fg input,
.lec-fg select {
    height: 42px;
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-rbtn);
    padding: 0 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--lp-txt);
    background: var(--lp-bg);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    direction: rtl;
    width: 100%;
}
.lec-fg input:focus,
.lec-fg select:focus {
    border-color: var(--lp-mid);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}
.lec-fg input::placeholder { color: var(--lp-hint); }

.lec-btn-search {
    height: 42px;
    padding: 0 24px;
    background: var(--lp-green);
    color: #fff;
    border: none;
    border-radius: var(--lp-rbtn);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background .2s, transform .1s;
    white-space: nowrap;
}
.lec-btn-search:hover { background: var(--lp-dark); }
.lec-btn-search:active { transform: scale(.98); }

.lec-btn-reset {
    height: 42px;
    padding: 0 16px;
    background: transparent;
    color: var(--lp-muted);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-rbtn);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.lec-btn-reset:hover {
    border-color: var(--lp-mid);
    color: var(--lp-green);
    background: var(--lp-pale);
}

/* ══════════════════════════════════════════════════════════════
   RESULTS META BAR
══════════════════════════════════════════════════════════════ */
.lec-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.lec-count { font-size: 14px; color: var(--lp-muted); }
.lec-count strong { color: var(--lp-green); }

.lec-vtoggle { display: flex; gap: 4px; }
.lec-vbtn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--lp-border);
    border-radius: 6px;
    background: var(--lp-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lp-muted);
    transition: all .2s;
    padding: 0;
}
.lec-vbtn svg { width: 16px; height: 16px; }
.lec-vbtn.active,
.lec-vbtn:hover {
    background: var(--lp-pale);
    border-color: var(--lp-mid);
    color: var(--lp-green);
}

/* ══════════════════════════════════════════════════════════════
   LOADING SPINNER
══════════════════════════════════════════════════════════════ */
.lec-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 3rem;
    color: var(--lp-muted);
    font-size: 14px;
}
.lec-loading.hidden { display: none; }
.lec-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--lp-border);
    border-top-color: var(--lp-green);
    border-radius: 50%;
    animation: lecSpin .7s linear infinite;
}
@keyframes lecSpin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   CARDS GRID
══════════════════════════════════════════════════════════════ */
.lec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.lec-grid.lec-list { grid-template-columns: 1fr; }

/* ── Single Card ───────────────────────────────────────────── */
.lec-card {
    background: var(--lp-white);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-rcard);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--lp-shcard);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    text-decoration: none;
    color: inherit;
    animation: lpFadeUp .35s ease both;
}
.lec-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lp-shover);
    border-color: var(--lp-light);
    text-decoration: none;
    color: inherit;
}
@keyframes lpFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Thumbnail */
.lec-thumb {
    height: 160px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.lec-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lec-thumb .lt-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lec-thumb .lt-pattern {
    position: absolute;
    inset: 0;
    opacity: .15;
    background-image: repeating-linear-gradient(
        45deg,
        #74c69d 0, #74c69d 1px,
        transparent 1px, transparent 18px
    );
}
.lec-thumb .lt-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.lec-cat-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--lp-gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
    z-index: 2;
    font-family: 'Cairo', sans-serif;
}
.lec-date-chip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    font-family: 'Cairo', sans-serif;
}
.lec-date-chip svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Card body */
.lec-body {
    padding: 1.1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.lec-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--lp-txt);
    margin-bottom: .4rem;
    line-height: 1.45;
    text-align: right;
}
.lec-speaker {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: .75rem;
}
.lec-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--lp-pale);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--lp-green);
    font-family: 'Cairo', sans-serif;
}
.lec-speaker-name {
    font-size: 13px;
    color: var(--lp-muted);
    font-weight: 500;
}
.lec-desc {
    font-size: 13px;
    color: var(--lp-muted);
    line-height: 1.65;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: .9rem;
    text-align: right;
}
.lec-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
    border-top: 1px solid var(--lp-border);
}
.lec-mig { display: flex; gap: 12px; }
.lec-mi {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--lp-hint);
    font-family: 'Cairo', sans-serif;
}
.lec-mi svg { width: 13px; height: 13px; flex-shrink: 0; }

.lec-btn-reg {
    height: 32px;
    padding: 0 14px;
    background: var(--lp-pale);
    color: var(--lp-green);
    border: 1px solid rgba(45,106,79,.25);
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.lec-btn-reg:hover {
    background: var(--lp-green);
    color: #fff;
    text-decoration: none;
}

/* ── List view overrides ───────────────────────────────────── */
.lec-grid.lec-list .lec-card { flex-direction: row; }
.lec-grid.lec-list .lec-thumb { width: 200px; height: auto; min-height: 130px; }
.lec-grid.lec-list .lec-desc { -webkit-line-clamp: 3; }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════════ */
.lec-empty {
    text-align: center;
    padding: 4rem 2rem;
    display: none;
}
.lec-empty svg {
    width: 64px;
    height: 64px;
    color: var(--lp-border);
    margin-bottom: 1rem;
}
.lec-empty h3 {
    font-size: 18px;
    color: var(--lp-muted);
    margin-bottom: .4rem;
    font-family: 'Cairo', sans-serif;
}
.lec-empty p {
    font-size: 14px;
    color: var(--lp-hint);
    font-family: 'Cairo', sans-serif;
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════════════ */
.lec-pag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.lec-pbtn {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--lp-border);
    background: var(--lp-white);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all .2s;
    white-space: nowrap;
}
.lec-pbtn:hover {
    border-color: var(--lp-mid);
    color: var(--lp-green);
    background: var(--lp-pale);
}
.lec-pbtn.active {
    background: var(--lp-green);
    border-color: var(--lp-green);
    color: #fff;
    box-shadow: 0 2px 8px rgba(45,106,79,.3);
}
.lec-pbtn:disabled,
.lec-pbtn[disabled] {
    opacity: .4;
    pointer-events: none;
    cursor: not-allowed;
}
.lec-pdots {
    font-size: 14px;
    color: var(--lp-muted);
    padding: 0 4px;
    font-family: 'Cairo', sans-serif;
}

/* ══════════════════════════════════════════════════════════════
   DETAIL PAGE
══════════════════════════════════════════════════════════════ */
.lec-detail-hero { padding-bottom: 2.5rem; }

.lec-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.ldm-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: rgba(255,255,255,.8);
    font-family: 'Cairo', sans-serif;
}
.ldm-item svg { flex-shrink: 0; }

.lec-detail-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.lec-detail-img {
    width: 100%;
    border-radius: var(--lp-rcard);
    margin-bottom: 1.5rem;
    box-shadow: var(--lp-shcard);
}

.lec-detail-html {
    font-size: 15px;
    line-height: 1.8;
    color: var(--lp-txt);
    font-family: 'Cairo', sans-serif;
}
.lec-detail-html h2,
.lec-detail-html h3 {
    color: var(--lp-dark);
    margin: 1.5rem 0 .75rem;
}
.lec-detail-html p { margin-bottom: 1rem; }

.lec-detail-nodesc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--lp-muted);
    font-family: 'Cairo', sans-serif;
}

/* Attachments */
.lec-attachments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lp-border);
}
.lec-attachments h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--lp-dark);
    margin-bottom: 1rem;
    font-family: 'Cairo', sans-serif;
}
.lec-attach-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--lp-bg);
    border: 1px solid var(--lp-border);
    border-radius: 8px;
    margin-bottom: 8px;
    color: var(--lp-green);
    text-decoration: none;
    font-size: 13px;
    font-family: 'Cairo', sans-serif;
    transition: all .2s;
}
.lec-attach-item:hover {
    background: var(--lp-pale);
    border-color: var(--lp-mid);
    text-decoration: none;
}

/* Sidebar */
.lec-sidebar-card {
    background: var(--lp-white);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-rcard);
    padding: 1.5rem;
    box-shadow: var(--lp-shcard);
    position: sticky;
    top: 90px;
}
.lsc-speaker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--lp-border);
}
.lsc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lp-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--lp-green);
    flex-shrink: 0;
    font-family: 'Cairo', sans-serif;
}
.lsc-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--lp-txt);
    font-family: 'Cairo', sans-serif;
}
.lsc-title {
    font-size: 12px;
    color: var(--lp-muted);
    margin-top: 2px;
    font-family: 'Cairo', sans-serif;
}

.lsc-info-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.lsc-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-family: 'Cairo', sans-serif;
}
.lsc-label { color: var(--lp-muted); }
.lsc-value { font-weight: 600; color: var(--lp-txt); }

.lsc-btn-reg {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--lp-green);
    color: #fff;
    border: none;
    border-radius: var(--lp-rbtn);
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
    margin-bottom: .75rem;
}
.lsc-btn-reg:hover {
    background: var(--lp-dark);
    color: #fff;
    text-decoration: none;
}

.lsc-btn-back {
    display: block;
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--lp-muted);
    border: 1px solid var(--lp-border);
    border-radius: var(--lp-rbtn);
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.lsc-btn-back:hover {
    border-color: var(--lp-mid);
    color: var(--lp-green);
    background: var(--lp-pale);
    text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .lec-detail-body {
        grid-template-columns: 1fr;
    }
    .lec-sidebar-card { position: static; }
}

@media (max-width: 700px) {
    .lec-hero { padding: 2rem 1rem 1.75rem; }
    .lec-hero h1 { font-size: 1.75rem; }
    .lec-main { padding: 1.5rem 1rem 3rem; }
    .lec-filter { padding: 1rem; }
    .lec-fg { min-width: 140px; }
    .lec-grid.lec-list .lec-card { flex-direction: column; }
    .lec-grid.lec-list .lec-thumb { width: 100%; min-height: 140px; }
}
