﻿/* ============================================================
   RTL Overrides for Go.arch Template
   Strategy:
   - Header & Slider → LTR (Untouched)
   - Projects Gallery → LTR (Untouched)
   - Other Sections → RTL
   ============================================================ */

/* ==================== ۱. پایه و فونت ==================== */

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', 'Montserrat', 'Oswald', Tahoma, sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] p,
html[dir="rtl"] a,
html[dir="rtl"] span,
html[dir="rtl"] li,
html[dir="rtl"] div,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] button,
html[dir="rtl"] select {
    font-family: 'Vazirmatn', 'Montserrat', 'Oswald', Tahoma, sans-serif;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    letter-spacing: 0 !important;
}


/* ============================================================
   ⚠️ HEADER + SLIDER → کاملاً LTR (دست‌نخورده)
   ============================================================ */

html[dir="rtl"] header.header-home,
html[dir="rtl"] header.header-home *,
html[dir="rtl"] .forcefullwidth_wrapper_tp_banner,
html[dir="rtl"] .forcefullwidth_wrapper_tp_banner *,
html[dir="rtl"] .rev_slider_wrapper,
html[dir="rtl"] .rev_slider_wrapper * {
    direction: ltr !important;
}

/* متن‌های داخل اسلایدر هم LTR بمونن */
html[dir="rtl"] .slide-title,
html[dir="rtl"] .slide-subtitle,
html[dir="rtl"] .tp-caption {
    text-align: left !important;
    direction: ltr !important;
}

/* فلش‌های کناری صفحه رو دست نزن */
html[dir="rtl"] .arrow-left,
html[dir="rtl"] .arrow-right {
    transform: none;
}


/* ============================================================
   ⚠️ PROJECTS GALLERY - LTR (دست‌نخورده)
   ============================================================ */

html[dir="rtl"] .projects-carousel,
html[dir="rtl"] .projects-carousel * {
    direction: ltr;
    text-align: left;
}

/* عنوان بخش پروژه‌ها راست‌چین (چون در container است) */
html[dir="rtl"] .projects .section-title {
    text-align: right;
}


/* ============================================================
   ✅ بقیه بخش‌ها - RTL
   ============================================================ */

/* ==================== Section Headers ==================== */

html[dir="rtl"] .section-header {
    text-align: right;
}

html[dir="rtl"] .section-title {
    text-align: right;
}

html[dir="rtl"] .fade-title-left {
    left: auto;
    right: 0;
    text-align: right;
}

html[dir="rtl"] .fade-title-right {
    right: auto;
    left: 0;
    text-align: left;
}


/* ==================== About Section ==================== */

html[dir="rtl"] .about .col-about-title {
    text-align: right;
}

html[dir="rtl"] .about .col-about-info {
    text-align: right;
}

    html[dir="rtl"] .about .col-about-info p {
        text-align: right;
        direction: rtl;
    }

html[dir="rtl"] .about .col-about-spec .service-item {
    text-align: right;
}

html[dir="rtl"] .about .col-about-img {
    text-align: left;
}


/* ==================== Services Section ==================== */

html[dir="rtl"] .services .col-service .service-item {
    text-align: right;
}

    html[dir="rtl"] .services .col-service .service-item h4 {
        text-align: right;
    }

    html[dir="rtl"] .services .col-service .service-item p {
        text-align: right;
        direction: rtl;
    }


/* ==================== Experience ==================== */

html[dir="rtl"] .experience-info {
    text-align: right;
}

html[dir="rtl"] .text-parallax-content {
    text-align: center;
    direction: ltr;
}


/* ==================== Clients ==================== */

html[dir="rtl"] .clients-list {
    padding-right: 0;
    text-align: right;
}

    html[dir="rtl"] .clients-list li {
        float: right;
    }

html[dir="rtl"] .clients .section-content .btn {
    direction: rtl;
}


/* ==================== Objects / Map ==================== */

html[dir="rtl"] .objects .section-title {
    text-align: right;
}

html[dir="rtl"] .object-info {
    text-align: right;
}

html[dir="rtl"] .object-title {
    text-align: right;
}

html[dir="rtl"] .object-content {
    text-align: right;
    direction: rtl;
}

    html[dir="rtl"] .object-content a,
    html[dir="rtl"] .object-content span[dir="ltr"] {
        direction: ltr;
        unicode-bidi: embed;
    }


/* ==================== Contacts Section ==================== */

html[dir="rtl"] .contacts .section-title {
    text-align: right;
}

html[dir="rtl"] .col-address {
    text-align: right;
    direction: rtl;
}

    html[dir="rtl"] .col-address span[dir="ltr"] {
        direction: ltr;
        unicode-bidi: embed;
    }

html[dir="rtl"] .form-group {
    text-align: right;
}

html[dir="rtl"] .form-control {
    text-align: right;
    direction: rtl;
}

    html[dir="rtl"] .form-control::placeholder {
        text-align: right;
        direction: rtl;
    }

html[dir="rtl"] .form-submit {
    text-align: left !important;
}

    html[dir="rtl"] .form-submit .btn {
        direction: rtl;
    }

html[dir="rtl"] .success-message,
html[dir="rtl"] .error-message {
    text-align: right;
}


/* ==================== Footer ==================== */

html[dir="rtl"] .footer {
    direction: rtl;
}

    html[dir="rtl"] .footer .brand {
        text-align: right;
        display: inline-block;
    }

    html[dir="rtl"] .footer .text-left-md {
        text-align: right !important;
    }

    html[dir="rtl"] .footer .text-right-md {
        text-align: left !important;
    }

    html[dir="rtl"] .footer .text-center-md {
        text-align: center !important;
    }

html[dir="rtl"] .author-link {
    direction: ltr;
    display: inline-block;
}


/* ==================== Buttons (غیر از اسلایدر) ==================== */

html[dir="rtl"] .btn {
    direction: rtl;
}

    html[dir="rtl"] .btn i {
        margin-right: 5px;
        margin-left: 0;
    }

html[dir="rtl"] .icon-next::before,
html[dir="rtl"] .icon-prev::before {
    transform: scaleX(-1);
    display: inline-block;
}


/* ==================== Grid Fixes ==================== */

html[dir="rtl"] .row-base {
    direction: rtl;
}

html[dir="rtl"] .col-base {
    float: right;
}


/* ==================== Bootstrap RTL Fixes ==================== */

html[dir="rtl"] .text-left {
    text-align: right !important;
}

html[dir="rtl"] .text-right {
    text-align: left !important;
}

html[dir="rtl"] .pull-left {
    float: right !important;
}

html[dir="rtl"] .pull-right {
    float: left !important;
}


/* ==================== Loader ==================== */

html[dir="rtl"] .col-line {
    float: right;
}

html[dir="rtl"] .loader-brand {
    direction: ltr;
}


/* ==================== Scroll to Top ==================== */

html[dir="rtl"] .scroll-top {
    right: auto;
    left: 30px;
}


/* ==================== Typography ==================== */

html[dir="rtl"] p {
    line-height: 2;
}


/* ==================== Numbers & Latin Text ==================== */

html[dir="rtl"] .header-phone,
html[dir="rtl"] .text-parallax-content {
    direction: ltr;
    unicode-bidi: embed;
}

html[dir="rtl"] img {
    transform: none !important;
}

html[dir="rtl"] .project-zoom {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}


/* ==================== Magnific Popup ==================== */

html[dir="rtl"] .mfp-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .mfp-close {
    right: auto;
    left: 0;
}

/* ============================================================
   Project Card — Aspect Ratio ثابت
   ============================================================ */

/* container کارت پروژه: نسبت ابعاد ثابت */
.project figure {
    position: relative;
    aspect-ratio: 4 / 6; /* نسبت ابعاد: 4 عرض، 6 ارتفاع */
    overflow: hidden;
}

    /* تصویر: کشیده یا crop شده تا قاب رو پر کنه */
    .project figure img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover; /* ← کشش هوشمند */
        object-position: center;
        display: block;
    }

/* ============================================================
   Projects Filter
   ============================================================ */

.projects-filter select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5a47e' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 16px;
    padding-left: 45px;
}

    .projects-filter input.form-control:focus,
    .projects-filter select.form-control:focus {
        border-color: #D0D7B6;
        box-shadow: 0 0 0 3px rgba(208, 215, 182, 0.15);
    }

.pagination li a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

/*    .pagination li a:hover {
        background-color: #c5a47e !important;
        color: #fff;
    }*/

    .pagination li a:hover {
        background-color: #D0D7B6 !important;
        color: #211019;
    }
/* ============================================================
   Page Title Panel (در صفحات داخلی)
   ============================================================ */

.page-title-panel {
    margin-top: 6vmin;
    font-family: 'Oswald', sans-serif;
    font-size: 2vmin;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
    /*color: #c5a47e;*/
    color: #D0D7B6;
    word-wrap: break-word;
    padding: 0 1em;
    text-align: center;
    direction: rtl;
}

@media (max-width: 768px) {
    .page-title-panel {
        font-size: 2.5vmin;
        margin-top: 4vmin;
    }
}

/* ============================================================
   Inner Pages Top Padding
   ============================================================ */

.page-top-spacing {
    padding-top: 200px;
}

@media (max-width: 1400px) {
    .page-top-spacing {
        padding-top: 180px;
    }
}

@media (max-width: 992px) {
    .page-top-spacing {
        padding-top: 150px;
    }
}

@media (max-width: 768px) {
    .page-top-spacing {
        padding-top: 120px;
    }
}

@media (max-width: 480px) {
    .page-top-spacing {
        padding-top: 100px;
    }
}

/* ============================================================
   User Menu Dropdown
   ============================================================ */

.user-menu-wrapper {
    position: relative;
}

.user-menu-toggle {
    display: flex !important;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #fff;
}

    .user-menu-toggle:hover {
        color: #c5a47e;
    }

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
    z-index: 1000;
    overflow: hidden;
    animation: fadeInDown 0.2s ease;
}

.user-menu-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    text-align: right;
    direction: rtl;
}

    .user-menu-item:hover {
        background: #3a3a3a;
        color: #c5a47e;
    }

    .user-menu-item i {
        width: 20px;
        text-align: center;
    }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   Map Fullwidth (Home Page) — اصلاح‌شده
   ============================================================================ */

html[dir="rtl"] .objects .section-content {
    padding: 0;
    margin: 0;
    width: 100%;
}

html[dir="rtl"] .map-fullwidth {
    position: relative;
    width: 100%;
    padding: 40px 0;
    direction: rtl; /* ← مهم */
}

html[dir="rtl"] .map-fullwidth__inner {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 30px;
    /*background: #211019;*/
    border-radius: 16px;
    border: 1px solid rgba(208, 215, 182, 0.1);
    box-sizing: border-box;
    display: flex; /* ← جدید */
    align-items: center; /* ← جدید */
    justify-content: center; /* ← جدید */
    min-height: 600px;
}

html[dir="rtl"] .map-fullwidth__svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 500px;
    max-height: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
    pointer-events: auto;
    object-position: center center;
}

/* ==================== Legend ==================== */
html[dir="rtl"] .map-fullwidth__legend {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    background: rgba(33, 16, 25, 0.9);
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid rgba(208, 215, 182, 0.2);
    font-size: 12px;
    z-index: 2;
}

    html[dir="rtl"] .map-fullwidth__legend p {
        color: #EDEDED;
        margin: 0 0 10px;
        font-size: 11px;
        font-weight: 600;
    }

    html[dir="rtl"] .map-fullwidth__legend div {
        display: flex;
        align-items: center;
        gap: 8px;
        color: rgba(237, 237, 237, 0.7);
        font-size: 11px;
        margin-bottom: 6px;
    }

    html[dir="rtl"] .map-fullwidth__legend .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    html[dir="rtl"] .map-fullwidth__legend .dot--active {
        background: #D0D7B6;
    }

    html[dir="rtl"] .map-fullwidth__legend .dot--empty {
        background: #1E3B4A;
    }

/* ==================== Counter ==================== */
html[dir="rtl"] .map-fullwidth__counter {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: auto;
    /*background: rgba(33, 16, 25, 0.9);*/
    padding: 14px 22px;
    border-radius: 10px;
    border: 1px solid rgba(208, 215, 182, 0.2);
    text-align: center;
    direction: rtl;
    z-index: 2;
}

    html[dir="rtl"] .map-fullwidth__counter strong {
        display: block;
        font-family: 'Oswald', sans-serif;
        font-size: 28px;
        font-weight: 700;
        color: #D0D7B6;
        line-height: 1;
        margin-bottom: 4px;
    }

    html[dir="rtl"] .map-fullwidth__counter span {
        display: block;
        font-size: 10px;
        color: rgba(237, 237, 237, 0.6);
    }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    html[dir="rtl"] .map-fullwidth__inner {
        padding: 15px;
        border-radius: 12px;
    }

    html[dir="rtl"] .map-fullwidth__svg {
        min-height: 380px;
    }

    html[dir="rtl"] .map-fullwidth__legend {
        top: 10px;
        right: 10px;
        padding: 10px;
        font-size: 10px;
    }

    html[dir="rtl"] .map-fullwidth__counter {
        bottom: 10px;
        left: 10px;
        padding: 10px 14px;
    }

        html[dir="rtl"] .map-fullwidth__counter strong {
            font-size: 20px;
        }
}

/* ============================================================
   Section Header — Inline (عنوان + لینک کنار هم)
   ============================================================ */

.section-header--inline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(208, 215, 182, 0.08);
}

    .section-header--inline .section-title {
        text-align: right;
        margin: 0;
        flex: 1 1 auto;
        min-width: 200px;
    }

/* لینک «مشاهده آرشیو کامل» */
.section-more {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    color: #D0D7B6;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    transition: color 0.3s ease;
    float:left;
    margin-left:5px;
}

    .section-more::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        left: 100%;
        height: 1px;
        background: currentColor;
        transition: left 0.4s ease;
    }

    .section-more:hover {
        color: #C9B0B3;
    }

        .section-more:hover::after {
            left: 0;
        }

    .section-more .icon-next {
        display: inline-block;
        width: 1.2em;
        height: 1em;
        background: url(../img/img-icon/prev.png) 0 0 no-repeat;
        background-size: 1.2em 1em;
        transition: transform 0.3s ease;
        /* رنگ آیکون به پسته‌ای */
        filter: brightness(0) saturate(100%) invert(88%) sepia(8%) saturate(600%) hue-rotate(40deg);
    }

    .section-more:hover .icon-next {
        transform: translateX(-6px);
        filter: brightness(0) saturate(100%) invert(80%) sepia(15%) saturate(400%) hue-rotate(300deg);
    }

/* موبایل */
@media (max-width: 768px) {
    .section-header--inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 1rem;
    }

        .section-header--inline .section-title {
            text-align: right;
            width: 100%;
        }

    .section-more {
        align-self: flex-end;
    }
}

.badge-unread {
    background: #D0D7B6;
    color: #211019;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    margin-inline-start: 8px;
}


/* ============================================================
   Navbar Desktop — Flexbox Layout (RTL)
   ============================================================ */

html[dir="rtl"] .navbar-desctop .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: nowrap;
}

/* برند — سمت راست */
html[dir="rtl"] .navbar-desctop .brand {
    float: none;
    margin: 0;
    flex-shrink: 0;
    order: 1; /* اولین از راست */
}

/* منو — وسط/راست */
html[dir="rtl"] .navbar-desctop-menu {
    float: none !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    padding: 0;
    margin: 0;
    list-style: none;
    flex: 1 1 auto;
    order: 2;
}

    html[dir="rtl"] .navbar-desctop-menu > li {
        float: none !important;
        margin: 0 !important;
        padding: 0;
        position: relative;
    }

        html[dir="rtl"] .navbar-desctop-menu > li > a {
            display: inline-block;
            padding: 6px 0;
            font-family: 'Vazirmatn', Tahoma, sans-serif;
            font-size: 0.95rem;
            letter-spacing: 0 !important;
            color: #EDEDED;
            text-decoration: none;
            transition: color 0.3s ease;
            white-space: nowrap;
        }

            html[dir="rtl"] .navbar-desctop-menu > li > a:hover,
            html[dir="rtl"] .navbar-desctop-menu > li.active > a {
                color: #c5a47e;
            }

/* ============================================================
   Nav Auth — سمت چپ
   ============================================================ */

html[dir="rtl"] .nav-auth {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    float: none !important;
    order: 3; /* آخر = سمت چپ در RTL */
    flex-shrink: 0;
    margin: 0;
}

.nav-auth__link {
    color: #EDEDED;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0 !important;
    text-decoration: none;
    padding: 6px 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

    .nav-auth__link:hover {
        color: #D0D7B6;
    }

.nav-auth__link--cta {
    background: #c5a47e;
    color: floralwhite !important;
    padding: 8px 22px;
    border-radius: 30px;
    font-weight: 600;
}

    .nav-auth__link--cta:hover {
        background: #C9B0B3;
        color: #211019 !important;
    }

/* موبایل — پنهان شود */
@media (max-width: 991px) {
    html[dir="rtl"] .nav-auth {
        display: none;
    }
}

/* ============================================================
   اصلاحات هدر و منوی موبایل (نسخه نهایی)
   ============================================================ */

@media (max-width: 991px) {

    /* ۱. هدر موبایل: چیدمان، رنگ و فاصله از چپ */
    .navbar-mobile {
        direction: ltr !important;
        background-color: #2b2b2b !important; /* حذف کامل رنگ بنفش */
        padding: 15px 25px !important; /* فاصله ۲۵ پیکسلی از چپ و راست */
        border-bottom: 1px solid rgba(208, 215, 182, 0.05) !important;
    }

        /* ۲. لوگو (IN ARCHA) */
        .navbar-mobile .brand {
            float: left !important;
            margin: 0 !important;
            font-size: 1.3rem !important;
            color: #EDEDED !important;
            font-family: 'Oswald', 'Vazirmatn', sans-serif !important;
            font-weight: 700 !important;
            letter-spacing: 0.1em !important;
            text-decoration: none !important;
        }

            /* ۳. رنگ دوگانه: IN سفید، ARCHA طلایی */
            .navbar-mobile .brand .text-primary {
                color: #c5a47e !important; /* طلایی سایت */
            }

        /* ۴. دکمه همبرگری */
        .navbar-mobile .navbar-toggle {
            float: right !important;
            margin: 0 !important;
            padding: 5px !important;
        }

            .navbar-mobile .navbar-toggle .icon-bar {
                background-color: #EDEDED !important; /* رنگ سه خط */
                width: 24px !important;
                height: 2px !important;
                margin: 5px 0 !important;
            }

    /* ۵. پس‌زمینه منوی باز شده */
    .navbar-collapse {
        direction: rtl !important;
        background-color: #2b2b2b !important;
        border: none !important;
        box-shadow: none !important;
        margin: 15px -25px -15px -25px !important; /* کشیدن منو تا لبه‌های صفحه */
        width: calc(100% + 50px) !important;
    }

    /* ۶. آیتم‌های منو */
    .navbar-nav-mobile {
        background-color: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
    }

        .navbar-nav-mobile li {
            border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        }

            .navbar-nav-mobile li a {
                color: #ccc !important;
                padding: 15px 25px !important;
                text-align: right !important;
                font-family: 'Vazirmatn', Tahoma, sans-serif !important;
                letter-spacing: 0 !important;
            }

                .navbar-nav-mobile li a:hover,
                .navbar-nav-mobile > .current > a {
                    color: #c5a47e !important;
                    background-color: transparent !important;
                }
}