/* Hafif Yaşam — tablet ve mobil uyum */

@media (max-width: 1180px) {
  .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cat-tiles a { flex-direction: row; text-align: left; padding: 12px 14px; gap: 12px; }
  .cat-tiles .ci { width: 44px; height: 44px; }
  .cat-tiles .ci .ico { width: 22px; height: 22px; }
  .cat-tiles .cn { flex: 1; }
  .cat-tiles small { margin-top: 0; }
  .card-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .cat-blocks, .cat-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: minmax(0, 720px); }
  .article-aside > * { position: static; }
  .article-aside { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
  .share-box { flex-direction: row; }
  /* Tablet / dar masaüstü: büyük kart yatay ve tam genişlik, küçük kartlar altında yan yana */
  .featured-grid { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
  .featured-grid .card-hero, .featured-grid.featured-grid-cat .card-hero { grid-column: 1 / -1; grid-row: auto; flex-direction: row; }
  .featured-grid .card-hero .card-media { flex: 0 0 52%; }
  .featured-grid .card-hero .card-body { justify-content: center; }
  .featured-extras { grid-column: 1 / -1; }
  .featured-grid-cat .card-compact { flex-direction: column; align-items: stretch; }
  .featured-grid-cat .card-compact .card-media { flex: none; margin: 0; border-radius: 0; }
  .cat-hero-inner { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 900px) {
  /* Üst alan: logo satırı yapışkan; arama ve kategori şeridi kaydırınca gizlenir */
  .site-header { position: relative; top: auto; }
  body.hdr-stuck .header-top { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: #fff; box-shadow: 0 4px 16px rgba(29, 43, 36, .08); padding-left: 16px; padding-right: 16px; grid-template-areas: "menu brand actions"; }
  body.hdr-stuck .header-top .search-wrap { display: none; }
  .header-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-areas: "menu brand actions" "search search search"; align-items: center; gap: 6px 4px; padding-top: 6px; padding-bottom: 8px; position: relative; }
  .menu-toggle { display: inline-grid; grid-area: menu; justify-self: start; margin-left: -6px; }
  .icon-btn { width: 44px; height: 44px; }
  .brand { grid-area: brand; justify-self: center; min-width: 0; }
  .brand-logo-img { height: auto; max-height: 42px; max-width: 100%; }
  .header-actions { grid-area: actions; justify-self: end; gap: 2px; margin-right: -6px; }
  .search-wrap { grid-area: search; max-width: none; width: 100%; margin: 0; }
  .search-form input { height: 46px; font-size: 16px; background: var(--cream); padding-left: 18px; }
  .search-form button { width: 40px; height: 40px; top: 3px; right: 3px; }
  .search-filter { display: inline-grid; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); color: var(--ink-2); }
  .search-filter:hover { color: var(--green); }
  .fav-link span { display: none; }
  .fav-link { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .fav-link .ico { width: 23px; height: 23px; }
  .fav-link .fav-count { position: absolute; top: 3px; right: 1px; }
  body.nav-open { overflow: hidden; }

  .mob-chips { display: block; border-top: 1px solid #f0ede5; }
  .mob-chips ul { list-style: none; margin: 0; padding: 8px 12px 6px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .mob-chips ul::-webkit-scrollbar { display: none; }
  .mob-chips li { flex: none; scroll-snap-align: start; }
  .mob-chips a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; padding: 4px 6px 6px; font-size: .74rem; font-weight: 600; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
  .mob-chips .mc-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--cat, var(--green)) 13%, #fff); color: var(--cat, var(--green)); }
  .mob-chips .mc-ico .ico { width: 20px; height: 20px; }
  .mob-chips a.active { color: var(--green); border-bottom-color: var(--green); }

  .main-nav { display: none; position: fixed; left: 0; right: 0; top: var(--hh, 58px); height: calc(100vh - var(--hh, 58px)); height: calc(100dvh - var(--hh, 58px)); overflow-y: auto; overscroll-behavior: contain; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 12px 24px rgba(29, 43, 36, .1); z-index: 59; }
  .main-nav.open { display: block; }
  .nav-fav { display: block; }
  .nav-fav .fav-count { margin-left: auto; }
  .nav-list { flex-direction: column; align-items: stretch; overflow: visible; padding: 6px 0 12px; }
  .nav-list a { padding: 13px 4px; font-size: 1rem; border-bottom: 1px solid #f2efe8; }
  .nav-list a.active { border-bottom-color: #f2efe8; }
  .nav-list .nav-all { margin-left: 0; }
  .nl-short { display: none; }
  .nl-full { display: inline; }
  .sub-list { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 28px; }
  .sub-list a { font-size: .92rem; padding: 9px 4px; }

  .hero-inner { grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; padding-top: 22px; padding-bottom: 24px; }
  .page-home .hero-inner { padding-bottom: 26px; }
  .hero-visual { align-self: end; }
  .hero-visual img { max-width: 150px; }
  .cat-strip-overlap { margin-top: 0; padding-top: 16px; }
  .cat-tiles a { flex-direction: column; text-align: center; padding: 12px 6px 10px; gap: 6px; }
  .cat-tiles .cn { flex: none; }
  .cat-tiles small { margin-top: auto; }
  .cat-blocks { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .tip-row { grid-template-columns: minmax(0, 1fr); }
  .cat-hero-inner { grid-template-columns: minmax(0, 1fr) 200px; gap: 16px; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .section { padding: 24px 0; }
  .section-head { margin-bottom: 14px; flex-wrap: wrap; gap: 4px 12px; }
  .section-head .more { white-space: normal; }
  .section-head h2 { font-size: 1.35rem; }
  .eyebrow { font-size: .7rem; margin-bottom: .5em; }
  .hero h1 { font-size: 1.85rem; }
  .hero-lead { font-size: .96rem; margin-bottom: 1.1em; }
  .hero .btn-lg { padding: .75em 1.3em; font-size: .95rem; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 104px; }
  .hero-visual img { max-width: 104px; }

  .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .cat-tiles a { flex-direction: column; text-align: center; padding: 10px 4px 8px; gap: 5px; border-radius: 12px; }
  .cat-tiles .ci { width: 40px; height: 40px; }
  .cat-tiles .ci .ico { width: 20px; height: 20px; }
  .cat-tiles .cn { font-size: .74rem; }
  .cat-tiles small { font-size: .66rem; }
  .cat-tiles .nl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cat-tiles .nl-mob { display: inline; }

  .featured-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .featured-grid .card-hero, .featured-grid.featured-grid-cat .card-hero { grid-column: 1 / -1; grid-row: auto; flex-direction: column; }
  .featured-grid .card-hero .card-media { flex: none; }
  .featured-grid.featured-grid-cat .card-hero { grid-row: auto; }
  .card-hero .card-title { font-size: 1.28rem; }
  .card-hero .card-excerpt { -webkit-line-clamp: 2; font-size: .93rem; }
  .featured-extras { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .section-featured .featured-grid:not(.featured-grid-cat) > .card-compact:nth-child(4) { display: none; } /* mobilde 2'li düzen bozulmasın */
  .featured-extras .tip-search, .tip-row .tip-search { display: none; }
  .card-grid-compact, .card-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .card-compact .card-body { padding: 10px 11px 8px; }
  .card-compact .card-title { font-size: .93rem; }
  .card-compact .card-meta { font-size: .74rem; }
  .card-grid:not(.card-grid-compact) .card-excerpt { display: none; }
  .card-grid:not(.card-grid-compact) .card-body { padding: 11px 12px 9px; }
  .card-grid:not(.card-grid-compact) .card-title { font-size: .98rem; line-height: 1.32; }
  .card-grid:not(.card-grid-compact) .badge { font-size: .62rem; padding: 2px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tip-box, .tip-search { padding: 16px; }
  .cat-blocks, .cat-cards { grid-template-columns: minmax(0, 1fr); }
  .cat-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .cat-card { padding: 14px; gap: 6px; }
  .cat-card-img { width: calc(100% + 28px); margin: -14px -14px 2px; }
  .cat-card h2 { font-size: 1rem; }
  .cat-card p { font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .cat-card .sub-names { display: none; }

  .page-hero-row { align-items: flex-start; }
  .page-hero-row .ci-lg { width: 52px; height: 52px; }
  .page-hero-row .ci-lg .ico { width: 26px; height: 26px; }
  .cat-hero-inner { grid-template-columns: minmax(0, 1fr) 96px; }
  .featured-grid-cat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .featured-grid-cat .card-compact { flex-direction: column; align-items: stretch; }
  .featured-grid-cat .card-compact .card-media { flex: none; margin: 0; border-radius: 0; }
  .featured-grid-cat .card-compact .card-title { font-size: .93rem; }
  .cat-stats { font-size: .82rem; gap: 4px 12px; }
  .topic-tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .topic-tags::-webkit-scrollbar { display: none; }
  .topic-tags > * { flex: none; }
  .section-head-tools .toolbar label { display: none; }
  .section-head-tools select { height: 36px; font-size: .85rem; }
  .cat-hero h1 { font-size: 1.7rem; }
  .cat-hero .lead { font-size: .95rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .field-row { grid-template-columns: 1fr; }
  .form { padding: 16px; }
  .article-aside { grid-template-columns: 1fr; }
  .share-box .btn { flex: 1; justify-content: center; }
  .prose { font-size: 1.03rem; line-height: 1.72; }
  .prose h2 { font-size: 1.38rem; }
  .post-nav { grid-template-columns: 1fr; }
  .pn-next { grid-column: 1; }
  .article-cover { padding: 0; }
  .article-cover img, .article-cover picture { border-radius: 0; }
  .toolbar { justify-content: flex-start; }
  .search-big select, .search-big .btn { flex: 1 1 auto; }
}

@media (max-width: 360px) {
  .hero-visual { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .mob-chips a { min-width: 62px; }
}


/* Hafif Yaşam: sağlam mobil yerleşim ve yatay taşma koruması */
html, body { max-width: 100%; }
body { overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
img, svg, video, iframe { max-width: 100%; }
.container, .site-main, .site-header, .section, .hero, .hero-inner { min-width: 0; }
@media (max-width: 900px) {
  .header-top { width: 100%; min-width: 0; }
  .brand-logo-img { display: block; width: auto !important; height: auto !important; max-width: min(160px, 42vw) !important; max-height: 58px !important; object-fit: contain; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) !important; }
  .hero-visual { display: none; }
  .hero h1, .hero-lead { max-width: 100%; overflow-wrap: anywhere; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
