/* =========================================================
   MOBİL ÖZEL DÜZENLEMELER
   Bu dosya sadece 768px ve altındaki ekranlarda aktif olur.
   style.css'ten SONRA yüklenmelidir.
   ========================================================= */

/* Masaüstünde hamburger butonu gizli */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {

    /* ------------------------------------------------------
       1. GENEL
    ------------------------------------------------------ */
    .wrap {
        width: calc(100% - 1.5rem) !important;
        max-width: 100% !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* ------------------------------------------------------
       2. HEADER & MOBİL MENÜ
    ------------------------------------------------------ */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .site-nav-wrap {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        min-height: 60px !important;
        padding-block: 0.5rem !important;
        position: relative;
        flex-wrap: nowrap !important;
    }

    .site-brand {
        font-size: 1.05rem !important;
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Hamburger butonu */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 42px;
        height: 42px;
        padding: 11px 9px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 150ms ease;
        box-sizing: border-box;
    }

    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus {
        background: #eff6ff;
        border-color: #2563eb;
        outline: none;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #17365d;
        border-radius: 2px;
        transition: all 250ms ease;
    }

    /* Açık durumda X ikonu */
    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Nav — mobilde gizli, açılınca görünür */
    .site-nav {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #fff !important;
        border: 1px solid #e2e8f0;
        border-top: none;
        border-radius: 0 0 0.75rem 0.75rem;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0.5rem !important;
        margin-top: 0 !important;
        display: none !important;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 998;
        box-sizing: border-box;
    }

    .site-nav.is-open {
        display: flex !important;
        animation: navSlideDown 200ms ease-out;
    }

    @keyframes navSlideDown {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .site-nav > a {
        display: block !important;
        width: 100% !important;
        padding: 0.75rem 0.9rem !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: 0.5rem !important;
        box-sizing: border-box !important;
        color: #334155 !important;
        border-bottom: 1px solid #e2e8f0;
        text-decoration: none;
    }

    .site-nav > a:last-child {
        border-bottom: none;
    }

    .site-nav > a:hover,
    .site-nav > a:focus {
        background: #eff6ff !important;
        color: #2563eb !important;
    }

    /* Dropdown — mobilde tam genişlik, accordion */
    .site-dropdown {
        width: 100%;
        border-bottom: 1px solid #e2e8f0;
    }

    .site-dropdown summary,
    .site-nav .dropdown-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        padding: 0.75rem 0.9rem !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: 0.5rem !important;
        box-sizing: border-box !important;
        color: #334155 !important;
        cursor: pointer;
    }

    .site-dropdown summary:hover,
    .site-dropdown summary:focus {
        background: #eff6ff !important;
        color: #2563eb !important;
    }

    .site-dropdown summary::after {
        content: '▾' !important;
        font-size: 0.75rem;
        transition: transform 200ms ease;
    }

    .site-dropdown[open] summary::after {
        transform: rotate(180deg);
    }

    .site-dropdown-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 0 !important;
        overflow: hidden !important;
        background: #f8fafc !important;
        border: none !important;
        border-radius: 0.5rem !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 0 0.25rem 0 !important;
        transition: max-height 300ms ease, padding 200ms ease;
    }

    .site-dropdown[open] .site-dropdown-menu {
        max-height: 400px !important;
        overflow-y: auto !important;
        padding: 0.25rem !important;
    }

    .site-dropdown-menu a {
        display: block !important;
        padding: 0.6rem 0.75rem !important;
        font-size: 0.82rem !important;
        font-weight: 600 !important;
        color: #334155 !important;
        border-radius: 0.375rem !important;
        text-decoration: none;
    }

    .site-dropdown-menu a:hover {
        background: #fff !important;
        color: #2563eb !important;
    }

    /* ------------------------------------------------------
       3. ANA LAYOUT — İÇERİK ÖNCE, SIDEBAR SONRA
    ------------------------------------------------------ */
    .page-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
        padding-block: 1.25rem !important;
    }

    .page-main {
        order: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .sidebar {
        order: 2 !important;
        width: 100% !important;
        position: static !important;
        top: auto !important;
    }

    .sidebar-left {
        order: 2 !important;
    }

    .sidebar-right {
        order: 3 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* ------------------------------------------------------
       4. SIDEBAR — DİKEY LİSTE, TAM GENİŞLİK
    ------------------------------------------------------ */
    .sidebar-box {
        padding: 1rem !important;
        width: 100% !important;
    }

    .sidebar-title h2 {
        font-size: 1rem !important;
    }

    .sidebar-category-list {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
        width: 100% !important;
    }

    .sidebar-category-link {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        padding: 0.6rem 0.65rem !important;
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        gap: 0.5rem !important;
        box-sizing: border-box !important;
    }

    .sidebar-category-link > span:last-child {
        flex: 1 1 auto;
        min-width: 0;
        word-break: break-word;
    }

    .sidebar-category-icon {
        flex: 0 0 auto;
    }

    .sidebar-action {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.8rem !important;
    }

    .sidebar-blog-item strong {
        font-size: 0.8rem !important;
    }

    .sidebar-blog-item span {
        font-size: 0.72rem !important;
    }

    /* ------------------------------------------------------
       5. HERO SLIDER
    ------------------------------------------------------ */
    .hero-slider {
        border-radius: 0.875rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-slide {
        padding: 1.75rem 1.25rem 3rem !important;
        min-height: 260px !important;
    }

    .hero-title {
        font-size: 1.375rem !important;
        line-height: 1.2 !important;
    }

    .hero-text {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .hero-label {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hero-btn {
        width: 100% !important;
        justify-content: center;
        padding: 0.65rem 1rem !important;
        font-size: 0.85rem !important;
        box-sizing: border-box;
    }

    .slider-prev,
    .slider-next {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
    }

    .slider-prev { left: 8px !important; }
    .slider-next { right: 8px !important; }

    .slider-dot {
        width: 8px !important;
        height: 8px !important;
    }

    .slider-dot.active {
        width: 20px !important;
    }

    /* ------------------------------------------------------
       6. BÖLÜM BAŞLIKLARI
    ------------------------------------------------------ */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
    }

    .section-title {
        font-size: 1.2rem !important;
    }

    .section-desc {
        font-size: 0.8rem !important;
    }

    .section-link {
        font-size: 0.8rem !important;
    }

    /* ------------------------------------------------------
       7. TEST / SINAV LİSTESİ (exam-row)
    ------------------------------------------------------ */
    .exam-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 0.9rem 1rem !important;
    }

    .exam-title {
        font-size: 0.9rem !important;
        line-height: 1.35 !important;
    }

    .exam-meta {
        font-size: 0.7rem !important;
        gap: 0.4rem !important;
    }

    .exam-start {
        width: 100% !important;
        text-align: center !important;
        padding: 0.6rem !important;
        font-size: 0.8rem !important;
    }

    /* ------------------------------------------------------
       8. KARTLAR
    ------------------------------------------------------ */
    .card-body {
        padding: 1.25rem !important;
    }

    .card-title {
        font-size: 1.1rem !important;
    }

    .card-text {
        font-size: 0.85rem !important;
    }

    /* ------------------------------------------------------
       9. KATEGORİ SAYFASI (kt-*)
    ------------------------------------------------------ */
    .kt-hero,
    .kt-hero-detail {
        padding: 1.25rem !important;
        border-radius: 0.875rem !important;
    }

    .kt-hero h1,
    .kt-hero-detail h1 {
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
    }

    .kt-hero p,
    .kt-hero-detail p {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
    }

    .kt-category-grid,
    .kt-test-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .kt-category-card,
    .kt-test-card {
        padding: 1rem !important;
        border-radius: 0.75rem !important;
    }

    .kt-category-card h2 {
        font-size: 1rem !important;
    }

    .kt-category-card p {
        font-size: 0.8rem !important;
    }

    .kt-test-card h3 {
        font-size: 0.95rem !important;
    }

    .kt-test-card .kt-desc {
        font-size: 0.8rem !important;
    }

    .kt-test-card-meta span {
        font-size: 0.7rem !important;
        padding: 3px 7px !important;
    }

    .kt-start-btn {
        padding: 0.65rem !important;
        font-size: 0.8rem !important;
    }

    .kt-study-guide {
        padding: 1.25rem !important;
    }

    .kt-study-steps {
        grid-template-columns: 1fr !important;
    }

    .kt-study-step {
        padding: 0.75rem !important;
    }

    .kt-seo-box {
        padding: 1.25rem !important;
    }

    .kt-seo-box h2 { font-size: 1.1rem !important; }
    .kt-seo-box h3 { font-size: 0.95rem !important; }

    .kt-section-header h2 {
        font-size: 1.2rem !important;
    }

    .kt-related-link {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    .kt-breadcrumb {
        font-size: 0.75rem !important;
    }

    /* ------------------------------------------------------
       10. TEST / SINAV ÇÖZME EKRANI
    ------------------------------------------------------ */
    .test-top-bar {
        padding: 0.9rem 1rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.65rem !important;
    }

    .test-top-bar h1 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }

    .test-top-bar small {
        font-size: 0.75rem !important;
    }

    .test-top-bar .top-right {
        width: 100% !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .test-top-bar .top-right span {
        font-size: 0.75rem !important;
    }

    .timer {
        padding: 0.5rem 0.85rem !important;
        font-size: 0.85rem !important;
        min-width: 65px !important;
    }

    .test-layout {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .test-card,
    .test-side,
    .test-result {
        padding: 1.1rem !important;
        border-radius: 0.75rem !important;
    }

    .question {
        font-size: 1.05rem !important;
        line-height: 1.45 !important;
        margin-bottom: 1rem !important;
    }

    .qno {
        font-size: 0.8rem !important;
    }

    .option {
        padding: 0.75rem !important;
        gap: 0.6rem !important;
        border-radius: 0.65rem !important;
        margin: 0.5rem 0 !important;
    }

    .letter {
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px !important;
        font-size: 0.8rem !important;
    }

    .test-actions {
        flex-direction: column-reverse !important;
        gap: 0.5rem !important;
    }

    .test-actions .btn {
        width: 100% !important;
    }

    .qn-grid {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 0.4rem !important;
    }

    .qn {
        height: 34px !important;
        font-size: 0.75rem !important;
    }

    .score {
        font-size: 2.5rem !important;
    }

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

    .test-stat b { font-size: 1.35rem !important; }

    .detail-box {
        padding: 0.85rem !important;
    }

    .detail-box .qtitle {
        font-size: 0.85rem !important;
    }

    .topic-table {
        font-size: 0.72rem !important;
    }

    .topic-table th,
    .topic-table td {
        padding: 0.4rem 0.3rem !important;
    }

    /* ------------------------------------------------------
       11. BLOG DETAY
    ------------------------------------------------------ */
    .blog-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .blog-detail-title {
        font-size: 1.35rem !important;
    }

    .blog-detail-content {
        font-size: 0.9rem !important;
        line-height: 1.75 !important;
    }

    .blog-card {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        padding: 0.9rem !important;
    }

    .blog-card-image {
        height: 160px !important;
    }

    .blog-card-title {
        font-size: 1rem !important;
    }

    /* ------------------------------------------------------
       12. FOOTER
    ------------------------------------------------------ */
    .site-footer {
        padding: 1.5rem 0 !important;
        margin-top: 2rem !important;
    }

    .footer-links {
        gap: 0.75rem !important;
    }

    .footer-links a {
        font-size: 0.75rem !important;
    }

    /* ------------------------------------------------------
       13. BUTONLAR
    ------------------------------------------------------ */
    .btn {
        padding: 0.6rem 1rem !important;
        font-size: 0.82rem !important;
    }

    .btn-lg {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
    }
}

/* Çok küçük telefonlar */
@media (max-width: 400px) {
    .site-brand {
        font-size: 0.9rem !important;
    }

    .mobile-menu-toggle {
        width: 38px !important;
        height: 38px !important;
        padding: 9px 7px !important;
    }

    .hero-title {
        font-size: 1.2rem !important;
    }

    .hero-slide {
        padding: 1.5rem 1rem 2.75rem !important;
        min-height: 240px !important;
    }

    .qn-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}