/*
Theme Name: YPCB - RAMADHAN
Author: CRISCO
Description: Custom WordPress theme for Youth for Peace and Capacity Building. Fully bilingual ready, SEO optimized, with Projects and Team custom post types.
Version: 3.0.0
License: GPL v2 or later
Text Domain: ypcb
*/

/* ========== GLOBAL VARIABLES ========== */
:root {
    --ypcb-blue: #0077b5;
    --ypcb-dark: #222;
    --text-gray: #555;
    --white: #ffffff;
    --flat-light: #fafafa;
    --primary-color: #0077b5;
    --primary-dark: #026ba4;
    --border-color: #eee;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========== BASE STYLES ========== */
body {
    font-family: 'Poppins', 'Tajawal', sans-serif;
    color: var(--ypcb-dark);
    background-color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== RTL OVERRIDES ========== */
html[dir="rtl"] .navbar-nav { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .lang-donate-wrapper { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .text-box { left: auto; right: 0; }
html[dir="rtl"] .image-box { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .back-btn i { transform: rotate(180deg); margin-right: 0; margin-left: 8px; }
html[dir="rtl"] .sidebar { border-left: none; border-right: 4px solid var(--ypcb-blue); }
html[dir="rtl"] .footer-social-links a { margin-right: 0; margin-left: 10px; }
html[dir="rtl"] .footer-contact-list li i { margin-right: 0; margin-left: 8px; }

/* ========== CUSTOM NAVBAR (BILINGUAL, HOVER DROPDOWNS) ========== */
.navbar {
    backdrop-filter: blur(10px);
    padding: 12px 0;
    background-color: rgba(255,255,255,0.98) !important;
    box-shadow: var(--box-shadow);
}

.navbar-brand img {
    height: 70px;
    width: auto;
}

/* ----- Custom Hamburger (3 lines → X) - NO BORDER ----- */
.custom-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    padding: 0;
    display: none;
}

.custom-toggler:focus,
.custom-toggler:active,
.custom-toggler:hover {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.custom-toggler span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.custom-toggler span:nth-child(1) { top: 0px; }
.custom-toggler span:nth-child(2) { top: 10px; }
.custom-toggler span:nth-child(3) { top: 20px; }

.custom-toggler.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.custom-toggler.active span:nth-child(2) {
    opacity: 0;
    left: -30px;
}

.custom-toggler.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

.navbar-toggler-icon {
    display: none;
}

/* ----- Desktop Navigation (Hover Dropdowns) ----- */
.navbar-nav {
    gap: 10px;
}

.nav-link {
    color: #333 !important;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 16px !important;
    border-radius: 4px;
    transition: 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--ypcb-blue) !important;
}

/* Custom dropdown caret (no Bootstrap toggle) */
.nav-link.dropdown-caret {
    display: inline-flex;
    align-items: center;
}
.nav-link.dropdown-caret::after {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
    content: "▾";
    font-size: 1.2rem;
    line-height: 1;
    border: none;
}
html[dir="rtl"] .nav-link.dropdown-caret::after {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Dropdown menu - hover on desktop */
.nav-item.dropdown-hover {
    position: relative;
}
.nav-item.dropdown-hover .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: #f8f9fa;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 8px;
    border-radius: 8px;
    min-width: 200px;
    z-index: 1000;
}
html[dir="rtl"] .nav-item.dropdown-hover .dropdown-menu {
    left: auto;
    right: 0;
}
.nav-item.dropdown-hover:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 8px 16px;
    border-radius: 4px;
    transition: 0.2s;
}
.dropdown-item:hover {
    color: var(--primary-color) !important;
}

/* ----- Language Switcher & Donate ----- */
.lang-switcher {
    display: flex;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
}

.lang-link {
    text-decoration: none;
    color: #666;
    padding: 4px 10px;
    border-radius: 0px;
    transition: 0.2s;
    text-transform: uppercase;
    border: 1px solid #ddd;
    cursor: pointer;
    background: white;
    line-height: 1.2;
}

.lang-link.active {
    background-color: var(--ypcb-blue);
    color: white !important;
    border-color: var(--ypcb-blue);
}

.lang-link:hover {
    background-color: #e9ecef;
    color: #333;
}

.lang-link.active:hover {
    background-color: var(--primary-dark);
}

.donate-btn {
    background-color: var(--ypcb-blue);
    color: white !important;
    border: none;
    padding: 8px 24px !important;
    font-weight: 600;
    border-radius: 0px;
    transition: 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.donate-btn:hover {
    background-color: var(--primary-dark);
}

.lang-donate-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* ----- Mobile Styles (≤991px) ----- */
@media (max-width: 991.98px) {
    .custom-toggler {
        display: block;
    }

    .navbar .container {
        display: flex;
        flex-wrap: inherit;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .navbar-brand {
        margin-right: 0;
        flex-shrink: 0;
        max-width: 70%;
    }

    .navbar-brand img {
        height: 50px;
        width: auto;
        object-fit: contain;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: white;
        padding: 20px;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    html[dir="rtl"] .navbar-collapse {
        left: auto;
        right: 0;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
        margin: 0 !important;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link {
        padding: 14px 0 !important;
        font-size: 16px;
        white-space: normal;
    }

    .nav-item.dropdown-hover .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #f9f9f9;
        padding: 10px 0 10px 20px;
        margin-top: 0;
        border-radius: 8px;
        display: none;
    }
    .nav-item.dropdown-hover .dropdown-menu.show {
        display: block;
    }
    html[dir="rtl"] .nav-item.dropdown-hover .dropdown-menu {
        padding-left: 0;
        padding-right: 20px;
    }

    .lang-donate-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-left: 0;
        margin-top: 25px;
        width: 100%;
    }

    .lang-switcher {
        justify-content: flex-end;
        width: 100%;
    }

    .donate-wrapper {
        width: 100%;
    }

    .donate-btn {
        width: 100%;
        padding: 12px !important;
        font-size: 1rem;
    }
}

/* ========== WHO WE ARE SECTION ========== */
.who-we-are-section { padding: 100px 0; background-color: var(--white); }
.custom-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}
.text-box {
    background-color: white;
    padding: 60px;
    width: 60%;
    position: absolute;
    left: 0;
    z-index: 2;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.text-box .title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 30px;
    text-transform: uppercase;
    color: var(--ypcb-blue);
}
.text-box .description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 30px;
    max-width: 85%;
}
.text-box .learn-more {
    font-size: 1rem;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.text-box .learn-more:hover { color: var(--ypcb-blue); }
.image-box {
    width: 50%;
    position: relative;
    margin-left: auto;
    z-index: 1;
}
.image-box img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 15px 15px 50px rgba(0,0,0,0.1);
}

/* ========== PROJECT CARDS ========== */
.project-card {
    background: #fff;
    overflow: hidden;
    border: none;
    transition: 0.4s;
    height: 100%;
    text-decoration: none !important;
    display: block;
    border-radius: 0;
}
.img-wrapper {
    overflow: hidden;
    height: 230px;
    background-color: #f8f8f8;
}
.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.project-info { padding: 20px; }
.project-name {
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    transition: 0.3s;
    font-size: 1.2rem;
}
.read-more-btn {
    text-decoration: none;
    font-weight: 700;
    color: var(--ypcb-blue);
    display: inline-block;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}
.project-card:hover .img-wrapper img { transform: scale(1.1); }
.project-card:hover .project-name { color: var(--ypcb-blue); }
.project-card:hover .read-more-btn {
    color: var(--ypcb-blue);
    border-bottom-color: var(--ypcb-blue);
}

/* ========== FEATURED PROJECTS SECTION ========== */
.btn-see-all {
    display: inline-block;
    padding: 12px 35px;
    background-color: transparent;
    color: var(--ypcb-blue);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: 0.3s;
    border: 1px solid var(--ypcb-blue);
}
.btn-see-all:hover {
    background-color: var(--ypcb-blue);
    color: #fff;
    transform: translateY(-3px);
}

/* ========== PARTNERS SLIDER ========== */
.partners-wrapper { background: #ffffff; overflow: hidden; padding: 60px 0; }
.partners-title-center {
    text-align: center;
    font-weight: 700;
    font-size: 1.6rem;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.logo-slider-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}
.logo-track {
    display: flex;
    width: max-content;
    gap: 80px;
}
.slide-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-item img {
    height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.4s ease;
}
.slide-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}
@keyframes scrollRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.logo-track-animate { animation: scrollRTL 30s linear infinite; }
.logo-track-animate:hover { animation-play-state: paused; }

/* ========== CAMPAIGN CARD ========== */
.campaign-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}
.campaign-card {
    transition: 0.3s;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.campaign-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,119,181,0.1);
}
.progress-bar { background-color: var(--ypcb-blue); }

/* ========== BLOG / PROJECTS ARCHIVE HEADER ========== */
.blog-header {
    padding: 100px 0 50px;
    background-color: #fcfcfc;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}
.blog-header h1 {
    color: var(--ypcb-blue);
    font-size: 2.5rem;
    font-weight: 700;
}
.blog-header p {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== PAGINATION ========== */
.pagination .page-link {
    border-radius: 0;
    color: var(--ypcb-blue);
    border: 1px solid #eee;
    padding: 10px 16px;
}
.pagination .page-item.active .page-link {
    background-color: var(--ypcb-blue);
    border-color: var(--ypcb-blue);
    color: var(--white);
}
.pagination .page-link i { font-size: 0.8rem; }

/* ========== TEAM PAGE ========== */
.main-header {
    background: linear-gradient(135deg, #0077b5 0%, #016ba4f4 100%);
    background-size: cover;
    background-position: center;
    padding: 140px 0 60px 0;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}
.header-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; }
.header-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.team-container { max-width: 1200px; margin: 0 auto; padding: 20px 20px 80px; }
.team-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #555;
}
.filter-btn:hover { background: #e0e0e0; }
.filter-btn.active { background: var(--ypcb-blue); color: white; }
.member-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border: 1px solid #f0f0f0;
}
.member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,119,181,0.1);
    border-color: var(--ypcb-blue);
}
.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.member-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ypcb-blue);
    margin-bottom: 5px;
}
.member-position {
    color: var(--text-gray);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.member-department {
    font-size: 0.8rem;
    color: var(--ypcb-blue);
    font-weight: 600;
    margin-bottom: 20px;
    padding: 5px 15px;
    background-color: rgba(0,119,181,0.08);
    border-radius: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #666;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 50%;
    transition: 0.2s;
    background: #f5f5f5;
}
.social-icon:hover { background: var(--ypcb-blue); color: white !important; }

/* Single member page */
.member-page { display: none; background-color: #fafaf8; min-height: 100vh; padding-top: 100px; }
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border-radius: 30px;
    text-decoration: none;
    color: var(--ypcb-blue);
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #eee;
}
.back-btn:hover {
    background: var(--ypcb-blue);
    color: white;
    transform: translateX(-5px);
    border-color: var(--ypcb-blue);
}
html[dir="rtl"] .back-btn:hover { transform: translateX(5px); }
.member-single-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
    padding: 50px;
    text-align: center;
}
.member-single-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid #f0f0f0;
    margin-bottom: 30px;
}
.member-single-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ypcb-blue);
    margin-bottom: 10px;
}
.member-single-position {
    font-size: 1.2rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 10px;
}
.member-single-department {
    font-size: 0.9rem;
    color: var(--ypcb-blue);
    font-weight: 600;
    margin-bottom: 30px;
    padding: 8px 20px;
    background-color: rgba(0,119,181,0.08);
    border-radius: 30px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.member-single-bio {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: left;
}
html[dir="rtl"] .member-single-bio { text-align: right; }
.member-single-contact {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
}
.contact-title {
    color: var(--ypcb-blue);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}
.social-icons-large {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.social-icon-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: #666;
    text-decoration: none;
    font-size: 1.4rem;
    border-radius: 50%;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: 0.2s;
}
.social-icon-large:hover { background: var(--ypcb-blue); color: white !important; }

/* ========== PROJECT DETAILS PAGE ========== */
.img-container {
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
#p-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.info-bar {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}
.social-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}
.social-share a {
    display: inline-block;
    color: #666;
    transition: 0.2s;
    font-size: 1.1rem;
}
.social-share a:hover { color: var(--ypcb-blue) !important; }
#copy-btn { position: relative; }
#copy-toast {
    display: none;
    position: absolute;
    background: #000;
    color: #fff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    margin-bottom: 5px;
}
.p-title-main {
    font-weight: 800;
    color: var(--ypcb-blue);
    margin-bottom: 25px;
    font-size: 1.8rem;
}
.sidebar {
    background: var(--white);
    padding: 30px;
    border-left: 4px solid var(--ypcb-blue);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-top: 15px;
    letter-spacing: 1px;
}
.value {
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 5px;
    color: #333;
}

/* ========== ABOUT PAGE ========== */
#aboutHero { height: 80vh; min-height: 450px; }
.carousel-item {
    height: 80vh;
    min-height: 450px;
    background-size: cover;
    background-position: center;
}
.carousel-overlay {
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.carousel-content {
    max-width: 700px;
    padding: 0 8%;
    color: white;
    text-align: left;
}
.carousel-content h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 15px; line-height: 1.1; }
.carousel-content p {
    font-size: 1.1rem;
    border-left: 4px solid var(--ypcb-blue);
    padding-left: 20px;
}
.carousel-indicators {
    justify-content: flex-start;
    margin-left: 8%;
    margin-bottom: 2rem;
}
.carousel-indicators [data-bs-target] {
    width: 30px;
    height: 4px;
    border-radius: 2px;
}
.flat-section { padding: 70px 0; background-color: var(--white); }
.section-content { max-width: 900px; margin: 0 auto; padding: 0 15px; }
.flat-badge {
    display: inline-block;
    padding: 5px 15px;
    background: #eef7ff;
    color: var(--ypcb-blue);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.flat-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}
.flat-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 60px;
    height: 3px;
    background: var(--ypcb-blue);
}
.flat-text { font-size: 1rem; color: var(--text-gray); margin-bottom: 20px; }

/* Tabs for sectors & cities */
.tabs-wrapper {
    position: relative;
    max-width: 1150px;
    margin: 0 auto 40px;
    border-bottom: 2px solid #f0f0f0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    padding-bottom: 2px;
}
.tabs-wrapper::-webkit-scrollbar { height: 4px; }
.tabs-wrapper::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.custom-tabs {
    display: flex;
    flex-wrap: nowrap;
    border: none;
    gap: 20px;
    padding: 0;
    margin: 0;
}
.custom-tabs .nav-link {
    background: transparent !important;
    color: #222;
    border: none;
    border-radius: 0;
    padding: 12px 0;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
    font-size: 0.9rem;
}
.custom-tabs .nav-link.active {
    color: var(--ypcb-blue) !important;
    border-bottom: 3px solid var(--ypcb-blue);
}

/* Partners on about page */
.partner-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    transition: all 0.3s;
    filter: grayscale(100%);
    opacity: 0.5;
}
.partner-link:hover .partner-card {
    filter: grayscale(0%);
    opacity: 1;
    border-color: var(--ypcb-blue);
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(37,99,235,0.15);
}
.partner-logo { max-height: 35px; width: auto; object-fit: contain; }

/* Leadership cards (about page) */
.member-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.member-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.btn-meet {
    transition: 0.3s;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-meet:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transition: ease-in-out 0.3s;
}

/* ========== FOOTER ========== */
.footer-section {
    background-color: #fff;
    padding: 80px 0 30px;
    border-top: 1px solid #f0f0f0;
    margin-top: 60px;
}
.f-logo-img { height: 80px; width: auto; object-fit: contain; }
.footer-bio {
    color: #94a3b8;
    line-height: 1.7;
    max-width: 450px;
    font-size: 0.95rem;
}
.footer-title {
    font-weight: 700;
    color: var(--ypcb-blue);
    margin-bottom: 25px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}
.footer-links a:hover { color: var(--ypcb-blue); }
.footer-contact-list {
    list-style: none;
    padding: 0;
    color: #94a3b8;
}
.footer-contact-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}
.footer-contact-list i {
    color: var(--ypcb-blue);
    font-size: 1rem;
    width: 22px;
}
.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(0,119,181,0.05);
    border-radius: 50%;
    color: #94a3b8;
    margin-right: 8px;
    transition: 0.3s;
}
.footer-social-links a:hover { background: var(--ypcb-blue); color: white; }
.footer-bottom { border-top: 1px solid rgba(0,119,181,0.2); }

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
    .custom-wrapper { flex-direction: column-reverse; display: block; }
    .text-box {
        position: static;
        width: 100%;
        padding: 40px 20px;
        box-shadow: none;
    }
    .text-box .description { max-width: 100%; }
    .image-box { width: 100%; margin-bottom: -30px; }
    .blog-header { padding: 80px 15px 40px; }
    .blog-header h1 { font-size: 2rem; }
}
@media (max-width: 768px) {
    .text-box .title { font-size: 1.6rem; }
    .partners-title-center { font-size: 1.3rem; }
    .header-title { font-size: 2rem; }
    .header-subtitle { font-size: 1rem; }
    .member-single-card { padding: 30px 20px; }
    .member-single-photo { width: 150px; height: 150px; }
    .member-single-name { font-size: 1.6rem; }
    .member-single-position { font-size: 1rem; }
    .member-single-bio { font-size: 1rem; text-align: center; }
    html[dir="rtl"] .member-single-bio { text-align: center; }
    .img-container { height: 300px; }
    .p-title-main { font-size: 1.5rem; }
    .sidebar { padding: 20px; }
}
@media (max-width: 576px) {
    .navbar-brand img { height: 45px; }
    .campaign-img { height: 180px; }
    .team-filter { gap: 8px; }
    .filter-btn { padding: 8px 16px; font-size: 0.85rem; }
    .blog-header h1 { font-size: 1.5rem; }
    .pagination .page-link { padding: 8px 12px; font-size: 0.9rem; }
    .img-container { height: 220px; }
    .info-bar { flex-direction: column; align-items: flex-start; }
    .social-share { width: 100%; justify-content: flex-start; }
}

/* ========== ULTIMATE DROPDOWN FIX ========== */
.nav-item.dropdown-hover {
    position: relative !important;
}
.nav-item.dropdown-hover .dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #f8f9fa !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    padding: 8px !important;
    border-radius: 8px !important;
    min-width: 200px !important;
    z-index: 1000 !important;
    list-style: none !important;
    margin: 0 !important;
}
html[dir="rtl"] .nav-item.dropdown-hover .dropdown-menu {
    left: auto !important;
    right: 0 !important;
}
.nav-item.dropdown-hover:hover .dropdown-menu {
    display: block !important;
}
.dropdown-item {
    padding: 8px 16px !important;
    border-radius: 4px !important;
    color: #333 !important;
    text-decoration: none !important;
    display: block !important;
    white-space: nowrap !important;
}
.dropdown-item:hover {
    background: var(--ypcb-blue) !important;
    color: white !important;
}
.navbar-nav,
.dropdown-menu,
.navbar-nav ul,
.dropdown-menu ul,
.navbar-nav li,
.dropdown-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ========== HERO SPLIT SECTION ========== */
.hero-split-section {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
    margin-top: 90px; /* مسافة علوية لتفادي الـ navbar الثابت */
}

.hero-content-box {
    padding: 20px 0;
    max-width: 540px;
}

.hero-main-title {
    font-size: 3rem;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
    margin-bottom: 25px;
    position: relative;
}

.hero-main-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--ypcb-blue);
    margin-top: 20px;
}

.hero-main-text {
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 35px;
}

.hero-main-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--ypcb-blue);
    color: #ffffff;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--ypcb-blue);
}

.hero-main-btn:hover {
    background-color: transparent;
    color: var(--ypcb-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,119,181,0.2);
}

.hero-main-btn i {
    transition: transform 0.3s ease;
}

.hero-main-btn:hover i {
    transform: translateX(5px);
}

/* Image Box - بشكل مربع 500x500 مع object-fit cover */
.hero-image-box {
    width: 500px;
    height: 500px;
    margin: 0 auto; /* لتوسيط الحاوية في الشاشات الصغيرة */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* لقص أي جزء زائد من الصورة */
    border-radius: 8px;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.15);
}

/* جعل الصورة تملأ المربع بالكامل مع الحفاظ على نسبتها واقتطاع الزوائد */
.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* يضمن تغطية الصورة للمربع دون تشويه */
    transition: transform 0.5s ease;
}

/* إزالة الحدود الوهمية التي كانت موجودة */
.hero-image-box::before {
    display: none;
}

/* تحسينات للشاشات الصغيرة (جعل المربع أصغر) */
@media (max-width: 768px) {
    .hero-image-box {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-image-box {
        width: 250px;
        height: 250px;
    }
}

/* RTL Support */
html[dir="rtl"] .hero-main-title::after {
    margin-right: 0;
    margin-left: auto;
}

html[dir="rtl"] .hero-main-btn:hover i {
    transform: translateX(-5px);
}

html[dir="rtl"] .hero-image-box::before {
    right: auto;
    left: -20px;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .hero-main-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 991.98px) {
    .hero-split-section {
        padding: 60px 0;
    }
    
    .hero-content-box {
        text-align: center;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-main-title {
        font-size: 2.2rem;
    }
    
    .hero-main-title::after {
        margin: 20px auto 0;
    }
    
    .hero-main-text {
        font-size: 1.1rem;
    }
    
    .hero-image-box {
        margin-bottom: 30px;
        margin-left: auto;
        margin-right: auto;
    }
    
    html[dir="rtl"] .hero-main-title::after {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 767.98px) {
    .hero-split-section {
        padding: 40px 0;
    }
    
    .hero-main-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .hero-main-text {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-main-btn {
        padding: 14px 28px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }
    
    .hero-image-box::before {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .hero-main-title {
        font-size: 1.5rem;
    }
    
    .hero-content-box {
        padding: 0 10px;
    }
}