/* ============================================================
   Gri English — Global Site Overrides
   Nav bar elevation, dropdown highlights, root zoom
   ============================================================ */

/* Root zoom adjustment — tüm rem değerleri %10 küçültür */
html { font-size: 14.4px; }

/* ============ NAV BAR — Subtle Elevation (Varyant A) ============ */
.site-header {
  background: #fcfaf3 !important;
  border-bottom: 1px solid #ece8de !important;
  box-shadow: 0 2px 8px rgba(26, 34, 48, 0.05) !important;
  position: relative;
  z-index: 100;
}
.site-header .wrap.nav {
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
}
[data-theme="dark"] .site-header {
  background: #1a2230 !important;
  border-bottom-color: #2d3548 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25) !important;
}

/* Dark mode navbar iki satirli yazi kontrasti (nw1/nw2 main.css'te sabit hex) */
[data-theme="dark"] .nav-links a .nw1 {
  color: #e6e2d6 !important;
}
[data-theme="dark"] .nav-links a .nw2 {
  color: #a8a498 !important;
}
[data-theme="dark"] .nav-links a svg.caret {
  opacity: 0.65 !important;
}

/* ============ DROPDOWN ITEM HIGHLIGHT ============ */
/* Hover ve aktif öğeler beyaz zemine geçer, krem dropdown'dan ayrılır */
.nav-dropdown-menu li > a:hover,
.nav-submenu-list li > a:hover,
.nav-dropdown-menu li > a.active,
.nav-submenu-list li > a.active,
.nav-submenu > a:hover,
.nav-submenu.is-open > a {
  background: #fff !important;
  color: var(--text, #1a2230) !important;
}

[data-theme="dark"] .nav-dropdown-menu li > a:hover,
[data-theme="dark"] .nav-submenu-list li > a:hover,
[data-theme="dark"] .nav-dropdown-menu li > a.active,
[data-theme="dark"] .nav-submenu-list li > a.active,
[data-theme="dark"] .nav-submenu > a:hover,
[data-theme="dark"] .nav-submenu.is-open > a {
  background: #232c3f !important;
  color: #f0f0f0 !important;
}

/* Dropdown menü kendi zeminini krem tutar, hover beyazı belirgin olsun */
.nav-dropdown-menu,
.nav-submenu-list {
  background: #fcfaf3 !important;
  border: 1px solid #ece8de !important;
  box-shadow: 0 8px 24px rgba(26, 34, 48, 0.08) !important;
}
[data-theme="dark"] .nav-dropdown-menu,
[data-theme="dark"] .nav-submenu-list {
  background: #1a2230 !important;
  border-color: #2d3548 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================================
   FOOTER REDESIGN — Editorial 4-column layout + mascot
   ============================================================ */
.site-footer,
.footer {
  background: var(--bg-card, #fff);
  border-top: 1px solid var(--line, #ece8de);
  margin-top: 2.5rem;
  padding: 2rem 0 0;
}
[data-theme="dark"] .site-footer,
[data-theme="dark"] .footer {
  background: #1a1f28;
  border-top-color: #2d3548;
}

.site-footer .wrap,
.footer .wrap {
  position: relative;
}

.footer-grid-v2 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.8rem;
  padding: 0 0 1.6rem;
}

.footer-brand .brand {
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
}
.footer-brand p {
  color: var(--text-soft, var(--text-muted));
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.3rem 0 0;
  max-width: 340px;
}

.site-footer h4,
.footer h4 {
  font-family: var(--font-ui, Inter), system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted, #6b6862);
  margin: 0.2rem 0 0.7rem;
}
.site-footer ul,
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer ul li,
.footer ul li {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.site-footer ul li a,
.footer ul li a {
  color: var(--text, #1a2230);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer ul li a:hover,
.footer ul li a:hover {
  color: #c89a3c;
}

.footer-bottom {
  border-top: 1px solid var(--line, #ece8de);
  padding: 0.85rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: var(--text-muted, #6b6862);
}
.footer-tagline {
  font-family: var(--font-ui, Inter), system-ui, sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Decorative cat in footer corner */
.footer-cat {
  position: absolute;
  right: 0.5rem;
  bottom: 2.4rem;
  width: 28px;
  height: 28px;
  color: rgba(26, 34, 48, 0.18);
  pointer-events: none;
  transition: color 0.25s, transform 0.25s;
}
[data-theme="dark"] .footer-cat {
  color: rgba(244, 239, 227, 0.2);
}
.footer-cat svg {
  width: 100%;
  height: 100%;
}
.site-footer:hover .footer-cat,
.footer:hover .footer-cat {
  color: rgba(200, 154, 60, 0.7);
  transform: translateY(-2px);
}

@media (max-width: 800px) {
  .footer-grid-v2 {
    grid-template-columns: 1fr 1fr;
    gap: 1.3rem;
    padding-bottom: 1.4rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-cat {
    bottom: 2rem;
    width: 22px;
    height: 22px;
  }
}
@media (max-width: 500px) {
  .footer-grid-v2 {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

/* ============================================================
   MASCOT helpers — kedi reusable
   ============================================================ */
.gri-cat-inline {
  display: inline-block;
  vertical-align: middle;
  width: 1em;
  height: 1em;
  color: currentColor;
}
.gri-cat-inline svg {
  width: 100%;
  height: 100%;
}

/* ============================================================
   LOADING — opsiyonel kedi loader (loading mesajına .gri-loader sınıfı ekle)
   ============================================================ */
.gri-loader {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.5rem;
  color: var(--text-muted);
}
.gri-loader-cat {
  width: 40px;
  height: 40px;
  color: var(--cat-accent, #c89a3c);
  animation: gri-cat-bob 1.4s ease-in-out infinite;
}
.gri-loader-cat svg { width: 100%; height: 100%; }
.gri-loader-text {
  font-family: var(--font-ui, Inter), system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
@keyframes gri-cat-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ============================================================
   MOBILE MAKEOVER — iPhone 14 Plus (428px) referans
   Phase 1: nav drawer, typography, tap targets, card grids
   ============================================================ */

@media (max-width: 720px) {

  /* ---------- ROOT TIPOGRAFI ----------
     Mobile'da rem zoom'u kaldır, normal okuma boyutuna döndür */
  html { font-size: 16px; }

  body {
    line-height: 1.6;
  }

  /* Uzun parçalar için rahat satır yüksekliği */
  .wrap p,
  article p,
  .lead {
    line-height: 1.65;
  }

  h1 { font-size: 1.7rem; line-height: 1.25; }
  h2 { font-size: 1.4rem; line-height: 1.3; }
  h3 { font-size: 1.18rem; line-height: 1.35; }
  h4 { font-size: 1rem; line-height: 1.4; }

  /* ---------- WRAP PADDING ----------
     Ekran kenarı boşluğu küçülsün ama içerik nefes alsın */
  .wrap { padding: 0 1.1rem; }
  .wrap.nav { padding: 0.5rem 1rem; }

  /* ---------- NAV DRAWER REWRITE ----------
     Önceki: dropdownlar absolute → drawer içinde bozuk
     Yeni: drawer içinde dropdownlar accordion */

  .nav-links.nav-mobile-drawer.open {
    top: 56px;
    padding: 0.5rem 0 1rem;
    max-height: calc(100vh - 56px);
    border-radius: 0 0 12px 12px;
  }

  /* Her nav öğesi tam genişlik, kalın ayraç, dokunma alanı */
  .nav-links.nav-mobile-drawer.open li {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0;
  }

  .nav-links.nav-mobile-drawer.open > li > a,
  .nav-links.nav-mobile-drawer.open .nav-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 0.85rem 1.4rem;
    font-size: 1rem;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
  }

  /* Dropdown'lar drawer içinde inline (accordion) */
  .nav-mobile-drawer .nav-dropdown {
    position: static;
  }

  .nav-mobile-drawer .nav-dropdown .nav-dropdown-menu {
    position: static !important;
    display: none;
    background: rgba(0,0,0,0.025) !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0;
    padding: 0.3rem 0;
    min-width: 0;
    width: 100%;
    border-radius: 0;
  }
  [data-theme="dark"] .nav-mobile-drawer .nav-dropdown .nav-dropdown-menu {
    background: rgba(255,255,255,0.04) !important;
  }

  .nav-mobile-drawer .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  /* Caret rotation when open */
  .nav-mobile-drawer .nav-dropdown.open .nav-dropdown-trigger .caret {
    transform: rotate(180deg);
  }
  .nav-mobile-drawer .nav-dropdown-trigger .caret {
    transition: transform 0.18s;
  }

  /* Dropdown menü item'leri girintili, daha küçük */
  .nav-mobile-drawer .nav-dropdown-menu > li {
    border-bottom: none !important;
  }
  .nav-mobile-drawer .nav-dropdown-menu > li > a {
    padding: 0.7rem 1.4rem 0.7rem 2.5rem;
    font-size: 0.92rem;
    min-height: 44px;
    color: var(--text-muted);
    font-weight: 400;
  }
  .nav-mobile-drawer .nav-dropdown-menu > li > a:hover {
    color: var(--text);
    background: transparent !important;
  }

  /* Submenu (3.kat) drawer içinde de inline */
  .nav-mobile-drawer .nav-submenu {
    position: static;
  }
  .nav-mobile-drawer .nav-submenu-list {
    position: static !important;
    display: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-width: 0;
    padding: 0;
  }
  .nav-mobile-drawer .nav-submenu.open .nav-submenu-list {
    display: block;
  }
  .nav-mobile-drawer .nav-submenu-trigger {
    padding: 0.7rem 1.4rem 0.7rem 2.5rem !important;
    font-size: 0.92rem !important;
    min-height: 44px;
    color: var(--text-muted);
    font-weight: 400 !important;
  }
  .nav-mobile-drawer .nav-submenu-list > li > a {
    padding: 0.6rem 1.4rem 0.6rem 3.5rem !important;
    font-size: 0.88rem !important;
    min-height: 40px;
    color: var(--text-muted);
  }
  .nav-mobile-drawer .nav-submenu.open .nav-submenu-trigger .caret-right {
    transform: rotate(90deg);
  }

  /* Hamburger butonu büyüt ve dokunma alanını artır */
  .site-header .mobile-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
  }
  .site-header .mobile-toggle:hover {
    background: rgba(0,0,0,0.04);
  }
  .site-header .mobile-toggle.open {
    background: rgba(0,0,0,0.06);
  }
  [data-theme="dark"] .site-header .mobile-toggle:hover {
    background: rgba(255,255,255,0.05);
  }

  /* Brand mobilde küçülsün ama okunsun */
  .site-header .brand { 
    margin-left: 1rem;
    font-size: 1.15rem;
  }

  /* ---------- HUB CARDS — tek sütun, geniş tap alanı ---------- */
  .qb-hub-grid,
  .product-grid,
  .exam-grid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem;
  }

  .qb-hub-card,
  .product-card {
    padding: 1.3rem 1.2rem;
    min-height: auto;
  }

  /* CTA butonları daha büyük */
  .btn,
  .qb-hub-cta,
  .product-card .product-cta {
    min-height: 44px;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
  }

  /* ---------- CARD GENEL ---------- */
  .card,
  .collapse-card {
    padding: 1.1rem 1rem;
  }

  /* ---------- TABLOLAR — yatay scroll ---------- */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* ---------- HERO SECTIONLAR ---------- */
  .hero,
  .hero-ed {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  .hero h1,
  .hero-ed h1 {
    font-size: 1.8rem;
    line-height: 1.22;
  }
  .hero .lead,
  .hero-ed .lead {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* ---------- BREADCRUMB --------- */
  .breadcrumb {
    padding: 0.7rem 0;
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

}

/* ---------- 480px ve altı: daha sıkı kenarlar ---------- */
@media (max-width: 480px) {
  .wrap { padding: 0 0.9rem; }
  .site-header .brand { margin-left: 0.8rem; font-size: 1.08rem; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.3rem; }
}

/* ============================================================
   MOBILE MAKEOVER — Phase 2
   Drawer polish, mockup frame hide, reveal fix, scroll-to-top
   ============================================================ */

/* ---------- Scroll-to-top button (her sayfada) ---------- */
.scroll-to-top {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2C5856;
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s, background 0.15s;
  z-index: 95;
  transform: translateY(10px);
  padding: 0;
}
.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background: #1f4540;
}
.scroll-to-top:active {
  transform: scale(0.92);
}
.scroll-to-top svg {
  width: 22px;
  height: 22px;
}
[data-theme="dark"] .scroll-to-top {
  background: #9C7F45;
}
[data-theme="dark"] .scroll-to-top:hover {
  background: #b89656;
}

@media (max-width: 720px) {

  /* ---------- 1. GİRİŞ butonu drawer içinde uygun şekilde ---------- */
  .nav-links.nav-mobile-drawer.open .btn-nav-cta {
    background: #2C5856 !important;
    color: #fff !important;
    border-radius: 10px !important;
    margin: 1rem 1.4rem 0.5rem !important;
    padding: 0.9rem 1.2rem !important;
    text-align: center !important;
    display: block !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    min-height: 48px !important;
    border: none !important;
  }
  .nav-links.nav-mobile-drawer.open li:has(> .btn-nav-cta) {
    border-bottom: none !important;
  }
  [data-theme="dark"] .nav-links.nav-mobile-drawer.open .btn-nav-cta {
    background: #9C7F45 !important;
  }

  /* ---------- 2. Aa + Theme toggle yan yana, ortada ---------- */
  .nav-links.nav-mobile-drawer.open .font-size-wrap,
  .nav-links.nav-mobile-drawer.open .theme-toggle-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-bottom: none !important;
    padding: 0.3rem 1.4rem !important;
    min-height: auto !important;
  }
  .nav-links.nav-mobile-drawer.open .font-size-toggle,
  .nav-links.nav-mobile-drawer.open .theme-toggle {
    min-width: 80px;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.02);
  }
  [data-theme="dark"] .nav-links.nav-mobile-drawer.open .font-size-toggle,
  [data-theme="dark"] .nav-links.nav-mobile-drawer.open .theme-toggle {
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
  }

  /* ---------- 3. Fake browser frame (panelim, yazi-pratigi window) — mobilde sade görünüm ---------- */
  .panelim-window .pw-titlebar,
  .yazi-window .yw-titlebar {
    display: none !important;
  }
  .panelim-window,
  .yazi-window {
    border-radius: 12px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
  }
  .panelim-window .pw-viewport,
  .yazi-window .yw-viewport,
  .panelim-window .pw-slide,
  .yazi-window .yw-slide {
    padding: 1rem !important;
  }

  /* ---------- 4. Reveal animations — mobilde anında görün, scroll observer'a takılma ---------- */
  .reveal,
  .reveal-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .reveal.is-visible,
  .reveal-scroll.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }

  /* ---------- 5. Hero feature strip — tighter mobile layout ---------- */
  .hero-feature-strip {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.7rem !important;
    margin-top: 1rem !important;
  }
  .hero-feature-strip .hfi {
    padding: 0.7rem 0.6rem !important;
  }
  .hero-feature-strip .hfi-title {
    font-size: 0.85rem !important;
  }
  .hero-feature-strip .hfi-desc {
    font-size: 0.72rem !important;
  }

  /* ---------- 6. Panelim CTA buttons (PANELIME GIT vs UCRETSIZ HESAP AC) ---------- */
  .panelim-cta-bottom {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.7rem !important;
    width: 100% !important;
  }
  .panelim-cta-bottom .btn {
    width: 100% !important;
    min-height: 48px !important;
  }

  /* ---------- 7. Hero question preview & panel stage cards (Image 5) ---------- */
  .hero-q-preview,
  .panelim-stage,
  .panelim-content {
    width: 100% !important;
  }
  .panelim-section .wrap > * + * {
    margin-top: 1.5rem;
  }

  /* ---------- 8. CTA strip "Yardıma ihtiyacın..." iyileştirme ---------- */
  .cta-strip h2 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
  }
  .cta-strip .lead {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
  }
  .cta-strip .btn-outline {
    width: auto;
    min-height: 46px;
    padding: 0.75rem 1.4rem;
  }

  /* ---------- 9. Long pages — better bottom padding for scroll-to-top button ---------- */
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* 480 ve altı için ek sıkılaştırmalar */
@media (max-width: 480px) {
  .hero-feature-strip {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   CTA STRIP COMPACT — color inheritance bug fix
   .cta-strip parent: dark navy bg + cream text
   .cta-strip.compact override: cream bg, ama text color override eksik
   Sonuç: cream metin + cream bg = görünmez
   ============================================================ */
.cta-strip.compact h2 {
  color: var(--text) !important;
}
.cta-strip.compact .btn-outline {
  color: var(--text) !important;
  border-color: var(--text) !important;
  background: transparent !important;
}
.cta-strip.compact .btn-outline:hover {
  background: var(--text) !important;
  color: var(--bg) !important;
}
.cta-strip.compact .btn-ghost {
  color: var(--text-soft, var(--text)) !important;
}
.cta-strip.compact .btn-ghost:hover {
  color: var(--text) !important;
}

/* Dark mode: cta-strip.compact içinde light tekrar yanlış görünmesin */
[data-theme="dark"] .cta-strip.compact {
  background: var(--bg) !important;
}
[data-theme="dark"] .cta-strip.compact h2,
[data-theme="dark"] .cta-strip.compact .btn-outline {
  color: var(--text) !important;
  border-color: var(--text) !important;
}
[data-theme="dark"] .cta-strip.compact .btn-outline:hover {
  background: var(--text) !important;
  color: var(--bg) !important;
}

/* ============================================================
   MOBILE MAKEOVER — Phase 3
   Image 5, 6, 7, 8 specific fixes
   ============================================================ */

@media (max-width: 720px) {

  /* ----- IMAGE 5: hero-right CTA section ----- */
  /* hero-q-secondary-cta: full width, centered, breathing room */
  .hero-q-secondary-cta {
    width: 100% !important;
    margin-top: 1.5rem;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.6rem !important;
  }
  .hero-q-secondary-cta .qpc-btn {
    width: 100% !important;
    max-width: 360px;
    padding: 0.95rem 1.2rem !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
  }
  .hero-q-secondary-cta .qpc-note {
    text-align: center !important;
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    max-width: 320px;
  }

  /* hero-feature-strip Panel Takibi vs other items dengeli */
  .hero-feature-strip {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  .hero-feature-strip .hfi {
    text-align: left;
    border: 1px solid rgba(0,0,0,0.06);
  }
  [data-theme="dark"] .hero-feature-strip .hfi {
    border-color: rgba(255,255,255,0.08);
  }

  /* hero-right içeriği daha rahat */
  .hero-right {
    margin-top: 1rem !important;
  }
  .hero-q-preview {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }


  /* ----- IMAGE 6: soru.html bottom controls ----- */
  /* Action bar icon button tap target 44px, daha rahat spacing */
  .q-actionbar {
    padding: 0.6rem 0.6rem !important;
    gap: 0.4rem !important;
  }
  .q-actions {
    gap: 0.3rem !important;
    flex-wrap: nowrap;
  }
  .q-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0.6rem 0.55rem !important;
    border-radius: 8px;
  }
  .q-btn svg {
    width: 19px !important;
    height: 19px !important;
  }
  /* Primary action (Açıklama) ve nav buttons daha belirgin */
  .q-btn-explain {
    min-width: 48px !important;
  }
  .q-nav-pill {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.8rem !important;
    min-height: 44px !important;
  }


  /* ----- IMAGE 7: gri-ask modal açıkken passage column squeeze ----- */
  /* Mobile: gri sheet bottom sheet, ana content tam genişlik */
  body.gri-mobile-open .q-grid,
  body.gri-mobile-open .q-grid.show-gri {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }
  body.gri-mobile-open .q-grid > * {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Gri sheet maximum height %72'de tutuluyor — passage'a alan kalır */
  .q-grid.show-gri .q-gri {
    max-height: 72vh !important;
  }


  /* ----- IMAGE 8: IELTS deneme timer bar ----- */
  .timer-bar {
    padding: 0.6rem 0.9rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
  }
  .timer-bar .timer {
    font-size: 0.92rem !important;
    flex: 1 1 auto !important;
    min-width: 0;
  }
  .timer-bar .timer strong {
    font-size: 1.05rem !important;
  }
  .timer-toggle-btn {
    padding: 0.55rem 0.9rem !important;
    font-size: 0.75rem !important;
    min-height: 40px;
    letter-spacing: 0.06em !important;
  }
  .timer-bar .submit-btn {
    padding: 0.55rem 1rem !important;
    font-size: 0.78rem !important;
    min-height: 40px;
  }
  .font-zoom-group {
    order: 99;
    flex: 0 0 100%;
    justify-content: center;
    display: flex !important;
  }
  .font-zoom-btn {
    padding: 0.45rem 0.8rem !important;
    flex: 1;
    max-width: 80px;
  }

  /* Tab bar (Passage 1 / Passage 2 / Hata Bildir) — tappable */
  .tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tab-btn {
    padding: 0.85rem 1rem !important;
    font-size: 0.9rem !important;
    min-height: 44px;
  }
  .tab-btn .tab-progress {
    font-size: 0.7rem !important;
  }

  /* Reading & writing 2-column passage layout mobilde 1-col */
  .passage-wrapper {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  .passage-left,
  .passage-right {
    padding: 1.2rem 1rem !important;
  }
}

/* 480 ve altı için ek mobile tweaks */
@media (max-width: 480px) {
  /* Soru.html bottom bar: pill kompak görünüm */
  .q-nav-pill .np-count {
    font-size: 0.78rem;
  }
  /* hfi tek sütun */
  .hero-feature-strip .hfi {
    padding: 0.7rem 0.6rem;
  }
  .hero-feature-strip .hfi-title {
    font-size: 0.85rem;
  }
}

/* ============================================================
   PHASE 4 — GLOBAL DESIGN REFRESH
   Tipografi, buton, kart, dekor, spacing tutarlılığı
   Hedef: editorial premium ama sade ve nefes alabilir
   ============================================================ */

/* ---------- 1. TİPOGRAFİ — Body Inter, Display serif ---------- */
/* Önceki: Crimson Pro (body serif) + Playfair (display) + Inter (UI) = karışık */
/* Yeni: Inter body, Playfair sadece display/heading, serif sadece prose */

body,
p:not(.lead):not(.qp-passage):not(.qp-question):not(.passage-content),
.btn, .qb-hub-card p, .product-card p,
.cta-text, .hero-feature-strip .hfi-desc,
.qb-topic-name, .qb-topic-count,
li, label, input, textarea, select, button {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Lead text — opsiyonel serif kalır ama Inter de iyi durur. Inter'de bırakıyorum, daha modern */
.lead, .hero-lead-ed {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 400;
  line-height: 1.65;
}

/* Editorial prose (passage, poem, story) — serif KALIR */
.qp-passage, .qp-question, .passage-content,
.q-passage, article.editorial,
blockquote {
  font-family: 'Crimson Pro', 'EB Garamond', Georgia, serif !important;
}

/* Heading anatomy — net hiyerarşi */
h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  font-weight: 600;
}
h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem) !important;
  line-height: 1.2 !important;
  letter-spacing: -0.015em;
  font-weight: 600;
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  font-weight: 600;
}
h4 {
  font-size: 0.98rem !important;
  line-height: 1.4 !important;
  font-weight: 600;
}

/* ---------- 2. BUTON SİSTEMİ — 3 tip, tek anatomi ---------- */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem;
  min-height: 44px !important;
  padding: 0.7rem 1.4rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  border-radius: 8px !important;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--teal) !important;
  color: #fff !important;
  border-color: var(--teal) !important;
}
.btn-primary:hover {
  background: var(--teal-deep) !important;
  border-color: var(--teal-deep) !important;
}

.btn-outline {
  background: transparent !important;
  color: var(--text) !important;
  border-color: var(--text) !important;
}
.btn-outline:hover {
  background: var(--text) !important;
  color: var(--bg) !important;
}

.btn-ghost {
  background: transparent !important;
  color: var(--text-soft, var(--text)) !important;
  border-color: transparent !important;
  padding: 0.7rem 1rem !important;
}
.btn-ghost:hover {
  background: rgba(0,0,0,0.05) !important;
  color: var(--text) !important;
}

[data-theme="dark"] .btn-ghost:hover {
  background: rgba(255,255,255,0.06) !important;
}

/* ---------- 3. KART SİSTEMİ — tek tip radius, shadow ---------- */
.card,
.qb-hub-card,
.product-card,
.exam-card,
.hero-q-preview,
.collapse-card,
.panel-card,
.dashboard-card,
.qb-list-card,
.panelim-window,
.yazi-window {
  border-radius: 12px !important;
  border: 1px solid var(--line) !important;
  background: var(--bg-card, #fff) !important;
  box-shadow: 0 1px 3px rgba(26, 34, 48, 0.04) !important;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s !important;
}
.card:hover,
.qb-hub-card:hover,
.product-card:hover,
.exam-card:hover {
  border-color: var(--line-strong) !important;
  box-shadow: 0 4px 14px rgba(26, 34, 48, 0.07) !important;
  transform: none !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .qb-hub-card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .exam-card,
[data-theme="dark"] .hero-q-preview {
  background: var(--bg-card) !important;
  border-color: var(--line) !important;
}

/* ---------- 4. DEKORATİF GÜRÜLTÜ KALDIR/AZALT ---------- */

/* Fake browser frame'ler — desktop ve mobil her yerde gizle */
.pw-titlebar,
.yw-titlebar {
  display: none !important;
}

/* Animated badge glow — sakin tut */
.hero-free-badge {
  animation: none !important;
}
.hero-free-badge::before {
  animation: none !important;
  box-shadow: 0 0 0 3px rgba(44, 138, 77, 0.15) !important;
}

/* Tag draw animation */
.hero-tag-rule::after {
  animation: none !important;
  transform: scaleX(1) !important;
}

/* Hero card rise */
.hero-q-preview {
  animation: none !important;
}

/* Excessive hover lifts */
.hfi:hover,
.exam-card:hover {
  transform: none !important;
}
.hfi:hover .hfi-icon {
  background: var(--teal-soft) !important;
  color: var(--teal) !important;
  transform: none !important;
  box-shadow: none !important;
}

/* CTA strip blob backgrounds — kısması */
.cta-strip.compact::before,
.panelim-showcase::before,
.hero.hero-editorial::before {
  opacity: 0.4 !important;
  animation: none !important;
}

/* ---------- 5. SPACING — daha çok nefes ---------- */
section {
  padding: 4rem 0;
}
section.compact,
.cta-strip.compact {
  padding: 3rem 0 !important;
}
.hero, .hero-editorial {
  padding: 3.5rem 0 3rem !important;
}

@media (max-width: 720px) {
  section { padding: 2.5rem 0; }
  section.compact, .cta-strip.compact { padding: 2rem 0 !important; }
  .hero, .hero-editorial { padding: 1.8rem 0 1.5rem !important; }
}

/* ---------- 6. EYEBROW/BADGE STANDARDLAŞTIRMASI ---------- */
.eyebrow,
.hero-overline,
.slide-tag,
.qp-chip-label,
.qb-hub-badge {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 11px !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
}

/* Renkli eyebrow kalır */
.eyebrow[style*="--gold"],
.eyebrow.gold {
  color: var(--gold) !important;
}

/* ---------- 7. INPUT/FORM TEMİZLİĞİ ---------- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  font-family: 'Inter', system-ui, sans-serif !important;
  border-radius: 8px !important;
  border: 1.5px solid var(--line) !important;
  padding: 0.7rem 0.9rem !important;
  min-height: 44px !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px var(--teal-soft) !important;
}

/* ---------- 8. LINK SİSTEMİ ---------- */
/* Sadece prose içindeki body text linklerinde underline + teal */
/* UI anchor'ları (kart, badge, CTA) kendi stillerini korur */
p > a:not(.btn),
.lead a:not(.btn),
li > a:not(.btn):not(.nav-dropdown-trigger):not(.nav-submenu-trigger):not(.nav-submenu-list a),
article a:not(.btn),
.prose a:not(.btn) {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(44, 88, 86, 0.3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.15s, color 0.15s;
}
p > a:not(.btn):hover,
.lead a:not(.btn):hover,
article a:not(.btn):hover,
.prose a:not(.btn):hover {
  text-decoration-color: var(--teal);
}

/* Nav listesi içi linkler underline'sız */
.nav-links a,
.nav-links li > a,
.nav-dropdown-menu a,
.nav-submenu-list a {
  text-decoration: none !important;
}

[data-theme="dark"] p > a:not(.btn),
[data-theme="dark"] .lead a:not(.btn),
[data-theme="dark"] article a:not(.btn) {
  color: var(--teal-deep);
}


/* ---------- Specific UI anchor reset — no underline ---------- */
/* Çalışma paketleri kartları, Ders notları kartları, vs */
.qb-hub-card,
.qb-hub-card a,
.product-card,
.product-card a,
.exam-card,
.exam-card a,
.qb-list-card,
.qb-list-card a,
.calisma-card,
.calisma-card a,
.notes-card,
.notes-card a,
.note-card-link {
  text-decoration: none !important;
}

/* Footer linkleri */
.site-footer a,
.footer a {
  text-decoration: none !important;
}

/* Breadcrumb linkleri */
.breadcrumb a {
  text-decoration: none !important;
}

/* Eyebrow ve overline türündeki linkler */
.eyebrow,
.hero-overline,
a.eyebrow,
.qb-hub-badge {
  text-decoration: none !important;
}

/* Hub card CTA arrow (İncele →) */
.qb-hub-cta,
.notes-card-cta,
.calisma-card-cta,
[class*="-cta"] {
  text-decoration: none !important;
}

/* Hero-q-preview ve içeriği */
.hero-q-preview,
.hero-q-preview a,
.hero-q-secondary-cta a {
  text-decoration: none !important;
}

/* Card description paragraflarındaki tekil link de override gerekir */
.qb-hub-card p,
.product-card p,
.notes-card p,
.exam-card p,
.qb-list-card p {
  /* Bu paragraf bir <a> wrapper içindeyse, p > a kuralı tetiklenir
     ama kartın kendisi link olduğunda underline istemiyoruz */
}
.qb-hub-card p > a,
.product-card p > a,
.notes-card p > a,
.exam-card p > a {
  text-decoration: none !important;
  color: inherit !important;
}

/* ---------- Button & toggle text-decoration reset ---------- */
/* Bazı toggle button'lar (wiz-rubric-toggle gibi) underline alıyor — sıfırla */
button,
button:hover,
button:focus,
.wiz-rubric-toggle,
.wiz-rubric-toggle:hover,
.wiz-rubric-toggle:focus,
[role="button"],
.toggle,
.collapse-toggle,
.tab-btn,
.tab-btn:hover {
  text-decoration: none !important;
}

/* ============================================================
   HERO MOBILE PROGRESSIVE DISCLOSURE
   Desktop: trigger gizli, content her zaman açık
   Mobile (<880px): trigger görünür, content default kapalı
   ============================================================ */

/* Default (desktop): trigger gizli, content açık */
.hero-collapsible .hero-collapse-trigger {
  display: none;
}
.hero-collapsible .hero-collapse-content {
  display: block;
}
.lead-extra {
  display: inline;
}

/* Mobile: progressive disclosure aktif */
@media (max-width: 880px) {

  /* Lead paragraph kısalt */
  .lead-extra {
    display: none;
  }

  /* Collapsible trigger görünür */
  .hero-collapsible {
    margin: 1.2rem 0 0;
  }
  .hero-collapsible .hero-collapse-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    min-height: 48px;
    transition: background 0.15s, border-color 0.15s;
  }
  .hero-collapsible .hero-collapse-trigger:hover,
  .hero-collapsible .hero-collapse-trigger:focus {
    background: var(--bg-card, #fff);
    border-color: var(--line-strong);
    outline: none;
  }
  .hero-collapsible .hero-collapse-trigger .hct-label {
    flex: 1;
    text-align: left;
  }
  .hero-collapsible .hero-collapse-trigger .hct-chev {
    transition: transform 0.2s ease;
    color: var(--text-muted);
    flex-shrink: 0;
  }
  .hero-collapsible[data-expanded="true"] .hero-collapse-trigger .hct-chev {
    transform: rotate(180deg);
  }

  /* Content default kapalı */
  .hero-collapsible .hero-collapse-content {
    display: none;
    margin-top: 0.8rem;
  }
  .hero-collapsible[data-expanded="true"] .hero-collapse-content {
    display: block;
    animation: hero-collapse-in 0.25s ease-out;
  }
  @keyframes hero-collapse-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Secondary CTA (Ücretsiz Hesap Aç) — primary CTA ile çift olduğu için gizle */
  .hero-q-secondary-cta {
    display: none !important;
  }

  /* Hero CTA buttons mobilde tam genişlik tek sütun */
  .hero-cta-ed {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem;
  }
  .hero-cta-ed .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Dark mode mobil trigger renk uyumu */
[data-theme="dark"] .hero-collapsible .hero-collapse-trigger {
  background: var(--bg-soft);
  border-color: var(--line);
}

/* ============================================================
   PHASE 5 — MODERN EDITORIAL MOBILE DEEPENING
   Mobile-specific refinement: tighter type, calmer chrome,
   better whitespace rhythm, single-purpose sections
   ============================================================ */

@media (max-width: 720px) {

  /* ----- 1. SECTION RHYTHM ----- */
  /* Daha az padding, daha çok content density, ama nefes alacak şekilde */
  section {
    padding: 2.2rem 0 !important;
  }
  section.compact,
  section[class*="-showcase"] {
    padding: 1.8rem 0 !important;
  }

  /* Hero özel - üst kısım sıkı, alt biraz nefes */
  .hero, .hero-editorial {
    padding: 1.5rem 0 1.2rem !important;
  }

  /* ----- 2. SECTION HEAD TİPOGRAFİ ----- */
  /* Her section başlığı net bir kademe gösterir */
  .section-head {
    margin-bottom: 1.5rem !important;
    text-align: left !important;
  }
  .section-head .eyebrow {
    font-size: 10px !important;
    letter-spacing: 0.16em !important;
    margin-bottom: 0.6rem !important;
    display: block;
  }
  .section-head h2 {
    font-size: clamp(1.45rem, 5vw, 1.85rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.015em;
    margin-bottom: 0.6rem !important;
  }
  .section-head h2 .it,
  .section-head h2 em {
    font-style: italic;
    font-weight: 500;
    color: var(--teal);
  }

  /* Diamond/divider dekorasyonu mobilde gizle - dikkat dağıtıyor */
  .section-head .divider,
  .section-head .dia,
  .panelim-divider {
    display: none !important;
  }

  /* Section head'ler altındaki açıklama metni */
  .section-lead,
  .section-head + p,
  .section-head p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: var(--text-soft);
    max-width: 100%;
  }


  /* ----- 3. PANELIM SHOWCASE — heavy but core ----- */
  /* 2-col panelim-content layout'u tek sütun, daha kompakt */
  .panelim-showcase .panelim-content {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  /* Feature buttons: liste daha kompakt */
  .panelim-showcase .pf-list {
    gap: 0.5rem !important;
  }
  .panelim-showcase .pf-item {
    padding: 0.85rem 0.95rem !important;
    border-radius: 10px;
    min-height: 64px;
  }
  .panelim-showcase .pf-icon-wrap {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .panelim-showcase .pf-text strong {
    font-size: 0.92rem;
    line-height: 1.3;
  }
  .panelim-showcase .pf-text span {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--text-muted);
    display: block;
    margin-top: 0.15rem;
  }
  .panelim-showcase .pf-marker {
    font-size: 0.7rem;
    flex-shrink: 0;
  }
  /* Panelim window mockup mobilde gizle - dekoratif */
  .panelim-showcase .panelim-stage,
  .panelim-showcase .panelim-window {
    display: none !important;
  }


  /* ----- 4. YAZI SHOWCASE — collapse extra-heavy detail ----- */
  .yazi-showcase .yazi-stage,
  .yazi-showcase .yazi-window {
    display: none !important;
  }
  .yazi-showcase .yazi-grid,
  .yazi-showcase .yazi-content {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }


  /* ----- 5. HOW-IT-WORKS — 4 steps kompakt ----- */
  .how-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }
  .how-step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.9rem;
    padding: 1rem 1.1rem !important;
    align-items: start;
    text-align: left !important;
  }
  .how-step .how-icon {
    width: 44px !important;
    height: 44px !important;
    grid-row: 1 / 3;
    margin: 0 !important;
  }
  .how-step .how-num {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    grid-column: 2;
    margin-bottom: 0.2rem;
  }
  .how-step h3 {
    grid-column: 2;
    font-size: 1.02rem !important;
    margin-bottom: 0.3rem !important;
  }
  .how-step p {
    grid-column: 2;
    font-size: 0.9rem !important;
    line-height: 1.55;
    color: var(--text-soft);
  }


  /* ----- 6. SINAVLAR GRID — 1 col, kompakt ----- */
  #sinavlar .exam-grid,
  .exam-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }
  .exam-card {
    padding: 1.15rem 1.2rem !important;
  }
  .exam-card h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.4rem !important;
  }
  .exam-card p,
  .exam-card .exam-desc {
    font-size: 0.88rem !important;
    line-height: 1.5;
    margin-bottom: 0.7rem;
  }


  /* ----- 7. MATERYALLER ----- */
  #materyaller .product-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }


  /* ----- 8. CTA-STRIP ----- */
  .cta-strip.compact .wrap-narrow {
    text-align: left !important;
  }
  .cta-strip.compact h2 {
    font-size: clamp(1.5rem, 5vw, 1.9rem) !important;
    margin-bottom: 0.7rem !important;
  }
  .cta-strip.compact .lead {
    font-size: 0.95rem !important;
    line-height: 1.6;
    margin-bottom: 1.4rem;
  }
  .cta-strip.compact > div > div[style*="display: flex"],
  .cta-strip.compact > .wrap-narrow > div[style*="display: flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .cta-strip.compact .btn {
    width: 100%;
    justify-content: center;
  }


  /* ----- 9. GLOBAL: REVEAL/ANIM CALMER ----- */
  /* Mobilde animasyonlar kısa ve sade */
  .reveal-scroll {
    transition-duration: 0.4s !important;
  }
  [data-stagger].is-visible > * {
    animation-duration: 0.4s !important;
  }


  /* ----- 10. EYEBROW / TAG STANDARDIZE ----- */
  /* Mobilde tek tip, hafif */
  .eyebrow,
  .hero-overline,
  .qb-hub-badge,
  .slide-tag {
    font-size: 10px !important;
    letter-spacing: 0.16em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
  }
  /* Renkli eyebrow varsa onun rengini koru */
  .eyebrow[style*="--gold"],
  .eyebrow[style*="gold"] {
    color: var(--gold) !important;
  }


  /* ----- 11. NUMARALANDIRMA — kompakt görünüm ----- */
  .pf-marker,
  .how-num,
  .qb-num,
  [class*="-num"]:not(.np-count):not(.qp-num) {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  /* ----- 12. WRAP / CONTAINER PADDING ----- */
  .wrap,
  .wrap-narrow {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
  }
}

/* ----- 13. CARD HOVER mobilde devre dışı (touch) ----- */
@media (hover: none), (max-width: 720px) {
  .card:hover,
  .exam-card:hover,
  .qb-hub-card:hover,
  .product-card:hover,
  .pf-item:hover,
  .hfi:hover {
    transform: none !important;
    box-shadow: 0 1px 3px rgba(26, 34, 48, 0.04) !important;
  }
}


/* ============================================================
   PHASE 6 — MOBILE DEEP HUB PAGES
   sat-soru-bankasi-rw.html, sat-soru-bankasi-math.html,
   toefl-soru-bankasi-*, udsp-soru-bankasi.html,
   yds-soru-bankasi-*, ydt-soru-bankasi.html
   ============================================================ */

/* ----- 1. QB-TOPIC-HERO (deep hub hero) ----- */
@media (max-width: 720px) {
  .qb-topic-hero {
    padding: 1.5rem 0 1.2rem !important;
  }
  .qb-topic-hero-inner {
    text-align: left !important;
    padding: 0 1.1rem;
  }
  .qb-topic-hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
    line-height: 1.1 !important;
    margin-bottom: 0.6rem !important;
  }
  .qb-topic-hero-meta,
  .qb-topic-hero .lead {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    max-width: 100%;
  }
  /* Diamond divider mobilde gizle */
  .qb-topic-hero .divider,
  .qb-topic-hero .dia {
    display: none !important;
  }
}

/* ----- 2. QB-CATEGORY — accordion behavior (mobile only) ----- */
.qb-category {
  margin-bottom: 1.5rem;
}
.qb-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.4rem 0;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.qb-category-head h2 {
  margin: 0 !important;
  flex: 1;
  min-width: 0;
}
.qb-cat-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  /* Mobile: head'e chevron ekle */
  .qb-category-head {
    padding: 0.7rem 0 !important;
    margin-bottom: 0 !important;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .qb-category-head h2 {
    font-size: 1.15rem !important;
    letter-spacing: -0.01em;
  }
  .qb-category-head::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-right: 6px;
  }
  .qb-category[data-collapsed="true"] .qb-category-head::after {
    transform: rotate(-45deg);
  }
  /* Topic list collapse */
  .qb-category .qb-topic-list {
    transition: max-height 0.25s ease;
  }
  .qb-category[data-collapsed="true"] .qb-topic-list {
    max-height: 0 !important;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
}

/* ----- 3. QB-TOPIC-ROW mobile layout ----- */
@media (max-width: 720px) {
  .qb-topic-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.6rem;
  }
  .qb-topic-row {
    display: grid !important;
    grid-template-columns: 28px 1fr auto !important;
    grid-template-rows: auto auto;
    gap: 0.4rem 0.7rem !important;
    align-items: center;
    padding: 0.75rem 0.85rem !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: var(--bg-card, #fff) !important;
  }
  .qb-topic-check {
    grid-column: 1;
    grid-row: 1;
  }
  .qb-topic-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.95rem !important;
    font-weight: 600;
    line-height: 1.3;
  }
  .qb-topic-count {
    grid-column: 3;
    grid-row: 1;
    font-size: 0.75rem !important;
    color: var(--text-muted);
    white-space: nowrap;
  }
  .qb-topic-status {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 0.4rem !important;
    width: 100%;
    text-align: center;
    padding: 0.6rem 0.9rem !important;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-radius: 8px !important;
    font-weight: 600;
    font-size: 0.85rem !important;
  }
  .qb-topic-status.active {
    background: var(--teal) !important;
    color: #fff !important;
    border-color: var(--teal) !important;
  }
  .qb-topic-status:not(.active) {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--line) !important;
  }
}

/* ----- 4. QB-HUB-HERO (top-level hubs like soru-bankasi.html) ----- */
@media (max-width: 720px) {
  .qb-hub-hero {
    padding: 1.5rem 0 1.2rem !important;
  }
  .qb-hub-hero-inner {
    text-align: left !important;
    padding: 0 1.1rem;
  }
  .qb-hub-hero h1 {
    font-size: clamp(1.7rem, 6.5vw, 2.4rem) !important;
    margin-bottom: 0.6rem !important;
    line-height: 1.1;
  }
  .qb-hub-hero .lead {
    font-size: 0.95rem !important;
    line-height: 1.55;
    margin-bottom: 1.2rem;
  }
  .qb-hub-hero .divider,
  .qb-hub-hero .dia {
    display: none !important;
  }
  /* Stats horizontal 3-col tight */
  .qb-hub-hero .stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
  }
  .qb-hub-hero .stats > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  .qb-hub-hero .stats .s-num {
    font-size: 1.4rem !important;
    font-weight: 600;
    color: var(--text);
    font-family: 'Playfair Display', Georgia, serif;
  }
  .qb-hub-hero .stats .s-lbl {
    font-size: 0.7rem !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
}

/* ----- 5. QB-HUB-GRID + CARDS ----- */
@media (max-width: 720px) {
  .qb-hub-grid {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }
  .qb-hub-grid.two-col {
    grid-template-columns: 1fr !important;
  }
  .qb-hub-card {
    padding: 1.2rem 1.2rem 1rem !important;
    min-height: auto;
  }
  .qb-hub-card h3 {
    font-size: 1.15rem !important;
    margin-bottom: 0.4rem !important;
  }
  .qb-hub-card .qb-hub-desc {
    font-size: 0.88rem !important;
    line-height: 1.5;
    margin-bottom: 0.8rem;
  }
  .qb-hub-card .qb-hub-meta {
    gap: 1rem !important;
    margin: 0.6rem 0 0.9rem;
  }
  .qb-hub-card .m-num {
    font-size: 1.05rem !important;
    color: var(--text);
  }
  .qb-hub-card .m-lbl {
    font-size: 0.7rem !important;
    color: var(--text-muted);
  }
  .qb-hub-card .qb-hub-mark {
    width: 36px !important;
    height: 36px !important;
  }
  .qb-hub-card .qb-hub-badge {
    font-size: 0.65rem !important;
    padding: 0.18rem 0.55rem !important;
  }
  .qb-hub-card .qb-hub-cta {
    font-size: 0.85rem !important;
    font-weight: 600;
  }
}

/* ----- 6. QB-MULTI-BAR (select all bar) ----- */
@media (max-width: 720px) {
  .qb-multi-bar {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding: 0.7rem !important;
  }
  .qb-multi-btn {
    flex: 1 1 auto !important;
    min-height: 40px;
    font-size: 0.82rem !important;
  }
  .qb-multi-text {
    flex-basis: 100%;
    text-align: center;
    font-size: 0.78rem;
  }
}


/* ============================================================
   HERO-RIGHT mobile width fix
   .hero-right has display:flex justify-content:center in main.css
   This makes flex children shrink to content width on mobile
   Fix: override to block so collapsible takes full width
   ============================================================ */
@media (max-width: 720px) {
  .hero-right {
    display: block !important;
  }
  .hero-collapsible {
    width: 100% !important;
    display: block;
  }
  .hero-collapsible > .hero-collapse-trigger {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   SORU.HTML — mobile fixes
   Question card header chip layout, action bar polish
   ============================================================ */

@media (max-width: 720px) {

  /* ----- 1. Q-HEADER 2-row layout ----- */
  /* Üst satır: q-num + q-timer | Alt satır: 3 chip */
  .q-header {
    display: grid !important;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 0.5rem !important;
    align-items: center;
    padding-bottom: 0.5rem;
  }
  .q-header .q-num {
    grid-row: 1;
    grid-column: 1;
  }
  .q-header .q-timer {
    grid-row: 1;
    grid-column: 2;
  }
  .q-header .q-tool-btn:nth-of-type(1),
  .q-header #bookmarkBtn {
    grid-row: 2;
    grid-column: 1;
  }
  .q-header .q-tool-btn:nth-of-type(2),
  .q-header #reportBtn {
    grid-row: 2;
    grid-column: 2;
  }
  .q-header .q-tool-btn:nth-of-type(3),
  .q-header #noteBtn {
    grid-row: 2;
    grid-column: 3;
  }

  /* ----- 2. Q-TOOL-BTN chip wrap fix ----- */
  .q-tool-btn {
    white-space: nowrap !important;
    padding: 0.45rem 0.7rem !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.02em !important;
    min-height: 36px;
    justify-content: center;
  }
  .q-header .q-tool-btn {
    width: 100%;
  }
  .q-tool-btn svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
  }
  .q-tool-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ----- 3. Q-NUM + Q-TIMER kompakt ----- */
  .q-num {
    font-size: 0.85rem !important;
    width: 30px !important;
    height: 30px !important;
  }
  .q-timer {
    font-size: 0.78rem !important;
    padding: 0.3rem 0.6rem !important;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
  }
  .q-timer-text {
    font-family: monospace;
  }

  /* ----- 4. Q-ACTIONBAR alt bar polish ----- */
  /* Daha okunabilir icon button'lar */
  .q-actionbar {
    padding: 0.55rem 0.7rem !important;
    gap: 0.5rem !important;
    border-top: 1px solid var(--line);
  }
  .q-nav-pill {
    padding: 0.5rem 0.85rem !important;
    min-height: 44px;
    font-size: 0.78rem !important;
    gap: 0.4rem !important;
  }
  .q-actions {
    gap: 0.25rem !important;
  }
  .q-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0.5rem !important;
    font-size: 0 !important;
    gap: 0 !important;
    letter-spacing: 0;
    border-radius: 8px !important;
  }
  .q-btn svg {
    width: 18px !important;
    height: 18px !important;
  }
  /* Açıklama (explain) butonu - primary action, biraz daha geniş */
  .q-btn-explain {
    min-width: 52px !important;
    background: var(--teal) !important;
    color: #fff !important;
    border-color: var(--teal) !important;
  }
  .q-btn-explain svg {
    stroke: #fff;
  }
  /* Prev/Next nav buttons - daha belirgin */
  .q-btn-prev,
  .q-btn-next {
    background: var(--bg-soft) !important;
    border-color: var(--line-strong) !important;
  }
}

/* Çok dar ekranlarda (<400px) ekstra sıkı */
@media (max-width: 400px) {
  .q-header .q-tool-btn {
    font-size: 0.66rem !important;
    padding: 0.4rem 0.5rem !important;
  }
  .q-actions {
    gap: 0.2rem !important;
  }
  .q-btn {
    min-width: 40px !important;
  }
}


/* ============================================================
   PHASE 7 — SORU.HTML MOBILE ACTION BAR POLISH
   1. Bottom q-actionbar: ikonların altına etiket ekle
   2. Top q-header: 2-satır grid agresif şekilde uygula
   ============================================================ */

@media (max-width: 720px) {

  /* ----- 1. BOTTOM Q-ACTIONBAR — etiketli butonlar ----- */
  /* soru.html inline @media (max-width: 540px) font-size:0 ile metni gizliyor.
     Override edip etiketleri geri getiriyoruz, ama altta küçük olarak. */
  .q-actionbar .q-actions {
    gap: 0.3rem !important;
  }
  .q-actionbar .q-actions .q-btn {
    flex-direction: column !important;
    gap: 0.18rem !important;
    font-size: 0.62rem !important;
    letter-spacing: 0.02em !important;
    padding: 0.45rem 0.35rem !important;
    min-width: 54px !important;
    min-height: 54px !important;
    line-height: 1 !important;
    text-transform: none !important;
    font-weight: 600 !important;
  }
  .q-actionbar .q-actions .q-btn svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
  }
  /* Primary action (Açıklama) belirgin kalsın */
  .q-actionbar .q-btn-explain {
    min-width: 60px !important;
  }

  /* Nav pill (1/74) kompakt kalır */
  .q-actionbar .q-nav-pill {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.78rem !important;
    min-height: 54px !important;
    flex-shrink: 0;
  }

  /* Actionbar genel boşluk */
  .q-actionbar {
    padding: 0.55rem 0.55rem !important;
    gap: 0.4rem !important;
  }

  /* ----- 2. TOP Q-HEADER — agresif grid override ----- */
  /* soru.html inline @media (max-width: 540px) muhtemelen flex tutuyor.
     Higher specificity ile grid uygula. */
  .q-content .q-header,
  body .q-header {
    display: grid !important;
    grid-template-columns: auto auto 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 0.5rem 0.5rem !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem;
  }
  .q-content .q-header .q-num {
    grid-row: 1 !important;
    grid-column: 1 !important;
  }
  .q-content .q-header .q-timer {
    grid-row: 1 !important;
    grid-column: 2 / -1 !important;
    justify-self: start;
  }
  .q-content .q-header #bookmarkBtn,
  .q-content .q-header .q-tool-btn:nth-of-type(1) {
    grid-row: 2 !important;
    grid-column: 1 !important;
  }
  .q-content .q-header #reportBtn,
  .q-content .q-header .q-tool-btn:nth-of-type(2) {
    grid-row: 2 !important;
    grid-column: 2 !important;
  }
  .q-content .q-header #noteBtn,
  .q-content .q-header .q-tool-btn:nth-of-type(3) {
    grid-row: 2 !important;
    grid-column: 3 !important;
  }
  .q-content .q-header .q-tool-btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0.5rem 0.5rem !important;
    font-size: 0.72rem !important;
  }
  .q-content .q-header .q-tool-btn svg {
    width: 14px !important;
    height: 14px !important;
  }
}

