/**
 * Footer — tablet + mobil (max-width: 1024px)
 * PC görünümü yalnızca footer.css (min-width: 1025px)
 */

@media (max-width: 1024px) {
    .site-footer {
        --f-mobile-footer-bg: var(--header-strip-bg, #14151a);
        --f-footer-hairline: var(--header-strip-border, #2d3139);
        --f-footer-hairline-w: 1px;
        --f-logos-surface: var(--chrome-control-bg, #1a1c23);
        --f-logos-border: var(--header-strip-border, #2d3139);
        --f-logos-surface-soft: color-mix(in srgb, var(--chrome-control-bg, #1a1c23) 55%, transparent);
    }

    @supports (border-width: 0.5px) {
        .site-footer {
            --f-footer-hairline-w: 0.5px;
        }
    }

    body.light-mode .site-footer {
        --f-mobile-footer-bg: var(--header-strip-bg, #ffffff);
        --f-footer-hairline: var(--header-strip-border, rgba(74, 158, 255, 0.15));
        --f-logos-surface: #f5f5f5;
        --f-logos-border: #e8eaed;
        --f-logos-surface-soft: rgba(245, 245, 245, 0.85);
    }

    /* Logo bloğu: sosyal üstte değil, ödeme/güven bölümünde */
    .f-header-right .f-header-social {
        display: none !important;
    }

    /* Sosyal → güven (kutulu) → ödeme (altta, kutusuz) */
    .f-mobile-logos-stack {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        width: 100%;
        margin: 20px 0 12px;
        padding: 4px 0 8px;
        border: none;
        background: transparent !important;
        box-sizing: border-box;
        overflow: visible;
    }

    .f-mobile-logos-stack__social.social-btns {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: clamp(6px, 2vw, 10px);
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        order: 1;
    }

    .site-footer .f-mobile-logos-stack__social.social-btns a.social-link {
        flex: 0 0 auto;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
    }

    .site-footer .f-mobile-logos-stack__social.social-btns a i,
    .site-footer .f-mobile-logos-stack__social.social-btns a .social-link__x {
        font-size: 17px !important;
        line-height: 1;
    }

    .f-mobile-logos-stack__trust.trust-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 2px;
        background: transparent !important;
        border: none;
        order: 2;
        overflow: visible !important;
    }

    .f-mobile-logos-stack__trust.trust-container::-webkit-scrollbar {
        display: none;
        height: 0;
    }

    .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust img {
        display: block !important;
        position: relative;
        z-index: 1;
        flex: 0 0 auto;
        height: auto !important;
        max-height: 24px !important;
        width: auto !important;
        max-width: min(68px, 18vw) !important;
        padding: 0 !important;
        margin: 0 !important;
        object-fit: contain !important;
        object-position: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-sizing: content-box !important;
        opacity: 1 !important;
        filter: brightness(0) invert(1) !important;
        transition: opacity 0.18s ease;
    }

    .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust:hover img,
    .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust:focus-within img,
    .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust.is-tip-open img {
        background: transparent !important;
        border: none !important;
        filter: brightness(0) invert(1) !important;
        opacity: 1 !important;
    }

    body.light-mode .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust img,
    body.light-mode .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust:hover img,
    body.light-mode .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust:focus-within img,
    body.light-mode .site-footer .f-mobile-logos-stack__trust .f-logo-tip--trust.is-tip-open img {
        filter: grayscale(1) brightness(0.42) !important;
        opacity: 1 !important;
    }

    .f-mobile-logos-stack__pay.pay-icons {
        display: flex !important;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px 10px;
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 360px;
        border: none;
        order: 3;
        overflow: visible;
    }

    .f-mobile-logos-stack__pay .pay-card {
        flex: 0 0 auto;
        height: auto;
        min-width: 0;
        padding: 0;
        margin: 0;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        position: relative;
        z-index: 1;
    }

    .site-footer .f-mobile-logos-stack,
    .site-footer .f-mobile-logos-stack__trust,
    .site-footer .f-mobile-logos-stack__pay,
    .site-footer .f-body,
    .site-footer .f-body-inner {
        overflow: visible !important;
    }

    .site-footer .f-mobile-logos-stack .f-logo-tip__label {
        z-index: 300;
    }

    .site-footer .f-mobile-logos-stack__pay.pay-icons .pay-card img {
        max-height: 26px !important;
        max-width: 64px !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        opacity: 0.95;
        border-radius: 4px !important;
    }

    .f-bottom .f-bottom-trust.trust-container {
        display: none !important;
    }

    .site-footer {
        position: relative;
        background-color: var(--header-strip-bg, #14151a) !important;
        background-image: none !important;
        overflow-x: clip;
        overflow-y: visible;
        scroll-margin-bottom: var(--mobile-bottom-nav-clearance, 64px);
    }

    body.light-mode .site-footer {
        background-color: var(--header-strip-bg, #ffffff) !important;
    }

    .f-header-inner::before,
    .f-header-inner::after,
    .f-body-inner::before,
    .f-body-inner::after,
    .f-bottom-inner::before,
    .f-bottom-inner::after {
        display: none !important;
    }

    /* Header ile aynı yatay hiza (mobile-header-bar / responsive-chrome) */
    .f-header-inner,
    .f-body-inner,
    .f-bottom-inner {
        width: 100% !important;
        max-width: var(--container-max, 1600px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: max(12px, env(safe-area-inset-left)) !important;
        padding-right: max(12px, env(safe-area-inset-right)) !important;
        box-sizing: border-box !important;
    }

    /* Mobil/tablet footer — header şeridi ile aynı zemin rengi */
    .f-header,
    .f-bottom,
    .f-header-right,
    .f-logo-section,
    .copyright-container,
    .trust-container,
    .legal-links,
    .f-body,
    .f-body-inner,
    .f-sidebar,
    .f-content,
    .f-collapse,
    .f-collapse__panel,
    .f-collapse__panel--popular .links-grid,
    body.dark-mode .site-footer .f-header,
    body.dark-mode .site-footer .f-header-inner,
    body.dark-mode .site-footer .f-logo-section,
    body.dark-mode .site-footer .f-header-right,
    body.dark-mode .site-footer .f-body,
    body.dark-mode .site-footer .f-body-inner,
    body.dark-mode .site-footer .f-sidebar,
    body.dark-mode .site-footer .f-content,
    body.dark-mode .site-footer .f-bottom,
    body.dark-mode .site-footer .f-bottom-inner,
    body.dark-mode .site-footer .copyright-container,
    body.dark-mode .site-footer .legal-links,
    body.dark-mode .site-footer .trust-container,
    body.dark-mode .site-footer .f-collapse,
    body.dark-mode .site-footer .f-collapse__trigger.f-title,
    body.dark-mode .site-footer .f-collapse__panel,
    body.light-mode .site-footer .f-header,
    body.light-mode .site-footer .f-header-inner,
    body.light-mode .site-footer .f-logo-section,
    body.light-mode .site-footer .f-header-right,
    body.light-mode .site-footer .f-body,
    body.light-mode .site-footer .f-body-inner,
    body.light-mode .site-footer .f-sidebar,
    body.light-mode .site-footer .f-content,
    body.light-mode .site-footer .f-bottom,
    body.light-mode .site-footer .f-bottom-inner,
    body.light-mode .site-footer .copyright-container,
    body.light-mode .site-footer .legal-links,
    body.light-mode .site-footer .trust-container,
    body.light-mode .site-footer .f-collapse,
    body.light-mode .site-footer .f-collapse__trigger.f-title,
    body.light-mode .site-footer .f-collapse__panel {
        background: var(--header-strip-bg, #14151a) !important;
        background-color: var(--header-strip-bg, #14151a) !important;
        background-image: none !important;
    }

    body.light-mode .f-header,
    body.light-mode .f-bottom,
    body.light-mode .f-logo-section,
    body.light-mode .f-header-right,
    body.light-mode .copyright-container,
    body.light-mode .trust-container,
    body.light-mode .legal-links,
    body.light-mode .f-body,
    body.light-mode .f-sidebar,
    body.light-mode .f-content,
    body.light-mode .f-collapse,
    body.light-mode .f-collapse__panel,
    body.light-mode .f-collapse__panel--popular .links-grid,
    body.light-mode .site-footer .f-header,
    body.light-mode .site-footer .f-header-inner,
    body.light-mode .site-footer .f-logo-section,
    body.light-mode .site-footer .f-header-right,
    body.light-mode .site-footer .f-body,
    body.light-mode .site-footer .f-body-inner,
    body.light-mode .site-footer .f-sidebar,
    body.light-mode .site-footer .f-content,
    body.light-mode .site-footer .f-bottom,
    body.light-mode .site-footer .f-bottom-inner,
    body.light-mode .site-footer .copyright-container,
    body.light-mode .site-footer .legal-links,
    body.light-mode .site-footer .trust-container,
    body.light-mode .site-footer .f-collapse,
    body.light-mode .site-footer .f-collapse__trigger.f-title,
    body.light-mode .site-footer .f-collapse__panel {
        background: var(--header-strip-bg, #ffffff) !important;
        background-color: var(--header-strip-bg, #ffffff) !important;
    }

    /* Üst şerit: logo, mağaza butonları (sosyal → logo bloğunun altında) */
    .f-header {
        height: auto;
        border-top: var(--f-footer-hairline-w) solid var(--f-footer-hairline);
        border-bottom: var(--f-footer-hairline-w) solid var(--f-footer-hairline);
        padding: 0;
    }

    body.light-mode .f-header {
        border-top-color: var(--f-footer-hairline);
        border-bottom-color: var(--f-footer-hairline);
    }

    .f-header-inner {
        flex-direction: column;
        max-width: 100%;
        align-items: stretch;
    }

    .f-logo-section {
        display: flex !important;
        width: 100%;
        justify-content: center;
        align-items: center;
        padding: 16px 0 14px;
        border-right: none;
    }

    .site-footer .f-logo-section img.footer-site-logo,
    .site-footer .f-logo-section img.site-logo.footer-site-logo {
        max-width: 140px !important;
        max-height: 38px !important;
        object-position: center center;
        margin: 0 auto;
    }

    .f-header-right {
        display: block !important;
        width: 100%;
        padding: 0 0 16px;
    }

    /* İlan Pazarı + Mağazalar — mobil/tablet yan yana */
    .f-header-right .nav-btns {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch;
        width: 100%;
        max-width: none;
        gap: 10px;
        margin: 0;
        padding: 2px 0 4px;
    }

    .f-header-right .nav-btns .btn {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        max-width: none;
        height: 46px;
        padding: 0 12px 0 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.01em;
        background: var(--chrome-control-bg, #1a1c23) !important;
        border: 1px solid var(--header-strip-border, #2d3139) !important;
        box-shadow: none !important;
        color: #ececec !important;
        transition: background 0.15s ease, border-color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .f-header-right .nav-btns .btn:active {
        background: var(--f-logos-surface-soft) !important;
        border-color: var(--f-logos-border) !important;
    }

    .f-header-right .nav-btns .btn-blue,
    .f-header-right .nav-btns .btn-green {
        background: var(--f-logos-surface) !important;
        border-color: var(--f-logos-border) !important;
    }

    .f-header-right .nav-btns .btn .btn-left {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        align-items: center;
    }

    .f-header-right .nav-btns .btn .btn-left span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #ececec !important;
    }

    .f-header-right .nav-btns .btn i:first-child {
        margin-right: 8px;
        font-size: 14px;
        flex-shrink: 0;
        color: #9aa3ad !important;
    }

    .f-header-right .nav-btns .btn-blue i:first-child {
        color: #7b8cff !important;
    }

    .f-header-right .nav-btns .btn-green i:first-child {
        color: #3dd99a !important;
    }

    .f-header-right .nav-btns .btn .arrow-icon {
        flex-shrink: 0;
        margin-left: 4px;
        font-size: 11px;
        line-height: 1;
        color: #8a8a8a !important;
        opacity: 1;
        background: none;
        width: auto;
        height: auto;
        border-radius: 0;
    }

    body.light-mode .f-header-right .nav-btns .btn,
    body.light-mode .f-header-right .nav-btns .btn-blue,
    body.light-mode .f-header-right .nav-btns .btn-green {
        background: var(--f-logos-surface, #f3f4f6) !important;
        border-color: var(--f-logos-border, #e2e6ec) !important;
        color: #1f2937 !important;
    }

    body.light-mode .f-header-right .nav-btns .btn:active {
        background: var(--f-logos-surface-soft, #e8eaee) !important;
    }

    body.light-mode .f-header-right .nav-btns .btn .btn-left span {
        color: #1f2937 !important;
    }

    body.light-mode .f-header-right .nav-btns .btn i:first-child {
        color: #6b7280 !important;
    }

    body.light-mode .f-header-right .nav-btns .btn-blue i:first-child {
        color: #4b5eff !important;
    }

    body.light-mode .f-header-right .nav-btns .btn-green i:first-child {
        color: #00a86a !important;
    }

    body.light-mode .f-header-right .nav-btns .btn .arrow-icon {
        color: #9ca3af !important;
    }

    /* Gövde */
    .f-body {
        border: none;
    }

    .f-body-inner {
        flex-direction: column;
        padding-bottom: 8px;
    }

    .f-sidebar,
    .f-content {
        width: 100%;
        padding: 0;
        border: none;
    }

    .f-sidebar .pay-icons:not(.f-footer-pay) {
        display: none !important;
    }


    /* Akordeon başlıkları */
    .f-collapse__trigger.f-title {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        width: 100%;
        margin: 0;
        padding: 16px 0;
        border: none;
        border-bottom: var(--f-footer-hairline-w) solid var(--f-footer-hairline);
        background: transparent;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .f-collapse__trigger .f-collapse__label {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
    }

    body.light-mode .f-collapse__trigger.f-title {
        color: #1a1a1a;
        border-bottom-color: var(--f-footer-hairline);
    }

    .f-collapse__icon {
        flex: 0 0 auto;
        margin-left: auto;
        align-self: center;
        border: none;
        background: none;
        color: #8a8a8a;
        font-size: 20px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0;
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .f-collapse__icon::before {
        content: '+';
        display: block;
    }

    .f-collapse__trigger[aria-expanded="true"] .f-collapse__icon {
        transform: none;
        color: #8a8a8a;
    }

    .f-collapse__trigger[aria-expanded="true"] .f-collapse__icon::before {
        content: '−';
        font-weight: 600;
    }

    body.light-mode .f-collapse__icon,
    body.light-mode .f-collapse__trigger[aria-expanded="true"] .f-collapse__icon {
        color: #6b7280;
    }

    .f-collapse__panel {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
    }

    .f-collapse__panel ul {
        padding: 8px 0 12px;
        margin: 0;
    }

    .f-sidebar-links {
        padding: 12px 0;
        margin: 0;
        list-style: none;
    }

    .f-sidebar li,
    .f-sidebar-links li,
    .links-grid li {
        font-size: 13px;
        margin-bottom: 10px;
        line-height: 1.35;
    }

    .f-collapse__panel--popular .links-grid {
        display: block;
        max-height: 220px;
        overflow-y: auto;
        padding: 8px 0 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #404040 transparent;
    }

    .f-collapse__panel--popular .links-grid ul {
        margin-bottom: 8px;
    }

    /* Alt bölüm */
    .f-bottom {
        border-top: none;
        padding: 4px 0 16px;
    }

    .f-bottom-inner {
        flex-direction: column;
        align-items: center;
    }

    .f-footer-divider {
        order: 1;
        display: block;
        width: 100%;
        height: var(--f-footer-hairline-w);
        min-height: 1px;
        background: var(--f-footer-hairline);
        margin: 4px 0 14px;
        border: none;
    }

    @supports (height: 0.5px) {
        .f-footer-divider {
            min-height: 0;
        }
    }

    body.light-mode .f-footer-divider {
        background: var(--f-footer-hairline);
    }

    .copyright-container {
        order: 2;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 10px 14px;
        padding: 0 0 14px;
        border: none;
        text-align: center;
    }

    .copy-text {
        font-size: 12px;
        white-space: normal;
    }

    .dmca-img {
        max-height: 26px;
        margin: 0;
    }

    .site-footer .f-bottom .legal-links {
        order: 3;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        max-width: 100% !important;
        gap: 6px !important;
        padding: 0 0 8px !important;
        border: none !important;
        box-sizing: border-box !important;
    }

    .site-footer .f-bottom .legal-links a,
    .site-footer .f-bottom .legal-links a:link,
    .site-footer .f-bottom .legal-links a:visited,
    .site-footer .f-bottom .legal-links a:hover {
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 1 auto;
        min-width: 0;
        font-size: clamp(9px, 2.55vw, 11px) !important;
        line-height: 1.25;
        white-space: nowrap !important;
        text-align: center;
        box-sizing: border-box;
    }

    /* En uzun metin — tek satır, diğerlerine çok yakın punto */
    .site-footer .f-bottom .legal-links a:nth-child(3) {
        font-size: clamp(8.5px, 2.35vw, 10.5px) !important;
    }

    /* Yukarı çık */
    .f-back-top {
        position: fixed;
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(var(--mobile-bottom-nav-clearance, 64px) + 8px);
        z-index: 900;
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 10px;
        background: #4b5eff;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(75, 94, 255, 0.4);
    }

    .f-back-top:not([hidden]) {
        display: flex;
    }

    .f-back-top[hidden] {
        display: none !important;
    }
}

/* Tablet — header ile 16px yatay boşluk */
@media (min-width: 768px) and (max-width: 1024px) {
    .f-mobile-logos-stack {
        gap: 16px;
        padding: 6px 0 10px;
    }

    .f-mobile-logos-stack__pay.pay-icons {
        max-width: 480px;
        gap: 10px 12px;
    }

    .f-mobile-logos-stack__trust.trust-container {
        gap: 8px;
        justify-content: center;
        overflow-x: visible;
    }

    .site-footer .f-mobile-logos-stack__trust.trust-container .f-logo-tip--trust img {
        max-height: 28px !important;
        max-width: min(88px, 16vw) !important;
        padding: 7px 10px !important;
    }

    .f-mobile-logos-stack__social.social-btns {
        gap: 10px;
    }

    .site-footer .f-mobile-logos-stack__social.social-btns a {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .site-footer .f-mobile-logos-stack__social.social-btns a i,
    .site-footer .f-mobile-logos-stack__social.social-btns a .social-link__x {
        font-size: 18px !important;
    }

    .site-footer .f-mobile-logos-stack__pay.pay-icons .pay-card img {
        max-height: 28px !important;
        max-width: 70px !important;
    }

    .site-footer .f-bottom .legal-links a {
        font-size: 11px !important;
    }

    .site-footer .f-bottom .legal-links a:nth-child(3) {
        font-size: 10.5px !important;
    }

    .f-header-inner,
    .f-body-inner,
    .f-bottom-inner {
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
    }
}

@media (max-width: 359px) {
    .site-footer .f-mobile-logos-stack__social.social-btns a {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        border-radius: 7px !important;
    }

    .site-footer .f-mobile-logos-stack__social.social-btns a i,
    .site-footer .f-mobile-logos-stack__social.social-btns a .social-link__x {
        font-size: 15px !important;
    }

    .f-mobile-logos-stack__trust.trust-container {
        gap: 4px;
        justify-content: flex-start;
    }

    .site-footer .f-mobile-logos-stack__trust.trust-container .f-logo-tip--trust img {
        max-height: 22px !important;
        max-width: min(62px, 17.5vw) !important;
        padding: 4px 6px !important;
    }

    .site-footer .f-mobile-logos-stack__pay.pay-icons .pay-card img {
        max-height: 22px !important;
        max-width: 56px !important;
    }
}

@media (min-width: 380px) and (max-width: 1024px) {
    .f-header-right .nav-btns {
        gap: 10px;
    }

    .f-header-right .nav-btns .btn {
        font-size: 13px;
        padding: 0 12px 0 14px;
        height: 46px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .f-header-right .nav-btns {
        gap: 12px;
    }

    .f-header-right .nav-btns .btn {
        font-size: 14px;
        height: 48px;
    }

    .f-header-right .nav-btns .btn i:first-child {
        font-size: 15px;
        margin-right: 9px;
    }
}

@media (max-width: 380px) {
    .site-footer .f-bottom .legal-links {
        gap: 4px !important;
    }

    .site-footer .f-bottom .legal-links a {
        font-size: clamp(8px, 2.35vw, 9.5px) !important;
    }

    .site-footer .f-bottom .legal-links a:nth-child(3) {
        font-size: clamp(7.5px, 2.2vw, 9px) !important;
    }
}
