/*
 * پخش سراسری میثاق الماس — لایهٔ مرتب‌سازی و ریسپانسیو (۱۴۰۵/۰۷/۱۶)
 * همان تم ۹۶۱: سرمه‌ایِ تیرهٔ فوتر، قرمزِ #ef233c، فونتِ yekan و همان تصویرها.
 * فقط چیدمان، فاصله، خوانایی و رفتار در موبایل/تبلت. آخرین CSSِ صفحه است.
 */
:root {
    --mg-red: #ef233c;
    --mg-red-dark: #c9182d;
    --mg-dark: #2b2b2b;
    --mg-footer: #3a3a3a;
    --mg-ink: #222;
    --mg-muted: #6b6b6b;
    --mg-line: #ececec;
    --mg-soft: #f6f6f6;
    --mg-radius: 12px;
}

html, body.misagh-legacy-shell { overflow-x: hidden; max-width: 100%; }
body.misagh-legacy-shell { padding-top: 0 !important; font-family: 'yekan', Tahoma, sans-serif; color: var(--mg-ink); -webkit-text-size-adjust: 100%; }
body.misagh-legacy-shell img { max-width: 100%; height: auto; }
body.misagh-legacy-shell main.container { max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
body.misagh-legacy-shell .container:not(main) { width: 100% !important; max-width: 1200px !important; padding-right: 16px !important; padding-left: 16px !important; margin-right: auto !important; margin-left: auto !important; }
body.misagh-legacy-shell .row { margin-right: -12px; margin-left: -12px; }
body.misagh-legacy-shell .row > [class*="col-"] { padding-right: 12px; padding-left: 12px; }
body.misagh-legacy-shell .preloader { display: none !important; }

/* ---------- نوارِ تاریخ و ساعت ---------- */
.date-wrapper {
    display: flex; align-items: center; justify-content: flex-start; gap: 14px;
    max-width: 1200px; margin: 0 auto; padding: 6px 16px; font-size: 12.5px; color: var(--mg-muted);
    direction: rtl; line-height: 1.6;
}
.date-wrapper #MyClockDisplay { direction: ltr; unicode-bidi: plaintext; }
.date-wrapper #date:before { content: "\f073"; font-family: FontAwesome; margin-left: 6px; color: var(--mg-red); }
.date-wrapper #MyClockDisplay:before { content: "\f017"; font-family: FontAwesome; margin-left: 6px; color: var(--mg-red); }

/* ---------- هدر: نوارِ سفید و چسبان (همان سبکِ هدرِ دومِ قالب) ---------- */
.main-header.header-style-two {
    position: sticky !important; top: 0 !important; z-index: 1000;
    background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .08); border-top: 3px solid var(--mg-red);
}
.main-header.header-style-two .header-lower { background: transparent; }
.main-header.header-style-two .nav-outer { background: transparent; padding: 0; border-radius: 0; }
.main-header .main-menu { display: flex !important; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 72px; width: 100%; }
.main-header .main-menu .navbar-header { display: none; }
.main-header .navbar-collapse, .main-header .navbar-collapse.collapse { visibility: visible !important; display: block !important; height: auto !important; order: 1; padding: 0; }
.main-header .main-menu .navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.main-header .main-menu .navigation > li { float: none; }
.main-header .main-menu .navigation > li > a {
    color: var(--mg-ink); padding: 22px 14px 19px; font-size: 14.5px; font-weight: 700; line-height: 28px; white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.main-header .main-menu .navigation > li > a:hover, .main-header .main-menu .navigation > li:hover > a { color: var(--mg-red); border-bottom-color: var(--mg-red); }
.main-header .main-menu .navigation > li > a .fa { margin-right: 6px; }
.main-header .main-menu .navigation > li > ul {
    border-radius: 0 0 10px 10px; border-top: 3px solid var(--mg-red); box-shadow: 0 12px 26px rgba(0, 0, 0, .12); min-width: 200px; background: #fff;
}
.main-header .main-menu .navigation > li.dropdown:hover > ul { display: block !important; }
.main-header .main-menu .navigation > li > ul > li > a { color: var(--mg-ink); padding: 10px 18px; display: block; }
.main-header .main-menu .navigation > li > ul > li > a:hover { color: var(--mg-red); background: var(--mg-soft); }
.main-header .dropdown-btn { display: none; }
.main-header .login-box { order: 0; margin-left: 24px; }
.main-header .login-box .logo { display: flex; align-items: center; }
.main-header .login-box .logo img { height: 52px; max-height: 52px; width: auto; margin: 0; float: none; }
.main-header .login-box .pull-left { display: none; }
.bounce-in-header { display: none !important; } /* هدرِ تکراری؛ هدرِ اصلی خودش چسبان است */

/* ---------- اسلایدر ---------- */
.mg-hero { position: relative; overflow: hidden; background: #ddd; height: clamp(220px, 46vw, 600px); }
.mg-hero .mg-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.mg-hero .mg-slide.is-active { opacity: 1; }
.mg-hero .mg-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.mg-hero .mg-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.mg-hero .mg-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: rgba(255, 255, 255, .35); padding: 0; cursor: pointer; transition: all .2s; }
.mg-hero .mg-dots button.is-active { background: var(--mg-red); border-color: var(--mg-red); width: 26px; border-radius: 6px; }

/* ---------- درباره ---------- */
.cs-about-two { padding: 72px 0; }
.cs-about-two .row { display: flex; flex-wrap: wrap; align-items: center; }
.cs-about-two-col img { width: 100%; height: auto; border-radius: var(--mg-radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .1); }
.cs-about-two-col h2 { font-size: 26px; line-height: 1.7; margin: 0 0 14px; color: var(--mg-ink); }
.cs-about-two-col p { line-height: 2.1; text-align: justify; color: #444; font-size: 15px; margin-bottom: 22px; }
.cs-my-btn-brown, .cs-my-btn-white, body.misagh-legacy-shell .btn-default.cs-my-btn-brown {
    border-radius: 24px; padding: 10px 28px; font-weight: 700; display: inline-block;
}

/* ---------- همکاران / امکانات / مشتریان ---------- */
.cs-clients-area { padding: 56px 0; background: var(--mg-soft); }
.cs-blog-area { padding: 56px 16px; max-width: 100% !important; }
.cs-ver-section-title h2, .section-title h2 { position: relative; font-size: 26px; margin: 0 0 30px; text-align: center; color: var(--mg-red); }
.cs-ver-section-title h2:after { content: ""; display: block; width: 56px; height: 3px; background: var(--mg-red); border-radius: 2px; margin: 12px auto 0; }
.clients-carousel { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; padding: 0 16px; }
.clients-carousel .item { flex: 0 1 auto; }
.cs-clients-area .clients-carousel .item a { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--mg-radius); padding: 18px 28px; box-shadow: 0 4px 16px rgba(0, 0, 0, .05); }
.cs-clients-area .clients-carousel .item img { width: auto; max-width: min(520px, 80vw); max-height: 150px; }
.cs-blog-area .clients-carousel .item { width: min(560px, 100%); }
.cs-blog-col { background: #fff; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); overflow: hidden; box-shadow: 0 6px 20px rgba(0, 0, 0, .05); }
.cs-blog-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cs-blog-content { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cs-blog-content h4 { margin: 0; font-size: 17px; }
.cs-blog-content .btn { margin: 0 !important; }

/* ---------- صفحه‌های داخلی ---------- */
.about, .about-wrapper { min-height: 0 !important; }
body.misagh-legacy-shell main > section:first-child, body.misagh-legacy-shell main > div:first-child > section:first-child { scroll-margin-top: 90px; }

/* ---------- فوتر ---------- */
.cs-main-footer { padding: 56px 0 28px; background: var(--mg-footer); }
.cs-main-footer .row { display: flex; flex-wrap: wrap; align-items: flex-start; }
.cs-main-footer .footer-title { color: #fff !important; font-size: 19px; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--mg-red); display: inline-block; }
.cs-main-footer .cs-footer-col ul { list-style: none; padding: 0; margin: 0; }
.cs-main-footer .cs-footer-col li { color: #e6e6e6; line-height: 1.9; margin-bottom: 12px; font-size: 14.5px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cs-main-footer .cs-footer-col li .fa { color: var(--mg-red); width: 16px; text-align: center; flex: 0 0 16px; }
.cs-main-footer .cs-footer-col li b { color: #fff; font-weight: 700; }
.cs-main-footer .cs-footer-col a { color: #e6e6e6; }
.cs-main-footer .cs-footer-col a:hover { color: #fff; text-decoration: underline; }
.cs-main-footer .cs-footer-col[style*="315px"] { height: auto !important; min-height: 180px; }
.cs-main-footer .cs-footer-col img { max-height: 120px; width: auto; }
.cs-copyright-area { padding: 14px 0; background: #2f2f2f; }
.cs-copyright-area .row { display: flex; align-items: center; }
.cs-copyright-area .cs-copyright-col { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 10px; }
.cs-copyright-area h5 { color: #cfcfcf; font-size: 13px; margin: 0; line-height: 1.9; }
.cs-copyright-area h5 a { color: #ff6b7d; }
.cs-copyright-area .homa-poweredby a { color: #9a9a9a !important; }
.cs-copyright-area .row > div:last-child { display: none; }
.cs-copyright-area .row > div:first-child { flex: 1 1 100%; max-width: 100%; width: 100%; }

/* ---------- تبلت ---------- */
@media (max-width: 1199.98px) {
    .main-header .main-menu .navigation > li > a { padding: 22px 10px 19px; font-size: 14px; }
}

/* ---------- موبایل و تبلتِ کوچک: منوی کشویی ---------- */
@media (max-width: 991.98px) {
    .main-header .main-menu { min-height: 62px; }
    .main-header .main-menu .navbar-header { display: block; order: 2; }
    .main-header .main-menu .navbar-toggle {
        display: flex; flex-direction: column; justify-content: center; gap: 4px; margin: 0; float: none;
        width: 46px; height: 46px; padding: 0 12px; border-radius: 10px; background: var(--mg-red); border: 0;
    }
    .main-header .main-menu .navbar-toggle .icon-bar { display: block; width: 22px; height: 2px; background: #fff; border-radius: 1px; margin: 0 !important; }
    .main-header .login-box { order: 1; margin: 0; }
    .main-header .login-box .logo img { height: 44px; max-height: 44px; }
    .main-header .navbar-collapse, .main-header .navbar-collapse.collapse { order: 3; flex-basis: 100%; display: none !important; }
    .main-header .navbar-collapse.collapse.in, .main-header .navbar-collapse.collapsing { display: block !important; }
    .main-header .main-menu .navigation { flex-direction: column; align-items: stretch; padding: 4px 0 12px; }
    .main-header .main-menu .navigation > li > a { padding: 12px 6px; border-bottom: 1px solid var(--mg-line); }
    .main-header .main-menu .navigation > li > ul { position: static; display: block !important; box-shadow: none; border-top: 0; padding-right: 12px; opacity: 1; visibility: visible; }
    .cs-about-two { padding: 48px 0; }
    .cs-about-two-col { margin-bottom: 22px; }
    .cs-main-footer .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; width: 100%; margin-bottom: 18px; }
    .cs-main-footer .cs-footer-col[style*="315px"] { min-height: 0; justify-content: flex-start !important; }
}

@media (max-width: 767.98px) {
    .date-wrapper { font-size: 12px; padding: 4px 16px; }
    .mg-hero { height: clamp(190px, 58vw, 340px); }
    .cs-about-two-col h2 { font-size: 21px; }
    .cs-about-two-col p { font-size: 14.5px; line-height: 2; }
    .cs-ver-section-title h2, .section-title h2 { font-size: 22px; margin-bottom: 22px; }
    .cs-clients-area, .cs-blog-area { padding: 40px 0; }
    .cs-clients-area .clients-carousel .item a { padding: 14px 16px; }
    .cs-copyright-area .cs-copyright-col { flex-direction: column; text-align: center; }
    .cs-main-footer { padding: 40px 0 16px; }
}


/* منوی بازشدهٔ موبایل: سفید و خوانا، بی سقفِ ارتفاع */
@media (max-width: 991.98px) {
    .main-header .navbar-collapse, .main-header .navbar-collapse.collapse.in {
        background: #fff !important; max-height: none !important; overflow: visible !important; border: 0 !important;
        box-shadow: none !important; margin: 0 !important; width: 100% !important; padding: 0 !important;
    }
    .main-header .main-menu .navigation, .main-header .main-menu .navigation > li { background: transparent !important; width: 100%; float: none !important; }
    .main-header .main-menu .navigation > li > a { color: var(--mg-ink) !important; text-align: right !important; font-size: 15px; background: transparent !important; border-top: 0 !important; }
    .main-header .main-menu .navigation > li > ul > li > a { color: var(--mg-muted) !important; text-align: right; background: transparent !important; }
}

/* ---------- امکاناتِ ما: چهار کارتِ ساده ---------- */
.mg-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mg-feature { background: #fff; border: 1px solid var(--mg-line); border-radius: var(--mg-radius); padding: 26px 20px 22px; text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .04); display: flex; flex-direction: column; align-items: center; }
.mg-feature-icon { width: 60px; height: 60px; border-radius: 50%; background: rgba(239, 35, 60, .1); color: var(--mg-red); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 14px; }
.mg-feature h4 { font-size: 17px; margin: 0 0 10px; color: var(--mg-ink); line-height: 1.6; }
.mg-feature p { font-size: 14px; line-height: 2; color: #555; margin: 0 0 12px; }
.mg-feature-link { margin-top: auto; color: var(--mg-red); font-weight: 700; font-size: 14px; }
.mg-feature-link:hover { color: var(--mg-red-dark); }
@media (max-width: 991.98px) { .mg-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .mg-features { grid-template-columns: 1fr; gap: 14px; } }
