/*
Theme Name: Dr. Mowafak Ali Theme
Theme URI: https://mowafak.xo.je/
Author: Dr. Mowafak Ali
Author URI: https://mowafak.xo.je/
Description: Custom, high-performance, RTL-ready Dark Mode WordPress Theme built for Dr. Mowafak Ali's training programs, financial consulting, blog, and seamless LMS integration (Tutor LMS, LearnDash, Masteriyo).
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drmowafak
Tags: dark-mode, rtl-language-support, education, custom-menu, featured-images, translation-ready
*/

/* Core Theme Styles */

:root{--navy:#03182f;--navy2:#062c53;--gold:#e4a329;--gold2:#ffc45b;--bg:#f7f9fc;--surface:#fff;--text:#142238;--muted:#627188;--line:#dfe6ee;--shadow:0 12px 35px #001b3518}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Tahoma,Arial,sans-serif;line-height:1.65;transition:.25s}body.dark{--bg:#07111f;--surface:#0c1b2c;--text:#edf3fa;--muted:#a8b7c8;--line:#20354b;--shadow:0 12px 35px #0006}a{text-decoration:none;color:inherit}.container{width:min(1200px,93%);margin:auto}
header{background:#02162d;color:white;position:sticky;top:0;z-index:50;border-bottom:1px solid #ffffff18}.nav{height:100px;display:flex;align-items:center;justify-content:space-between;gap:15px}.brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;color:var(--gold)}.logo-img{height:85px;width:auto;object-fit:contain;transition:transform .3s}.logo-img:hover{transform:scale(1.05)}.logo{width:44px;height:44px;border:2px solid var(--gold);border-radius:50%;display:grid;place-items:center;font-size:22px}.links{display:flex;gap:20px;font-size:14px;font-weight:700}.links a:hover{color:var(--gold2)}.controls{display:flex;gap:7px;align-items:center}.ctl{background:#ffffff0d;border:1px solid #ffffff35;color:white;border-radius:8px;padding:8px 11px;cursor:pointer}.book{background:var(--gold);color:#07192b;border:0;padding:6px 14px;border-radius:6px;font-weight:bold;font-size:14px;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;height:34px}.hamb{display:none}
.hero{position:relative;overflow:hidden;background:radial-gradient(circle at 68% 35%,#0a4777 0,#052a50 32%,#02172e 72%);color:white}.hero:before{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff06 1px,transparent 1px),linear-gradient(90deg,#ffffff06 1px,transparent 1px);background-size:50px 50px;mask-image:linear-gradient(to bottom,transparent,#000,transparent)}.heroWrap{position:relative;min-height:380px;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:20px;padding-top:0;margin-top:-40px}.eyebrow{color:var(--gold2);font-weight:800}.hero h1{font-size:62px;line-height:1.05;margin:8px 0}.hero h2{font-size:22px;margin:0 0 14px}.hero p{max-width:660px;color:#dce7f1}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.btn{display:inline-flex;align-items:center;justify-content:center;padding:11px 18px;border-radius:8px;font-weight:800;border:1px solid transparent;cursor:pointer}.gold{background:var(--gold);color:#06192b}.outline{border-color:#ffffff80;color:white}.navy{background:var(--navy);color:white}.portraitZone{align-self:end;width:360px;margin:0 auto;height:430px;display:flex;align-items:flex-end;justify-content:center;position:relative}.arch-frame{position:absolute;width:360px;height:415px;border-radius:180px 180px 30px 30px;border:1px solid var(--gold);z-index:1;bottom:0;left:0}.arch-circle{position:absolute;width:44px;height:44px;border-radius:50%;border:1px solid var(--gold);z-index:1;top:30px;left:-12px;overflow:hidden}.arch-line{width:70px;height:1px;background:var(--gold);transform:rotate(-45deg);position:absolute;top:22px;left:-13px}.portrait{position:relative;z-index:2;width:330px;height:385px;object-fit:cover;object-position:50% 18%;border-radius:165px 165px 25px 25px;box-shadow:0 20px 50px #0007;bottom:15px}.exp-badge{position:absolute;bottom:25px;right:-40px;background:#031326;border:1px solid var(--gold);border-radius:16px;padding:15px 25px;z-index:3;text-align:center;box-shadow:0 12px 30px #0008;color:white}.exp-badge small{display:block;font-size:16px;font-weight:bold}.exp-badge div{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--gold);font-size:34px;font-weight:900;margin:2px 0;line-height:1}.exp-badge span{font-size:24px}
.stats{position:relative;margin-top:-32px;z-index:4}.statsGrid{background:var(--surface);border-radius:14px;box-shadow:var(--shadow);display:grid;grid-template-columns:repeat(6,1fr);padding:12px}.stat{text-align:center;padding:12px;border-inline-end:1px solid var(--line)}.stat:last-child{border:0}.stat b{display:block;font-size:27px;color:var(--navy2)}body.dark .stat b{color:var(--gold2)}.stat small{color:var(--muted)}
section{padding:64px 0}.head{text-align:center;max-width:760px;margin:0 auto 32px}.head span{color:#c68412;font-weight:800}.head h2{font-size:37px;color:var(--navy);margin:3px 0}.dark .head h2{color:white}.head p{color:var(--muted)}.grid{display:grid;gap:16px}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:21px;box-shadow:0 5px 18px #001a330a;transition:.2s}.card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.icon{font-size:26px;color:#d58e12}.card h3{color:var(--navy);margin:5px 0}.dark .card h3{color:#fff}.card p{color:var(--muted);font-size:14px}.band{background:var(--navy);color:white}.band .head h2{color:white}.course{padding:0;overflow:hidden}.courseTop{padding:23px;background:linear-gradient(145deg,#052a50,#02162d);color:white}.courseTop h3{color:white}.courseBody{padding:18px}.cred{display:flex;align-items:center;gap:13px}.badge{min-width:62px;height:48px;border-radius:8px;background:#edf2f8;color:#05264a;display:grid;place-items:center;font-weight:900}.dark .badge{background:#142a42;color:#fff}
.pageHero{background:linear-gradient(120deg,#02162d,#074775);color:white;padding:68px 0}.pageHero h1{font-size:48px;margin:0}.pageHero p{color:#d8e4ef;max-width:760px}.two{display:grid;grid-template-columns:1fr 1fr;gap:30px}.timeline{border-inline-start:3px solid var(--gold);padding-inline-start:25px}.notice{background:#fff6df;border:1px solid #ebca7c;color:#74500a;padding:14px;border-radius:10px}.dark .notice{background:#2b2415;color:#f1d992;border-color:#6c5727}.gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.ph{aspect-ratio:4/3;background:var(--surface);border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;text-align:center}.form input,.form select,.form textarea{width:100%;padding:12px;margin:6px 0;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:8px}.form textarea{min-height:125px}
footer{background:#021326;color:#c7d5e3;padding:38px 0 16px}.foot{display:grid;grid-template-columns:2fr 1fr 1fr 1.5fr;gap:28px}.wa{position:fixed;right:20px;bottom:20px;width:58px;height:58px;border-radius:50%;background:#20b85a;color:white;display:grid;place-items:center;font-size:26px;z-index:60;box-shadow:var(--shadow)}
html[dir=ltr] body{font-family:Arial,Tahoma,sans-serif}
@media(max-width:940px){.links{display:none}.hamb{display:block}.heroWrap,.two{grid-template-columns:1fr}.portraitZone{height:410px}.portrait{height:390px;width:340px}.statsGrid,.g4,.g3,.gallery{grid-template-columns:1fr 1fr}.hero h1{font-size:45px}.book{display:none}}
@media(max-width:560px){.statsGrid,.g4,.g3,.gallery{grid-template-columns:1fr}.hero h1,.pageHero h1{font-size:35px}.controls .ctl{padding:6px}.portrait{width:300px}}
/* Added Sections CSS */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; }
.feat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; transition: .2s; }
.feat-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.feat-icon { font-size: 28px; color: var(--gold); margin-bottom: 12px; }
.feat-card h4 { font-size: 18px; margin: 0 0 8px; color: var(--navy); }
.dark .feat-card h4 { color: #fff; }

.timeline-section { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 48px; }
.timeline-wrapper { position: relative; max-width: 900px; margin: 0 auto; padding: 20px 0; }
.timeline-wrapper::before { content: ''; position: absolute; left: 50%; transform: translateX(-50%); width: 2px; height: 100%; background: var(--gold); }
html[dir=rtl] .timeline-wrapper::before, body[data-lang=ar] .timeline-wrapper::before { left: 50%; transform: translateX(50%); }

.timeline-item { width: 50%; padding: 0 30px 30px 30px; position: relative; }
.timeline-item:nth-child(odd) { left: 0; text-align: left; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
html[dir=rtl] .timeline-item:nth-child(odd), body[data-lang=ar] .timeline-item:nth-child(odd) { left: auto; right: 0; text-align: right; }
html[dir=rtl] .timeline-item:nth-child(even), body[data-lang=ar] .timeline-item:nth-child(even) { left: auto; right: 50%; text-align: right; }

.timeline-dot { position: absolute; top: 5px; right: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 3px solid var(--bg); z-index: 5; transition: .25s; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; right: auto; }
html[dir=rtl] .timeline-dot, body[data-lang=ar] .timeline-dot { left: -8px; right: auto; }
html[dir=rtl] .timeline-item:nth-child(even) .timeline-dot, body[data-lang=ar] .timeline-item:nth-child(even) .timeline-dot { right: -8px; left: auto; }

.timeline-year { font-size: 22px; font-weight: 800; color: var(--gold); margin-bottom: 8px; font-family: Tahoma, sans-serif; }
.timeline-content-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; transition: .25s; }
.timeline-content-card h4 { font-size: 18px; margin: 0 0 8px; color: var(--navy); }
.dark .timeline-content-card h4 { color: #fff; }
.timeline-item:hover .timeline-content-card { border-color: var(--gold); box-shadow: var(--shadow); }

.education-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.academic-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; transition: .2s; }
.academic-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.academic-badge { background: #e4a32922; color: var(--gold); border: 1px solid #e4a32944; font-size: 13px; font-weight: bold; padding: 5px 10px; border-radius: 6px; align-self: flex-start; margin-bottom: 12px; }
.academic-card h3 { font-size: 20px; color: var(--navy); margin: 0 0 8px; }
.dark .academic-card h3 { color: #fff; }
.academic-inst { font-size: 15px; font-weight: bold; color: var(--muted); margin-bottom: 12px; }
.academic-meta { margin-top: auto; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.academic-detail { font-size: 14px; color: var(--text); margin: 8px 0 16px; }

@media(max-width: 768px) {
    .about-grid, .education-grid { grid-template-columns: 1fr; }
    .timeline-wrapper::before { left: 0; transform: none; }
    html[dir=rtl] .timeline-wrapper::before, body[data-lang=ar] .timeline-wrapper::before { left: auto; right: 0; transform: none; }
    .timeline-item { width: 100%; padding: 0 0 30px 30px; left: 0 !important; right: auto !important; text-align: left !important; }
    html[dir=rtl] .timeline-item, body[data-lang=ar] .timeline-item { padding: 0 30px 30px 0; text-align: right !important; }
    .timeline-dot { left: -8px !important; right: auto !important; }
    html[dir=rtl] .timeline-dot, body[data-lang=ar] .timeline-dot { right: -8px !important; left: auto !important; }
}

/* Testimonials Marquee */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
    display: flex;
}
.marquee-content {
    display: flex;
    flex-shrink: 0;
    width: max-content;
    gap: 20px;
    animation: scroll-left 35s linear infinite;
    padding-left: 20px;
    will-change: transform;
}
.marquee-content:hover,
.marquee-content:hover * {
    animation-play-state: paused !important;
}
.marquee-img {
    height: 350px;
    width: auto;
    max-width: none !important;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: var(--bg);
    transition: transform .3s;
    cursor: pointer;
}
.marquee-img:hover {
    transform: scale(1.02);
}
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
html[dir=rtl] .marquee-content, body[data-lang=ar] .marquee-content {
    animation-name: scroll-right;
    animation-duration: 35s !important;
    padding-right: 20px;
    padding-left: 0;
}
@keyframes scroll-right {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}


.band .timeline-dot { border-color: var(--navy); }

/* Credentials Card Styles */
.band .cred-card {
    background: var(--navy2);
    border-color: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 24px;
}
.band .cred-card:hover {
    border-color: var(--gold);
}
.band .cred-card h3 {
    color: var(--gold) !important;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 22px;
}
.band .cred-card p {
    color: #f1f1f1 !important;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}
.cred-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    background: #fff;
    padding: 2px;
}

.band .timeline-content-card p { color: var(--text) !important; }
.dark .band .timeline-content-card p { color: #e2e8f0 !important; }

/* About Section Headings */
.about-h3 {
    color: var(--navy);
}
.dark .about-h3 {
    color: #fff !important;
}

.logo-img-foot { transition: transform 0.3s; }
.logo-img-foot:hover { transform: scale(1.05) rotate(1deg); }

/* FAQ Accordion Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.band .faq-item {
    background: var(--navy2);
    border-color: rgba(255, 255, 255, 0.1);
}
.faq-item[open] {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.faq-item summary {
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    list-style: none; /* Hide default arrow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.band .faq-item summary {
    color: var(--gold);
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 24px;
    color: var(--gold);
    transition: transform 0.3s;
    position: absolute;
    left: 20px;
}
html[dir="ltr"] .faq-item summary::after {
    left: auto;
    right: 20px;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-content {
    padding: 0 20px 20px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}
.band .faq-item .faq-content {
    color: #e2e8f0;
}

/* Premium Form Styles */
.premium-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-row {
    display: flex;
    gap: 16px;
}
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}
.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}
.dark .form-label {
    color: #e2e8f0;
}
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.dark .form-input {
    background: #041d38;
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(228, 163, 41, 0.15);
}
.dark .form-input:focus {
    box-shadow: 0 0 0 4px rgba(228, 163, 41, 0.25);
}
.form-input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}
html[dir="ltr"] .submit-btn svg {
    transform: none !important;
}

/* Course Filters */
.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    background: rgba(228, 163, 41, 0.1);
}
.filter-btn.active {
    background: var(--gold);
    color: #fff;
}
.course.hidden {
    display: none !important;
}

/* ==========================================================================
   COURSES CATALOG & DETAILS CSS (Fixed Layout & Responsiveness)
   ========================================================================== */
.search-box-wrap {
    max-width: 600px;
    margin: 0 auto 35px auto;
    position: relative;
}
.search-input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 45px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 30px;
    color: #fff;
    font-size: 1em;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}
.search-input:focus {
    border-color: var(--gold);
}
.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    pointer-events: none;
}
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 35px;
    justify-content: center;
}
.cat-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: #e2ecf5;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}
.cat-btn.active, .cat-btn:hover {
    background: var(--gold);
    color: #000;
    font-weight: bold;
    border-color: var(--gold);
}
.course-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    padding: 0;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}
.course-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.course-img-box {
    height: 200px;
    max-height: 200px;
    width: 100%;
    overflow: hidden;
    border-bottom: 2px solid var(--gold);
    position: relative;
    background: #021224;
}
.course-img {
    width: 100%;
    height: 100%;
    max-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}
.course-card:hover .course-img {
    transform: scale(1.06);
}
.course-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.course-cat {
    color: var(--gold);
    font-size: 0.82em;
    font-weight: bold;
    margin-bottom: 8px;
}
.course-title {
    color: #ffffff;
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.4;
    min-height: 48px;
}
.course-desc {
    color: #a8b2d1;
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex: 1;
}
.course-footer {
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.course-price {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.25em;
}

/* Single Course Page Layout */
.course-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}
@media (max-width: 900px) {
    .course-layout {
        grid-template-columns: 1fr;
    }
}
.sticky-card {
    position: sticky;
    top: 90px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.price-badge {
    font-size: 2.2em;
    font-weight: 900;
    color: var(--gold);
}
.old-price {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 1.2em;
    margin-right: 10px;
}
.discount-pill {
    background: rgba(228, 163, 41, 0.15);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    display: inline-block;
}
.feature-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 0.95em;
}
.feature-item:last-child {
    border-bottom: none;
}

/* ==========================================================================
   CERTIFICATES GALLERY & LIGHTBOX CSS
   ========================================================================== */
.cert-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.cert-filter-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: #e2ecf5;
    padding: 9px 22px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}
.cert-filter-btn.active, .cert-filter-btn:hover {
    background: var(--gold);
    color: #000;
    font-weight: bold;
    border-color: var(--gold);
    box-shadow: 0 4px 15px rgba(228, 163, 41, 0.3);
}
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}
.cert-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}
.cert-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.cert-img-wrap {
    height: 220px;
    max-height: 220px;
    overflow: hidden;
    position: relative;
    background: #021224;
    border-bottom: 2px solid rgba(228, 163, 41, 0.4);
}
.cert-thumb {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}
.cert-card:hover .cert-thumb {
    transform: scale(1.05);
}
.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 18, 36, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cert-card:hover .cert-overlay {
    opacity: 1;
}
.cert-zoom-icon {
    background: var(--gold);
    color: #000;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.88em;
}
.cert-details {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cert-title {
    font-size: 1.05em;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.4;
    font-weight: 600;
}
.cert-issuer {
    color: var(--gold);
    font-size: 0.85em;
    margin: 0;
    line-height: 1.5;
}

/* Lightbox Modal */
.cert-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.cert-modal.open {
    display: flex;
}
.cert-modal-content {
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.cert-modal-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--gold);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.cert-modal-caption {
    color: #ffffff;
    text-align: center;
    margin-top: 15px;
    font-size: 1.2em;
}
.cert-modal-caption span {
    color: var(--gold);
    display: block;
    font-size: 0.85em;
    margin-top: 4px;
}
.cert-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}
.cert-modal-close:hover {
    color: var(--gold);
}

/* ==========================================================================
   BLOG POSTS CARDS & SIDEBAR CSS
   ========================================================================== */
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}
.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.post-card-img-wrap {
    height: 190px;
    max-height: 190px;
    overflow: hidden;
    border-bottom: 2px solid var(--gold);
    background: #021224;
    position: relative;
}
.post-card-img {
    width: 100%;
    height: 100%;
    max-height: 190px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.post-card:hover .post-card-img {
    transform: scale(1.06);
}
.post-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-tag {
    color: var(--gold);
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 10px;
}
.post-title {
    font-size: 1.15em;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.4;
}
.post-excerpt {
    color: var(--muted);
    font-size: 0.88em;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: #8b9bb4;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
}


/* Courses Styles */
.search-box-wrap {
            max-width: 600px;
            margin: 0 auto 35px auto;
            position: relative;
        }
        .search-input {
            width: 100%;
            padding: 14px 20px;
            padding-right: 45px;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 30px;
            color: #fff;
            font-size: 1em;
            outline: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            transition: border-color 0.3s ease;
        }
        .search-input:focus {
            border-color: var(--gold);
        }
        .search-icon {
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gold);
            pointer-events: none;
        }
        .filter-bar {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 35px;
            justify-content: center;
        }
        .cat-btn {
            background: var(--surface);
            border: 1px solid var(--line);
            color: #e2ecf5;
            padding: 8px 18px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }
        .cat-btn.active, .cat-btn:hover {
            background: var(--gold);
            color: #000;
            font-weight: bold;
            border-color: var(--gold);
        }
        .card.course {
            display: flex;
            flex-direction: column;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            height: 100%;
            padding: 0;
            box-shadow: var(--shadow);
            transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .card.course:hover {
            transform: translateY(-6px);
            border-color: var(--gold) !important;
            box-shadow: 0 12px 30px rgba(0,0,0,0.5);
        }
        .course-img-box {
            height: 180px;
            overflow: hidden;
            border-bottom: 2px solid var(--gold);
            position: relative;
            background: #021224;
        }
        .course-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
            display: block;
        }
        .card.course:hover .course-img {
            transform: scale(1.06);
        }
        .course-title-box {
            padding: 20px 20px 15px 20px;
            display: flex;
            align-items: center;
            min-height: 70px;
            background: var(--surface);
        }
        .course-title {
            color: #ffffff;
            margin: 0;
            font-size: 1.15em;
            font-weight: bold;
            line-height: 1.4;
        }
        .course-desc-box {
            background: #052a50;
            padding: 15px 20px;
            flex: 1;
            display: flex;
            align-items: center;
        }
        .course-desc {
            color: #e2ecf5;
            font-size: 0.88em;
            line-height: 1.6;
            margin: 0;
        }
        .course-footer-box {
            padding: 15px 20px 20px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--surface);
        }
        .course-price {
            color: var(--gold);
            font-weight: bold;
            font-size: 1.15em;
        }
        .course-btn {
            padding: 8px 16px;
            font-size: 0.85em;
            text-decoration: none;
            border: 1px solid var(--gold);
            border-radius: 6px;
            color: var(--gold);
            background: transparent;
            transition: all 0.2s ease;
            display: inline-block;
        }
        .course-btn:hover {
            background: var(--gold);
            color: #000;
        }

/* Certificates & Bio Styles */
.cert-filters {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 40px;
        }
        .cert-filter-btn {
            background: var(--surface);
            border: 1px solid var(--line);
            color: #e2ecf5;
            padding: 9px 22px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 0.95em;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        .cert-filter-btn.active, .cert-filter-btn:hover {
            background: var(--gold);
            color: #000;
            font-weight: bold;
            border-color: var(--gold);
            box-shadow: 0 4px 15px rgba(228, 163, 41, 0.3);
        }
        .certs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
            gap: 25px;
        }
        .cert-card {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            height: 100%;
            display: flex;
            flex-direction: column;
            box-shadow: var(--shadow);
        }
        .cert-card:hover {
            transform: translateY(-6px);
            border-color: var(--gold);
            box-shadow: 0 12px 30px rgba(0,0,0,0.5);
        }
        .cert-img-wrap {
            height: 220px;
            overflow: hidden;
            position: relative;
            background: #021224;
            border-bottom: 2px solid rgba(228, 163, 41, 0.4);
        }
        .cert-thumb {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top center;
            transition: transform 0.4s ease;
        }
        .cert-card:hover .cert-thumb {
            transform: scale(1.05);
        }
        .cert-overlay {
            position: absolute;
            inset: 0;
            background: rgba(2, 18, 36, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .cert-card:hover .cert-overlay {
            opacity: 1;
        }
        .cert-zoom-icon {
            background: var(--gold);
            color: #000;
            font-weight: bold;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.88em;
        }
        .cert-details {
            padding: 18px;
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .cert-title {
            font-size: 1.05em;
            color: #ffffff;
            margin: 0 0 8px 0;
            line-height: 1.4;
            font-weight: 600;
        }
        .cert-issuer {
            color: var(--gold);
            font-size: 0.85em;
            margin: 0;
            line-height: 1.5;
        }

        /* Lightbox Modal */
        .cert-modal {
            display: none;
            position: fixed;
            z-index: 99999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.92);
            backdrop-filter: blur(5px);
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
        }
        .cert-modal.open {
            display: flex;
        }
        .cert-modal-content {
            max-width: 900px;
            width: 100%;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
        }
        .cert-modal-img {
            max-width: 100%;
            max-height: 75vh;
            object-fit: contain;
            border-radius: 8px;
            border: 1px solid var(--gold);
            box-shadow: 0 10px 40px rgba(0,0,0,0.8);
        }
        .cert-modal-caption {
            color: #ffffff;
            text-align: center;
            margin-top: 15px;
            font-size: 1.2em;
        }
        .cert-modal-caption span {
            color: var(--gold);
            display: block;
            font-size: 0.85em;
            margin-top: 4px;
        }
        .cert-modal-close {
            position: absolute;
            top: -40px;
            right: 0;
            color: #ffffff;
            font-size: 32px;
            cursor: pointer;
            line-height: 1;
        }
        .cert-modal-close:hover {
            color: var(--gold);
        }

/* Blog Styles */
.search-box-wrap {
            max-width: 600px;
            margin: 0 auto 35px auto;
            position: relative;
        }
        .search-input {
            width: 100%;
            padding: 14px 20px;
            padding-right: 45px;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 30px;
            color: #fff;
            font-size: 1em;
            outline: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            transition: border-color 0.3s ease;
        }
        .search-input:focus {
            border-color: var(--gold);
        }
        .search-icon {
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gold);
            pointer-events: none;
        }
        .post-card {
            display: flex;
            flex-direction: column;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
            height: 100%;
        }
        .post-card:hover {
            transform: translateY(-5px);
            border-color: var(--gold);
            box-shadow: 0 10px 25px rgba(0,0,0,0.4);
        }
        .post-card-img-wrap {
            height: 190px;
            overflow: hidden;
            border-bottom: 2px solid var(--gold);
            background: #021224;
            position: relative;
        }
        .post-card-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
        }
        .post-card:hover .post-card-img {
            transform: scale(1.06);
        }
        .post-card-body {
            padding: 22px;
            display: flex;
            flex-direction: column;
            flex: 1;
        }
        .post-tag {
            color: var(--gold);
            font-size: 0.85em;
            font-weight: bold;
            margin-bottom: 10px;
        }
        .post-title {
            font-size: 1.15em;
            color: #ffffff;
            margin: 0 0 10px 0;
            line-height: 1.4;
        }
        .post-excerpt {
            color: var(--muted);
            font-size: 0.88em;
            line-height: 1.6;
            margin-bottom: 18px;
            flex: 1;
        }
        .post-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8em;
            color: #8b9bb4;
            border-top: 1px solid rgba(255,255,255,0.05);
            padding-top: 12px;
        }
        .pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 50px;
            flex-wrap: wrap;
        }
        .page-btn {
            background: var(--surface);
            border: 1px solid var(--line);
            color: #e2ecf5;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.2s ease;
        }
        .page-btn.active, .page-btn:hover {
            background: var(--gold);
            color: #000;
            border-color: var(--gold);
        }
        .page-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

/* Additional Global Fixes for Images and Containers */
img {
    max-width: 100%;
    height: auto;
}
.course-img-box {
    height: 180px !important;
    max-height: 180px !important;
    overflow: hidden !important;
    background: #021224;
    border-bottom: 2px solid var(--gold);
    position: relative;
}
.course-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 180px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}
.cert-img-wrap {
    height: 220px !important;
    max-height: 220px !important;
    overflow: hidden !important;
    background: #021224;
}
.cert-thumb {
    width: 100% !important;
    height: 100% !important;
    max-height: 220px !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
}
.post-card-img-wrap {
    height: 190px !important;
    max-height: 190px !important;
    overflow: hidden !important;
    background: #021224;
}
.post-card-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 190px !important;
    object-fit: cover !important;
    display: block !important;
}
.marquee-content {
    display: flex !important;
    flex-shrink: 0 !important;
    width: max-content !important;
    animation: scroll-left 35s linear infinite !important;
    padding-left: 20px !important;
    will-change: transform !important;
}
.marquee-content:hover,
.marquee-content:hover * {
    animation-play-state: paused !important;
}
.marquee-img {
    height: 350px !important;
    width: auto !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
    cursor: pointer !important;
}
html[dir=rtl] .marquee-content, body[data-lang=ar] .marquee-content {
    animation-name: scroll-right !important;
    animation-duration: 35s !important;
    padding-right: 20px !important;
    padding-left: 0 !important;
}
@keyframes scroll-right {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}
