/*
Theme Name: PrepCenter Theme
Description: Main Stylesheet - Final Robust Version (Modern UI + Moroccan Hero + Creative Footer)
Version: 2.8
*/

/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    --primary: #0077b6;
    --primary-600: #023e8a;
    --accent: #fca311;
    --bg: #0b131a;
    --surface: #121c25;
    --surface-2: #1a2632;
    --card: #15222e;
    --text: #edf2f4;
    --muted: #8d99ae;
    --border: rgba(141, 153, 174, 0.2);
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
    --ring: rgba(0, 119, 182, 0.25);
}

:root[data-theme="light"] {
    --primary: #0077b6;
    --primary-600: #023e8a;
    --accent: #fca311;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --surface-2: #f1f3f5;
    --card: #ffffff;
    --text: #2b2d42;
    --muted: #6c757d;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 8px 30px rgba(10, 20, 40, 0.08);
    --shadow-sm: 0 4px 15px rgba(10, 20, 40, 0.05);
}

/* BASE */
* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary); }
.container { width: min(1180px, 92%); margin-inline: auto; }
.section { padding: 60px 0; }

/* UTILITIES */
.text-center { text-align: center; }
.relative-z { position: relative; z-index: 10; }
.mt-4 { margin-top: 2rem; }

/* =========================================
   2. TYPOGRAPHY & COMMON ELEMENTS
   ========================================= */
h1, h2, h3, h4, h5, h6 { margin-top: 0; line-height: 1.2; color: var(--text); font-weight: 700; }

/* Section Title */
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary);
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}
.section-title::after {
    content: ''; position: absolute; bottom: -5px; left: 50%;
    transform: translateX(-50%); width: 60px; height: 4px;
    background: var(--accent); border-radius: 4px;
}
.section-title-container { text-align: center; margin-bottom: 20px; }

/* Styled Section Title (Left aligned) */
.section-title-styled {
    font-size: 1.8rem; color: var(--primary); margin: 0 0 30px 0;
    padding-bottom: 8px; border-bottom: 2px solid var(--accent);
    display: inline-flex; align-items: center; gap: 10px;
}
.section-title-styled i { color: var(--accent); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.5rem; border-radius: 12px;
    font-weight: 600; cursor: pointer; transition: 0.3s ease; gap: 0.5rem;
    border: 1px solid transparent; text-decoration: none; font-size: 0.95rem;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: var(--primary); color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary), transparent 60%);
}
.btn-primary:hover { background: var(--primary-600); color: white; }

.btn-secondary {
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-accent {
    background: var(--accent); color: var(--surface);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--accent), transparent 60%);
}
.btn-accent:hover { background: color-mix(in srgb, var(--accent), #000 10%); }

.btn-outline {
    background: transparent; border: 1px solid var(--muted); color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }


/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--surface);
    backdrop-filter: blur(10px);
}

/* ---- Top Bar ---- */
.header-top-bar {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
}
.header-top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---- Main Bar ---- */
.header-main-bar {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.header-main-bar .container {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 24px;
}
.dh-logo .custom-logo-link img,
.dh-logo .custom-logo { height: 58px; width: auto; }

.dh-cta { display: flex; align-items: center; }
.dh-cta .btn { padding: 0.6rem 1.1rem; font-size: 0.88rem; }

/* Legacy desktop-header hidden */
.desktop-header { display: none; }

/* Social Icons */
.socials { display: flex; gap: 8px; }
.social {
    display: grid; place-items: center; width: 32px; height: 32px;
    border: 1px solid var(--border); border-radius: 8px;
    color: var(--muted); transition: 0.2s;
}
.social:hover {
    background: var(--surface-2); color: var(--primary);
    border-color: var(--primary); transform: translateY(-2px);
}
.social svg { width: 16px; height: 16px; }

/* Search Form */
.search-form {
    display: flex; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px; padding: 0 10px;
    transition: 0.3s;
}
.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}
.search-field {
    border: none; background: transparent; padding: 6px 8px;
    color: var(--text); outline: none; width: 180px;
}
.search-submit { background: none; border: none; color: var(--muted); cursor: pointer; }
.search-submit:hover { color: var(--primary); }

/* Mobile Header */
.mobile-header { display: none; padding: 10px 0; align-items: center; justify-content: space-between; }
@media (max-width: 1100px) {
    .header-top-bar { display: none; }
    .header-main-bar { display: none; }
    .mobile-header { display: flex; }
}


/* =========================================
   4. MOROCCAN MODERN HERO (Creative & Light)
   ========================================= */
.hero-section-final.moroccan-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--surface-2) 0%, color-mix(in srgb, var(--primary), var(--bg) 85%) 50%, var(--bg) 100%);
    min-height: 600px; display: flex; align-items: center;
}
.moroccan-art-layer {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1; pointer-events: none;
}
.zellige-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.08;
    background-image:
        radial-gradient(circle at 50% 50%, var(--primary) 10%, transparent 12%),
        radial-gradient(circle at 0% 50%, var(--primary) 10%, transparent 12%),
        radial-gradient(circle at 100% 50%, var(--primary) 10%, transparent 12%),
        repeating-linear-gradient(45deg, var(--text) 0, var(--text) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(-45deg, var(--text) 0, var(--text) 1px, transparent 1px, transparent 30px);
    background-size: 60px 60px;
}
.moroccan-arch-outline {
    position: absolute; right: -5%; top: 50%; transform: translateY(-50%);
    width: 600px; height: 80%;
    border: 2px solid var(--accent); border-bottom: none;
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
    opacity: 0.35; box-shadow: 0 0 80px rgba(252, 163, 17, 0.15) inset;
}
.moroccan-arch-outline::after {
    content: ''; position: absolute; top: 20px; left: 20px; right: 20px; bottom: 0;
    border: 1px dashed var(--primary); border-bottom: none;
    border-radius: 50% 50% 0 0 / 40% 40% 0 0; opacity: 0.3;
}
.star-float {
    position: absolute; width: 100px; height: 100px;
    background-color: color-mix(in srgb, var(--primary), transparent 82%);
    transform: rotate(45deg); display: flex; align-items: center; justify-content: center;
    animation: float-star 8s ease-in-out infinite;
}
.star-float::before {
    content: ''; position: absolute; width: 100%; height: 100%;
    background-color: color-mix(in srgb, var(--primary), transparent 82%);
    transform: rotate(45deg);
}
.star-1 { top: 10%; right: 15%; width: 150px; height: 150px; animation-delay: 0s; }
.star-2 { bottom: 15%; left: 10%; width: 80px; height: 80px; background-color: color-mix(in srgb, var(--accent), transparent 82%); animation-delay: 4s; }
.star-2::before { background-color: color-mix(in srgb, var(--accent), transparent 82%); }
@keyframes float-star {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(50deg); }
}
.hero-main-title {
    font-size: clamp(2.5rem, 5vw, 3.8rem); font-weight: 800;
    line-height: 1.2; color: var(--text); margin-bottom: 5px;
}
.hero-text-col p { font-size: 1.2rem; max-width: 650px; margin-bottom: 1rem; color: var(--muted); }
.hero-content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-buttons-row { display: flex; flex-wrap: wrap; gap: 15px; }


/* =========================================
   5. LAYOUT & SIDEBAR
   ========================================= */
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.main-col-full { width: 100%; }
.sidebar-col { position: sticky; top: 100px; }
.sidebar-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li {
    padding: 8px 0; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.widget ul li i { color: var(--accent); }


/* =========================================
   6. CONTACT PAGE (MODERN UI)
   ========================================= */
.contact-page-wrapper { background-color: var(--bg); padding-bottom: 60px; }
.contact-header {
    padding: 60px 0 40px; background: linear-gradient(to bottom, var(--surface-2), var(--bg));
    margin-bottom: 20px;
}
.contact-header .entry-title { font-size: 3rem; font-weight: 800; color: var(--primary); }
.contact-subtitle { font-size: 1.25rem; color: var(--muted); }
.contact-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: flex-start; }

/* Contact Cards */
.contact-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 30px; margin-bottom: 25px; box-shadow: var(--shadow-sm); transition: 0.3s;
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* Icons */
.info-item { display: flex; gap: 20px; margin-bottom: 25px; }
.icon-box {
    width: 50px; height: 50px; flex-shrink: 0;
    background-color: color-mix(in srgb, var(--accent), transparent 85%);
    color: var(--accent); border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; transition: 0.3s;
}
.contact-card:hover .icon-box { background-color: var(--accent); color: #fff; transform: rotate(-5deg); }
.icon-box.small {
    width: 40px; height: 40px; font-size: 1.1rem; border-radius: 10px;
    background-color: color-mix(in srgb, var(--primary), transparent 90%); color: var(--primary);
}
.contact-card:hover .icon-box.small { background-color: var(--primary); color: #fff; }

/* Details */
.phone-link { font-size: 1.15rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.email-row, .hour-row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.separator-dots { flex-grow: 1; border-bottom: 1px dotted var(--border); margin: 0 10px; position: relative; top: -4px; }
.badge-closed { background: var(--surface-2); padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; }

/* Contact Form */
.contact-form-wrapper {
    background: var(--card); padding: 40px; border-radius: 20px;
    box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 30px;
}
.wpcf7-form-control-wrap input, .wpcf7-form-control-wrap textarea {
    background-color: var(--surface-2) !important; border: 1px solid transparent !important;
    padding: 15px !important; font-size: 1rem; border-radius: 12px; width: 100%;
}
.wpcf7-form-control-wrap input:focus, .wpcf7-form-control-wrap textarea:focus {
    background-color: var(--card) !important; border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--ring); outline: none;
}
.wpcf7-submit {
    width: 100%; padding: 15px !important; font-size: 1.1rem !important;
    margin-top: 10px; border-radius: 12px; background: var(--primary); color: white; border: none; cursor: pointer;
}
.google-map-container {
    border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
    border: 4px solid var(--card); height: 400px;
}
.google-map-container iframe { width: 100%; height: 100%; filter: grayscale(20%); transition: 0.5s; }
.google-map-container:hover iframe { filter: grayscale(0); }


/* =========================================
   7. COMMENTS AREA (MODERN UI)
   ========================================= */
.comments-area { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.comment-list { list-style: none; padding: 0; }
.comment-body {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 25px; margin-bottom: 25px;
    position: relative; transition: 0.3s;
}
.comment-body:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.comment-meta { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed var(--border); }
.comment-author .avatar { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--surface-2); }
.fn { font-weight: 700; font-size: 1.05rem; }
.comment-reply-link {
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 16px;
    background: var(--surface-2); border-radius: 20px; font-size: 0.85rem; font-weight: 600;
}
.comment-reply-link:hover { background: var(--primary); color: white; }
.children { list-style: none; padding-left: 0; margin-left: 30px; border-left: 2px solid var(--border); }
.children .comment-body { margin-left: 20px; background: var(--surface); }

/* Comment Form */
.comment-respond {
    background: var(--card); padding: 40px; border-radius: var(--radius);
    border: 1px solid var(--border); margin-top: 50px; box-shadow: var(--shadow-sm);
}
.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.comment-form-comment, .comment-form-cookies-consent, .comment-form-submit { grid-column: 1 / -1; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
    width: 100%; padding: 14px 18px; background: var(--surface-2); border: 1px solid transparent;
    border-radius: 12px; color: var(--text); transition: 0.3s;
}
.comment-form input:focus, .comment-form textarea:focus {
    background: var(--card); border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); outline: none;
}
.form-submit .submit {
    padding: 12px 30px; border-radius: 12px; font-weight: 700;
    background: var(--primary); color: white; border: none; cursor: pointer;
}


/* =========================================
   8. CPT: UNIVERSITIES & COUNTRIES (Common)
   ========================================= */
.uni-hero {
    min-height: 400px; position: relative; display: flex; align-items: flex-end;
    background-size: cover; background-position: center; color: white; padding-bottom: 40px;
}
.uni-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 19, 26, 0.95), rgba(11, 19, 26, 0.2)); }
.uni-hero-content { position: relative; z-index: 2; display: flex; gap: 30px; align-items: flex-end; }
.uni-hero-logo {
    width: 140px; height: 140px; background: white; padding: 10px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.uni-hero-title { font-size: 3rem; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* V2 Layout */
.uni-creative-layout-v2, .country-3col-grid { display: grid; gap: 40px; margin-top: 40px; }
.uni-creative-layout-v2 { grid-template-columns: 1fr 1.8fr; }
.country-3col-grid { grid-template-columns: 2fr 3fr 2fr; }

.info-col-sticky, .sidebar-col { position: sticky; top: 100px; align-self: start; }

.uni-content-box, .info-box {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow-sm);
}
.uni-info-box-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.info-box-item { display: flex; gap: 15px; border-bottom: 1px dashed var(--border); padding-bottom: 15px; }
.info-box-item:last-child { border: none; }
.info-box-item .label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; font-weight: 700; display: block; }
.info-box-item .value { font-weight: 600; }

/* Diplomas */
.diploma-card {
    display: flex; gap: 20px; background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 25px; margin-bottom: 20px; transition: 0.3s;
}
.diploma-card:hover { transform: translateY(-5px); border-left: 4px solid var(--accent); }
.diploma-card-icon {
    width: 50px; height: 50px; background: var(--primary); color: white;
    border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
}
.tag-item-small {
    display: inline-block; background: var(--surface); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 6px; font-size: 0.85rem; color: var(--muted); margin: 3px;
}

/* University Archive List Item V2 */
.uni-list-card-v2 {
    display: flex; gap: 20px; background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; margin-bottom: 15px; transition: 0.3s;
}
.uni-list-card-v2:hover { border-color: var(--accent); transform: translateY(-3px); }
.uni-list-logo-v2 { width: 80px; height: 80px; background: white; padding: 5px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); }
.uni-list-name-v2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }

/* Archive Filters */
.university-filters-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
    background: var(--surface); padding: 25px; border-radius: var(--radius); margin-bottom: 40px; border: 1px solid var(--border);
}
.filter-item select { width: 100%; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: var(--text); }


/* =========================================
   9. FOOTER STYLES (Cleaned & Fixed)
   ========================================= */
.site-footer-reloaded {
    background-color: #0b131a;
    padding: 60px 0;
    color: #8d99ae;
    font-size: 0.95rem;
    margin-top: 60px;
    border-top: 4px solid var(--primary);
}

.footer-grid-layout {
    display: grid;
    /* العمود الأول (العلامة التجارية) أوسع */
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    text-align: left;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* --- Brand Column (Logo + Text) --- */
.footer-about-wrapper {
    margin-bottom: 30px;
    display: block;
}

.footer-logo-link, 
.footer-logo-img, 
.footer-col .custom-logo {
    float: left;
    margin-right: 20px;
    margin-bottom: 5px;
    max-width: 100px;
    height: auto;
    display: inline-block;
}

.footer-text-content {
    line-height: 1.6;
    color: #aeb4b9;
}

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

/* --- Details Box (Contact) --- */
.footer-details-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.footer-detail-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.footer-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.footer-detail-row i {
    color: var(--accent);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}
.footer-detail-row span {
    color: #edf2f4;
    font-weight: 500;
}

.footer-copyright-row {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: var(--muted);
    text-align: left;
}

/* --- Footer Menus (Fixed Colors) --- */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    margin-top: 10px;
}

.footer-menu li {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.footer-menu li:last-child {
    border-bottom: none;
}

.footer-menu a {
    color: #ffffff !important; /* فرض اللون الأبيض */
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    opacity: 1; /* إزالة الشفافية ليكون ناصعاً */
}

.footer-menu a:hover {
    color: var(--accent) !important; /* اللون الذهبي عند التمرير */
    transform: translateX(5px);
    padding-left: 5px;
}

/* Responsive Footer */
@media (max-width: 900px) {
    .footer-grid-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-menu {
        margin-top: 0;
    }
}
/* =========================================
   10. DESKTOP NAVIGATION
   ========================================= */

/* Main Container */
.main-nav .menu {
    list-style: none; display: flex; gap: 8px; margin: 0; padding: 0;
    align-items: center; justify-content: center;
}

/* Top Level Links */
.menu-item > a {
    position: relative; padding: 0.5rem 0.7rem; border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; gap: 4px;
    font-size: 0.88rem; font-weight: 600; color: var(--text); text-decoration: none;
    white-space: nowrap;
}

/* Hover Effects */
.menu-item > a:hover, .menu-item:hover > a, .menu-item.current-menu-item > a {
    background: color-mix(in oklab, var(--primary), transparent 92%);
    color: var(--primary);
}

/* Dropdown Styling */
.sub-menu {
    position: absolute; background: var(--surface);
    border: 1px solid color-mix(in oklab, var(--text), transparent 90%);
    border-radius: 12px; min-width: 240px; padding: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); z-index: 100;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.2s ease-in-out; pointer-events: none;
}

/* Positioning Level 1 */
.main-nav .menu > .menu-item-has-children { position: relative; }
.main-nav .menu > .menu-item-has-children > .sub-menu { top: 100%; left: 0; margin-top: 15px; }
.main-nav .menu > .menu-item-has-children > .sub-menu::before {
    content: ''; position: absolute; top: -20px; left: 0;
    width: 100%; height: 20px; display: block; background: transparent;
}

/* Positioning Level 2+ */
.sub-menu .menu-item-has-children { position: relative; }
.sub-menu .menu-item-has-children > .sub-menu {
    top: 0; left: 100%; margin-top: -5px; margin-left: 10px;
}
.sub-menu .menu-item-has-children > .sub-menu::before {
    content: ''; position: absolute; top: 0; left: -15px;
    width: 15px; height: 100%; background: transparent;
}

/* Show Logic */
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}

/* Dropdown Items */
.sub-menu li { display: block; margin: 2px 0; }
.sub-menu a {
    display: flex; justify-content: space-between; padding: 0.6rem 1rem;
    border-radius: 8px; color: var(--text); font-size: 0.95rem; font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.sub-menu a:hover {
    background: color-mix(in oklab, var(--text), transparent 96%);
    color: var(--primary); transform: translateX(3px);
}

/* Arrows */
.main-nav .menu > .menu-item-has-children > a::after {
    content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); margin-bottom: 2px; opacity: 0.7;
}
.sub-menu .menu-item-has-children > a::after {
    content: ''; display: inline-block; width: 6px; height: 6px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

/* =========================================
   14. SINGLE ARTICLE — Modern Layout
   ========================================= */

.single-post { padding-bottom: 0; }

/* ── Hero Header Band ── */
.article-hero-band {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary) 100%);
    padding: 32px 0 36px;
    position: relative;
    overflow: hidden;
}
.article-hero-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Category badge inside hero */
.hero-cat-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 13px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s;
    position: relative;
}
.hero-cat-badge:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }

/* Hero title */
.hero-title {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin: 0 0 28px;
    max-width: 860px;
    color: #fff;
    position: relative;
}

/* Hero meta */
.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}
.hero-meta i { color: rgba(255, 255, 255, 0.6); margin-right: 3px; }
.hero-meta__dot { color: rgba(255, 255, 255, 0.35); font-weight: 700; }

/* Meta + Share row at the bottom of the hero band */
.hero-band-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

/* ── Sub-bar (kept for backwards compat but no longer used) ── */
.article-subbar { display: none; }
.article-subbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Breadcrumbs */
.single-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--muted);
}
.single-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.single-breadcrumbs a:hover { color: var(--primary); }
.sb-sep { opacity: 0.4; }
.sb-current {
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}

/* Share buttons */
.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.article-share__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 2px;
}
.article-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 7px;
    color: #fff;
    font-size: 0.8rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    transition: background 0.2s, transform 0.2s;
}
.article-share__btn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.32); color: #fff; }
.article-share__btn--tw { }
.article-share__btn--fb { }
.article-share__btn--li { }
.article-share__btn--wa { }

/* ── Content column ── */
.single-article-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 44px 20px 70px;
    box-sizing: border-box;
}

/* ── Featured image — small, inside content column ── */
.article-thumb { margin-bottom: 36px; }
.article-thumb__img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ── Content Typography ── */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
}
.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.02em;
    color: var(--primary);
    border-left: 4px solid var(--accent);
    padding-left: 14px;
}
.entry-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--primary);
}
.entry-content p { margin: 0 0 1.5rem; text-align: justify; }
.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.entry-content a:hover { color: var(--accent); }
.entry-content img { border-radius: var(--radius); margin: 30px 0; width: 100%; height: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote {
    margin: 2.5rem 0;
    padding: 22px 28px;
    border-left: 4px solid var(--primary);
    background: var(--surface-2);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1.08rem;
    font-style: italic;
    color: var(--muted);
    line-height: 1.75;
}
.entry-content blockquote p { margin: 0; }
.entry-content figcaption { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 8px; font-style: italic; }
.entry-content code { font-family: 'Courier New', monospace; font-size: 0.88em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; color: var(--accent); }
.entry-content pre { background: var(--surface-2); padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); }
.entry-content pre code { background: none; padding: 0; color: var(--text); }

/* ── Tags ── */
.entry-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--muted);
}
.tag-chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.tag-chip:hover { border-color: var(--primary); color: var(--primary); }

/* ── Post Navigation (prev / next) ── */
.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.post-nav-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.post-nav-link--prev { align-items: flex-start; }
.post-nav-link--next { align-items: flex-end; text-align: right; }
.post-nav-link__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.post-nav-link__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}
@media (max-width: 580px) {
    .single-post-nav { grid-template-columns: 1fr; }
    .post-nav-link--next { align-items: flex-start; text-align: left; }
}

/* ── Related Articles ── */
.single-related {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    padding: 60px 0;
}
.single-related__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 32px;
}
.single-related__title i { color: var(--accent); }
.single-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.rel-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.rel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--primary), transparent 70%); color: inherit; }
.rel-card__thumb { position: relative; padding-top: 58%; overflow: hidden; background: var(--surface-2); }
.rel-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.rel-card:hover .rel-card__img { transform: scale(1.06); }
.rel-card__img-placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, var(--surface-2), var(--card)); }
.rel-card__cat { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); padding: 14px 16px 4px; }
.rel-card__title { font-size: 0.97rem; font-weight: 700; line-height: 1.4; margin: 0; padding: 0 16px 10px; color: var(--text); transition: color 0.2s; }
.rel-card:hover .rel-card__title { color: var(--primary); }
.rel-card__date { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--muted); padding: 0 16px 16px; margin-top: auto; }
.rel-card__date i { color: var(--accent); }

/* ── Comments ── */
.single-comments { padding: 60px 0; border-top: 1px solid var(--border); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .single-related__grid { grid-template-columns: repeat(2, 1fr); }
    .article-subbar .container { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 600px) {
    .article-hero-band { padding: 36px 0 40px; }
    .hero-title { font-size: 1.8rem; }
    .single-article-wrap { padding: 28px 16px 50px; }
    .single-related__grid { grid-template-columns: 1fr; }
}

/* =========================================
   14b. SINGLE VIDEO PAGE
   ========================================= */

.single-video-post { padding-bottom: 0; }

/* Prominent player — wider than the text column */
.video-single-player {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 20px 0;
    box-sizing: border-box;
}

/* 16:9 aspect-ratio wrapper */
.video-player-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.video-player-embed iframe,
.video-player-embed embed,
.video-player-embed object {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.video-single-fallback-img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* Narrower description column below the player */
.video-desc-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 36px 20px 60px;
    box-sizing: border-box;
}

/* Play icon overlay on related video cards */
.rel-card__thumb--play { position: relative; }
.rel-card__play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    border: 2px solid rgba(255,255,255,0.75);
    transition: background 0.25s, transform 0.25s;
}
.rel-card:hover .rel-card__play-icon {
    background: var(--accent);
    border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 700px) {
    .video-single-player { padding-top: 24px; }
    .video-desc-wrap { padding: 24px 16px 44px; }
}


/* =========================================
   VIDEO ARCHIVE STYLES
   ========================================= */

.video-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.video-card-archive {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.video-card-archive:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.video-thumbnail-wrapper {
    position: relative;
    display: block;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.video-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.video-card-archive:hover .video-thumb { transform: scale(1.05); }

.video-thumb-placeholder {
    position: absolute;
    inset: 0;
    background: var(--surface-2);
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}
.video-card-archive:hover .play-overlay {
    background: var(--accent);
    border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.1);
    color: var(--surface);
}

.video-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.video-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 5px;
}
.video-title { font-size: 1.1rem; font-weight: 700; margin: 0; line-height: 1.4; }
.video-title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.video-card-archive:hover .video-title a { color: var(--primary); }

/* =========================================
   15. HOMEPAGE VIDEO CARDS (Modern Design Fix)
   ========================================= */

.latest-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.video-card-modern {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.video-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #000;
}

.video-card-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.9;
}

.video-card-modern:hover .video-card-img {
    transform: scale(1.1);
    opacity: 0.6;
}

.video-card-placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.video-play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    z-index: 2;
}

.video-card-modern:hover .video-play-overlay {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--surface);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card-body {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-date-small {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.video-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--text);
    transition: color 0.2s;
}

.video-card-modern:hover .video-card-title {
    color: var(--primary);
}

/* =========================================
   17. FINAL ARCHIVE PRO & BOXED CARDS
   (Combined Final Version)
   ========================================= */

/* --- 1. Archive Page Layout & Typography --- */
.archive-page-wrapper {
    padding-top: 12px;
    padding-bottom: 60px;
    background-color: var(--bg);
}

/* Breadcrumbs */
.pro-breadcrumbs ol {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; align-items: center; gap: 8px;
}
.pro-breadcrumbs li {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    color: var(--muted);
}
.pro-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.pro-breadcrumbs a:hover { color: var(--primary); }
.pro-breadcrumbs .sep { color: var(--border); }
.pro-breadcrumbs .current { color: var(--primary); }

/* Archive header — full-width, no sidebar */
.archive-pro-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

/* Fade-up animation for the title block */
@keyframes archiveReveal {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-reveal {
    animation: archiveReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pro-title-wrapper {
    margin-top: 20px;
}

.pro-archive-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 12px;
    line-height: 1.15;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 14px;
}
.pro-archive-title::before { display: none; }

/* Accent underline bar */
.pro-archive-title::after {
    content: none;
}
.pro-title-wrapper::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin-top: 14px;
}

/* Description line below title */
.pro-archive-desc {
    font-size: 0.97rem;
    color: var(--muted);
    margin: 10px 0 0;
    max-width: 640px;
    line-height: 1.6;
}

/* Grid System */
.content-grid-pro {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}
.posts-grid-pro {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px 30px;
}

/* Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.grid-item-animate {
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sidebar Sticky */
.sidebar-col-pro { position: relative; }
.sidebar-inner-sticky { position: sticky; top: 100px; }
.sidebar-col-pro .widget {
    background: transparent; border: none; padding: 0;
    margin-bottom: 40px; box-shadow: none;
}
.sidebar-col-pro .widget h4 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 20px;
    padding-bottom: 10px; border-bottom: 2px solid var(--border);
    letter-spacing: 0.5px;
}

/* Pagination */
.pagination-pro {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}
.pagination-pro .nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination-pro .page-numbers {
    min-width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s ease;
}
.pagination-pro .page-numbers:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination-pro .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}
.pagination-pro .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
    pointer-events: none;
}
.pagination-pro .prev,
.pagination-pro .next {
    padding: 0 18px;
    gap: 6px;
    font-size: 0.85rem;
    background: var(--card);
    border-color: var(--border);
}
.pagination-pro .prev:hover,
.pagination-pro .next:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Utility */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid-pro { grid-template-columns: 1fr; gap: 40px; }
    .sidebar-col-pro { order: 2; }
}


/* --- 2. Pro Card Design (Boxed UI) --- */

.post-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: color-mix(in srgb, var(--primary), transparent 80%);
}

/* Thumbnail Area */
.post-thumbnail-link {
    display: block;
    position: relative;
    padding-top: 60%; /* 16:10 Ratio */
    overflow: hidden;
    background-color: var(--surface-2);
}

.post-thumbnail {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.6s ease;
}

.post-card:hover .post-thumbnail {
    transform: scale(1.08);
}

/* Content Area */
.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex; flex-direction: column; justify-content: flex-start;
}

.post-meta {
    font-size: 0.8rem; color: var(--accent);
    text-transform: uppercase; font-weight: 700;
    letter-spacing: 0.5px; margin-bottom: 12px;
    display: inline-block;
}

.post-title {
    font-size: 1.25rem; font-weight: 700;
    line-height: 1.4; margin: 0 0 15px 0;
    color: var(--text); transition: color 0.2s ease;
}

.post-title a {
    text-decoration: none; color: inherit;
}
.post-title a::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
}

.post-card:hover .post-title {
    color: var(--primary);
}

.post-excerpt {
    font-size: 0.95rem; color: var(--muted);
    line-height: 1.6; margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* Post Card — Category Badge (overlaid on thumbnail) */
.post-cat-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
}

/* Post Card — Placeholder when no featured image */
.post-thumbnail-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--surface-2), var(--card));
}

/* Post Card — Read More link */
.post-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}
.post-read-more:hover {
    gap: 10px;
    color: var(--accent);
}

/* Single Article — Category badge above title */
.entry-cat-badge {
    display: inline-block;
    background: color-mix(in srgb, var(--primary), transparent 85%);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
    text-decoration: none;
    transition: background 0.2s;
}
.entry-cat-badge:hover {
    background: color-mix(in srgb, var(--primary), transparent 70%);
}

/* Single Article — Title */
.entry-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

/* Single Article — Tags */
.entry-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--muted);
}
.tag-chip {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}
.tag-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Related posts — placeholder & title */
.related-post-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--surface-2), var(--card));
}
.related-posts-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
}
.related-posts-title i { color: var(--accent); }

/* =========================================
   19. SINGLE COUNTRY PAGE DESIGN
   ========================================= */

/* --- Hero Section --- */
.country-hero {
    position: relative;
    height: 400px; /* ارتفاع مناسب للهيرو */
    display: flex;
    align-items: center;
    color: #fff;
    margin-bottom: 40px;
    background-color: var(--surface-2);
}

.country-hero .hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    z-index: 0;
}

.country-hero .hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.country-header-content {
    position: relative; z-index: 2;
    max-width: 800px;
}

.country-title-row {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 30px;
}

.hero-flag {
    width: 60px; height: auto;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    border: 2px solid #fff;
}

.country-hero .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800; color: #fff; margin: 0;
    line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* --- Stats Bar (Glassmorphism) --- */
.country-stats-bar {
    display: inline-flex; flex-wrap: wrap; gap: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.95rem;
}

.stat-item .dashicons { font-size: 20px; color: var(--accent); }
.stat-item .label { opacity: 0.8; margin-right: 5px; }
.stat-item .value { font-weight: 700; color: #fff; }

/* --- Section Headings --- */
.section-heading {
    font-size: 1.8rem; font-weight: 700;
    margin-bottom: 25px; color: var(--text);
    position: relative; padding-left: 15px;
}
.section-heading::before {
    content: ''; position: absolute; left: 0; top: 5px; bottom: 5px;
    width: 4px; background: var(--primary); border-radius: 2px;
}

/* --- Cities Grid (Visual Cards) --- */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.city-card {
    position: relative; border-radius: 12px; overflow: hidden;
    height: 180px; display: block; text-decoration: none;
    background: var(--surface-2);
}

.city-card .city-img, .city-card .city-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.city-card:hover .city-img img { transform: scale(1.1); }

.city-card .city-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}

.city-card h3 {
    margin: 0; font-size: 1.2rem; font-weight: 700; color: #fff;
}
.city-card .btn-text {
    font-size: 0.8rem; opacity: 0.8; margin-top: 5px; display: block;
}

/* --- Universities List Grid --- */
.unis-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.uni-mini-card {
    display: flex; align-items: center; gap: 15px;
    background: var(--card); border: 1px solid var(--border);
    padding: 15px; border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.uni-mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.uni-logo-wrapper img {
    width: 50px; height: 50px; object-fit: contain;
    border-radius: 50%; border: 1px solid #eee; padding: 2px;
}

.uni-details h4 {
    margin: 0 0 5px 0; font-size: 1rem; line-height: 1.3;
}
.uni-details h4 a { text-decoration: none; color: var(--text); }
.uni-location {
    font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 3px;
}

/* --- Resources Grid (Posts & Videos) --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--card); border: 1px solid var(--border);
    padding: 20px; border-radius: 10px;
    display: flex; flex-direction: column;
    transition: border-color 0.3s ease;
}
.resource-card:hover { border-color: var(--accent); }

.res-tag {
    font-size: 0.75rem; text-transform: uppercase; font-weight: 700;
    color: var(--muted); margin-bottom: 10px; letter-spacing: 0.5px;
}
.resource-card.video-type .res-tag { color: #ff0000; } /* Red for video */

.resource-card h5 {
    margin: 0 0 15px 0; font-size: 1.1rem; line-height: 1.4; flex-grow: 1;
}
.resource-card h5 a { text-decoration: none; color: var(--text); }
.resource-card .read-more {
    font-size: 0.9rem; font-weight: 600; color: var(--primary);
    text-decoration: none; margin-top: auto;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .country-hero { height: auto; padding: 60px 0; }
    .country-header-content { text-align: center; }
    .country-title-row { justify-content: center; flex-direction: column; gap: 10px; }
    .country-stats-bar { justify-content: center; width: 100%; }
    .content-grid-pro { grid-template-columns: 1fr; } /* Stack sidebar on mobile */
    .unis-list-grid { grid-template-columns: 1fr; }
}

/* --- Advantages Section (المميزات) --- */
.section-heading-sm {
    font-size: 1.4rem; font-weight: 700; margin-bottom: 20px;
    color: var(--text);
}

.advantages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.advantage-item {
    display: flex; align-items: center; gap: 12px;
    background: #fff; padding: 12px 15px;
    border-radius: 8px; border: 1px solid var(--border);
    transition: transform 0.2s;
}

.advantage-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.adv-icon {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: rgba(var(--primary-rgb), 0.1); /* لون خفيف */
    color: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.adv-text {
    font-weight: 600; font-size: 0.95rem; color: var(--text);
}


/* =========================================
   MOBILE MENU
   ========================================= */

/* Logo size constraint on mobile */
.mobile-header .custom-logo-link img,
.mobile-header .custom-logo {
    max-height: 45px;
    width: auto;
}

/* Burger button with rounded background */
.mobile-menu-toggle {
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.mobile-menu-toggle:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

/* Smooth max-height animation */
.mobile-nav-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--surface);
    border-top: 1px solid var(--border);
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0;
}
.mobile-nav-panel.is-active {
    max-height: 600px;
    padding: 15px 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: min(1180px, 92%);
    margin-inline: auto;
}
.mobile-menu-list li { border-bottom: 1px solid var(--border); }
.mobile-menu-list a {
    display: block;
    padding: 13px 0;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
}
.mobile-menu-list a:hover { color: var(--primary); }

/* Mobile sub-menu: accordion style (overrides desktop absolute dropdown) */
.mobile-menu-list .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-menu-list .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.mobile-menu-list .menu-item-has-children.is-open > a::after {
    transform: rotate(-135deg);
}

.mobile-menu-list .sub-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: 0;
    background: transparent;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-menu-list .menu-item-has-children.is-open > .sub-menu {
    max-height: 500px;
}
.mobile-menu-list .sub-menu li {
    border-bottom: none;
    border-top: 1px solid var(--border);
}
.mobile-menu-list .sub-menu a {
    padding: 10px 0 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted, var(--text));
}


/* =========================================
   MOBILE RESPONSIVE FIXES
   ========================================= */

@media (max-width: 768px) {

    .hero-section-final.moroccan-hero { min-height: auto; padding: 50px 0; }
    .hero-content-grid { grid-template-columns: 1fr; gap: 25px; }
    .hero-text-col { text-align: center; }
    .hero-buttons-row { justify-content: center; }
    .moroccan-arch-outline { display: none; }
    .star-float { display: none; }

    .content-grid { grid-template-columns: 1fr; }
    .sidebar-col { position: relative; top: auto; }

    .contact-header { padding: 35px 0 20px; }
    .contact-header .entry-title { font-size: 2rem; }
    .contact-subtitle { font-size: 1rem; }
    .contact-layout { grid-template-columns: 1fr; gap: 25px; }
    .contact-form-wrapper { padding: 25px; }
    .google-map-container { height: 220px; }

    .comment-form { grid-template-columns: 1fr; }
    .comment-respond { padding: 25px; }
    .children { margin-left: 12px; }

    .uni-creative-layout-v2 { grid-template-columns: 1fr; gap: 25px; }
    .country-3col-grid { grid-template-columns: 1fr; gap: 25px; }
    .info-col-sticky { position: relative; top: auto; }
    .uni-hero { min-height: 260px; }
    .uni-hero-title { font-size: 1.8rem; }
    .uni-hero-content { flex-direction: column; align-items: flex-start; gap: 15px; }
    .uni-hero-logo { width: 80px; height: 80px; }

    .university-filters-container { grid-template-columns: 1fr; padding: 15px; gap: 12px; margin-bottom: 25px; }

    .site-footer-reloaded { padding: 35px 0; margin-top: 40px; }
    .footer-grid-layout { gap: 30px; }

    .content-grid-pro { grid-template-columns: 1fr; gap: 30px; }
    .sidebar-inner-sticky { position: relative; top: auto; }
    .archive-page-wrapper { padding-top: 12px; padding-bottom: 50px; }
    .pro-title-wrapper { margin-bottom: 30px; }
    .posts-grid-pro { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

    .video-archive-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }

    .cities-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .unis-list-grid { grid-template-columns: 1fr; }

    .resources-grid { grid-template-columns: 1fr; }
    .advantages-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }

    .country-stats-bar { gap: 15px; padding: 12px 18px; }
    .section-heading { font-size: 1.4rem; }
    .section-title-styled { font-size: 1.4rem; }
}

@media (max-width: 480px) {

    .hero-section-final.moroccan-hero { padding: 40px 0; }
    .hero-main-title { font-size: 2rem; }
    .breadcrumbs .current { max-width: 100px; }
    .video-archive-grid { grid-template-columns: 1fr; }
    .cities-grid { grid-template-columns: 1fr 1fr; }
    .advantages-list { grid-template-columns: 1fr; }
    .posts-grid-pro { grid-template-columns: 1fr; gap: 18px; }
    .country-stats-bar { flex-direction: column; gap: 10px; border-radius: 12px; }
    .pagination-pro .page-numbers { width: 38px; height: 38px; }
    .pagination-pro .next, .pagination-pro .prev { padding: 0 14px; }
    .contact-form-wrapper { padding: 18px; }
    .comment-respond { padding: 18px; }
    .site-footer-reloaded { padding: 30px 0; }
}

/* =========================================
   POSTS GRID & TEAM GRID (Search / Team page)
   ========================================= */
.posts-grid,
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}

@media (max-width: 900px) {
    .posts-grid,
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .posts-grid,
    .team-grid { grid-template-columns: 1fr; }
}


/* =========================================
   FORCE NO SIDEBAR — Articles & Videos
   ========================================= */
body.single-post aside,
body.single-post .sidebar-col,
body.single-post .sidebar-col-pro,
body.single-post .widget-area,
body.single-video aside,
body.single-video .sidebar-col,
body.single-video .sidebar-col-pro,
body.single-video .widget-area,
body.post-type-archive-video aside,
body.post-type-archive-video .sidebar-col,
body.post-type-archive-video .sidebar-col-pro,
body.post-type-archive-video .widget-area {
    display: none !important;
}
body.single-post .content-grid,
body.single-post .content-grid-pro,
body.single-video .content-grid,
body.single-video .content-grid-pro,
body.post-type-archive-video .content-grid,
body.post-type-archive-video .content-grid-pro {
    grid-template-columns: 1fr !important;
}