/**
 * Kıyam Arşiv — Mobil / tablet responsive düzenlemeler
 */

html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: clip;
    max-width: 100%;
}

img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

/* İç sayfalarda CBH sidebar çakışmasını önle */
body:not(.has-hero) .top-left-logo,
body:not(.has-hero) .sidebar-toggle,
body:not(.has-hero) .sidebar-drawer,
body:not(.has-hero) .sidebar-overlay {
    display: none !important;
}

/* Tablet */
@media (max-width: 992px) {
    .site-footer__grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }

    .panel-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .panel-content {
        padding: 1.25rem !important;
    }

    .panel-columns {
        grid-template-columns: 1fr !important;
    }
}

/* Mobil */
@media (max-width: 768px) {
    .container {
        padding-left: clamp(16px, 4vw, 24px) !important;
        padding-right: clamp(16px, 4vw, 24px) !important;
    }

    .section {
        padding: clamp(48px, 8vh, 80px) 0 !important;
    }

    /* Hero */
    .hero {
        min-height: 100svh !important;
        min-height: -webkit-fill-available;
    }

    .hero__content {
        padding: 0 1.25rem !important;
        width: 100%;
        max-width: 100%;
    }

    .hero__title {
        font-size: clamp(1.65rem, 7.2vw, 2.4rem) !important;
        line-height: 0.92 !important;
        word-break: normal !important;
        hyphens: manual !important;
    }

    .hero__subtitle {
        font-size: clamp(0.85rem, 3.5vw, 1.1rem) !important;
        margin-bottom: 1.5rem !important;
    }

    .hero__actions {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
        width: 100%;
    }

    .hero__actions .btn,
    .hero__actions .bprimary,
    .hero__actions .bghost {
        width: 100% !important;
        max-width: 300px;
        padding: 14px 18px !important;
        font-size: 0.72rem !important;
        letter-spacing: 1.5px !important;
    }

    .hero__scroll {
        right: 50% !important;
        transform: translateX(50%);
        bottom: 18px !important;
    }

    /* Header menü */
    .site-header__toggle {
        display: block !important;
    }

    .site-header__nav {
        position: fixed !important;
        top: var(--header-height, 72px) !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(5, 5, 5, 0.98) !important;
        backdrop-filter: blur(16px);
        padding: 0.75rem 1.25rem 1.25rem !important;
        transform: translateY(-130%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: transform 0.3s ease, opacity 0.3s ease !important;
        z-index: 9990 !important;
        max-height: calc(100dvh - var(--header-height, 72px));
        overflow-y: auto;
    }

    .site-header__nav.is-open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }

    .site-header__menu {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    .site-header__menu li {
        width: 100%;
    }

    .site-header__menu a {
        display: block !important;
        padding: 0.85rem 0 !important;
        font-size: 0.8rem !important;
        border-bottom: 1px solid var(--BL, rgba(255, 255, 255, 0.08)) !important;
    }

    .site-header__logo span {
        max-width: 55vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* İç sayfa başlıkları */
    .page-hero {
        padding: calc(var(--header-height, 72px) + 1.5rem) 0 2rem !important;
        text-align: left !important;
    }

    .page-hero__title {
        font-size: clamp(1.45rem, 7vw, 2.1rem) !important;
        line-height: 1.05 !important;
    }

    .page-hero__subtitle {
        font-size: 0.95rem !important;
    }

    /* Yazı listesi */
    .article-card,
    .yzx-row {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        padding: 1.15rem 0 !important;
    }

    .article-card__body h3 a,
    .yzx-row-title {
        font-size: clamp(1.05rem, 4.8vw, 1.45rem) !important;
    }

    .article-card:hover .article-card__body h3 a,
    .article-card:hover .yzx-row-title {
        transform: none !important;
    }

    .yzx-arrow {
        display: none !important;
    }

    /* Projeler */
    .project-item,
    .pjx-item,
    .project-item:nth-child(even),
    .pjx-item--flip {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .project-item:nth-child(even) .project-item__image,
    .project-item:nth-child(even) > div:last-child {
        order: 0 !important;
        text-align: left !important;
    }

    .project-item__no,
    .pjx-ghost {
        font-size: clamp(3.5rem, 16vw, 6rem) !important;
        right: 0 !important;
        opacity: 0.3 !important;
    }

    /* Bildirge */
    .bildirge-frame {
        flex-direction: column;
        gap: 1.25rem;
    }

    .bildirge-rail {
        display: none;
    }

    .bildirge-scroll {
        max-height: none;
        padding-right: 0;
        mask-image: none;
    }

    /* Aci gerçekler */
    .truth-section,
    .manifesto-scroll {
        padding: 10vh 1.25rem 8vh !important;
        min-height: auto !important;
    }

    .truth-section__lead,
    .mf-body {
        font-size: clamp(1.2rem, 5.5vw, 1.65rem) !important;
        max-width: 100% !important;
    }

    /* Footer */
    .site-footer {
        padding: 3rem 1.25rem 0 !important;
    }

    .site-footer__grid {
        grid-template-columns: 1fr !important;
    }

    .site-footer__bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    /* Arşiv araç çubuğu */
    .archive-toolbar {
        gap: 1rem;
    }

    .archive-search {
        flex-direction: column;
    }

    .archive-search input {
        min-width: 0 !important;
        width: 100%;
    }

    .archive-filters {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        scrollbar-width: thin;
    }

    .archive-filter {
        flex-shrink: 0;
        font-size: 0.7rem !important;
        padding: 0.38rem 0.8rem !important;
    }

    /* Kaynak kartları */
    .kaynak-card {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 1.15rem 0 !important;
    }

    .kaynak-card__no {
        font-size: 1.35rem !important;
        width: auto !important;
    }

    .kaynak-list .kaynak-card {
        padding: 1.15rem 1rem !important;
    }

    .kaynak-card__soz {
        font-size: 1rem !important;
        padding-left: 1rem;
    }

    .page-hero + .section {
        padding-top: 1.75rem !important;
    }

    .manifesto p,
    .bildirge-p {
        font-size: 1rem !important;
        line-height: 1.75 !important;
        font-weight: 400 !important;
        color: rgba(232, 227, 220, 0.85) !important;
    }

    .kaynak-detail__cite dl {
        grid-template-columns: 1fr !important;
    }

    .kaynak-detail__soz {
        padding: 1rem 1.1rem !important;
    }

    .kaynak-detail__soz,
    .kaynak-detail__soz .rich-content {
        font-size: 1.1rem !important;
    }

    /* Üye paneli */
    .panel-grid {
        padding-top: var(--header-height, 72px);
        gap: 0 !important;
    }

    .panel-sidebar {
        padding: 0.75rem 0 !important;
    }

    .panel-sidebar__profile,
    .panel-sidebar__divider {
        display: none !important;
    }

    .panel-sidebar__nav {
        display: flex;
        gap: 0.35rem;
        overflow-x: auto;
        padding: 0 clamp(16px, 4vw, 24px);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .panel-sidebar__nav::-webkit-scrollbar {
        display: none;
    }

    .panel-sidebar__nav li {
        flex: 0 0 auto;
    }

    .panel-sidebar__nav a {
        white-space: nowrap;
        margin-bottom: 0;
        padding: 0.5rem 0.85rem;
        font-size: 0.9rem;
    }

    .panel-sidebar__menu {
        position: relative;
    }

    .panel-sidebar__menu.has-sag .panel-sidebar__nav {
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent calc(100% - 20px));
        mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent calc(100% - 20px));
    }

    .panel-sidebar__menu.has-sol .panel-sidebar__nav {
        -webkit-mask-image: linear-gradient(to right, transparent 20px, #000 72px);
        mask-image: linear-gradient(to right, transparent 20px, #000 72px);
    }

    .panel-sidebar__menu.has-sol.has-sag .panel-sidebar__nav {
        -webkit-mask-image: linear-gradient(to right, transparent 20px, #000 72px, #000 calc(100% - 72px), transparent calc(100% - 20px));
        mask-image: linear-gradient(to right, transparent 20px, #000 72px, #000 calc(100% - 72px), transparent calc(100% - 20px));
    }

    .panel-sidebar__menu.has-sol .panel-sidebar__kaydir--sol,
    .panel-sidebar__menu.has-sag .panel-sidebar__kaydir--sag {
        display: flex;
    }

    .panel-sidebar__kaydir {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0 0 2px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.14);
        color: #fff;
        font-size: 1.35rem;
        line-height: 1;
        cursor: pointer;
    }

    .panel-sidebar__kaydir--sol {
        left: 6px;
    }

    .panel-sidebar__kaydir--sag {
        right: 6px;
    }

    .panel-welcome__inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .panel-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }

    .panel-stat-card {
        padding: 1rem !important;
    }

    .panel-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.25rem;
    }

    .panel-card {
        padding: 1rem !important;
    }

    .panel-table th,
    .panel-table td {
        padding: 0.55rem 0.4rem !important;
    }

    .panel-table .panel-status,
    .panel-table__tarih {
        white-space: nowrap;
    }

    /* Sayfalama & paylaşım */
    .pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .pagination__list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .share-bar {
        padding: 0.65rem 0.75rem;
    }

    .scroll-top {
        right: 14px !important;
        bottom: 14px !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* Formlar */
    .contact-grid,
    .form-row {
        grid-template-columns: 1fr !important;
    }

    .rich-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Marquee */
    .marquee__item,
    .ticker-inner span {
        padding: 0 18px !important;
        letter-spacing: 2px !important;
        font-size: 0.62rem !important;
    }

    /* Kart grid */
    .card-grid {
        grid-template-columns: 1fr !important;
    }

    .stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.25rem !important;
    }

    .auth-card {
        padding: 1.75rem 1.25rem !important;
    }

    .auth-page {
        padding: calc(var(--header-height, 72px) + 1.5rem) 1rem 2rem !important;
        min-height: 0 !important;
    }
}

/* Küçük telefon */
@media (max-width: 480px) {
    .panel-table__ikincil {
        display: none;
    }

    .panel-stats,
    .stats {
        grid-template-columns: 1fr !important;
    }

    body.has-hero .top-left-logo {
        left: 14px !important;
        top: 16px !important;
    }

    body.has-hero .sidebar-toggle {
        right: 14px !important;
    }

    .hero__eyebrow {
        font-size: 0.68rem !important;
        letter-spacing: 1px !important;
    }

    .section__title,
    .yzx-heading-line span,
    .pjx-heading-line span {
        font-size: clamp(1.4rem, 7vw, 1.9rem) !important;
    }

    .sidebar-drawer {
        width: 100vw !important;
        padding-top: 72px !important;
    }
}

/* Yatay mobil */
@media (max-width: 900px) and (orientation: landscape) {
    .hero__title {
        font-size: clamp(1.35rem, 5.5vw, 2rem) !important;
    }

    .hero__actions {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero__actions .btn,
    .hero__actions .bprimary,
    .hero__actions .bghost {
        width: auto !important;
        flex: 1 1 140px;
        max-width: 200px;
    }
}
