/* ==========================================================================
   صفحه نخست آکادمی
   ========================================================================== */

.ac-container {
    max-width: var(--academy-max);
    margin: 0 auto;
    padding: 0 24px;
}

.ac-home {
    background: var(--academy-bg);
}

/* --------------------------------------------------------------------------
   هیرو
   -------------------------------------------------------------------------- */
.ac-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #0b1220 0%, #16264a 45%, #1e3a8a 100%);
    color: #fff;
    padding: 76px 0 84px;
    isolation: isolate;
}

.ac-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 420px at 88% 8%, rgba(59, 130, 246, .30), transparent 60%),
        radial-gradient(700px 380px at 6% 92%, rgba(168, 85, 247, .24), transparent 62%);
}

.ac-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}

.ac-hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 56px;
    align-items: center;
}

/*
 * Twenty Twenty-Five به هر wp-block-group درون‌خطی عرض می‌دهد که باعث
 * سرریز از ستون گرید می‌شود. این ستون‌ها را به عرض کامل قفل می‌کنیم.
 */
.ac-hero-inner > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
}

.ac-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: .86rem;
    font-weight: 600;
    color: #bfdbfe;
    margin-bottom: 22px;
}

.ac-hero-title {
    font-size: clamp(2.1rem, 5vw, 3.35rem);
    font-weight: 900;
    line-height: 1.28;
    letter-spacing: -.02em;
    margin: 0 0 18px;
    color: #fff;
}

.ac-hero-accent {
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ac-hero-text {
    font-size: 1.06rem;
    line-height: 2;
    color: #cbd5e1;
    max-width: 54ch;
    margin: 0 0 30px;
}

.ac-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 38px;
}

.ac-hero-stats {
    display: flex;
    gap: 34px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.ac-hero-stats li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac-hero-stats strong {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
}

.ac-hero-stats span {
    font-size: .84rem;
    color: #94a3b8;
}

/* دکمه‌ها */
.ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* ارتفاع ثابت + padding افقی. line-height را 1 می‌گذاریم تا
       جعبه flex دقیقاً هم‌اندازه محتوا شود و آیکون وسط بنشیند.
       box-sizing:border-box لازم است وگرنه padding به ارتفاع اضافه
       می‌شود و دکمه ۶۸px می‌شود. */
    box-sizing: border-box;
    height: 46px;
    padding: 0 22px;
    border-radius: 11px;
    font-size: .96rem;
    font-weight: 700;
    line-height: 1;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

/*
 * نکته مهم: در flex، align-items:center آیکون را نسبت به «خط متن»
 * وسط‌چین می‌کند نه نسبت به جعبه. چون line-height دکمه 1.5 است،
 * این دو با هم فرق می‌کنند. راه‌حل: خط متن را به ارتفاع جعبه برسانیم.
 */
.ac-btn > svg {
    flex: 0 0 auto;
    display: block;
    align-self: center;
    vertical-align: middle;
    /* خنثی کردن اثر line-height والد روی ارتفاع خط */
    margin-block: 0;
}

.ac-btn:hover {
    transform: translateY(-2px);
}

.ac-btn-primary {
    background: var(--academy-accent);
    color: #1a1206;
    box-shadow: 0 8px 22px rgba(245, 158, 11, .28);
}

.ac-btn-primary:hover {
    background: #fbbf24;
    box-shadow: 0 12px 28px rgba(245, 158, 11, .38);
}

.ac-btn-ghost {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .22);
    color: #e2e8f0;
}

.ac-btn-ghost:hover {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.ac-btn-outline {
    background: #fff;
    border-color: var(--academy-line);
    color: var(--academy-ink);
    /* فقط اندازه فونت؛ ارتفاع و padding از .ac-btn ارث می‌برد */
    font-size: .9rem;
}

.ac-btn-outline:hover {
    border-color: var(--academy-primary);
    color: var(--academy-primary);
}

.ac-btn-white {
    background: #fff;
    color: var(--academy-primary-dark);
    white-space: nowrap;
}

.ac-btn-white:hover {
    background: #f1f5f9;
}

/* تصویر سمت هیرو */
.ac-hero-visual {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 340px;
    display: grid;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 18px;
}

.ac-card {
    position: relative;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    width: 88%;
}

.ac-card-1 {
    padding: 26px;
    animation: acFloat 7s ease-in-out infinite;
    justify-self: end;
}

.ac-card-bar {
    height: 10px;
    width: 44%;
    border-radius: 99px;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    margin-bottom: 20px;
}

.ac-card-line {
    height: 9px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .22);
    margin-bottom: 12px;
}

.ac-card-line:last-child { margin-bottom: 0; }

.ac-card-2 {
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    animation: acFloat 7s ease-in-out infinite .9s;
    justify-self: start;
}

.ac-chip {
    text-align: center;
    padding: 10px 6px;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-chip-ok    { background: rgba(16, 185, 129, .22); color: #6ee7b7; }
.ac-chip-blue  { background: rgba(59, 130, 246, .22); color: #93c5fd; }
.ac-chip-amber { background: rgba(245, 158, 11, .22); color: #fcd34d; }
.ac-chip-green { background: rgba(34, 197, 94, .22);  color: #86efac; }

.ac-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
    z-index: 0;
}

.ac-orb-1 {
    width: 220px;
    height: 220px;
    background: rgba(99, 102, 241, .40);
    top: -50px;
    inset-inline-end: -40px;
}

.ac-orb-2 {
    width: 180px;
    height: 180px;
    background: rgba(236, 72, 153, .30);
    bottom: -30px;
    inset-inline-start: -20px;
}

/* کارت‌ها باید روی هاله‌ها باشند */
.ac-card { z-index: 1; }

@keyframes acFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-13px); }
}

/* --------------------------------------------------------------------------
   بخش‌ها
   -------------------------------------------------------------------------- */
.ac-section {
    padding: 60px 0;
}

.ac-cats-section { background: var(--academy-soft); }

.ac-section-head {
    text-align: center;
    margin-bottom: 34px;
    padding-block: 0;
}

/* فاصله عنوان تا شبکه کارت‌ها */
.ac-cats-grid,
.ac-featured-grid,
.ac-latest-grid {
    margin-top: 8px;
}

.ac-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    text-align: start;
}

.ac-eyebrow {
    display: inline-block;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .09em;
    color: var(--academy-primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ac-section-title {
    font-size: clamp(1.5rem, 3vw, 2.05rem);
    font-weight: 900;
    color: var(--academy-ink);
    margin: 0 0 8px;
    line-height: 1.4;
    letter-spacing: -.01em;
}

.ac-section-sub {
    color: var(--academy-muted);
    margin: 0;
    font-size: .98rem;
}

/* --------------------------------------------------------------------------
   دسته‌بندی‌ها
   -------------------------------------------------------------------------- */
.ac-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 14px;
    max-width: 100% !important;
    width: 100% !important;
}

.ac-cat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    background: #fff;
    border: 1px solid var(--academy-line);
    border-radius: var(--academy-radius);
    padding: 17px 18px;
    box-shadow: var(--academy-shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ac-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--academy-shadow-lg);
    border-color: var(--ac-c);
}

.ac-cat-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--ac-c) 12%, #fff);
    color: var(--ac-c);
}

.ac-cat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.ac-cat-title {
    font-weight: 700;
    color: var(--academy-ink);
    font-size: 1rem;
    line-height: 1.5;
}

.ac-cat-count {
    font-size: .82rem;
    color: var(--academy-muted);
}

.ac-cat-arrow {
    flex-shrink: 0;
    color: var(--academy-muted);
    opacity: 0;
    transform: translateX(6px);
    transition: all .18s ease;
}

.ac-cat-card:hover .ac-cat-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--ac-c);
}

/* --------------------------------------------------------------------------
   پیل برچسب
   -------------------------------------------------------------------------- */
.ac-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(29, 78, 216, .09);
    color: var(--academy-primary-dark);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.8;
}

.ac-pill:hover { background: rgba(29, 78, 216, .17); }

/* --------------------------------------------------------------------------
   نوشته‌های ویژه
   -------------------------------------------------------------------------- */
.ac-featured-section { background: var(--academy-bg); }

.ac-featured-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    /* stretch = هر دو کارت هم‌ارتفاع؛ body داخلی flex:1 خالی جا را پر می‌کند */
    align-items: stretch;
}

.ac-featured-card {
    background: #fff;
    border: 1px solid var(--academy-line);
    border-radius: var(--academy-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--academy-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ac-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--academy-shadow-lg);
}

/*
 * ارتفاع تصویر ثابت است تا هر دو کارت (با عرض‌های متفاوت) هم‌ارتفاع بمانند.
 * بدون این، aspect-ratio باعث اختلاف ارتفاع می‌شد.
 */
.ac-featured-media {
    display: block;
    overflow: hidden;
    background: var(--academy-soft);
    height: 260px;
}

.ac-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

.ac-featured-card:hover .ac-featured-media img { transform: scale(1.045); }

.ac-featured-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    /* لینک «ادامه مطلب» همیشه پایین کارت می‌ماند */
    flex: 1;
}

.ac-featured-body .ac-read {
    margin-top: auto;
}

.ac-featured-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--academy-muted);
}

.ac-featured-title {
    font-size: 1.24rem;
    font-weight: 800;
    line-height: 1.55;
    margin: 0;
    color: var(--academy-ink);
    /*
     * عنوان همیشه دقیقاً ۲ خط ارتفاع می‌گیرد تا خلاصه‌های دو کارت
     * روی یک خط افقی شروع شوند (چیدمان «هم‌سطح»).
     * ارتفاع مطلق است چون فونت کارت شاخص بزرگ‌تر است؛ اگر از em
     * استفاده کنیم دو کارت ارتفاع متفاوت می‌گیرند.
     */
    min-height: 4.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ac-featured-lead .ac-featured-title { font-size: 1.45rem; }

.ac-featured-title a { color: inherit; }
.ac-featured-title a:hover { color: var(--academy-primary); }

.ac-featured-excerpt {
    color: var(--academy-muted);
    font-size: .93rem;
    line-height: 1.9;
    margin: 0;
    /* هم‌ترازی: خلاصه هم روی ۳ خط ثابت می‌ماند */
    min-height: 5.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* لینک ادامه — در RTL فلش باید به سمت چپ (شروع) حرکت کند */
.ac-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    /* مثل دکمه: line-height روی 1 تا آیکون و متن هم‌سطح شوند */
    line-height: 1;
    color: var(--academy-primary);
    font-weight: 700;
    font-size: .9rem;
    align-self: flex-start;
}

.ac-read > svg {
    display: block;
    align-self: center;
    flex: 0 0 auto;
}

.ac-read svg,
.ac-btn svg {
    transition: transform .18s ease;
}

.ac-read:hover svg { transform: translateX(-4px); }

.ac-btn:hover svg { transform: translateX(-3px); }

/* --------------------------------------------------------------------------
   آخرین نوشته‌ها
   -------------------------------------------------------------------------- */
.ac-latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 20px;
    align-items: start;
}

.ac-post-card {
    background: #fff;
    border: 1px solid var(--academy-line);
    border-radius: var(--academy-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--academy-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ac-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--academy-shadow-lg);
    border-color: #c7d2fe;
}

.ac-post-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.ac-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

.ac-post-card:hover .ac-post-media img { transform: scale(1.05); }

.ac-post-nothumb {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #a5b4fc;
}

.ac-post-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* لینک «ادامه مطلب» همیشه پایین کارت می‌ماند */
.ac-post-body .ac-read { margin-top: auto; }

.ac-post-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.ac-minutes {
    font-size: .78rem;
    color: var(--academy-muted);
}

.ac-post-title {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.6;
    margin: 0;
    color: var(--academy-ink);
    /* هم‌ترازی: عنوان همیشه ۲ خط ارتفاع می‌گیرد تا خلاصه‌ها
       و لینک «ادامه مطلب» همه کارت‌ها روی یک خط بیفتند */
    min-height: 3.46rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ac-post-title a { color: inherit; }
.ac-post-title a:hover { color: var(--academy-primary); }

.ac-post-excerpt {
    color: var(--academy-muted);
    font-size: .88rem;
    line-height: 1.9;
    margin: 0 0 4px;
    /* هم‌ترازی: خلاصه روی ۳ خط ثابت */
    min-height: 5.02rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   CTA / خبرنامه
   -------------------------------------------------------------------------- */
.ac-cta-section { padding-top: 20px; }

.ac-cta {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 46px 48px;
    background: linear-gradient(135deg, #1e3a8a 0%, #4338ca 55%, #6d28d9 100%);
    color: #fff;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 34px;
    align-items: center;
    box-shadow: 0 20px 50px rgba(79, 70, 229, .28);
}

.ac-cta-glow {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    top: -190px;
    inset-inline-end: -90px;
    filter: blur(46px);
    pointer-events: none;
}

.ac-cta-copy { position: relative; z-index: 2; }

.ac-cta-title {
    font-size: clamp(1.35rem, 2.6vw, 1.85rem);
    font-weight: 900;
    line-height: 1.5;
    margin: 0 0 12px;
    color: #fff;
}

.ac-cta-text {
    color: rgba(255, 255, 255, .82);
    font-size: .95rem;
    line-height: 1.95;
    margin: 0;
    max-width: 48ch;
}

.ac-cta-form {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, .12);
    padding: 9px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(8px);
}

.ac-cta-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #fff;
    padding: 11px 14px;
    font-size: .95rem;
    font-family: inherit;
    border-radius: 9px;
    outline: none;
}

.ac-cta-input::placeholder { color: rgba(255, 255, 255, .58); }

.ac-cta-input:focus {
    background: rgba(255, 255, 255, .10);
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   بخش‌های فروشگاه (آخرین محصولات / آخرین دوره‌ها)
   -------------------------------------------------------------------------- */
.ac-shop-section { background: var(--academy-bg); }
.ac-course-section { background: var(--academy-soft); }

.ac-shop-grid,
.ac-course-grid {
    margin-top: 8px;
    display: grid;
    gap: 20px;
    align-items: stretch;
}

.ac-shop-grid {
    /* ۳ ستون برای ۶ محصول؛ minmax بزرگ‌تر از ۳۲۰ جلوی چهارستونی‌شدن را می‌گیرد */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.ac-course-grid {
    /* ۳ ستون در عرض کامل؛ minmax بزرگ‌تر از ۳۳۰ تا ردیف پلن‌ها یک‌خط بماند */
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.ac-shop-card,
.ac-course-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--academy-line);
    border-radius: var(--academy-radius);
    overflow: hidden;
    box-shadow: var(--academy-shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ac-shop-card:hover,
.ac-course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--academy-shadow-lg);
    border-color: rgba(29, 78, 216, .38);
}

/* کاور */
.ac-shop-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--academy-soft);
    border-bottom: 1px solid var(--academy-line);
}

.ac-shop-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.ac-shop-card:hover .ac-shop-media img,
.ac-course-card:hover .ac-shop-media img {
    transform: scale(1.06);
}

.ac-shop-tag {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-start: 12px;
    z-index: 2;
    padding: 5px 11px;
    border-radius: 99px;
    background: rgba(17, 24, 39, .78);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}

.ac-shop-tag--course { background: rgba(30, 58, 138, .88); }
.ac-shop-tag--download { background: rgba(5, 150, 105, .9); }
.ac-shop-tag--virtual { background: rgba(124, 58, 237, .9); }
.ac-shop-tag--physical { background: rgba(180, 83, 9, .9); }

/* بدنه */
.ac-shop-body,
.ac-course-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 16px 18px 18px;
}

.ac-shop-meta,
.ac-course-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ac-rate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--academy-muted);
    line-height: 1.8;
}

.ac-rate-star { color: var(--academy-accent); font-size: .95rem; }
.ac-rate-count { font-weight: 600; opacity: .82; }

.ac-shop-title,
.ac-course-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.65;
    color: var(--academy-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.35em;
}

.ac-shop-title a,
.ac-course-title a {
    color: inherit;
    text-decoration: none;
}

.ac-shop-title a:hover,
.ac-course-title a:hover { color: var(--academy-primary); }

/* پلن‌های دوره */
.ac-course-plans {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ac-course-plans li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0 10px;
    row-gap: 3px;
    padding: 8px 12px;
    border-radius: var(--academy-radius-sm);
    background: var(--academy-soft);
    border: 1px solid var(--academy-line);
    font-size: .84rem;
    color: var(--academy-body);
}

.ac-course-plans b {
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 800;
    color: var(--academy-primary-dark);
}

.ac-course-plans b del { color: var(--academy-muted); font-weight: 600; }
.ac-course-plans b ins { text-decoration: none; }

/* کف کارت */
.ac-shop-foot,
.ac-course-foot {
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--academy-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ac-shop-price {
    font-size: 1rem;
    font-weight: 900;
    color: var(--academy-primary-dark);
    line-height: 1.5;
    white-space: nowrap;
}

.ac-shop-price del,
.ac-shop-price ins {
    font-size: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.ac-shop-price del { color: var(--academy-muted); font-weight: 600; }
.ac-shop-price ins { color: var(--academy-primary-dark); }

.ac-course-from {
    font-size: .8rem;
    color: var(--academy-muted);
    line-height: 1.5;
}

.ac-course-from b {
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--academy-primary-dark);
}

.ac-shop-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--academy-primary);
    color: #fff;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
    transition: background .18s ease, transform .18s ease;
}

.ac-shop-add svg { flex-shrink: 0; }

.ac-shop-add:hover {
    background: var(--academy-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   بازنویسی محدودیت‌های قالب والد
   Twenty Twenty-Five روی هر بلوک گروهی max-width محاسبه‌شده اعمال می‌کند.
   برای کنترل کامل روی چیدمان، همه را خنثی می‌کنیم.
   -------------------------------------------------------------------------- */
.wp-site-blocks .ac-featured-grid,
.wp-site-blocks .ac-latest-grid,
.wp-site-blocks .ac-cats-grid,
.wp-site-blocks .ac-shop-grid,
.wp-site-blocks .ac-course-grid,
.wp-site-blocks .ac-hero-inner,
.wp-site-blocks .ac-cta,
.wp-site-blocks .academy-footer .wp-block-columns,
.wp-site-blocks .academy-footer .wp-block-column,
.wp-site-blocks .ac-section-head,
.wp-site-blocks .ac-head-row,
.wp-site-blocks .ac-head-row > .wp-block-group {
    max-width: none !important;
    width: auto;
    margin-inline: 0;
}

.wp-site-blocks .ac-latest-grid {
    width: 100% !important;
    /* stretch: همه کارت‌های یک ردیف دقیقاً هم‌ارتفاع */
    align-items: stretch;
}

.wp-site-blocks .ac-featured-grid {
    grid-template-columns: 1.35fr 1fr !important;
    /* stretch: هر دو کارت دقیقاً هم‌ارتفاع می‌شوند (کف‌ها و لینک‌ها هم‌تراز) */
    align-items: stretch;
}

.wp-site-blocks .academy-footer .wp-block-columns {
    width: 100% !important;
    max-width: var(--academy-max) !important;
    margin-inline: auto;
    padding-inline: 24px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   واکنش‌گرایی
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ac-hero-inner { grid-template-columns: 1fr; gap: 42px; }
    .ac-hero-visual { min-height: 280px; max-width: 460px; }
    .ac-featured-grid { grid-template-columns: 1fr; }
    .ac-cta { grid-template-columns: 1fr; padding: 38px 32px; }
    .ac-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .ac-hero { padding: 52px 0 58px; }
    .ac-section { padding: 44px 0; }
    .ac-hero-stats { gap: 22px; }
    .ac-hero-stats strong { font-size: 1.35rem; }
    .ac-cta-form { flex-direction: column; }
    .ac-btn-white { width: 100%; justify-content: center; }
    .ac-head-row { flex-direction: column; align-items: stretch; }
    .ac-head-row .ac-btn { justify-content: center; }
    .ac-latest-grid { grid-template-columns: 1fr; }
    .ac-cats-grid { grid-template-columns: 1fr; }
    .ac-shop-grid,
    .ac-course-grid { grid-template-columns: 1fr; gap: 16px; }
    .ac-shop-foot,
    .ac-course-foot { flex-direction: column; align-items: stretch; }
    .ac-shop-add { width: 100%; }
    /* در عرض کم، برچسب و قیمت پلن روی دو خط می‌نشینند تا نشکنند */
    .ac-course-plans li { flex-direction: column; align-items: stretch; }
    .ac-course-plans b { text-align: end; }
}

@media (prefers-reduced-motion: reduce) {
    .ac-card, .ac-card-2 { animation: none; }
    * { transition: none !important; }
}
