/* ═══════════════════════════════════════════════════════
   Sama Footer — مینیمال و تیره؛ امضای «سما» بالای فوتر
   زیر موس رنگی می‌شود (js/sama-chrome.js)
   ═══════════════════════════════════════════════════════ */

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

@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 20%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 50%; }

.sama-footer {
    --f-bg: #0b1431;
    --f-text: #e8ecf6;
    --f-muted: #8e99b6;
    --f-line: rgba(255, 255, 255, .08);
    margin-top: 72px;
    color: var(--f-text);
    font-size: 14px;
}

.sama-footer__stage {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: 44px;
    border-radius: 32px 32px 0 0;
    background: var(--f-bg);
}
.sama-footer__aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sama-footer__aurora span {
    position: absolute;
    width: 46vw;
    max-width: 620px;
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: .4;
}
.sama-footer__aurora span:nth-child(1) {
    top: -55%;
    right: -10%;
    background: radial-gradient(circle, rgba(51, 102, 153, .9) 0, transparent 62%);
}
.sama-footer__aurora span:nth-child(2) {
    bottom: -65%;
    left: -12%;
    background: radial-gradient(circle, rgba(239, 57, 78, .45) 0, transparent 60%);
}

/* ── Top: wordmark + intro ── */
.sama-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--f-line);
}
.sama-footer__wordmark {
    position: relative;
    display: inline-block;
    flex: none;
    text-decoration: none !important;
}
.sama-footer__word {
    display: block;
    font-family: 'Lalezar', 'IRANSans', sans-serif;
    font-size: 112px;
    line-height: 1.05;
    white-space: nowrap;
}
.sama-footer__word--base {
    color: rgba(255, 255, 255, .07);
    -webkit-text-stroke: 1.2px rgba(255, 255, 255, .45);
}
.sama-footer__word--fill {
    position: absolute;
    inset: 0;
    color: transparent;
    background: linear-gradient(100deg, #336699, #4fb3e8 25%, #12c2a6 45%, #ffb703 68%, #ef394e 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-mask-image: radial-gradient(circle 95px at var(--mx) var(--my), #000 0, rgba(0, 0, 0, .6) 45%, transparent 100%);
    mask-image: radial-gradient(circle 95px at var(--mx) var(--my), #000 0, rgba(0, 0, 0, .6) 45%, transparent 100%);
    opacity: 0;
    transition: opacity .35s ease;
}
.sama-footer__wordmark:hover .sama-footer__word--fill,
.sama-footer__wordmark:focus-visible .sama-footer__word--fill { opacity: 1; }
/* لمسی: نور خودش آرام روی کلمه حرکت می‌کند */
@media (hover: none) {
    .sama-footer__word--fill {
        opacity: 1;
        animation: sama-spot-roam 7s ease-in-out infinite alternate;
    }
}
@keyframes sama-spot-roam {
    0% { --mx: 10%; --my: 40%; }
    50% { --mx: 55%; --my: 70%; }
    100% { --mx: 92%; --my: 35%; }
}

.sama-footer__intro {
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
}
.sama-footer__desc {
    max-width: 380px;
    margin: 0;
    color: var(--f-muted);
    font-size: 13.5px;
    line-height: 2;
}
.sama-footer__social { display: flex; flex: none; gap: 8px; }
.sama-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--f-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: #fff !important;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.sama-footer__social-link svg { width: 20px; height: 20px; }
.sama-footer__social-link img { width: 24px; height: 24px; object-fit: contain; border-radius: 6px; }
.sama-footer__social-link:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .1);
}

/* ── Link grid ── */
.sama-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr);
    gap: 32px;
    padding: 36px 0;
}
.sama-footer__title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.sama-footer__col ul { margin: 0; padding: 0; list-style: none; }
.sama-footer__col li { margin: 0; }
.sama-footer__col a {
    display: inline-block;
    padding: 5px 0;
    color: var(--f-muted) !important;
    font-size: 13.5px;
    text-decoration: none !important;
    transition: color .2s ease, transform .25s ease;
}
.sama-footer__col a:hover { color: #fff !important; transform: translateX(-4px); }

.sama-footer__branches { display: grid; gap: 14px; }
.sama-branch { margin: 0; }
.sama-branch__name { margin: 0 0 2px; color: var(--f-text); font-size: 13.5px; font-weight: 700; }
.sama-branch__addr { margin: 0; color: var(--f-muted); font-size: 12.5px; line-height: 1.9; }
.sama-branch__links { display: flex; gap: 14px; margin: 2px 0 0; }
.sama-footer__col .sama-branch__links a { padding: 0; color: #9fc4ea !important; font-size: 12.5px; font-weight: 700; }
.sama-footer__col .sama-branch__links a:hover { color: #fff !important; transform: none; }

/* ── Bottom bar ── */
.sama-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    padding: 16px 0;
    border-top: 1px solid var(--f-line);
}
.sama-footer__copy { margin: 0; color: var(--f-muted); font-size: 12.5px; }
.sama-footer__enamad {
    display: inline-flex;
    flex: none;
    padding: 4px;
    border-radius: 12px;
    background: #fff;
    line-height: 0;
}
.sama-footer__enamad img { width: 44px; height: auto; }
.sama-footer__enamad:hover { transform: translateY(-3px); }
.sama-footer__enamad { transition: transform .25s ease; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .sama-footer__top { flex-direction: column; align-items: flex-start; }
    .sama-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sama-footer__col--branches { grid-column: 1 / -1; }
    .sama-footer__branches { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (max-width: 767px) {
    .sama-footer { margin-top: 56px; font-size: 13.5px; }
    .sama-footer__stage { padding-top: 30px; border-radius: 24px 24px 0 0; }
    .sama-footer__top { padding-bottom: 24px; gap: 12px; }
    .sama-footer__word { font-size: 84px; }
    .sama-footer__intro { flex-wrap: wrap; gap: 16px; }
    .sama-footer__desc { flex-basis: 100%; }
    .sama-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; padding: 28px 0; }
    .sama-footer__col a:hover { transform: none; }
    .sama-footer__branches { grid-template-columns: 1fr; }
    .sama-footer__bottom { padding-bottom: 96px; }
}

@media (prefers-reduced-motion: reduce) {
    .sama-footer__word--fill { animation: none; }
}

/* ═══════════════════════════════════════════════════════
   Mobile dock — نوار شناور تیره پایین صفحه (جای sticky-footer قالب)
   ═══════════════════════════════════════════════════════ */
.sama-dock {
    position: fixed;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 1035;
    display: none;
    align-items: stretch;
    gap: 2px;
    height: 62px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    background: rgba(11, 20, 49, .92);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    backdrop-filter: saturate(160%) blur(16px);
    box-shadow: 0 18px 36px -14px rgba(11, 20, 49, .6);
}
/* خط رنگی ظریف بالای نوار */
.sama-dock::before {
    content: "";
    position: absolute;
    top: -1px;
    right: 22%;
    left: 22%;
    height: 2px;
    border-radius: 2px;
    background: var(--sama-spectrum, linear-gradient(90deg, #336699, #4fb3e8, #12c2a6, #ffb703, #ef394e));
    opacity: .9;
}
.sama-dock__item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    border-radius: 16px;
    color: rgba(255, 255, 255, .6) !important;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: color .2s ease, background .25s ease, transform .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.sama-dock__item svg { width: 22px; height: 22px; }
.sama-dock__item:active { transform: scale(.92); }
.sama-dock__item.is-active {
    background: #fff;
    color: var(--sama-navy, #0f1c3f) !important;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5);
}
.sama-dock__icon { position: relative; display: inline-flex; }
.sama-dock__count {
    position: absolute;
    top: -6px;
    left: -9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #0b1431;
    border-radius: 999px;
    background: var(--sama-yellow, #ffd60a);
    color: #0b1431;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}
.sama-dock__item.is-active .sama-dock__count { border-color: #fff; }

@media (max-width: 991px) {
    .sama-dock { display: flex; }
    /* جای دکمه بالا رفتن و گفتینو بالای نوار */
    #scroll-top { bottom: 92px !important; }
    #goftino_w, #goftino_w iframe { bottom: 86px !important; }
}
