/* فونت استعداد — کاملاً محلی، بدون هیچ درخواست خارجی */
@font-face {
    font-family: 'Estedad';
    src: url('../../fonts/Estedad-Light-1.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('../../fonts/Estedad-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('../../fonts/Estedad-Medium-1.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('../../fonts/Estedad-SemiBold-1.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Estedad';
    src: url('../../fonts/Estedad-Bold-1.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* وزن‌های ۸۰۰ و ۹۰۰ فایل جدا ندارند؛ به Bold نگاشت می‌شوند تا واقعی بمانند */
@font-face {
    font-family: 'Estedad';
    src: url('../../fonts/Estedad-Bold-1.woff2') format('woff2');
    font-weight: 800 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #ffb100;
    --primary-hover: #e09b00;
    --bg-color: #fdfaf6;
    --text-main: #1d1d1f;
    --text-light: #777;
    --border-color: #eaeaea;
    --dark-card: #181c25;
    --card-bg: #ffffff;

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
    --shadow-3d: 0 15px 35px rgba(0,0,0,0.1), 0 3px 10px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Estedad', Tahoma, sans-serif; }
/* overflow-x: clip جلوی اسکرول افقی را می‌گیرد بدون شکستن position:sticky سربرگ */
html { overflow-x: clip; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-x: clip; max-width: 100%; overflow-wrap: break-word; }
img, svg, video, iframe { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { width: 100%; max-width: 1250px; margin: 0 auto; padding: 0 20px; }

/* Typography & Badges */
.section-header { text-align: center; margin: 100px 0 50px; }
.section-header h2 { font-size: 2.2rem; margin-top: 15px; font-weight: 900; letter-spacing: -1px; }
.badge { padding: 6px 16px; border-radius: 30px; font-size: 13px; font-weight: bold; display: inline-flex; align-items: center; gap: 5px; box-shadow: var(--shadow-sm); }

/* Buttons */
.btn { padding: 14px 30px; border-radius: 14px; font-weight: bold; cursor: pointer; border: none; transition: all 0.3s ease; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; justify-content: center;}
a.btn, a.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #ffc107, #ff9800); color: #000; box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4); }
.btn-outline { background: #fff; border: 1px solid var(--border-color); color: #333; }
.btn-outline:hover { background: #f9f9f9; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* 1. Header */
.imanet-site-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; position: sticky; top: 0; background: rgba(253, 250, 246, 0.85); backdrop-filter: blur(12px); z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.02); }
.logo a { font-size: 26px; font-weight: 900; color: #000; display: flex; align-items: center; gap: 8px; }
.logo span { background: var(--primary); width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; border-radius: 8px; font-size: 18px; box-shadow: 0 4px 10px rgba(255,177,0,0.4); }
.nav-links { display: flex; gap: 35px; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }
.header-actions { display: flex; gap: 12px; }

/* مگامنوی «خدمات ما» — دسکتاپ */
.nav-links > li.menu-item-has-children { position: relative; }
.nav-links > li.menu-item-has-children > a { display: flex; align-items: center; gap: 5px; }
.nav-links > li.menu-item-has-children > a::after {
    content: '';
    width: 5px; height: 5px;
    border-inline-end: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
    transition: transform 0.25s ease;
    flex: none;
}
@media (min-width: 993px) {
    .nav-links > li.menu-item-has-children:hover > a::after,
    .nav-links > li.menu-item-has-children:focus-within > a::after,
    .nav-links > li.menu-item-has-children.is-open > a::after { transform: rotate(225deg); margin-top: 3px; }

    .nav-links .sub-menu {
        position: absolute; top: 100%; right: 50%;
        margin-top: 14px;
        transform: translateX(50%) translateY(0);
        width: 640px;
        background: #fff;
        border-radius: 20px;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 14px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        opacity: 0; visibility: hidden; pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 1100;
    }
    /* پل نامرئی روی فاصله‌ی بالای پنل تا لینک، تا هاور موس قطع نشود */
    .nav-links li.menu-item-has-children::after {
        content: ''; position: absolute; top: 100%; right: 0; left: 0; height: 14px;
    }
    .nav-links li.menu-item-has-children:hover > .sub-menu,
    .nav-links li.menu-item-has-children:focus-within > .sub-menu,
    .nav-links li.menu-item-has-children.is-open > .sub-menu {
        opacity: 1; visibility: visible; pointer-events: auto;
        transform: translateX(50%) translateY(0);
    }
    .sub-menu li { padding: 0 !important; border: 0 !important; }
    .sub-menu a {
        display: flex; align-items: center; gap: 13px;
        padding: 12px 14px; border-radius: 14px;
        font-weight: 600; font-size: 14px; color: var(--text-main);
        transition: background 0.2s ease;
    }
    .sub-menu a:hover { background: var(--bg-color); color: var(--text-main); }
    .sub-menu a::before {
        content: ''; flex: none; width: 40px; height: 40px;
        border-radius: 11px; display: flex; align-items: center; justify-content: center;
        font-size: 18px;
    }
    .sub-menu li:nth-child(1) a::before { content: '🏠'; background: #e8f5e9; }
    .sub-menu li:nth-child(2) a::before { content: '🛡️'; background: #e3f2fd; }
    .sub-menu li:nth-child(3) a::before { content: '✚'; background: #e0f7fa; }
    .sub-menu li:nth-child(4) a::before { content: '🏗️'; background: #eceff1; }
    .sub-menu li:nth-child(5) a::before { content: '⚖️'; background: #ede7f6; }
    .sub-menu li:nth-child(6) a::before { content: '🖥️'; background: #fce4ec; }
}

/* 2. Hero Section */
.hero-section { position: relative; overflow-x: clip; background-image: linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px); background-size: 50px 50px; padding: 60px 0 20px; min-height: 90vh; display: flex; flex-direction: column; justify-content: center; }
.hero-section::before { content: ''; position: absolute; top: 10%; right: 20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,177,0,0.05) 0%, transparent 60%); z-index: -1; pointer-events: none; }
.hero-layout { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-bottom: 60px; }
.hero-content { flex: 1.2; }
.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; }
.image-placeholder { width: 100%; max-width: 450px; height: 450px; background: #fff; border-radius: 30px; box-shadow: var(--shadow-lg); display: flex; justify-content: center; align-items: center; color: #aaa; border: 2px dashed #ddd; transition: transform 0.4s ease; }
.image-placeholder:hover { transform: translateY(-10px) rotateY(-5deg); }
.imanet-hero-illustration { width: 100%; max-width: 500px; height: auto; display: block; filter: drop-shadow(0 30px 45px rgba(201, 126, 26, 0.12)); transition: transform 0.4s ease; }
.imanet-hero-illustration:hover { transform: translateY(-10px); }
.hero-content h1 { font-size: 3.2rem; font-weight: 900; line-height: 1.4; margin-bottom: 20px; }
.hero-content h1 span { color: var(--primary); text-shadow: 2px 2px 0 rgba(255,177,0,0.2); }
.hero-content p { color: var(--text-light); font-size: 1.1rem; margin-bottom: 40px; max-width: 600px; line-height: 1.8; }

/* Marquee */
.marquee-section { text-align: center; margin-top: 20px; padding-top: 30px; }
.marquee-title { font-size: 13px; color: #888; margin-bottom: 20px; font-weight: bold; }
.marquee-wrapper { width: 100%; overflow: hidden; position: relative; display: flex; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee { display: flex; width: max-content; animation: scroll-left 40s linear infinite; padding: 10px 0; }
.marquee-content { display: flex; gap: 15px; padding-right: 15px; }
.platform-tag { background: #fff; border: 1px solid var(--border-color); padding: 8px 20px; border-radius: 20px; font-size: 13px; color: #555; white-space: nowrap; box-shadow: var(--shadow-sm); transition: 0.3s; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }

/* 3. Categories Grid */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.service-card { background: var(--card-bg); border-radius: 28px; padding: 35px; text-align: center; box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.02); transition: all 0.4s ease; border-top: 5px solid transparent;}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.icon-3d { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 22px; display: flex; justify-content: center; align-items: center; font-size: 35px; }

/* 4. How it works (Timeline) */
.timeline { display: flex; justify-content: space-between; position: relative; margin: 60px 0; text-align: center; }
.timeline::before { content: ''; position: absolute; top: 35px; left: 10%; right: 10%; height: 2px; background: linear-gradient(to left, #e0e0e0, #ffb100, #e0e0e0); z-index: 0; }
.timeline-step { position: relative; z-index: 1; width: 22%; background: var(--bg-color); padding: 0 10px; }
.step-icon { width: 70px; height: 70px; margin: 0 auto 20px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; box-shadow: var(--shadow-md); position: relative; }
.step-number { position: absolute; top: -10px; left: -10px; background: #fff; color: #000; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: bold; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.timeline-step h3, .timeline-step h4 { font-size: 1.1rem; margin-bottom: 10px; }
.timeline-step p { font-size: 0.9rem; color: var(--text-light); }

/* 5. Bento Grid (Main Services) */
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento-item { border-radius: 35px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; transition: 0.4s; position: relative; overflow: hidden; box-shadow: var(--shadow-md); }
.bento-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-3d); }

.bento-1 { grid-column: span 1; background: #fff; border: 1px solid #f0f0f0; }
.bento-2 { grid-column: span 2; background: var(--dark-card); color: #fff; }
.bento-3 { grid-column: span 2; background: #fff; border-top: 5px solid #00c853; }
.bento-4 { grid-column: span 1; background: #fff; border-top: 5px solid #2196f3; }

.check-list { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.check-list li { background: rgba(255,255,255,0.08); padding: 8px 15px; border-radius: 10px; font-size: 12px; border: 1px solid rgba(255,255,255,0.1); }
.bento-2 .check-list li { color: #e0e0e0; }

.tag-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tag-gray { background: #f5f5f5; padding: 10px 15px; border-radius: 12px; font-size: 12px; font-weight: bold; border: 1px solid #eee; }
.tag-cyan { background: #e0f7fa; color: #00838f; padding: 6px 15px; border-radius: 20px; font-size: 12px; }

/* 6. Tools / Pricing */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); gap: 30px; }
.pricing-list { background: #fff; border-radius: 28px; padding: 35px; box-shadow: var(--shadow-md); }
.tool-item { display: flex; justify-content: space-between; align-items: center; padding: 18px; background: #fdfdfd; border: 1px solid #f0f0f0; border-radius: 16px; margin-bottom: 12px; transition: 0.3s; }
.tool-item:hover { transform: translateX(-5px); box-shadow: var(--shadow-sm); }
.tool-price { color: #d81b60; font-size: 14px; font-weight: bold; background: #fce4ec; padding: 6px 12px; border-radius: 10px; }

/* 7. Customer Reviews */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; margin-top: 40px; }
.review-card { background: #fff; padding: 30px; border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); display: flex; flex-direction: column; justify-content: space-between; }
.stars { color: #ffca28; font-size: 18px; margin-bottom: 15px; }
.review-text { color: #444; font-size: 14px; line-height: 1.8; margin-bottom: 25px; font-style: italic; }
.review-author { display: flex; align-items: center; justify-content: space-between; }
.author-info strong { display: block; font-size: 14px; }
.author-info span { font-size: 12px; color: #888; }
.author-avatar { width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; font-size: 18px; }

/* Final Split CTA */
.cta-container { display: grid; grid-template-columns: 1fr 1fr; border-radius: 40px; overflow: hidden; margin: 100px 0; box-shadow: var(--shadow-3d); }
.cta-dark { background: var(--dark-card); padding: 60px; color: #fff; }
.cta-light { background: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.stat-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); padding: 25px; border-radius: 20px; text-align: center; }

/* 8. Footer */
footer { background: #f9f9f9; padding: 60px 0 20px; border-top: 1px solid #eaeaea; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }
.footer-col h2, .footer-col h4 { font-size: 16px; margin-bottom: 20px; color: #000; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-light); font-size: 14px; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--primary); }
.support-box { background: #fffde7; border: 1px solid #fff59d; padding: 20px; border-radius: 16px; text-align: center; }
.support-box strong { display: block; color: #f57f17; margin-bottom: 10px; font-size: 14px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #eee; color: #aaa; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }

/* Mobile navigation menu */
.imanet-nav-toggle { display: none; }
.imanet-nav-wrap { display: contents; } /* دسکتاپ: فرزندان مستقیماً در فلکس سربرگ می‌نشینند */

/* Responsive */
@media (max-width: 992px) {
    .hero-layout, .timeline { flex-direction: column; }
    .timeline::before { display: none; }
    .timeline-step { width: 100%; margin-bottom: 30px; }
    .bento-grid > div { grid-column: span 3 !important; }
    .cta-container, .footer-grid { grid-template-columns: 1fr; }

    .imanet-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
    }
    .imanet-nav-toggle span {
        width: 24px;
        height: 2px;
        background: #181c25;
        border-radius: 2px;
        transition: 0.3s ease;
    }
    .imanet-nav-open .imanet-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .imanet-nav-open .imanet-nav-toggle span:nth-child(2) { opacity: 0; }
    .imanet-nav-open .imanet-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .imanet-nav-wrap {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 20px;
        background: rgba(253, 250, 246, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid rgba(0,0,0,0.05);
        box-shadow: var(--shadow-md);
    }
    .imanet-nav-open .imanet-nav-wrap { display: flex; }
    .imanet-nav-wrap .nav-links { flex-direction: column; gap: 0; }
    .imanet-nav-wrap .nav-links li { padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
    .imanet-nav-wrap .header-actions { flex-direction: column; gap: 10px; margin-top: 16px; }
    .imanet-nav-wrap .header-actions .btn { width: 100%; }

    /* مگامنو در موبایل: آکاردئون ساده به‌جای گرید */
    .imanet-nav-wrap .nav-links > li.menu-item-has-children { flex-direction: column; align-items: stretch; }
    .imanet-nav-wrap .nav-links > li.menu-item-has-children > a { justify-content: space-between; }
    .imanet-nav-wrap .sub-menu {
        display: none;
        margin: 10px 0 0;
        padding-inline-start: 6px;
        border-inline-start: 2px solid rgba(255,177,0,0.3);
    }
    .imanet-nav-wrap li.menu-item-has-children.is-open .sub-menu { display: flex; flex-direction: column; gap: 2px; }
    .imanet-nav-wrap .sub-menu li { border-bottom: 0 !important; padding: 9px 0 9px 14px !important; }
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .section-header { margin: 70px 0 40px; }
    .section-header h2 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 2.4rem; }
    .cta-dark, .cta-light { padding: 40px 28px; }
}

@media (max-width: 560px) {
    .container { padding: 0 16px; }
    /* گریدهای با حداقل‌عرض ثابت را روی صفحهٔ باریک تک‌ستونه کن تا سرریز افقی نشود */
    .grid-4, .grid-2, .reviews-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .section-header { margin: 55px 0 30px; }
    .section-header h2 { font-size: 1.55rem; }
    .service-card, .pricing-list, .review-card { padding: 26px; }
    .bento-item { padding: 30px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .cta-dark, .cta-light { padding: 32px 22px; }
    .cta-container { margin: 60px 0; border-radius: 28px; }
    .footer-grid { gap: 30px; }
    .imanet-footer-company-row { flex-direction: column; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
/* Extracted Inline Styles (No inline styles allowed in markup) */
.btn-sm { padding: 10px 20px !important; }
.imanet-footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.imanet-logo-mb { margin-bottom: 20px; }
.imanet-logo-link { font-size: 24px; font-weight: 900; color: #000; display: flex; align-items: center; gap: 8px; }
.imanet-logo-icon { background: var(--primary); width: 25px; height: 25px; display: flex; justify-content: center; align-items: center; border-radius: 6px; font-size: 14px; color: #000; }
.imanet-footer-desc { color: var(--text-light); font-size: 13px; line-height: 2; }
.imanet-footer-company-row { display: flex; justify-content: space-between; align-items: flex-start; }
.imanet-telegram-link { color: #333; font-weight: bold; display: flex; align-items: center; gap: 5px; font-size: 14px; }
.imanet-footer-legal { display: flex; gap: 15px; }
/* پیوند پرش به محتوا (دسترس‌پذیری) */
.imanet-skip-link {
    position: absolute;
    top: -100px;
    right: 10px;
    z-index: 100000;
    background: #181c25;
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 8px 8px;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.2s ease;
}
.imanet-skip-link:focus { top: 0; }

/* برگهٔ عمومی */
.imanet-page-wrap { padding: 40px 20px; }
.imanet-page-header h1 { font-size: 2rem; font-weight: 900; margin-bottom: 25px; }

/* دکمهٔ بازگشت در صفحهٔ ۴۰۴ */
.imanet-404-home { margin-top: 20px; }

/*
 * صفحه‌بندی — هم paginate_links() در وبلاگ/آرشیو/جست‌وجو (imanet-blog.css)
 * و هم wp_link_pages() برای پست‌های چندبرگه‌ای در page.php/single.php از این
 * کلاس استفاده می‌کنند؛ چون page.php هرگز imanet-blog.css را بارگذاری
 * نمی‌کند، این قاعده باید در فایل همیشه‌بارگذاری‌شده بماند.
 */
.imanet-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 56px; }
.imanet-pagination .page-numbers {
    min-width: 42px; height: 42px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px; border: 1px solid var(--border-color); background: var(--card-bg);
    color: var(--text-main); font-weight: 700; font-size: 14px; text-decoration: none;
    transition: all 0.25s ease;
}
.imanet-pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary-hover); }
.imanet-pagination .page-numbers.current { background: linear-gradient(135deg, #ffc107, #ff9800); color: #1d1d1f; border-color: transparent; }
.imanet-pagination .page-numbers.dots { border: none; background: none; }
.imanet-pagination a { font-weight: 700; color: var(--text-main); text-decoration: none; }
.imanet-pagination a:hover { color: var(--primary-hover); }

/*
 * تایپوگرافی محتوای the_content() — برگه‌های عادی (page.php) و تک‌پست (single.php).
 * اینجا و نه در imanet-blog.css، چون page.php هرگز آن استایل‌شیت را صف‌بندی نمی‌کند
 * (شرط enqueue_assets فقط پست/آرشیو/جست‌وجو/۴۰۴ را پوشش می‌دهد) و این تایپوگرافی
 * باید روی هر برگهٔ عادی هم کار کند، نه فقط وبلاگ.
 */
.imanet-page-content,
.imanet-single-content { font-size: 16px; line-height: 1.95; color: var(--text-main); }

.imanet-page-content > *:first-child,
.imanet-single-content > *:first-child { margin-top: 0; }
.imanet-page-content > *:last-child,
.imanet-single-content > *:last-child { margin-bottom: 0; }

.imanet-page-content p,
.imanet-single-content p { margin: 0 0 22px; }

.imanet-page-content h2,
.imanet-single-content h2 { font-size: 1.6rem; font-weight: 900; margin: 46px 0 18px; letter-spacing: -0.3px; }
.imanet-page-content h3,
.imanet-single-content h3 { font-size: 1.3rem; font-weight: 800; margin: 36px 0 14px; }
.imanet-page-content h4,
.imanet-single-content h4 { font-size: 1.1rem; font-weight: 800; margin: 28px 0 12px; }

.imanet-page-content a,
.imanet-single-content a { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.imanet-page-content a:hover,
.imanet-single-content a:hover { color: var(--primary); }

.imanet-page-content strong,
.imanet-single-content strong { font-weight: 800; }

.imanet-page-content ul,
.imanet-page-content ol,
.imanet-single-content ul,
.imanet-single-content ol { margin: 0 0 22px; padding-inline-start: 26px; display: flex; flex-direction: column; gap: 8px; }
.imanet-page-content ul,
.imanet-single-content ul { list-style: disc; }
.imanet-page-content ol,
.imanet-single-content ol { list-style: decimal; }
.imanet-page-content li,
.imanet-single-content li { line-height: 1.9; }

.imanet-page-content blockquote,
.imanet-single-content blockquote {
    margin: 30px 0; padding: 20px 26px; border-inline-start: 4px solid var(--primary);
    background: var(--bg-color); border-radius: 0 16px 16px 0; color: var(--text-light);
    font-size: 15.5px; line-height: 1.9;
}
.imanet-page-content blockquote p:last-child,
.imanet-single-content blockquote p:last-child { margin-bottom: 0; }

.imanet-page-content img,
.imanet-single-content img { max-width: 100%; height: auto; border-radius: 18px; margin: 10px 0; display: block; }
.imanet-page-content figure,
.imanet-single-content figure { margin: 30px 0; }
.imanet-page-content figcaption,
.imanet-single-content figcaption { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 10px; }

.imanet-page-content hr,
.imanet-single-content hr { border: none; border-top: 1px solid var(--border-color); margin: 40px 0; }

.imanet-page-content code,
.imanet-single-content code { background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 6px; padding: 2px 7px; font-size: 0.9em; direction: ltr; display: inline-block; }
.imanet-page-content pre,
.imanet-single-content pre { background: var(--dark-card); color: #eee; border-radius: 16px; padding: 20px 22px; overflow-x: auto; margin: 0 0 22px; direction: ltr; text-align: left; }
.imanet-page-content pre code,
.imanet-single-content pre code { background: none; border: none; padding: 0; color: inherit; }

.imanet-page-content table,
.imanet-single-content table { width: 100%; border-collapse: collapse; margin: 0 0 26px; font-size: 14.5px; }
.imanet-page-content th,
.imanet-page-content td,
.imanet-single-content th,
.imanet-single-content td { border: 1px solid var(--border-color); padding: 10px 14px; text-align: right; }
.imanet-page-content th,
.imanet-single-content th { background: var(--bg-color); font-weight: 700; }

@media (max-width: 560px) {
    .imanet-page-content,
    .imanet-single-content { font-size: 15px; }
    .imanet-page-content h2,
    .imanet-single-content h2 { font-size: 1.35rem; }
    .imanet-page-content h3,
    .imanet-single-content h3 { font-size: 1.15rem; }
}

/* مگامنوی «افزونه‌ها»: تب دسته‌ها سمت راست، لینک محصولات سمت چپ (فقط دسکتاپ) */
.imanet-mega-panel { display: none; }

@media (min-width: 993px) {
    .nav-links > li.imanet-mega { position: static; }
    .imanet-mega-panel {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 50%;
        width: min(940px, 100%);
        margin-top: 10px;
        background: #fff;
        border: 1px solid var(--border-color);
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, 8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }
    .nav-links > li.imanet-mega:hover > .imanet-mega-panel,
    .nav-links > li.imanet-mega:focus-within > .imanet-mega-panel,
    .nav-links > li.imanet-mega.is-open > .imanet-mega-panel {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
    }
    .nav-links > li.imanet-mega:hover > a::after,
    .nav-links > li.imanet-mega:focus-within > a::after { transform: rotate(225deg); margin-top: 3px; }
}

.imanet-mega-banner { line-height: 0; background: var(--dark-card); }
.imanet-mega-banner img { display: block; width: 100%; height: 100px; object-fit: cover; object-position: center 30%; }
.imanet-mega-main { display: flex; height: min(316px, calc(100vh - 330px)); min-height: 190px; }
.imanet-mega-tabs { flex: 0 0 260px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 0; background: var(--bg-color); border-inline-end: 1px solid var(--border-color); }
.imanet-mega-tab {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 18px;
    border-inline-end: 3px solid transparent;
    color: var(--text-main);
    font-size: 14px; font-weight: 600;
    transition: background 0.2s, border-color 0.2s;
}
.imanet-mega-tab-ico {
    width: 32px; height: 32px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--border-color); border-radius: 10px;
    font-size: 18px;
}
.imanet-mega-tab.is-active,
.imanet-mega-tab:hover { background: rgba(255, 177, 0, 0.12); border-inline-end-color: var(--primary); color: var(--text-main); }

.imanet-mega-body { flex: 1; min-width: 0; min-height: 0; padding: 18px 24px; display: flex; flex-direction: column; overflow: hidden; }
.imanet-mega-pane { display: none; flex-direction: column; flex: 1; min-height: 0; }
.imanet-mega-pane.is-active { display: flex; }
.imanet-mega-head { flex: none; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); color: var(--text-light); font-size: 14px; }
.imanet-mega-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: min-content; align-content: start; gap: 4px 18px; margin: 0 0 12px; padding: 0; list-style: none; }
.imanet-mega-list a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 12px;
    color: var(--text-main); font-size: 14px; font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.imanet-mega-list a:hover { background: rgba(255, 177, 0, 0.12); color: #7a5200; }
.imanet-mega-ico {
    width: 34px; height: 34px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 177, 0, 0.14); color: #b87400; border-radius: 10px;
}
.imanet-mega-all {
    flex: none; align-self: flex-start; margin-top: auto;
    padding: 8px 22px; border: 1px solid var(--border-color); border-radius: 12px;
    color: var(--text-main); font-size: 13px; font-weight: 600;
    transition: border-color 0.2s, background 0.2s;
}
.imanet-mega-all:hover { border-color: var(--primary); background: rgba(255, 177, 0, 0.12); }

/* اسکرول هم‌رنگ تم */
.imanet-mega-list, .imanet-mega-tabs { scrollbar-width: thin; scrollbar-color: var(--primary) transparent; }
.imanet-mega-list::-webkit-scrollbar, .imanet-mega-tabs::-webkit-scrollbar { width: 6px; }
.imanet-mega-list::-webkit-scrollbar-track, .imanet-mega-tabs::-webkit-scrollbar-track { background: transparent; }
.imanet-mega-list::-webkit-scrollbar-thumb, .imanet-mega-tabs::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 6px; }
.imanet-mega-list::-webkit-scrollbar-thumb:hover, .imanet-mega-tabs::-webkit-scrollbar-thumb:hover { background: var(--primary-hover); }

/* موبایل و تبلت: بدون پنل شناور؛ فقط فهرست دسته‌ها زیر «محصولات» در منوی کشویی */
@media (max-width: 992px) {
    .imanet-mega-panel { display: block; position: static; }
    .imanet-mega-banner, .imanet-mega-body { display: none; }
    .imanet-mega-main { display: block; height: auto; min-height: 0; }
    .imanet-mega-tabs { flex: none; overflow: visible; padding: 6px 0 0; background: transparent; border: 0; }
    .imanet-mega-tab { padding: 8px 4px; border: 0; font-size: 14px; font-weight: 500; }
    .imanet-mega-tab-ico { width: 30px; height: 30px; font-size: 15px; }
    .imanet-mega-tab.is-active { background: transparent; }
    .imanet-mega-tab:hover { background: rgba(255, 177, 0, 0.12); }
}
