/* جعبه‌محور: فقط داخل فوتر (بدون reset سراسری صفحه) */
.raspina-footer,
.raspina-footer *,
.raspina-footer *::before,
.raspina-footer *::after {
    box-sizing: border-box;
}

/* متغیرهای ریسپانسیو — Mobile S … 4K */
:root {
    --footer-max-w: 1400px;
    --footer-pad-x: clamp(0.75rem, 4vw, 2rem);
    --footer-pad-y-top: clamp(1.5rem, 3vw, 2.2rem);
    --footer-section-gap: clamp(1.25rem, 3vw, 2rem);
    --footer-logo-max: clamp(100px, 28vw, 180px);
    --typing-size: clamp(1.05rem, 2.8vw, 1.8rem);
    --social-size: clamp(40px, 11vw, 52px);
    --social-font: clamp(1.25rem, 3.5vw, 1.8rem);
    --col-title-size: clamp(1.05rem, 2.2vw, 1.3rem);
    --menu-link-size: clamp(0.85rem, 2vw, 0.95rem);
    --trust-img-w: clamp(64px, 18vw, 85px);
}

/* ========== فوتر: قرمز برند + شیشه‌ای (خوانایی بالا) ========== */
.raspina-footer {
    --rf-glass: rgba(255, 255, 255, 0.11);
    --rf-glass-strong: rgba(255, 255, 255, 0.18);
    --rf-stroke: rgba(255, 255, 255, 0.28);
    --rf-stroke-soft: rgba(255, 255, 255, 0.14);
    --rf-text: #ffffff;
    --rf-text-soft: rgba(255, 255, 255, 0.92);
    --rf-text-muted: rgba(255, 255, 255, 0.78);
    --rf-gold: #ffe082;
    --rf-gold-mid: #ffd54f;
    --rf-gold-deep: #d4a13b;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(100% 80% at 50% -30%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
        linear-gradient(168deg, #c62828 0%, #a91f26 45%, #7f171c 100%);
    color: var(--rf-text-soft);
    font-family: 'Vazirmatn', sans-serif;
    border-top: 3px solid rgba(255, 224, 130, 0.45);
    margin-top: auto;
    padding: var(--footer-pad-y-top) 0 clamp(0.75rem, 1.8vw, 1rem);
    direction: rtl;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
}

.raspina-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 35%, rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
    z-index: 0;
}

.footer-container {
    position: relative;
    z-index: 1;
    max-width: var(--footer-max-w);
    margin: 0 auto;
    padding: 0 var(--footer-pad-x);
    width: 100%;
}

.raspina-footer a:focus-visible {
    outline: 2px solid var(--rf-gold-mid);
    outline-offset: 3px;
    border-radius: 4px;
}

/* بخش بالایی — کارت شیشه‌ای */
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--footer-section-gap);
    margin-bottom: clamp(1.35rem, 3vw, 2rem);
    padding: clamp(1.15rem, 2.8vw, 1.85rem);
    background: var(--rf-glass);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid var(--rf-stroke);
    border-radius: clamp(16px, 3.2vw, 24px);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.footer-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.85rem, 2.5vw, 1.5rem);
    justify-content: center;
    text-align: center;
}

.footer-logo {
    max-width: var(--footer-logo-max);
    height: auto;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
    transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.footer-logo:hover {
    transform: scale(1.03);
}

.typing-wrapper {
    font-size: var(--typing-size);
    font-weight: 700;
    color: var(--rf-text);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: -0.3px;
    max-width: min(100%, 42rem);
    line-height: 1.4;
}

.typing-wrapper .typing-animated {
    margin: 0;
}

.golden-raspina {
    color: var(--rf-gold);
    text-shadow:
        0 0 12px rgba(255, 213, 79, 0.55),
        0 0 24px rgba(212, 161, 59, 0.45);
    animation: goldLightGlowFooter 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes goldLightGlowFooter {
    0%, 100% {
        filter: brightness(1);
        text-shadow: 0 0 8px rgba(255, 224, 130, 0.55), 0 0 20px rgba(212, 161, 59, 0.35);
    }
    50% {
        filter: brightness(1.08);
        text-shadow: 0 0 16px rgba(255, 236, 179, 0.75), 0 0 28px rgba(255, 193, 7, 0.4);
    }
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 2vw, 1rem);
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--social-size);
    height: var(--social-size);
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: var(--rf-glass-strong);
    font-size: var(--social-font);
    color: var(--rf-text);
    transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, color 0.28s ease;
    border: 1px solid var(--rf-stroke);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.04);
    background: rgba(255, 255, 255, 0.28);
    color: #3e0d10;
    border-color: var(--rf-gold-mid);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 213, 79, 0.35);
}

.social-icon .social-svg-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58%;
    height: 58%;
    max-width: 28px;
    max-height: 28px;
    line-height: 0;
}
.social-icon .social-svg-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

/* آیکن‌های Font Awesome باقیمانده در فوتر (آدرس، ایمیل، …) */
.raspina-footer .fas,
.raspina-footer .far {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
}
.raspina-footer .fas { font-weight: 900 !important; }
.raspina-footer .far { font-weight: 400 !important; }

/* بخش ستون‌های منو — کارت شیشه‌ای برای هر ستون */
.footer-middle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--footer-section-gap);
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.footer-col {
    min-width: 0;
    padding: clamp(1rem, 2.5vw, 1.45rem);
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--rf-stroke-soft);
    border-radius: clamp(14px, 2.8vw, 20px);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.footer-col:hover {
    border-color: rgba(255, 224, 130, 0.35);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.footer-col.trust-col {
    background: rgba(255, 255, 255, 0.12);
}

.col-title {
    font-size: var(--col-title-size);
    font-weight: 700;
    color: var(--rf-text);
    margin-bottom: clamp(0.85rem, 2vw, 1.2rem);
    position: relative;
    padding-bottom: 0.6rem;
    display: inline-block;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}
.col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 52px;
    height: 3px;
    background: linear-gradient(90deg, var(--rf-gold-deep), var(--rf-gold-mid));
    border-radius: 20px;
    transition: width 0.22s ease;
    box-shadow: 0 0 12px rgba(255, 213, 79, 0.45);
}
.footer-col:hover .col-title::after {
    width: 80px;
}

.footer-menu {
    padding: 0;
    margin: 0;
}
.footer-menu li {
    margin-bottom: 0.65rem;
    list-style: none;
}
.footer-menu li a {
    color: var(--rf-text-soft);
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, padding 0.22s ease, box-shadow 0.22s ease;
    font-size: var(--menu-link-size);
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
    padding: 0.35rem 0.5rem;
    margin: 0 -0.25rem;
    border-radius: 10px;
    line-height: 1.45;
}
.footer-menu li a:hover {
    color: var(--rf-text);
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(-4px);
    padding-right: 0.65rem;
    box-shadow: 0 0 0 1px rgba(255, 224, 130, 0.28);
}

.badge-new {
    background: linear-gradient(135deg, var(--rf-gold-mid) 0%, var(--rf-gold) 100%);
    font-size: 0.68rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-right: 6px;
    color: #4a1518;
    font-weight: 800;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.65rem, 2vw, 1rem);
    margin-bottom: 1.65rem;
    justify-content: flex-start;
}

.trust-badges a {
    display: inline-flex;
    border-radius: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trust-badges a:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.trust-badges img {
    width: var(--trust-img-w);
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    padding: 4px;
    background: transparent;
    transition: filter 0.25s ease;
}

.trust-badges img:hover {
    filter: brightness(1.03);
}

.footer-contact-note {
    padding-top: 0.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-contact-note p {
    margin: 0.65rem 0;
    font-size: clamp(0.78rem, 1.8vw, 0.88rem);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--rf-text-soft);
    line-height: 1.55;
}
.footer-contact-note i {
    color: var(--rf-gold-mid);
    width: 26px;
    flex-shrink: 0;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    margin-top: 0.08em;
    filter: drop-shadow(0 0 6px rgba(255, 213, 79, 0.35));
}

.footer-bottom {
    text-align: center;
    padding: clamp(1rem, 2.2vw, 1.35rem) clamp(0.85rem, 2vw, 1.25rem);
    margin-top: 0.15rem;
    background: rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--rf-stroke-soft);
    border-radius: clamp(12px, 2.5vw, 18px);
    font-size: clamp(0.78rem, 1.6vw, 0.88rem);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.65rem, 2vw, 1rem);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
    margin: 0;
    color: var(--rf-text-muted);
    font-weight: 400;
    line-height: 1.55;
}
.footer-bottom strong {
    color: var(--rf-gold-mid);
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255, 213, 79, 0.35);
}

.footer-device {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.7rem, 1.45vw, 0.76rem);
    color: var(--rf-text-soft);
    letter-spacing: 0.2px;
}

.footer-device i {
    color: var(--rf-gold-mid);
    font-size: 1.05em;
    filter: drop-shadow(0 0 8px rgba(255, 213, 79, 0.4));
}

/* بدون backdrop-filter مرورگر: پس‌زمینه مات تا متن پاک بماند */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .footer-top {
        background: rgba(110, 25, 32, 0.92);
    }
    .footer-col {
        background: rgba(94, 22, 28, 0.88);
    }
    .footer-col.trust-col {
        background: rgba(122, 32, 40, 0.9);
    }
    .social-icon {
        background: rgba(90, 24, 30, 0.85);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .footer-bottom {
        background: rgba(50, 12, 16, 0.55);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .golden-raspina {
        animation: none;
        text-shadow: 0 0 10px rgba(255, 213, 79, 0.5), 0 0 20px rgba(212, 161, 59, 0.35);
    }
}

/* ========== Laptop (1024px – 1439px) ========== */
@media (min-width: 1024px) and (max-width: 1439px) {
    :root {
        --footer-max-w: 1200px;
        --footer-pad-x: clamp(1.25rem, 3vw, 1.75rem);
    }
    .footer-middle {
        gap: 1.5rem;
    }
}

/* ========== Tablet (768px – 1023px) — دو ستون + نمادها تمام‌عرض ========== */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --footer-max-w: 100%;
        --footer-pad-x: clamp(1.25rem, 4vw, 2rem);
    }
    .footer-middle {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-col.trust-col {
        grid-column: 1 / -1;
        max-width: 640px;
        margin-inline: auto;
    }
    .trust-badges {
        justify-content: center;
    }
    .footer-contact-note {
        text-align: center;
    }
    .footer-contact-note p {
        justify-content: center;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-brand {
        flex-direction: column;
        width: 100%;
    }
    .social-links {
        width: 100%;
        justify-content: center;
    }
}

/* ========== Mobile L (425px – 767px) ========== */
@media (min-width: 425px) and (max-width: 767px) {
    .footer-middle {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-brand {
        flex-direction: column;
        width: 100%;
    }
    .trust-badges {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}

/* ========== Mobile M (375px – 424px) ========== */
@media (min-width: 375px) and (max-width: 424px) {
    :root {
        --footer-pad-x: 1.1rem;
    }
    .footer-middle {
        grid-template-columns: 1fr;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
    }
    .footer-brand {
        flex-direction: column;
    }
    .footer-bottom {
        flex-direction: column;
        justify-content: center;
    }
}

/* ========== Mobile S (تا 374px) ========== */
@media (max-width: 374px) {
    :root {
        --footer-pad-x: 0.75rem;
        --footer-section-gap: 1.15rem;
    }
    .raspina-footer {
        border-top-width: 2px;
    }
    .footer-middle {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }
    .footer-top {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .footer-brand {
        flex-direction: column;
        gap: 0.75rem;
    }
    .social-links {
        justify-content: center;
        gap: 0.45rem;
    }
    .col-title::after {
        width: 40px;
    }
    .badge-new {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
        margin-right: 4px;
    }
    .trust-badges {
        justify-content: center;
        gap: 0.5rem;
    }
    .trust-badges img {
        padding: 4px;
        border-radius: 10px;
    }
    .footer-bottom {
        flex-direction: column;
        padding-top: 1rem;
        font-size: 0.78rem;
    }
    .footer-device {
        font-size: 0.65rem;
    }
}

/* زیر 768px: یک ستون (برای بازه‌هایی که بالا پوشش ندادند) */
@media (max-width: 767px) {
    .footer-middle {
        grid-template-columns: 1fr;
    }
    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-brand {
        flex-direction: column;
        width: 100%;
    }
    .social-links {
        justify-content: center;
    }
    .trust-badges {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

/* ========== Laptop L (1440px – 2559px) — پیش‌فرض، فقط ظرف کمی بزرگ‌تر ========== */
@media (min-width: 1440px) and (max-width: 2559px) {
    :root {
        --footer-max-w: 1400px;
    }
}

/* ========== 4K و صفحه‌های خیلی بزرگ (از 2560px) ========== */
@media (min-width: 2560px) {
    :root {
        --footer-max-w: min(1680px, 88vw);
        --footer-pad-x: clamp(2rem, 2.5vw, 3.5rem);
        --footer-pad-y-top: clamp(2.5rem, 2.5vw, 3.25rem);
        --typing-size: clamp(1.85rem, 1.1vw, 2.1rem);
        --footer-logo-max: clamp(190px, 12vw, 220px);
        --col-title-size: clamp(1.35rem, 0.9vw, 1.45rem);
        --menu-link-size: clamp(0.95rem, 0.55vw, 1.05rem);
        --trust-img-w: clamp(90px, 5vw, 100px);
        --social-size: clamp(52px, 3vw, 58px);
    }
    .raspina-footer {
        border-top-width: 4px;
        box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.28);
    }
    .footer-middle {
        gap: clamp(2rem, 2vw, 2.75rem);
    }
    .footer-bottom {
        font-size: clamp(0.88rem, 0.5vw, 0.95rem);
        padding: 1.35rem 0 0.65rem;
    }
    .footer-device {
        font-size: clamp(0.75rem, 0.45vw, 0.82rem);
    }
}
