.home-main {
    min-height: 100vh;
    overflow-x: hidden;
    background-color: #f5f7fb;
}


/* Hero */

.home-hero {
    position: relative;
    display: flex;
    min-height: 330px;
    align-items: center;
    justify-content: center;
    padding: 65px 0;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(113, 94, 229, 0.3),
            transparent 32%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(64, 107, 220, 0.2),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #111c42,
            #1c315d
        );
    text-align: center;
}

.home-hero::before {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.15) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.15) 1px,
            transparent 1px
        );
    background-size: 60px 60px;
    content: "";
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 3px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #c3ceff;
    background-color: rgba(255, 255, 255, 0.07);
    font-size: 0.78rem;
    font-weight: 700;
}

.home-hero h1 {
    margin: 18px 0 12px;
    color: #ffffff;
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.45;
}

.home-hero p {
    max-width: 680px;
    margin: 0 auto;
    color: #c4cce0;
    font-size: 0.98rem;
    line-height: 2;
}

.home-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.home-primary-action,
.home-secondary-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 21px;
    border-radius: 11px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.home-primary-action {
    border: 1px solid transparent;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #5573ef,
        #7655dc
    );
    box-shadow: 0 10px 25px rgba(77, 88, 211, 0.3);
}

.home-secondary-action {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4e8f7;
    background-color: rgba(255, 255, 255, 0.07);
}

.home-primary-action:hover,
.home-secondary-action:hover {
    transform: translateY(-2px);
}

.home-primary-action:hover {
    box-shadow: 0 14px 30px rgba(77, 88, 211, 0.42);
}

.home-secondary-action:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background-color: rgba(255, 255, 255, 0.12);
}


/* Sections */

.home-section {
    padding: 72px 0 82px;
}

.home-videos-section {
    background-color: #f5f7fb;
}

.home-notes-section {
    border-top: 1px solid #e3e7ef;
    background-color: #ffffff;
}

.home-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.home-section-title > span {
    display: block;
    margin-bottom: 4px;
    color: #5064e8;
    font-size: 0.78rem;
    font-weight: 800;
}

.home-section-title h2 {
    margin: 0;
    color: #142044;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    line-height: 1.5;
}

.home-section-title p {
    margin: 5px 0 0;
    color: #7d8598;
    font-size: 0.86rem;
}

.home-all-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border: 1px solid #d9dff7;
    border-radius: 10px;
    color: #4559dd;
    background-color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.home-all-link:hover {
    border-color: #5264e5;
    color: #ffffff;
    background-color: #5264e5;
    transform: translateY(-2px);
}


/* Grids */

.home-video-grid,
.home-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
}


/* Video cards */

.home-video-card,
.home-note-card {
    display: flex;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #dfe4ed;
    border-radius: 18px;
    background-color: #ffffff;
    box-shadow: 0 10px 32px rgba(24, 37, 75, 0.07);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.home-video-card:hover,
.home-note-card:hover {
    border-color: #cbd3f3;
    box-shadow: 0 18px 42px rgba(24, 37, 75, 0.12);
    transform: translateY(-5px);
}

.home-video-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(
        135deg,
        #151f3f,
        #334676
    );
}

.home-video-media video {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #000000;
    object-fit: cover;
}

.home-video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    gap: 9px;
    color: #dce2fa;
}

.home-video-placeholder span {
    font-size: 2rem;
}

.home-video-placeholder p {
    margin: 0;
    font-size: 0.8rem;
}

.home-video-content,
.home-note-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 21px;
}

.home-card-date {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #9299aa;
    font-size: 0.72rem;
}

.home-card-date span {
    color: #7185ec;
    font-size: 0.48rem;
}

.home-video-content h3,
.home-note-content h3 {
    margin: 10px 0 7px;
    color: #17213f;
    font-size: 1.04rem;
    line-height: 1.75;
}

.home-video-content h3 a,
.home-note-content h3 a {
    color: inherit;
    text-decoration: none;
}

.home-video-content h3 a:hover,
.home-note-content h3 a:hover {
    color: #4d61df;
}

.home-card-description {
    margin: 0 0 20px;
    color: #767f92;
    font-size: 0.83rem;
    line-height: 1.9;
}

.home-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e9ecf2;
}

.home-card-main-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #465be0;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.home-card-main-link:hover {
    color: #2e3db3;
}

.home-card-secondary-link {
    color: #949bac;
    font-size: 0.72rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Note cards */

.home-note-media {
    display: block;
    height: 205px;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #17264e,
        #4557df
    );
    text-decoration: none;
}

.home-note-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.home-note-card:hover .home-note-media img {
    transform: scale(1.04);
}

.home-note-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.92);
    font-size: 3rem;
    font-weight: 800;
}

.home-note-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
    color: #9098aa;
    font-size: 0.73rem;
}

.home-note-category {
    color: #4b5fdf;
    font-weight: 800;
}

.home-note-views {
    color: #969daf;
    font-size: 0.72rem;
}


/* Empty states */

.home-empty-state {
    grid-column: 1 / -1;
    padding: 55px 20px;
    border: 1px dashed #cbd2e1;
    border-radius: 18px;
    color: #788195;
    background-color: #ffffff;
    text-align: center;
}

.home-empty-icon {
    display: flex;
    width: 65px;
    height: 65px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        #5c73e7,
        #7958d8
    );
    font-size: 1.6rem;
}

.home-empty-state h3 {
    margin: 0 0 6px;
    color: #253252;
}

.home-empty-state p {
    margin: 0;
    font-size: 0.86rem;
}


/* Focus */

.home-primary-action:focus-visible,
.home-secondary-action:focus-visible,
.home-all-link:focus-visible,
.home-card-main-link:focus-visible,
.home-card-secondary-link:focus-visible,
.home-video-content h3 a:focus-visible,
.home-note-content h3 a:focus-visible,
.home-note-media:focus-visible {
    outline: 3px solid rgba(80, 100, 232, 0.35);
    outline-offset: 3px;
}


/* Tablet */

@media (max-width: 900px) {
    .home-video-grid,
    .home-note-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-section {
        padding: 60px 0 68px;
    }
}


/* Mobile */

@media (max-width: 680px) {
    .home-hero {
        min-height: 290px;
        padding: 50px 0;
    }

    .home-hero h1 {
        margin-top: 14px;
        font-size: 1.85rem;
        letter-spacing: 0;
    }

    .home-hero p {
        font-size: 0.86rem;
    }

    .home-primary-action,
    .home-secondary-action {
        width: min(100%, 240px);
    }

    .home-section {
        padding: 45px 0 52px;
    }

    .home-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 17px;
        margin-bottom: 25px;
    }

    .home-all-link {
        width: 100%;
    }

    .home-video-grid,
    .home-note-grid {
        grid-template-columns: 1fr;
        gap: 19px;
    }

    .home-note-media {
        height: 220px;
    }
}

@media (max-width: 420px) {
    .home-hero {
        min-height: 270px;
        padding: 42px 0;
    }

    .home-hero h1 {
        font-size: 1.65rem;
    }

    .home-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .home-primary-action,
    .home-secondary-action {
        width: 100%;
    }

    .home-video-content,
    .home-note-content {
        padding: 17px;
    }

    .home-note-media {
        height: 185px;
    }

    .home-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* ویژگی‌های کلیدی */

.home-features-section {
    padding: 72px 0;
    border-bottom: 1px solid #e3e7ef;
    background: #fff;
}

.home-features-header {
    margin-bottom: 34px;
    text-align: center;
}

.home-features-header > span {
    color: #5064e8;
    font-size: .78rem;
    font-weight: 800;
}

.home-features-header h2 {
    margin: 7px 0 0;
    color: #142044;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.home-feature-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 150px;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 17px;
    padding: 25px 27px;
    border: 1px solid #dfe4ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(24, 37, 75, .07);
}

.home-feature-number {
    position: absolute;
    top: 14px;
    left: 16px;
    color: #a0a8bb;
    font-size: .7rem;
    font-weight: 800;
}

.home-feature-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(135deg, #5573ef, #7655dc);
    font-size: 1.55rem;
}

.home-feature-card h3 {
    margin: 0 0 7px;
    color: #17213f;
    font-size: 1rem;
}

.home-feature-card p {
    margin: 0;
    color: #767f92;
    font-size: .82rem;
    line-height: 1.9;
}

/* متن و تصویر زیر ویژگی‌ها */

.home-showcase-section {
    border-bottom: 1px solid #e3e7ef;
    background: #f5f7fb;
}

.home-showcase-management {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-management-add {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 15px;
    border: 1px solid #d9dff7;
    border-radius: 10px;
    color: #4559dd;
    background: #fff;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
}

.home-showcase-list {
    display: grid;
    gap: 24px;
}

.home-showcase-row {
    display: grid;
    min-height: 320px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dfe4ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(24, 37, 75, .07);
}



.home-showcase-content,
.home-showcase-media {
    min-width: 0;
    direction: rtl;
}

.home-showcase-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(30px, 5vw, 62px);
}

.home-showcase-line {
    width: 62px;
    height: 4px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: #5264e5;
}

.home-showcase-content h3 {
    margin: 0 0 13px;
    color: #17213f;
    font-size: clamp(1.35rem, 2.3vw, 1.85rem);
}

.home-showcase-content > p {
    margin: 0;
    color: #6f788d;
    font-size: .92rem;
    line-height: 2.15;
}

.home-showcase-media {
    position: relative;
    min-height: 320px;
    background: #e9edf5;
}

.home-showcase-media > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}



.home-item-actions,
.home-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-item-actions {
    margin-top: 24px;
}

.home-image-actions {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 8px;
    border-radius: 11px;
    background: rgba(17, 28, 66, .84);
}

.home-item-actions form,
.home-image-actions form {
    margin: 0;
}

.home-item-actions a,
.home-item-actions button,
.home-image-actions a,
.home-image-actions button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #d9dff7;
    border-radius: 8px;
    color: #4559dd;
    background: #fff;
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.home-item-actions button,
.home-image-actions button {
    color: #b9344b;
    border-color: #f0cfd5;
}

@media (max-width: 680px) {
    .home-features-section {
        padding: 45px 0;
    }

    .home-features-grid,
    .home-showcase-row {
        grid-template-columns: 1fr;
    }

    .home-feature-card {
        min-height: 0;
        padding: 22px;
    }



    .home-showcase-content {
        padding: 30px 24px;
    }

    .home-showcase-media,
    .home-showcase-media > img {
        min-height: 240px;
    }

    .home-showcase-management {
        width: 100%;
    }
}
/* جایگاه ثابت هر ستون، مستقل از شماره ردیف */
.home-showcase-management { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.home-showcase-section { padding:56px 0; }
.home-features-header { text-align:right; }
.home-showcase-row { position:relative; direction:rtl; overflow:hidden; }
.home-showcase-slot--right { grid-column:1; grid-row:1; }
.home-showcase-slot--left { grid-column:2; grid-row:1; }
.home-showcase-slot--full { grid-column:1 / -1; grid-row:1; }
.home-showcase-row-number { position:absolute; z-index:2; top:12px; right:16px; padding:4px 12px; border:1px solid #d9dff7; border-radius:9px; background:#eef2ff; color:#3449a2; font-size:.75rem; font-weight:800; }
.home-showcase-empty-slot { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:320px; margin:10px; border:1px dashed #bec7e8; border-radius:12px; color:#55627f; }
.home-showcase-empty-slot > div { display:flex; gap:10px; }
.home-showcase-empty-slot a { color:#4559dd; text-decoration:none; font-size:.82rem; font-weight:800; }
.home-showcase-description { width:100%; color:#6f788d; font-size:.92rem; line-height:2.15; }
.home-showcase-description p { margin:.5em 0; }
.home-showcase-description .ql-align-left { text-align:left; }
.home-showcase-description .ql-align-center { text-align:center; }
.home-showcase-description .ql-align-right { text-align:right; }
.home-showcase-description .ql-align-justify { text-align:justify; }
.home-showcase-description ol, .home-showcase-description ul { padding-right:24px; }
.home-showcase-description li[data-list=bullet] { list-style:disc; }
.home-showcase-description li[data-list=ordered] { list-style:decimal; }
@media (max-width:680px) {
  .home-showcase-slot--right, .home-showcase-slot--left, .home-showcase-slot--full { grid-column:1; grid-row:auto; }
}
