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

/* =========================================
   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;
}
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: 10px 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);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}
.desktop-header {
    display: grid; grid-template-columns: 220px 1fr;
    align-items: center; gap: 20px; padding: 10px 0;
}
.dh-left .custom-logo { height: 100px; width: auto; }
.dh-right { display: flex; flex-direction: column; gap: 10px; }

/* Top Bar Tools */
.dh-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* Social Icons */
.socials { display: flex; gap: 8px; }
.social {
    display: grid; place-items: center; width: 36px; height: 36px;
    border: 1px solid var(--border); border-radius: 10px;
    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: 18px; height: 18px; }

/* Search Form */
.search-form {
    display: flex; align-items: center;
    background: var(--surface-2);
    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: 8px;
    color: var(--text); outline: none; width: 100%;
}
.search-submit { background: none; border: none; color: var(--muted); cursor: pointer; }
.search-submit:hover { color: var(--primary); }

/* Theme Toggle */
.theme-toggle {
    display: grid; place-items: center; width: 38px; height: 38px;
    border-radius: 10px; border: 1px solid var(--border);
    background: transparent; color: var(--text); cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { width: 20px; height: 20px; display: none; }
:root[data-theme="light"] .icon-sun { display: block; }
:root:not([data-theme="light"]) .icon-moon { display: block; }

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


/* =========================================
   4. MOROCCAN MODERN HERO (Creative & Light)
   ========================================= */
.hero-section-final.moroccan-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--surface-2) 0%, 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.04;
    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.15; box-shadow: 0 0 50px rgba(252, 163, 17, 0.1) 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 95%);
    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 95%);
    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 95%); animation-delay: 4s; }
.star-2::before { background-color: color-mix(in srgb, var(--accent), transparent 95%); }
@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.1; 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: 15px; margin: 0; padding: 0;
    align-items: center; justify-content: center;
}

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

/* 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 VIDEO PAGE (ENHANCED STYLES)
   ========================================= */

/* --- Breadcrumbs --- */
.single-post-container .breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 20px;
    background: var(--surface-2);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.breadcrumbs a {
    color: var(--text);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s ease;
}
.breadcrumbs a:hover {
    color: var(--primary);
}
.breadcrumbs .separator {
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 0.6;
}
.breadcrumbs .current {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* --- Video Meta (Date & Author) --- */
.post-meta-single {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--muted);
}
.meta-item i {
    color: var(--accent);
    font-size: 1.1rem;
}
.meta-item strong {
    color: var(--text);
    font-weight: 600;
}
.meta-item a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}
.meta-item a:hover {
    color: var(--primary);
}

/* --- Video Player Wrapper --- */
.video-player-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Related Posts / Suggested Content --- */
.related-posts {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
/* Grid Layout */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

/* Related Card Styling */
.related-post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}
.related-post-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image */
.related-post-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

/* Title & Icon */
.related-post-title {
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    flex-grow: 1; /* Ensures equal height cards */
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text);
    transition: color 0.2s ease;
}
.related-post-card:hover .related-post-title {
    color: var(--primary);
}

/* Indicators Icons (Video vs Post) */
.video-icon-indicator {
    color: #e74c3c; /* Red for Video */
    margin-top: 3px;
    flex-shrink: 0;
}
.post-icon-indicator {
    color: var(--primary); /* Blue for Article */
    margin-top: 3px;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
        gap: 15px;
    }
    .post-meta-single {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .breadcrumbs .current {
        max-width: 150px; /* Smaller truncation on mobile */
    }
}

@media (max-width: 480px) {
    .related-posts-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}


/* =========================================
   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%; /* 16:9 Aspect Ratio */
    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);
}

/* أيقونة التشغيل */
.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: 60px;
    padding-bottom: 80px;
    background-color: var(--bg);
}

/* Breadcrumbs */
.pro-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pro-breadcrumbs li {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--muted);
}
.pro-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}
.pro-breadcrumbs a::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px;
    background: var(--primary); transition: width 0.3s ease;
}
.pro-breadcrumbs a:hover { color: var(--text); }
.pro-breadcrumbs a:hover::after { width: 100%; }
.pro-breadcrumbs .sep { font-size: 0.7rem; color: var(--border); }
.pro-breadcrumbs .current { color: var(--primary); }

/* Pro Title (Architectural Look) */
.pro-title-wrapper {
    position: relative;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.pro-archive-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
}
.pro-archive-title::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--accent);
    margin-right: 15px;
    border-radius: 2px;
    position: relative;
    top: -8px;
}

/* 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;
    border-top: 1px solid var(--border); padding-top: 40px;
}
.pagination-pro .nav-links { display: flex; gap: 10px; }
.pagination-pro .page-numbers {
    width: 45px; height: 45px; display: grid; place-items: center;
    border-radius: 50%; font-weight: 600; color: var(--text);
    background: var(--surface-2); transition: all 0.3s ease;
    text-decoration: none; border: 1px solid transparent;
}
.pagination-pro .page-numbers:hover {
    background: var(--card); border-color: var(--accent);
    color: var(--accent); transform: scale(1.1);
}
.pagination-pro .page-numbers.current {
    background: var(--primary); color: white;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary), transparent 60%);
}
.pagination-pro .next, .pagination-pro .prev {
    width: auto; padding: 0 20px; border-radius: 99px;
}

/* 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;
}

/* =========================================
   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);
}