/* صفحه اصلی: بنر متنی (سبک تامبنیل)، استوری‌ها و نمایشگر استوری */

@font-face {
    font-family: 'Lalezar';
    src: url('fonts/lalezar/Lalezar.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ---------- بنر متنی ---------- */
/* افقی از m-lg-9 مثل بقیه بخش‌ها؛ فاصله عمودی کم تا بنر و استوری فشرده باشند */
.sama-teaser-wrap { margin-top: 2rem !important; margin-bottom: 1.6rem !important; }
.sama-teaser {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 104px;
    padding: 1.4rem 2.6rem;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(circle at 12% 120%, rgba(239, 57, 78, .55) 0, transparent 45%),
        linear-gradient(110deg, #0f1c3f 0%, #1f3c88 55%, #336699 100%);
    box-shadow: 0 12px 30px rgba(15, 28, 63, .22);
    transition: transform .25s ease, box-shadow .25s ease;
}
.sama-teaser + .sama-teaser { margin-top: 1rem; }
.sama-teaser:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15, 28, 63, .3);
}
/* درخشش عبوری */
.sama-teaser::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .16) 50%, transparent 70%);
    transform: translateX(120%);
    animation: sama-teaser-shine 5s ease-in-out infinite;
}
@keyframes sama-teaser-shine {
    0%, 55% { transform: translateX(120%); }
    100% { transform: translateX(-120%); }
}
.sama-teaser__bg-word {
    position: absolute;
    left: 18%;
    top: 50%;
    z-index: -1;
    transform: translateY(-50%) rotate(-8deg);
    font-family: 'Lalezar', 'IRANSans', sans-serif;
    font-size: 15rem;
    line-height: 1;
    color: rgba(255, 255, 255, .06);
    pointer-events: none;
    user-select: none;
}
.sama-teaser__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1.2rem;
    border-radius: 999px;
    background: #ef394e;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    transform: rotate(3deg);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
    white-space: nowrap;
}
.sama-teaser__badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: sama-teaser-pulse 1.4s ease-in-out infinite;
}
@keyframes sama-teaser-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.7); }
}
.sama-teaser__headline {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem 1.4rem;
    min-width: 0;
    font-family: 'Lalezar', 'IRANSans', sans-serif;
    font-weight: normal;
    line-height: 1.35;
}
.sama-teaser__title {
    font-size: clamp(2.6rem, 3.6vw, 4.4rem);
    color: #fff;
    text-shadow: 3px 3px 0 #0b1230, 0 0 22px rgba(0, 0, 0, .35);
}
.sama-teaser__highlight {
    display: inline-block;
    padding: .1em .55em 0;
    font-size: clamp(2rem, 2.8vw, 3.4rem);
    color: #111;
    background: #ffd60a;
    border-radius: 8px;
    transform: rotate(-2deg);
    box-shadow: 4px 4px 0 #ef394e;
}
.sama-teaser__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .9rem 1.8rem;
    border-radius: 999px;
    background: #fff;
    color: #0f1c3f;
    font-size: 1.35rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
.sama-teaser__cta i { transition: transform .2s ease; }
.sama-teaser:hover .sama-teaser__cta { background: #ffd60a; }
.sama-teaser:hover .sama-teaser__cta i { transform: translateX(-4px); }

@media (max-width: 767px) {
    .sama-teaser {
        flex-wrap: wrap;
        gap: .8rem 1rem;
        min-height: 0;
        padding: 1.2rem 1.4rem 1.3rem;
        border-radius: 16px;
    }
    .sama-teaser__badge { font-size: 1.05rem; padding: .35rem .9rem; }
    .sama-teaser__headline { order: 3; flex-basis: 100%; gap: .3rem .8rem; }
    .sama-teaser__title { font-size: 2.6rem; }
    .sama-teaser__highlight { font-size: 1.9rem; }
    .sama-teaser__cta { margin-right: auto; padding: .5rem 1.1rem; font-size: 1.1rem; }
    .sama-teaser__bg-word { font-size: 10rem; left: 4%; }
}

/* ---------- استوری‌ها ---------- */
/* فاصله استاندارد از بنر متنی بالا تا با آن یکی دیده نشود (همان ریتم نوار لوگوها: ۲.۴/۴rem) */
.sama-stories { margin-top: 2.4rem !important; margin-bottom: 2.4rem !important; }
.sama-stories__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .8rem;
}
.sama-stories__title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1d2433;
}
.sama-stories__navs { display: flex; gap: .6rem; }
.sama-stories__nav {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e6e8ec;
    background: #fff;
    color: #444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.sama-stories__nav[hidden] { display: none; }
.sama-stories__nav:hover:not(:disabled) { background: #336699; border-color: #336699; color: #fff; }
.sama-stories__nav:disabled { opacity: .35; cursor: default; }
/* لبه‌ها فقط وقتی محو می‌شوند که از آن سمت ادامه‌ای هست */
.sama-stories__frame { position: relative; }
.sama-stories__frame::before,
.sama-stories__frame::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}
.sama-stories__frame::before { right: 0; background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0)); }
.sama-stories__frame::after { left: 0; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.sama-stories__frame.has-prev::before,
.sama-stories__frame.has-next::after { opacity: 1; }
.sama-stories__scroller {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}
.sama-stories__scroller::-webkit-scrollbar { display: none; }
.sama-stories__track {
    display: flex;
    gap: 1.6rem;
    width: max-content;
    margin: 0 auto;
    padding: .6rem .4rem .4rem;
}
.sama-story {
    flex: 0 0 auto;
    width: 82px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}
.sama-story__ring {
    position: relative;
    width: 76px;
    height: 76px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #336699, #4fb3e8, #12c2a6, #ffb703, #ef394e, #336699);
    transition: transform .2s ease;
}
.sama-story:hover .sama-story__ring { transform: scale(1.05); }
.sama-story:active .sama-story__ring { transform: scale(.96); }
.sama-story.is-seen .sama-story__ring { background: #cfd5de; }
.sama-story__avatar {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #fff;
    overflow: hidden;
    background: #f1f3f6;
}
.sama-story__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.sama-story__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
}
.sama-story.is-seen .sama-story__label { color: #8a919d; font-weight: 500; }
.sama-story:focus-visible { outline: none; }
.sama-story:focus-visible .sama-story__ring { box-shadow: 0 0 0 3px rgba(51, 102, 153, .35); }

@media (min-width: 992px) {
    .sama-stories { margin-top: 4rem !important; margin-bottom: 4rem !important; }
}
@media (max-width: 767px) {
    .sama-stories__title { font-size: 1.45rem; }
    /* در گوشی کشیدن با انگشت کافی است؛ دکمه‌ها جا را تنگ می‌کنند */
    .sama-stories__navs { display: none; }
    .sama-stories__frame::before,
    .sama-stories__frame::after { width: 28px; }
    .sama-stories__track { gap: 1.1rem; margin: 0; }
    .sama-story { width: 70px; }
    .sama-story__ring { width: 66px; height: 66px; }
    .sama-story__label { font-size: 1.05rem; }
}

/* ---------- نمایشگر استوری ---------- */
html.sama-story-open,
html.sama-story-open body { overflow: hidden; }
.sama-sv {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    background: rgba(8, 10, 16, .94);
    animation: sama-sv-in .2s ease;
}
.sama-sv[hidden] { display: none; }
@keyframes sama-sv-in { from { opacity: 0; } to { opacity: 1; } }
.sama-sv__stage {
    position: relative;
    width: min(420px, 100vw);
    height: min(92vh, 760px);
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.sama-sv__blur {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(24px) brightness(.6);
    transform: scale(1.1);
}
.sama-sv__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
}
.sama-sv__top {
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    padding: 1rem 1.2rem 3rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent);
}
.sama-sv__bars { display: flex; gap: 4px; direction: rtl; }
.sama-sv__bar {
    flex: 1 1 0;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .35);
    overflow: hidden;
}
.sama-sv__bar span {
    display: block;
    height: 100%;
    background: #fff;
    transform-origin: right center;
    transform: scaleX(0);
}
.sama-sv__head { display: flex; align-items: center; gap: .9rem; margin-top: 1rem; color: #fff; }
.sama-sv__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    flex: 0 0 auto;
}
.sama-sv__names { min-width: 0; flex: 1 1 auto; line-height: 1.5; }
.sama-sv__title { display: block; font-size: 1.35rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sama-sv__brand { display: block; font-size: 1.1rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sama-sv__close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}
.sama-sv__close:hover { background: rgba(255, 255, 255, .28); }
.sama-sv__bottom {
    position: absolute;
    inset: auto 0 0;
    z-index: 3;
    padding: 4rem 1.6rem 1.8rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent);
    color: #fff;
}
.sama-sv__price { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.sama-sv__price strong { font-size: 1.8rem; font-weight: 800; }
.sama-sv__price del { font-size: 1.25rem; opacity: .7; }
.sama-sv__off {
    padding: .2rem .8rem;
    border-radius: 999px;
    background: #ef394e;
    font-size: 1.15rem;
    font-weight: 800;
}
.sama-sv__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: 1.2rem;
    border-radius: 14px;
    background: #fff;
    color: #0f1c3f;
    font-size: 1.45rem;
    font-weight: 800;
}
.sama-sv__cta:hover { background: #ffd60a; color: #0f1c3f; }
.sama-sv__nav {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}
.sama-sv__nav:hover { background: rgba(255, 255, 255, .28); }
.sama-sv__nav:disabled { visibility: hidden; }

@media (max-width: 575px) {
    .sama-sv { background: #000; }
    .sama-sv__stage { width: 100vw; height: 100%; border-radius: 0; }
    .sama-sv__nav { display: none; }
}
