/**
 * استایل صفحه‌ی اختصاصی شرکت (single-company.php)
 * مسیر پیشنهادی: assets/css/single-company.css در چایلد تم
 */

.qc-company-page {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    max-width: 1400px;
    margin: 0 auto;
    
}

/* اگه خود قالب (GeneratePress) یه محدودیت عرض کوچیک‌تر رو container اصلی گذاشته باشه،
   این override می‌کنه تا واقعاً به ۱۴۰۰px برسیم، نه فقط تو CSS خودمون */
.content-area,
#content,
#primary,
.site-content,
.site-main-content,
.inside-article,
article.type-company {
    max-width: 1400px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ===================== Breadcrumb ===================== */
.qc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #8A8D97;
    margin: 20px 0 4px;
    padding-top: 40px;
}
.qc-breadcrumb a {
    color: #8A8D97;
    text-decoration: none;
}
.qc-breadcrumb a:hover {
    color: #185FA5;
}
.qc-breadcrumb-sep {
    color: #C9CBD3;
}
.qc-breadcrumb-current {
    color: #042C53;
    font-weight: 600;
}

/* ===================== هیرو ===================== */
.qc-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    margin: 24px 0 20px;
    padding: 26px 40px;
    background: linear-gradient(120deg, #061031 0%, #0B1B49 55%, #16244F 100%);
}
.qc-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.qc-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
}
.qc-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(270deg, rgba(10,10,14,0.78) 0%, rgba(10,10,14,0.62) 55%, rgba(10,10,14,0.4) 100%);
}
.qc-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    gap: 24px;
    flex-wrap: wrap;
}
.qc-hero-text { flex: 1; min-width: 260px; }
.qc-hero-text h1 {
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 12px;
}
.qc-hero-tagline {
    color: rgba(255,255,255,0.82);
    font-size: 15px;
    line-height: 1.9;
    text-align: justify;
    max-width: 560px;
    margin: 0 0 26px;
}
.qc-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.qc-hero-icons { display: flex; gap: 10px; }
.qc-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.qc-icon-circle svg { width: 18px; height: 18px; }
.qc-icon-circle:hover { background: rgba(255,255,255,0.28); }

.qc-catalog-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #042C53;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
}
.qc-catalog-btn svg { width: 16px; height: 16px; }
.qc-catalog-btn:hover { background: #E6F1FB; }

.qc-hero-logo-box {
    background: #fff;
    border-radius: 16px;
    padding: 18px 22px;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.qc-hero-logo-box img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin: 0 auto 8px;
    display: block;
}
.qc-hero-logo-box span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #042C53;
}

@media (max-width: 700px) {
    .qc-hero { flex-direction: column; padding: 28px 20px; }
    .qc-hero-inner { flex-direction: column-reverse; align-items: center; text-align: center; }
    .qc-hero-actions { justify-content: center; }

    /* همه‌ی باکس‌ها/کارت‌ها دقیقاً ۵px از کناره‌ها فاصله داشته باشن، نه کمتر نه بیشتر */
    .qc-company-page {
        padding-left: 5px !important;
        padding-right: 5px !important;
        box-sizing: border-box !important;
    }
    .qc-hero,
    .qc-stats,
    .qc-info-grid,
    .qc-gallery-section,
    .qc-video-section,
    .qc-products-section,
    .qc-cta-bar {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* فونت اسم شرکت کوچیک‌تر بشه */
    .qc-hero-text h1 {
        font-size: 20px !important;
    }

    .qc-cta-bar {
        padding: 18px 16px !important;
    }
}

/* ===================== آمار ===================== */
.qc-stats {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(20,30,60,0.06);
    margin-bottom: 24px;
}
.qc-stat {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 20px 10px;
    position: relative;
}
.qc-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: #E4E2DA;
}
.qc-stat-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
}
.qc-stat-icon svg { width: 100%; height: 100%; }
.qc-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #042C53;
}
.qc-stat-label {
    display: block;
    font-size: 12px;
    color: #5F5E5A;
    margin-top: 2px;
}

/* ===================== اطلاعات تماس / درباره / چرا ما ===================== */
.qc-info-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1.4fr;
    gap: 20px;
    margin-bottom: 32px;
    align-items: stretch;
}
@media (max-width: 900px) {
    .qc-info-grid { grid-template-columns: 1fr; }
}

.qc-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(20,30,60,0.06);
}
.qc-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: #042C53;
    margin: 0 0 16px;
}

.qc-contact-list { list-style: none; margin: 0; padding: 0; }
.qc-contact-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #33363F;
    margin-bottom: 12px;
}
.qc-contact-list a { color: #33363F; text-decoration: none; }
.qc-contact-list a:hover { color: #185FA5; }
.qc-mini-icon { font-size: 14px; }

.qc-social-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.qc-social-row a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E6F1FB;
    color: #185FA5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
    font-weight: 700;
}
.qc-social-row a:hover { background: #185FA5; color: #fff; }

.qc-about-text { font-size: 14px; line-height: 2; text-align: justify; color: #33363F; }

.qc-whyus-list { list-style: none; margin: 0; padding: 0; }
.qc-whyus-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13.5px;
    color: #33363F;
    margin-bottom: 12px;
}
.qc-whyus-list svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.qc-whyus-list li span { flex: 1; text-align: justify; }
.qc-whyus-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: #042C53;
    margin: 0 0 16px;
}

/* ===================== گالری ===================== */
.qc-gallery-section, .qc-video-section, .qc-products-section {
    margin-bottom: 32px;
}
.qc-gallery-section h3, .qc-video-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: #042C53;
    margin-bottom: 14px;
}
.qc-gallery-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}
.qc-gallery-item {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    height: 150px;
}
.qc-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qc-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}
.qc-gallery-dots span {
    width: 7px; height: 7px; border-radius: 50%; background: #D3D1C7;
    cursor: pointer;
    transition: background .15s, width .15s;
}
.qc-gallery-dots span.is-active {
    background: #185FA5;
    width: 18px;
    border-radius: 4px;
}

/* ===================== ویدیو ===================== */
.qc-video-wrapper {
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}
.qc-video-wrapper video,
.qc-video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    border: 0;
}

/* ===================== گالری ویدیو (جدا از گالری عکس) ===================== */
.qc-video-track {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.qc-video-item {
    flex: 0 1 360px;
    max-width: 360px;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
}
.qc-video-item iframe,
.qc-video-item video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* ===================== محصولات شرکت ===================== */
.qc-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.qc-section-heading h3 { font-size: 17px; font-weight: 700; color: #042C53; margin: 0; }
.qc-see-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #185FA5;
    background: #F3F5F9;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
}
.qc-see-all:hover {
    background: #185FA5;
    color: #fff;
}

.qc-products-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.qc-product-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E4E2DA;
    padding: 12px;
    text-align: center;
}

/* ===================== گرید محصولات شرکت (۵ ستونه، همه پشت هم) ===================== */
.qc-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) {
    .qc-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .qc-products-grid { grid-template-columns: repeat(2, 1fr); }
}
.qc-product-card a { text-decoration: none; color: inherit; }
.qc-product-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #F3F5F9;
}
.qc-product-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}
.qc-product-cat {
    display: inline-block;
    font-size: 11px;
    color: #0C447C;
    background: #E6F1FB;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 6px;
}
.qc-product-card h4 { font-size: 13.5px; margin: 0 0 10px; color: #042C53; }
.qc-product-view-btn {
    display: block;
    font-size: 12.5px;
    padding: 7px;
    border-radius: 8px;
    background: #F3F5F9;
    color: #042C53;
    text-decoration: none;
}
.qc-product-view-btn:hover { background: #185FA5; color: #fff; }
.qc-no-products { color: #5F5E5A; font-size: 14px; }

/* ===================== CTA پایانی ===================== */
.qc-cta-bar {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #E6F1FB;
    border-radius: 16px;
    padding: 22px 28px;
    flex-wrap: wrap;
}
.qc-cta-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.qc-cta-icon svg { width: 22px; height: 22px; }
.qc-cta-text { flex: 1; min-width: 200px; font-size: 14px; color: #042C53; margin: 0; }
.qc-cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.qc-btn-outline {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #185FA5;
    color: #185FA5;
    text-decoration: none;
    font-size: 13.5px;
    background: #fff;
}
.qc-btn-outline:hover { background: #185FA5; color: #fff; }
.qc-btn-solid {
    padding: 10px 20px;
    border-radius: 8px;
    background: #042C53;
    color: #fff !important;
    text-decoration: none;
    font-size: 13.5px;
}
.qc-btn-solid:hover {
    background: #0C447C;
    color: #fff !important;
}

/* ===================== لایت‌باکس نمایش تصویر بزرگ ===================== */
.qc-gallery-item img.qc-lightbox-trigger {
    cursor: zoom-in;
    transition: transform .2s ease;
}
.qc-gallery-item img.qc-lightbox-trigger:hover {
    transform: scale(1.03);
}

.qc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6, 16, 49, 0.85);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.qc-lightbox.is-open {
    display: flex;
}
.qc-lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.qc-lightbox-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #042C53;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.qc-lightbox-close:hover { background: #fff; }

/* دکمه‌ی بزرگ‌نمایی روی هر ویدیو */
.qc-video-item { position: relative; }
.qc-video-expand {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(6,16,49,0.55);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.qc-video-expand:hover { background: rgba(6,16,49,0.8); }
.qc-video-expand svg { width: 16px; height: 16px; }

/* لایت‌باکس ویدیو (باکس بزرگ‌تر، نسبت ۱۶:۹) */
.qc-video-lightbox-body {
    width: min(92vw, 900px);
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.qc-video-lightbox-body iframe,
.qc-video-lightbox-body video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* ===================== نمایش بیشتر/کمتر (فقط موبایل) ===================== */
@media (max-width: 700px) {
    .qc-collapsible {
        position: relative;
        max-height: 130px;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .qc-collapsible.is-expanded {
        max-height: 2000px;
    }
    .qc-collapsible.has-toggle:not(.is-expanded)::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
        height: 44px;
        background: linear-gradient(to top, #fff, rgba(255,255,255,0));
    }
    .qc-readmore-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-top: 10px;
        background: none;
        border: none;
        color: #185FA5;
        font-size: 13px;
        font-weight: 600;
        font-family: inherit;
        padding: 0;
        cursor: pointer;
    }
    .qc-readmore-btn svg {
        width: 14px;
        height: 14px;
        transition: transform .2s ease;
    }
    .qc-collapsible.is-expanded + .qc-readmore-btn svg {
        transform: rotate(180deg);
    }
}
/* دسکتاپ: هیچ کوتاه‌سازی‌ای اعمال نشه و دکمه هم اصلاً دیده نشه */
@media (min-width: 701px) {
    .qc-readmore-btn { display: none !important; }
}