/* 
    Homepage Specific Styles
    This file contains styles for the Hero, About Us, News, Projects, and App sections.
*/

/* --- Hero Section --- */
.hero-section-wrapper {
    margin: 0;
    /*    padding: 40px 80px;*/
    position: relative;
    width: 100%;
    display: block;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 491px;
    overflow: hidden;
}

.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

    .hero-slider-bg .item {
        height: 100%;
        width: 100%;
        min-height: 491px;
    }

    .hero-slider-bg,
    .hero-slider-bg .owl-stage-outer,
    .hero-slider-bg .owl-stage,
    .hero-slider-bg .owl-item,
    .hero-slider-bg .item {
        height: 100%;
    }

.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(9, 42, 30, 0.8) 0%, rgba(9, 42, 30, 0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content-container {
    max-width: 1280px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    z-index: 2;
    pointer-events: none;
    min-height: 491px;
}

.hero-slider-bg img,
.hero-slider-bg video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[lang="ar"] .hero-content-container {
    align-items: flex-start;
    /* Since it's RTL, flex-start is right */
}

/* --- Owl Carousel Dots Styling --- */
.hero-section-wrapper .owl-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    z-index: 3;
}

.hero-section-wrapper .owl-dot span {
    width: 12px !important;
    height: 12px !important;
    margin: 0 !important;
    background: #e5e7eb !important;
    border-radius: 50% !important;
    display: block;
    transition: background 0.2s ease;
}

.hero-section-wrapper .owl-dot.active span {
    background: #1b8354 !important;
}

.hero-section-wrapper .owl-dot:hover span {
    background: #d1d5db !important;
}


.main-title {
    margin: 0 auto;
    font-size: clamp(1.5rem, 2vw + 1rem, 1.875rem); /* 24px → 30px */
    font-weight: 700;
    line-height: 1.3;
}


/* --- About Us Section --- */
.about-us-section {
    padding: 60px 80px;
    background-color: var(--dga-white);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-us-container {
    max-width: 1280px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.about-us-title-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.about-us-main-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 38px;
}

.about-us-description {
    margin: 0;
    font-size: 16px;
    max-width: 720px;
    color: var(--gray-800);
    line-height: 24px;
}

/* Grid */
.about-us-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    width: 100%;
    margin-top: 32px;
}

/* Card */
.about-us-card {
    margin: 0 auto;
    max-width: 299px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-us-card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
}

.about-us-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-us-card-value {
    font-size: 24px;
    color: var(--dga-primary);
}

.about-us-card-label {
    font-size: 14px;
}

/* ========================= */
/* ✅ TABLET (<= 992px) */
/* ========================= */
@media (max-width: 992px) {
    .about-us-section {
        padding: 50px 40px;
    }

    .about-us-main-title {
        font-size: 26px;
        line-height: 34px;
    }

    .about-us-description {
        font-size: 15px;
    }

    .about-us-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #phone_hidden {
        display: none;
    }
}

/* ========================= */
/* ✅ MOBILE (<= 576px) */
/* ========================= */
@media (max-width: 576px) {
    .about-us-section {
        padding: 40px 20px;
    }

    .about-us-title-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-us-main-title {
        font-size: 22px;
        line-height: 30px;
    }

    .about-us-description {
        font-size: 14px;
    }

    .about-us-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* keep grid on mobile */
        gap: 16px;
    }

    .about-us-card {
        padding: 16px;
        gap: 12px;
/*        flex-direction: column;
        align-items: flex-start;*/
    }

   

    .about-us-card-value {
        font-size: 20px;
    }

    .about-us-card-label {
        font-size: 13px;
    }

    #phone_hidden {
        display: none;
    }
}

@media (max-width: 1287px) {
    #phone_hidden {
        display: none;
    }
}

/* --- Services Section --- */
/* ========================= */
/* BASE */
/* ========================= */
.services-section {
    padding: 60px 80px;
    background-color: var(--dga-primary-50);
    width: 100%;
    display: flex;
    justify-content: center;
}

.services-container {
    max-width: 1280px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.services-title-header {
    gap: 32px;
    margin-bottom: 32px;
}

[dir="rtl"] .services-title-header {
    text-align: right;
}

.services-header-content {
    flex: 1;
    text-align: center;
}

.services-main-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #161616;
    line-height: 38px;
}

.services-description {
    margin: 20px auto;
    font-size: 16px;
    max-width: 720px;
    color: #161616;
    line-height: 24px;
}

.services-button {
    padding: 0 16px;
    border: 1px solid #d2d6db;
    font-size: 16px;
    height: 40px;
    background-color: transparent;
    border-radius: 4px;
    font-weight: 500;
    color: #161616;
    cursor: pointer;
    white-space: nowrap;
}

/* ========================= */
/* SCROLL AREA */
/* ========================= */

.services-scroll-wrapper {
    width: 100%;
    overflow: hidden;
    margin-bottom: 32px;
}

.services-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

    .services-scroll-container::-webkit-scrollbar {
        display: none;
    }

/* Card */
.service-card {
    text-align: right;
    padding: 24px;
    border: 1px solid #d2d6db;
    flex-shrink: 0;
    background-color: var(--dga-white);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.service-card-icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
    background-color: var(--dga-primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-card-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    color: var(--dga-primary);
    align-items: center;
    justify-self: center;
}

.service-card-content {
    /*    margin-top: 24px;
    margin-bottom: auto;
    flex-grow: 1;*/
}

.service-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    /*    color: #1f2a37;*/
    line-height: 28px;
}

.service-card-description {
    margin: 0;
    font-size: 16px;
    /*    color: #1f2a37;*/
    line-height: 24px;
}

.service-card-actions {
    /*    display: flex;
    gap: 16px;*/
}

/* ========================= */
/* ✅ TABLET (<= 992px) */
/* ========================= */

@media (max-width: 992px) {

    .services-title-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .services-main-title {
        font-size: 26px;
        line-height: 34px;
    }

    .services-description {
        font-size: 15px;
    }

}

/* ========================= */
/* ✅ MOBILE (<= 576px) */
/* ========================= */

@media (max-width: 576px) {
    .services-section {
        padding: 40px 20px;
    }

    .services-title-header {
        flex-direction: column;
        gap: 16px;
    }

    .services-main-title {
        font-size: 22px;
        line-height: 30px;
    }

    .services-description {
        font-size: 14px;
        margin-top: 16px;
    }

    .services-button {
        width: 100%;
        text-align: center;
    }

    .services-scroll-container {
        gap: 12px;
        padding-bottom: 16px;
    }

    .service-card {
        /*width: 240px; /* smaller cards for mobile scroll */
        padding: 16px;
        border-radius: 12px;
    }

    .service-card-icon-wrapper {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    .service-card-icon {
        width: 20px;
        height: 20px;
    }

    .service-card-title {
        font-size: 16px;
        line-height: 24px;
    }

    .service-card-description {
        font-size: 14px;
        line-height: 22px;
    }
}

/* --- Rai Services Section (من مكانك) --- */
.rai-service-card {
    background-color: var(--dga-white);
    border: 1px solid #d2d6db;
    border-radius: 16px;
    padding: 16px;
    height: 320px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .rai-service-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
    }

/* Arabic */
[lang="ar"] .rai-service-card {
    text-align: right;
}

.rai-service-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 16px;
}

.rai-service-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rai-service-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
}

.rai-service-card-description {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    color: var(--dga-gray-700);
}

/* Button alignment */
.rai-service-card .btn {
    align-self: flex-start;
}

[lang="ar"] .rai-service-card .btn {
    align-self: flex-start;
}

/* Custom Dots for carousels */
.custom-dot.owl-theme .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    margin: 5px 4px;
    background: #e5e7eb;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.custom-dot.owl-theme .owl-dots .owl-dot.active span {
    background: #1b8354;
}

/* --- News Section --- */
.news-section {
    padding: 60px 80px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.news-container {
    max-width: 1290px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.news-title-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 32px;
}

.news-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
}


.news-tab-switcher {
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background-color: var(--gray-200);
    border-radius: 8px;
    /*    padding: 4px;*/
}
@media (min-width: 1147px) {

    /* Your styles here */

    .news-tab-switcher {
        /* Example */
        width: 70% ;
    }
}

.news-tab-text {
    font-size: clamp(14px, 1.2vw, 16px);
}
.news-tab-button {
    padding: 10px 20px;
    background-color: transparent;
    border: none;
    flex: 1;
    color: var(--dga-black);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

    .news-tab-button[aria-selected="true"] {
        background-color: var(--dga-black);
        color: var(--dga-white);
    }

@media (max-width: 768px) {

    .news-tab-button {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {

    .news-tab-button {
        padding: 8px 10px;
    }
}

/* Only apply scroll behavior when container has .scrollable-tabs */
.news-tab-switcher.scrollable-tabs {
    flex-wrap: nowrap; /* prevent wrapping */
    overflow-x: auto; /* enable horizontal scroll */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 8px; /* spacing between buttons */
}

    /* Hide scrollbar for cleaner look */
    .news-tab-switcher.scrollable-tabs::-webkit-scrollbar {
        display: none;
    }

.news-tab-switcher.scrollable-tabs {
    scrollbar-width: none; /* Firefox */
}

    /* Buttons inside scrollable tabs */
    .news-tab-switcher.scrollable-tabs .news-tab-button {
        flex: 0 0 auto; /* prevent shrinking */
        white-space: nowrap; /* keep text in one line */
    }

.news-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE & old Edge */
}

    .news-scroll-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
        width: 0;
        height: 0;
    }

.news-card {
    /*min-width: 416px;*/
    width: 100%;
    height: auto;
    background: var(--dga-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 16px
}

.news-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px
}

.news-card-content {
    flex: 1;
}

.news-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 24px;
    color: var(--gray-900);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 56px; /* same height for all titles */
}
.news-card-desc {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
    display: -webkit-box; /* Required for multi-line ellipsis */
    -webkit-box-orient: vertical; /* Vertical orientation */
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Show … at the end */
    -webkit-line-clamp: 4; /* Limit to 4 lines */
    max-height: calc(1.6em * 4); /* Ensure container height matches 4 lines */
}

/* --- Legacy Utility Classes --- */
.myOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(19, 93, 61, 0.5);
    z-index: 1;
}

.rai-stats-number {
    /*    font-family: 'IBM Plex Sans Arabic-SemiBold', sans-serif !important;*/
    font-size: 40px;
    color: black;
}

.rai-service-label {
    /*    font-family: 'IBM Plex Sans Arabic-Medium', sans-serif;*/
    font-size: 18px;
    margin-bottom: 8px;
}

.project-description {
    /*    font-family: 'IBM Plex Sans Arabic-Regular', sans-serif;*/
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-600);
}

.no-data-msg {
    /*    font-family: 'IBM Plex Sans Arabic-Medium', sans-serif;*/
    font-size: 18px;
    color: var(--gray-600);
    margin: 0;
}

.stats-label {
    font-size: 16px;
}

.stats-number {
    /*    font-family: 'IBM Plex Sans Arabic-Bold', sans-serif;*/
    color: var(--accent-color);
    font-size: 22px;
}

.stats-icon {
    height: 50px;
    margin-bottom: 10px;
}

.service-card {
    border-radius: 1rem;
    height: 260px;
    display: flex;
    flex-direction: column;
}

.service-icon {
    height: 60px;
    margin-bottom: 15px !important;
    width: auto !important;
    margin: 0 auto;
}

.hiddenDiv {
    display: none;
}
.client-review-section {
    padding: 60px 80px;
}
.projects-section {
    padding: 60px 80px;
    background-color: var(--dga-primary-50);
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {

    .about-us-section,
    .news-section, .services-section, .projects-section, .client-review-section {
        padding: 40px 20px;
    }
    
    .hero-section-wrapper {
        padding: 0; /* keep full width on mobile */
    }
}

/* --- Weather Section --- */
.weather-section {
    background-color: var(--primary-color);
    color: var(--dga-white);
    padding: 60px 80px;
}

.weather-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.weather-main-title {
    color: var(--dga-white);
    margin: 0;
    font-size: 32px;
}

.weather-date {
    font-size: 16px;
    /*    font-family: var(--font-family);*/
    opacity: 0.9;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.weather-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.weather-icon {
    font-size: 24px;
    /*    width: 50px;
    height: 50px;*/
    margin-bottom: 8px;
}

.weather-label {
    font-size: 17px;
    letter-spacing: 1px;
}

.weather-value {
    font-size: 22px;
    /*    font-family: var(--font-family);*/
    color: var(--dga-primary-300);
}

/* --- App Section --- */
.app-section {
    padding: 40px;
    text-align: center;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.app-info {
    flex: 1;
    min-width: 300px;
}

[dir="rtl"] .app-info {
    text-align: right;
}

[dir="ltr"] .app-info {
    text-align: left;
}

.app-title {
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700
}

.app-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.app-store-img {
    max-width: 160px;
    height: auto;
}

.app-preview {
    flex: 1;
    min-width: 300px;
}

.app-preview-img {
    max-width: 100%;
    height: auto;
}

/* --- Special Projects Overrides --- */



.projects-container {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0px;
}

/* HEADER */
.projects-title-header {
    /*display: flex;*/
    justify-content: space-between;
    text-align: center;
    /*align-items: flex-end;*/
    gap: 20px;
    margin-bottom: 30px;
}

/*.projects-header-content {
    max-width: 700px;
}*/

.projects-main-title {
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.projects-description {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

/* CAROUSEL */
.projects-scroll-wrapper {
    margin-top: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* Firefox */
    scrollbar-width: none;
    /* IE/Edge */
    -ms-overflow-style: none;
}

    /* Chrome, Safari, Edge */
    .projects-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

.projects-scroll {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

    .projects-scroll .item {
        flex: 0 0 320px; /* Card width */
    }

.projects-scroll {
    height: 100%;
}
