/* ============================================================
   Dhariyat — Mobile & Tablet Responsiveness
   ============================================================ */

/* ── Global ── */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* إخفاء المؤشر المخصص على الشاشات اللمسية */
@media (hover: none), (pointer: coarse) {
    .tg-cursor,
    .tg-cursor-inner,
    .tg-cursor-outer {
        display: none !important;
    }
}

/* ── Header & Navigation ── */
@media (max-width: 991.98px) {
    .menu-area .logo img {
        max-height: 48px;
        width: auto;
    }

    .nav-outer .mobile-nav-toggler {
        font-size: 28px;
        line-height: 1;
        margin-right: 0;
        top: 8px;
        z-index: 10;
    }

    .menu-area-four.transparent-header {
        top: 0;
    }

    .menu-area .menu-wrap {
        padding: 10px 0;
    }

    .mobile-menu {
        width: min(300px, 88vw);
        padding-right: 0;
    }

    .mobile-menu .menu-box {
        padding: 30px 20px;
    }

    .mobile-menu .navigation li > a {
        font-size: 15px;
        padding: 12px 0;
    }
}

/* القائمة الجانبية من اليسار في RTL */
html[dir="rtl"] .mobile-menu {
    right: auto;
    left: 0;
    padding-left: 0;
    padding-right: 0;
    -webkit-transform: translateX(-101%);
    transform: translateX(-101%);
}

html[dir="rtl"] .mobile-menu-visible .mobile-menu {
    -webkit-transform: translateX(0);
    transform: translateX(0);
}

/* ── Homepage Banner ── */
@media (max-width: 991.98px) {
    .banner-area-three.banner-two {
        min-height: auto !important;
        padding: 110px 0 70px !important;
    }

    .banner-content-three .title {
        font-size: 32px !important;
        line-height: 1.25;
    }

    .banner-content-three p {
        font-size: 15px;
    }

    .banner-btn-wrap {
        flex-direction: column;
        align-items: center;
    }

    .banner-btn-wrap .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .banner-area-three.banner-two {
        padding: 90px 0 55px !important;
    }

    .banner-content-three .title {
        font-size: 26px !important;
    }
}

/* ── Section titles ── */
@media (max-width: 767.98px) {
    .section-title .title {
        font-size: 26px;
        line-height: 1.3;
    }

    .section-title .sub-title {
        font-size: 13px;
    }

    .pt-120, .pt-110, .pt-100 {
        padding-top: 70px !important;
    }

    .pb-120, .pb-110, .pb-100, .pb-90 {
        padding-bottom: 60px !important;
    }

    .pt-80 {
        padding-top: 50px !important;
    }
}

/* ── Cards & grids ── */
@media (max-width: 767.98px) {
    .dh-why-card,
    .dh-info-card,
    .dh-equipment-card,
    .dh-factory-card {
        padding: 22px 18px;
        margin-bottom: 20px;
    }

    .dh-why-card h4,
    .dh-info-card h3,
    .dh-factory-card h3,
    .dh-equipment-card h4 {
        font-size: 17px;
    }

    .dh-gallery-item img {
        height: 200px;
    }

    .dh-gallery-overlay {
        opacity: 1;
        background: rgba(12, 18, 57, 0.45);
    }
}

/* ── Projects Map ── */
@media (max-width: 991.98px) {
    .dh-projects-map {
        height: 320px;
        margin-bottom: 20px;
    }

    .dh-map-sidebar {
        height: auto;
        max-height: 360px;
    }
}

@media (max-width: 575.98px) {
    .dh-projects-map {
        height: 260px;
        border-radius: 6px;
    }

    .dh-map-sidebar {
        padding: 18px;
        max-height: 300px;
    }
}

/* ── Portfolio page ── */
@media (max-width: 991.98px) {
    .dh-portfolio-hero {
        padding: 100px 0 80px;
        min-height: auto;
    }

    .dh-portfolio-hero-title {
        font-size: 30px;
    }

    .dh-portfolio-hero-text {
        font-size: 16px;
    }

    .dh-portfolio-stats {
        margin-top: -30px;
    }

    .dh-portfolio-stats-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .dh-stat-box {
        padding: 22px 12px;
    }

    .dh-stat-num {
        font-size: 30px;
    }

    .dh-portfolio-sidebar {
        position: static;
        top: auto;
        margin-bottom: 20px;
    }

    .dh-portfolio-toolbar {
        flex-direction: column;
        gap: 12px;
    }

    .dh-portfolio-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .dh-ptab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 575.98px) {
    .dh-portfolio-hero {
        padding: 85px 0 65px;
    }

    .dh-portfolio-hero-title {
        font-size: 24px;
    }

    .dh-portfolio-hero-btns .btn {
        display: block;
        width: 100%;
        margin: 6px 0;
    }

    .dh-stat-num {
        font-size: 26px;
    }

    .dh-stat-label {
        font-size: 13px;
    }

    .dh-pcard-title {
        font-size: 15px;
    }
}

/* فلاتر المشاريع — قابلة للطي على الجوال */
.dh-mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--tg-secondary-color, #131944);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dh-mobile-filter-toggle i {
    transition: transform 0.25s ease;
}

.dh-mobile-filter-toggle.is-open i.fa-chevron-down {
    transform: rotate(180deg);
}

@media (max-width: 991.98px) {
    .dh-mobile-filter-toggle {
        display: flex;
    }

    .dh-portfolio-sidebar.dh-sidebar-collapsed .dh-sidebar-block {
        display: none;
    }

    .dh-portfolio-sidebar.dh-sidebar-collapsed {
        padding-bottom: 12px;
    }
}

/* ── Portfolio details ── */
@media (max-width: 767.98px) {
    .dh-portfolio-detail-hero,
    .dh-project-detail-hero {
        padding: 90px 0 50px;
    }

    .dh-portfolio-gallery-main img {
        max-height: 280px;
        object-fit: cover;
    }
}

/* ── Company profile flipbook ── */
@media (max-width: 767.98px) {
    .dh-profile-viewer {
        padding: 16px 10px 24px;
        border-radius: 10px;
    }

    .dh-profile-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dh-profile-toolbar-group {
        justify-content: center;
    }

    .dh-profile-btn {
        padding: 9px 14px;
        font-size: 13px;
    }

    .dh-profile-book-wrap {
        min-height: 280px;
    }
}

/* ── Contact & forms ── */
@media (max-width: 767.98px) {
    .appointment-img {
        display: none !important;
    }

    .contact-form-wrap,
    .contact-info-wrap {
        margin-bottom: 30px;
    }

    .footer-newsletter form {
        flex-direction: column;
        gap: 10px;
    }

    .footer-newsletter input {
        width: 100%;
    }

    .footer-newsletter .btn {
        width: 100%;
    }
}

/* ── Footer ── */
@media (max-width: 767.98px) {
    .footer-widget {
        margin-bottom: 30px;
    }

    .footer-widget .fw-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .copyright-wrap .row {
        text-align: center;
    }

    .copyright-text {
        margin-bottom: 10px;
    }
}

/* ── Tables overflow (if any) ── */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ── Buttons touch-friendly ── */
@media (max-width: 767.98px) {
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .scroll-top {
        width: 44px;
        height: 44px;
        line-height: 44px;
        right: 15px;
        bottom: 15px;
    }

    html[dir="rtl"] .scroll-top {
        right: auto;
        left: 15px;
    }
}

/* ── Auto tour: نبذة عن الشركة فقط ── */
body.dh-tour-focus-about-brief header,
body.dh-tour-focus-about-brief footer,
body.dh-tour-focus-about-brief .breadcrumb-area,
body.dh-tour-focus-about-brief main > section:not(#dh-about-intro) {
    visibility: hidden !important;
    pointer-events: none !important;
}

body.dh-tour-focus-about-brief #dh-about-intro .about-img-wrap,
body.dh-tour-focus-about-brief #dh-about-intro .about-experiences-wrap {
    visibility: hidden !important;
    pointer-events: none !important;
}

body.dh-tour-focus-about-brief #dh-about-intro {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

body.dh-tour-focus-about-brief #dh-tour-about-brief {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(12, 18, 57, 0.12);
    max-width: 900px;
    margin: 0 auto;
}

body.dh-tour-focus-about-brief #dh-tour-about-brief .sub-title {
    display: none;
}

@media (max-width: 767.98px) {
    body.dh-tour-focus-about-brief #dh-tour-about-brief {
        padding: 20px 16px;
    }

    body.dh-tour-focus-about-brief #dh-tour-about-brief .title {
        font-size: 22px;
    }

    body.dh-tour-focus-about-brief #dh-tour-about-brief p {
        font-size: 15px;
        line-height: 1.8;
    }
}

/* ── Auto tour: المشروع في مربع واحد مع زوم ── */
body.dh-tour-focus-project-brief header,
body.dh-tour-focus-project-brief footer,
body.dh-tour-focus-project-brief .breadcrumb-area,
body.dh-tour-focus-project-brief .dh-pdetail-sidebar,
body.dh-tour-focus-project-brief .dh-pdetail-similar,
body.dh-tour-focus-project-brief .dh-pdetail-map {
    visibility: hidden !important;
    pointer-events: none !important;
}

body.dh-tour-focus-project-brief .dh-portfolio-detail {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

body.dh-tour-focus-project-brief .dh-portfolio-detail .container,
body.dh-tour-focus-project-brief .dh-portfolio-detail .row,
body.dh-tour-focus-project-brief .dh-portfolio-detail .col-lg-8 {
    width: 100%;
    max-width: 100%;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 16px 48px rgba(12, 18, 57, 0.16);
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-hero {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-hero img {
    max-height: 340px;
    width: 100%;
    object-fit: cover;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-content {
    margin-top: 0 !important;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-title {
    font-size: 24px;
    margin-bottom: 16px;
    line-height: 1.4;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-desc h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--tg-primary-color, #f58220);
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-desc p {
    font-size: 16px;
    line-height: 1.9;
    margin: 0;
}

body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-arrow,
body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-dots,
body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-progress {
    display: none;
}

@media (max-width: 767.98px) {
    body.dh-tour-focus-project-brief #dh-tour-project-brief {
        padding: 16px;
    }

    body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-title {
        font-size: 18px;
    }

    body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-desc p {
        font-size: 14px;
    }

    body.dh-tour-focus-project-brief #dh-tour-project-brief .dh-pdetail-hero img {
        max-height: 220px;
    }
}

@media (max-width: 767.98px) {
    .dh-tour-bar {
        padding: 12px 14px;
        gap: 10px;
    }

    .dh-tour-bar-info strong {
        font-size: 13px;
    }

    .dh-tour-bar-progress {
        max-width: 100%;
    }
}

/* ── Breadcrumb ── */
@media (max-width: 575.98px) {
    .breadcrumb-area {
        padding: 70px 0 50px;
    }

    .breadcrumb-content .title {
        font-size: 24px;
    }
}

/* ── News ── */
@media (max-width: 575.98px) {
    .dh-news-hero-title {
        font-size: 26px;
    }
}

/* ── Gallery album ── */
@media (max-width: 767.98px) {
    .dh-gallery-album-frame {
        aspect-ratio: 4 / 3;
        max-height: 360px;
    }

    .dh-gallery-album-arrow {
        width: 40px;
        height: 40px;
    }

    .dh-gallery-album-prev {
        right: 10px;
    }

    .dh-gallery-album-next {
        left: 10px;
    }

    .dh-gallery-album-meta {
        padding: 16px 16px 10px;
    }

    .dh-gallery-album-info h3 {
        font-size: 17px;
    }

    .dh-gallery-album-controls {
        padding: 0 16px 16px;
    }

    .dh-gallery-album-hint {
        font-size: 12px;
    }
}

/* ── Fix horizontal overflow from theme ── */
@media (max-width: 767.98px) {
    .brand-inner {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .row {
        margin-left: -12px;
        margin-right: -12px;
    }

    .row > [class*="col-"] {
        padding-left: 12px;
        padding-right: 12px;
    }
}
