/* --- GLOBAL RESETS & LAYOUT FIXES --- */
:root {
    --ss-primary: #1B8354;
    --ss-primary-light: #ECFDF3;
    --ss-primary-dark: #067647;
    --ss-text-main: #161616;
    --ss-text-secondary: #4B5563;
    --ss-border: #D2D6DB;
}

body {
    font-family: boldFont;
    background-color: #fff;
    overflow-x: hidden; /* Prevents horizontal scroll breakage */
}

/* Main Wrapper to ensure no container bleed */
.home-page-desktop-ar-dga-version {
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* --- 1. SHARED BUTTON STYLE (Derived from Services) --- */
/* This class is now used everywhere to maintain design consistency */
.btn-ssp-style {
    padding: 10px 24px;
    background-color: transparent;
    color: var(--ss-primary);
    border: 1px solid var(--ss-primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.btn-ssp-style:hover {
    background-color: var(--ss-primary);
    color: #FFFFFF;
}

.btn-ssp-style i {
    transition: transform 0.3s;
}

.btn-ssp-style:hover i {
    transform: translateX(-4px); /* Arrow moves left on hover */
}

/* --- 2. ABOUT US & COUNTER SECTION STYLES (Fixed Alignment) --- */
.about-us-section {
    padding: 60px 20px;
    background-color: #fff;
    position: relative;
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.content3 {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-end; /* RTL alignment */
}

.aboutus-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 20px;
}

.title-content {
    color: var(--text-text-display, #1f2a37);
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.frame-3 {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}

.frame-3-content {
    color: #4B5563;
    font-size: 16px;
    line-height: 1.6;
    flex: 1;
}

/* Counter Container Fixes */
.counter-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* .counter.card {
     background: #fff;
     border: 1px solid #eee;
     border-radius: 16px;
     padding: 24px;
     flex: 1 1 200px; 
     display: flex;
     align-items: center;
     gap: 15px;
     box-shadow: 0 4px 6px rgba(0,0,0,0.05);
     transition: transform 0.3s;
     min-width: 250px;
 }*/
 .counter.card {
        background: #fff;
        border: 1px solid #eeeeee00;
        border-radius: 16px;
        padding: 24px;
        flex: 1 1 200px;/* Responsive flex */
        display: flex;
        align-items: center;
        gap: 15px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        transition: transform 0.3s;
        min-width: 250px;
    }
.counter.card:hover {
    transform: translateY(-5px);
    border-color: var(--ss-primary);
}

.featured-icon {
    width: 60px;
    height: 60px;
    background: var(--ss-primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.featured-icon img {
    width: 30px;
    height: 30px;
}

.content4 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.counter-display {
    font-size: 28px;
    font-weight: 800;
    color: var(--ss-primary);
}

.counter-range {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

@media (max-width: 768px) {
    .aboutus-title {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }
    .aboutus-title .title-content { width: 100%; }
    .aboutus-title .btn-ssp-style { align-self: flex-end; }
    .frame-3 { flex-direction: column; }
    .counter-container { flex-direction: column; }
    .counter.card { width: 100%; }
}

/* --- 3. SERVICES WIDGET STYLES (Scoped & Isolated - Pagination Based) --- */
#ss-widget-container {
    width: 100%;
    background-color: #f9fafb;
    box-sizing: border-box;
    padding: 60px 20px;
    position: relative;
    flex-shrink: 0;
}

#ss-widget-container *,
#ss-widget-container *::before,
#ss-widget-container *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

#ss-widget-container .ss-inner-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

/* Header */
#ss-widget-container .ss-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

#ss-widget-container .ss-title {
    font-size: 36px;
    font-weight: 800;
    color: #161616;
    margin: 0 0 8px 0;
}

#ss-widget-container .ss-desc {
    font-size: 16px;
    color: #4B5563;
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

/* Cards Grid Area */
#ss-widget-container .ss-cards-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    min-height: 300px;
}

#ss-widget-container .ss-page-container {
    display: flex;
    gap: 24px;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Service Cards */
#ss-widget-container .ss-card {
    width: 340px;
    min-height: 290px;
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

#ss-widget-container .ss-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 76, 53, 0.08);
}

/* Card Top Row: Title + Icon */
#ss-widget-container .ss-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

#ss-widget-container .ss-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
}

#ss-widget-container .ss-card-icon {
    width: 44px;
    height: 44px;
    background-color: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#ss-widget-container .ss-card-icon img {
    width: 26px;
    height: 26px;
}

/* Card Description */
#ss-widget-container .ss-card-text {
    font-size: 14px;
    color: #5f6368;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
    font-family: regularFont;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Bottom Row: Tags + Details */
#ss-widget-container .ss-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

/* Tags */
#ss-widget-container .ss-tags {
    display: flex;
    gap: 8px;
}

#ss-widget-container .ss-tag {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(27, 131, 84, 0.08);
    color: #1B8354;
    font-weight: 500;
}

.tag-green { background: #ECFDF3; color: #065F46; }
.tag-blue { background: #EFF8FF; color: #175CD3; }
.tag-orange { background: #FFF7ED; color: #C43100; }
.tag-gray { background: #F3F4F6; color: #6C737F; }

/* Details Button inside card */
#ss-widget-container .ss-details-btn {
    color: #1B8354;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: gap 0.2s ease;
}

#ss-widget-container .ss-details-btn:hover {
    gap: 8px;
}

#ss-widget-container .ss-details-btn i {
    font-size: 12px;
}

/* Pagination Controls Bar */
#ss-widget-container .ss-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px;
    flex-wrap: wrap;
    gap: 16px;
}

/* Navigation Buttons (scoped) */
#ss-widget-container .ss-pagination-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    color: #4B5563;
    padding: 0;
}

#ss-widget-container .ss-pagination-nav-btn:hover:not(:disabled) {
    border-color: #1B8354;
    color: #1B8354;
}

#ss-widget-container .ss-pagination-nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

#ss-widget-container .ss-pagination-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#ss-widget-container .ss-pagination-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Navigation buttons group */
#ss-widget-container .ss-nav-buttons-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dots */
#ss-widget-container .ss-pagination-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

#ss-widget-container .ss-pagination-dot {
    min-width: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e5e7eb !important;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none !important;
    padding: 0;
    outline: none;
    flex-shrink: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#ss-widget-container .ss-pagination-dot:hover {
    background-color: #9ca3af !important;
}

#ss-widget-container .ss-pagination-dot.active {
    background-color: #1B8354 !important;
    min-width: 40px;
    width: 40px;
    border-radius: 10px;
}

#ss-widget-container .ss-pagination-dot:focus-visible {
    outline: 2px solid #1B8354;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 1100px) {
    #ss-widget-container .ss-card {
        width: 300px;
        min-height: 270px;
    }
}

@media (max-width: 768px) {
    #ss-widget-container .ss-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    #ss-widget-container .ss-page-container {
        gap: 16px;
    }
    #ss-widget-container .ss-card {
        width: 280px;
        min-height: 260px;
        padding: 22px;
    }
}

@media (max-width: 640px) {
    #ss-widget-container .ss-pagination-nav-btn {
        width: 40px;
        height: 40px;
    }
    #ss-widget-container .ss-card {
        width: 100%;
        max-width: 360px;
        min-height: auto;
    }
}

/* --- 4. NEWS SECTION STYLES --- */
.articles-and-news-section {
    padding: 60px 20px;
    background-color: #fff;
}

.news-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    width:100%;
}
.fa, .far, .fas {
    font-family: "Font Awesome 5 Free" !important;
    }
.section-title-text {
    font-size: 32px;
    font-weight: 700;
    color: #161616;
    margin: 0;
    text-align: right;
}

[dir="ltr"] .section-title-text {
    text-align: left;
}

.news-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--ss-border);
    padding: 0; /* Image full width */
    gap: 5px;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
    padding:10px;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--ss-primary);
}

.news-item__image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.news-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-item__image img {
    transform: scale(1.05);
}

.news-item__caption {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 12px;
}

.news-item__title {
    font-size: 15px;
    font-weight: 700;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 60px; /* Force height for alignment */
    font-family: boldFont;
}

.actionsbtn {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

/* --- 5. PARTNERS SCROLLER STYLES --- */
.Partners-and-Beneficiaries {
    padding: 60px 20px;
    background: #f9fafb;
    overflow: hidden;
}

.partners-showcase {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.partner-block {
    width: 100%;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
    font-family: boldFont;
    text-align: right;
}

[dir="ltr"] .section-title {
    text-align: left;
}
.section {
        display: flex;
        flex-direction: column;
        gap: var(--global-spacing-4xl, 32px);
        align-items: center;
        justify-content: center;
        align-self: stretch;
        flex-shrink: 0;
        position: relative;
    }
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background-color: #ffffff2f;
    border-radius: 2px;
    font-family: boldFont;
}

[dir="ltr"] .section-title::after {
    left: 0;
    right: auto;
}

.scroller-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.logo-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    width: 100%;
    scrollbar-width: none;
    direction: ltr;
}

.logo-track::-webkit-scrollbar { display: none; }

.partner-card {
    width: 199px;
    height: 120px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #1B8354;
}

.partner-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: #555;
    z-index: 2;
}

.nav-btn:hover {
    background-color: #1B8354;
    border-color: #1B8354;
    color: #fff;
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.nav-btn:disabled:hover {
    background-color: #fff;
    border-color: #ddd;
    color: #555;
}

.nav-btn:hover .nav-btn svg {
    width: 20% !important;
    height: 20%;
    fill: currentColor;
    transform: rotate(180deg);
}
.nav-btn svg {
    width: 20%;
    height: 20%;
    fill: currentColor;
    transform: rotate(180deg); /* Adjusted for RTL */
}
.nav-btn svg:hover {
    width: 20%;
    height: 20%;
    fill: currentColor;
    transform: rotate(180deg); /* Adjusted for RTL */
}
.nav-btn.scroll-right svg {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .partners-showcase { padding: 0; }
    .partner-card { min-width: 130px; height: 100px; }
}

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}
.hero-section__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-section__caption {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    color: #fff;
    z-index: 10;
}
main {
        display: flex;
        flex-direction: column;
        min-height: 0vh;
    }
.aboutus-sub-title {
        color: #104631;
        font-family: var(--font-family-font-family-display);
        font-size: 18px;
        line-height: var(--line-height-display-line-heights-display-sm, 38px);
        font-weight: 700;
        position: relative;
        width: 100%;
    }

/* --- 6. HERO OVERLAY & IMAGE GRID STYLES --- */
.hero-section .hero-container {
    max-width: auto;
    padding-right: 0px;
    padding-left: 0px;
    margin-left: 25%;
    margin-top: 5%;
    margin-right: 10%;
}

.hero-section {
    position: relative;
}

.hero-section > img:first-child {
    width: 100%;
    display: block;
}

.hero-section .hero-section__caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-section .hero-section__caption .hero-container {
    pointer-events: none;
}

.hero-section .banner-text h1 {
    font-size: 50px;
    color: #F7FDF9;
}

.hero-section .banner-text h4 {
    margin: 8px 0px;
    font-size: 32px;
    color: #54c08a;
    padding-top: 25px;
}

.hero-section .banner-text p {
    width: 42%;
    font-size: 24px;
    color: #fff;
}

.hero-section .image-grid {
    display: flex;
    width: 100%;
    position: relative;
    bottom: 0;
    left: 0;
    z-index: 3;
    margin-top: -80px !important;
}

.hero-section .image-grid .image-item {
    flex: 1;
    width: 25%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.hero-section .image-grid .image-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.4s ease-in-out;
}

.hero-section .image-grid .image-item .default-img {
    position: relative;
    opacity: 1;
    z-index: 2;
}

.hero-section .image-grid .image-item .hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
}

.hero-section .image-grid .image-item:hover .default-img {
    opacity: 0;
}

.hero-section .image-grid .image-item:hover .hover-img {
    opacity: 1;
}

.hero-section .image-grid .image-item .service-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 90%;
    pointer-events: none;
    padding: 10px;
}

.hero-section .image-grid .image-item .service-label span {
    display: inline-block;
    color: #ffffff;
    background-color: rgba(27, 131, 84, 0.85);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    font-family: boldFont;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.hero-section .image-grid .image-item:hover .service-label span {
    background-color: rgba(27, 131, 84, 1);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .hero-section .banner-text h1 { font-size: 16px; }
    .hero-section .hero-container { margin-top: -30%; }
    .hero-section .banner-text h4 { padding-top: 2px; font-size: 14px; }
    .hero-section .banner-text p { width: 100%; font-size: 22px; }
    .hero-section .image-grid { flex-wrap: wrap; margin-top: -10px !important; }
    .hero-section .image-grid .image-item { width: 50%; flex: 0 0 50%; }
    .hero-section .image-grid .image-item .service-label span { font-size: 10px !important; }
}

/* --- 7. ABOUT US PAGE CARDS --- */
.card-container.card-list {
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 0 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.card-container.card-list::-webkit-scrollbar { display: none; }

.card-container.card-list .card-item {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
}

.card-container.card-list .card-item .ss-card {
    background: #ffffff;
    border: 1px solid var(--ss-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-container.card-list .card-item .ss-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--ss-primary);
}

.card-container.card-list .featured-icon2 {
    width: 60px;
    height: 60px;
    background: var(--ss-primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-container.card-list .featured-icon2 img {
    width: 30px;
    height: 30px;
}

.card-container.card-list .ss-card-body {
    flex-grow: 1;
}

.card-container.card-list .ss-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ss-primary);
    margin: 0;
    font-family: boldFont;
}

.card-container.card-list .ss-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

@media (max-width: 768px) {
    .card-container.card-list .card-item {
        width: 260px;
    }
}
