/* ================= پایه، فونت فارسی و صفحه فیکس بدون اسکرول ================= */
*, *::before, *::after { box-sizing: border-box; }

html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background-color: #061320;
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

body.lab-landing-body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: transparent !important;
    color: #ffffff;
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* ================= پس‌زمینه ثابت تمام صفحه ================= */
.lab-bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #061320;
}

.lab-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.lab-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(3, 14, 26, 0.92) 0%,
        rgba(3, 14, 26, 0.45) 30%,
        rgba(3, 14, 26, 0.14) 65%,
        rgba(3, 14, 26, 0.48) 100%
    );
}

/* ================= ساختار اصلی صفحه ================= */
.lab-main-container {
    width: 100%;
    height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 5% 32px;
    position: relative;
    z-index: 2;
}

/* ================= نوار بالا: لوگوی مینیمال راست + عنوان چپ ================= */
.lab-top-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.lab-site-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: rgba(8, 22, 38, 0.55);
    border: 1px solid rgba(235, 193, 74, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
}

.lab-site-logo:hover {
    transform: translateY(-2px);
    border-color: #ffd54f;
}

.lab-site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.lab-hero-content {
    text-align: left;
    direction: rtl;
    border-left: 3px solid #ebc14a;
    padding: 6px 0 6px 18px;
    background: linear-gradient(90deg, rgba(6, 19, 32, 0.52) 0%, transparent 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0 8px 8px 0;
}

.lab-hero-title {
    margin: 0 0 6px;
    font-size: clamp(19px, 2.2vw, 31px);
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
    line-height: 1.35;
}

.lab-hero-subtitle {
    margin: 0;
    font-size: clamp(12.5px, 1.05vw, 15.5px);
    font-weight: 400;
    color: #f4d36e;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ================= ردیف آیکون‌های پایین ================= */
.lab-icons-dock {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 18px 16px;
    max-width: 1200px;
}

body.lab-landing-body .lab-icon-item {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 102px;
    color: #f1f5f9 !important;
    font-family: inherit;
    text-align: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    outline: none;
}

.lab-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 1.5px solid rgba(235, 193, 74, 0.78);
    background: rgba(8, 22, 38, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(235, 193, 74, 0.08);
    transition: all 0.25s ease;
}

.lab-icon-circle svg,
.lab-icon-circle img {
    width: 30px;
    height: 30px;
    color: #ffffff;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.lab-icon-label {
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

body.lab-landing-body .lab-icon-item:hover,
body.lab-landing-body .lab-icon-item:focus-visible {
    transform: translateY(-6px);
}

body.lab-landing-body .lab-icon-item:hover .lab-icon-circle,
body.lab-landing-body .lab-icon-item:focus-visible .lab-icon-circle {
    border-color: #ffd54f;
    background: rgba(12, 34, 58, 0.88);
    box-shadow: 0 10px 26px rgba(235, 193, 74, 0.3), inset 0 0 16px rgba(235, 193, 74, 0.18);
}

/* ================= استایل پاپ‌آپ و ضربدر بستن ================= */
.lab-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lab-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.lab-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 12, 22, 0.78);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.lab-modal-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 820px;
    max-height: 86svh;
    background: rgba(10, 23, 38, 0.96);
    border: 1px solid rgba(235, 193, 74, 0.38);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.lab-modal.is-open .lab-modal-box {
    transform: translateY(0) scale(1);
}

.lab-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.lab-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffd54f;
}

/* ضربدر بستن پاپ‌آپ (مصون از تداخل استایل‌های GeneratePress) */
body.lab-landing-body button.lab-modal-close {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

body.lab-landing-body button.lab-modal-close:hover {
    background: rgba(239, 68, 68, 0.28) !important;
    border-color: rgba(239, 68, 68, 0.7) !important;
    transform: rotate(90deg);
}

.lab-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14.5px;
    line-height: 1.9;
    color: #e2e8f0;
    scrollbar-width: thin;
    scrollbar-color: rgba(235, 193, 74, 0.45) transparent;
}

/* ================= محتوای داخلی پاپ‌آپ‌ها ================= */
.sp-section { margin-bottom: 28px; }
.sp-section:last-child { margin-bottom: 0; }

.sp-heading {
    font-size: 16px;
    font-weight: 700;
    color: #ffd54f;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(235, 193, 74, 0.22);
}

.sp-intro p { margin: 0 0 12px; text-align: justify; }

/* آکاردئون زمینه‌های فعالیت */
.sp-acc-group { display: flex; flex-direction: column; gap: 10px; }
.sp-acc {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    overflow: hidden;
}
.sp-acc summary {
    padding: 13px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sp-acc summary::-webkit-details-marker { display: none; }
.sp-acc summary::after { content: '+'; font-size: 18px; color: #ffd54f; }
.sp-acc[open] summary::after { content: '−'; }
.sp-acc[open] summary { background: rgba(235, 193, 74, 0.08); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }

.sp-acc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    padding: 16px;
}
.sp-service-card {
    background: rgba(6, 17, 29, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px;
}
.sp-service-card h4 { margin: 0 0 6px; font-size: 14px; color: #f4d36e; }
.sp-service-card p { margin: 0; font-size: 13px; line-height: 1.75; color: #cbd5e1; }

/* کارت‌های تیم */
.sp-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.sp-team-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
}
.sp-team-photo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(235, 193, 74, 0.6);
    margin: 0 auto 12px;
    display: block;
    background: rgba(255, 255, 255, 0.08);
}
.sp-team-name { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #ffffff; }
.sp-team-role { margin: 0 0 6px; font-size: 13px; color: #ffd54f; font-weight: 500; }
.sp-team-edu { margin: 0; font-size: 12px; color: #94a3b8; }

/* نمای جدولی محصولات */
.sp-products-list {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}
.sp-product-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s;
}
.sp-product-row:last-child { border-bottom: none; }
.sp-product-row:hover { background: rgba(235, 193, 74, 0.06); }
.sp-product-thumb {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(235, 193, 74, 0.35);
    background: rgba(255, 255, 255, 0.06);
}
.sp-product-info h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; color: #ffd54f; }
.sp-product-info p { margin: 0; font-size: 13.5px; color: #cbd5e1; line-height: 1.75; }

/* تماس با ما و بله */
.sp-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.sp-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sp-contact-list li {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
}
.sp-contact-list strong { display: block; color: #ffd54f; margin-bottom: 4px; font-size: 13px; }
.sp-contact-list a { color: #ffffff; text-decoration: none; direction: ltr; display: inline-block; }
.sp-contact-list a:hover { color: #ffd54f; }

.sp-bale-form { display: flex; flex-direction: column; gap: 12px; }
.sp-bale-form input,
.sp-bale-form textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(5, 15, 26, 0.78);
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
}
.sp-bale-form input:focus,
.sp-bale-form textarea:focus { border-color: #ffd54f; }
body.lab-landing-body button.sp-bale-btn {
    background: linear-gradient(135deg, #27ae60, #1e8449) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px;
    padding: 12px 18px !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
body.lab-landing-body button.sp-bale-btn:hover { opacity: 0.92; }
.sp-bale-status { display: none; font-size: 12.5px; color: #4ade80; margin: 4px 0 0; }

/* ================= کاروسل دستی قابل جابجایی با ماوس و لمس ================= */
.sp-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
}

.sp-carousel-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    cursor: grab;
    padding: 8px 4px 12px;
    width: 100%;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(235, 193, 74, 0.35) transparent;
}

.sp-carousel-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.sp-logo-item {
    width: 136px;
    height: 92px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    flex-shrink: 0;
    direction: rtl;
    transition: border-color 0.2s, background 0.2s;
}

.sp-logo-item:hover {
    border-color: rgba(235, 193, 74, 0.55);
    background: rgba(255, 255, 255, 0.08);
}

.sp-logo-item img {
    max-width: 100%;
    max-height: 46px;
    object-fit: contain;
    pointer-events: none; /* جلوگیری از تداخل درگ عکس با کشیدن کاروسل */
    -webkit-user-drag: none;
}

.sp-logo-item span {
    font-size: 11.5px;
    color: #cbd5e1;
    margin-top: 6px;
    text-align: center;
}

body.lab-landing-body button.sp-carousel-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(235, 193, 74, 0.35) !important;
    color: #ffd54f !important;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}

body.lab-landing-body button.sp-carousel-btn:hover {
    background: rgba(235, 193, 74, 0.25) !important;
}

/* ================= واکنش‌گرایی موبایل و تبلت ================= */
@media (max-width: 768px) {
    .lab-main-container { padding: 20px 16px 20px; }
    .lab-site-logo { width: 48px; height: 48px; border-radius: 12px; padding: 6px; }
    .lab-hero-content { padding: 4px 0 4px 10px; }
    .lab-icons-dock {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px 8px;
        width: 100%;
    }
    body.lab-landing-body .lab-icon-item { width: 100%; }
    .lab-icon-circle { width: 52px; height: 52px; margin-bottom: 6px; }
    .lab-icon-circle svg, .lab-icon-circle img { width: 24px; height: 24px; }
    .lab-icon-label { font-size: 11px; }
    .sp-contact-grid { grid-template-columns: 1fr; }
    .sp-product-row { align-items: flex-start; }
    body.lab-landing-body button.sp-carousel-btn { display: none; } /* در موبایل با لمس اسکرول می‌شود */
}

@media (max-width: 480px) {
    .lab-icons-dock { grid-template-columns: repeat(3, 1fr); }
}

@media (max-height: 540px) {
    html, body.lab-landing-body { overflow-y: auto; height: auto; min-height: 100svh; }
    .lab-main-container { height: auto; min-height: 100svh; gap: 28px; }
}