/* ==========================================================================
   BelliOlur — Tema (sitepazari.web.app tema dili temel alınmıştır)
   Kabuk, tipografi, kartlar, header/footer, arama modalı.
   ========================================================================== */

:root {
  --primary-color: #00bcd4;
  --primary-dark: #0097a7;
  --secondary-color: #009688;
  --accent-color: #ff4081;
  --dark-color: #263238;
  --light-color: #eceff1;
  --text-color: #37474f;
  --muted-color: #78909c;
  --line-color: #e3e9ec;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --success: #2e7d32;
  --warn: #ef6c00;
  --danger: #d32f2f;
  --info: #0277bd;

  --border-radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --box-shadow: 0 6px 15px rgba(0, 0, 0, .10);
  --box-shadow-hover: 0 12px 28px rgba(0, 0, 0, .16);
  --shadow-soft: 0 2px 8px rgba(38, 50, 56, .06);
  --transition: all .28s cubic-bezier(.25, .8, .25, 1);
  --container: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #fafafa;
  background-image: linear-gradient(135deg, rgba(0, 188, 212, .05) 0%, rgba(0, 150, 136, .05) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--primary-color); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid rgba(0, 188, 212, .55); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; width: 100%; padding: 0 20px; }

/* ------------------------------------------------------------------ header */

.main-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, .08);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 1000;
}
.header-container { display: flex; align-items: center; gap: 20px; }

.logo-link { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* İşaret artık /images/logo.svg dosyasından geliyor (bkz. build-logo-assets).
   Zemin logonun kendi içinde olduğu için burada arka plan verilmez; şeffaf
   bir logo konulursa da doğru görünür. */
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  object-fit: contain; display: block;
  box-shadow: 0 4px 12px rgba(0, 188, 212, .28);
}
.logo-text {
  font-size: 1.45rem; font-weight: 700; letter-spacing: -.5px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.main-nav { display: flex; align-items: center; gap: 6px; margin-left: 12px; flex-shrink: 0; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border: 0; background: transparent; border-radius: 22px;
  font-size: .95rem; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.nav-btn:hover { background: var(--light-color); color: var(--primary-dark); }
.nav-btn i { font-size: .75rem; transition: transform .25s ease; }
.nav-dropdown { position: relative; }
.nav-dropdown.open > .nav-btn i { transform: rotate(180deg); }
.mega-panel {
  position: absolute; top: calc(100% + 12px); left: 0; z-index: 1200;
  width: min(88vw, calc(var(--sutun, 3) * 300px + 40px));
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow-hover); padding: 16px; display: none;
  max-height: min(76vh, 640px); overflow-y: auto;
  animation: mega-in .18s ease;
}
.nav-dropdown.open .mega-panel { display: block; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-6px); } }

.mega-grid { display: grid; grid-template-columns: repeat(var(--sutun, 3), minmax(0, 1fr)); gap: 4px; }
.mega-kart {
  display: flex; gap: 11px; align-items: flex-start; padding: 10px 11px;
  border-radius: var(--radius-sm); transition: background .16s, transform .16s;
}
.mega-kart:hover { background: color-mix(in srgb, var(--c, #00bcd4) 9%, #fff); transform: translateX(2px); }
.mega-ikon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, #00bcd4) 15%, #fff); color: var(--c, var(--primary-color)); font-size: .92rem;
}
.mega-metin { min-width: 0; }
.mega-metin strong { display: flex; align-items: center; gap: 7px; font-size: .9rem; color: var(--dark-color); line-height: 1.3; }
.mega-metin strong small {
  font-size: .68rem; font-weight: 600; padding: 1px 7px; border-radius: 9px;
  background: color-mix(in srgb, var(--c, #00bcd4) 14%, #fff); color: var(--c, var(--primary-color));
}
.mega-metin > small {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .76rem; color: var(--muted-color); line-height: 1.35; margin-top: 2px;
}

.mega-alt { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-color); }
.mega-alt-baslik { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-color); margin-bottom: 9px; }
.mega-alt-baslik i { color: var(--accent-color); }
.mega-etiketler { display: flex; flex-wrap: wrap; gap: 6px; }
.mega-etiket {
  padding: 5px 12px; border-radius: 16px; background: var(--surface-soft);
  font-size: .78rem; color: var(--text-color); transition: var(--transition);
}
.mega-etiket:hover { background: var(--primary-color); color: #fff; }

/* --------------------------------------- başlıktaki sık kullanılanlar şeridi */

.header-sik {
  display: flex; align-items: center; gap: 6px;
  /* flex-basis 0: şeridin genişliği İÇERİĞİNE bağlı olmasın. `auto` iken
     kap önce içeriğe göre genişleyip sonra büzülüyordu; bu yüzden ilk
     ölçüm taşmayı göremiyor, taşma ancak sonraki düzende ortaya
     çıkıyordu. 0 tabanla clientWidth ilk karede kesinleşir. */
  flex: 1 1 0; min-width: 0; overflow: hidden;
  margin-left: 18px;
  /* Sola hizalı: taşma sona doğru olur, böylece app.js'teki seridiSigdir
     `scrollWidth > clientWidth` ile taşmayı gerçekten görebilir. */
  justify-content: flex-start;
}
.header-sik[hidden] { display: none; }
.sik-etiket {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted-color); margin-right: 2px; cursor: help;
  max-width: 74px; line-height: 1.15; text-align: right;
}
.sik-etiket i { font-size: .7rem; color: var(--secondary-color); flex-shrink: 0; }

/* Şerit iki satır yüksekliğindedir: ad kırpılmaz, sarmalanır. Punto
   `--sik-fs` ile ada göre app.js'ten gelir (bkz. sikYaziBoyutu). */
.sik-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 14px;
  background: var(--surface-soft); color: var(--text-color);
  font-size: var(--sik-fs, .75rem); line-height: 1.15;
  /* flex-shrink kapalı: kısa adlar ("KDV") daraltılıp harf harf
     bölünmesin; genişliği içerik belirlesin, tavanı max-width koysun. */
  flex: 0 0 auto; max-width: 152px; min-width: 0;
  transition: var(--transition);
}
.sik-link i { font-size: 1em; color: var(--primary-color); flex-shrink: 0; }
.sik-ad {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere; hyphens: auto;
}
.sik-link:hover { background: var(--primary-color); color: #fff; }
.sik-link:hover i { color: #fff; }

/* Kaç bağlantının sığdığına viewport eşiği değil, çizimden sonraki
   GERÇEK ÖLÇÜM karar verir (bkz. app.js → seridiSigdir). Buradaki tek iş
   etiketi daraltmak ve mobilde şeridi tamamen kapatmak. */
@media (max-width: 1560px) {
  .sik-link { max-width: 122px; }
  .sik-etiket { max-width: 0; overflow: hidden; margin-right: 0; }
  .sik-etiket i { font-size: .84rem; }
}
@media (max-width: 900px) { .header-sik { display: none; } }
@media (max-width: 1040px) { .nav-rehber span, .nav-rehber { font-size: 0; } .nav-rehber i { font-size: .95rem; } }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }

.mobile-nav { display: none; }

/* ------------------------------------------------------------------ butonlar */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; background: var(--primary-color); color: #fff; border: none;
  border-radius: 25px; font-size: .95rem; font-weight: 500; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 10px rgba(0, 188, 212, .28);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 188, 212, .38); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary-color); }
.btn-secondary { background: var(--secondary-color); box-shadow: 0 4px 10px rgba(0, 150, 136, .28); }
.btn-accent { background: var(--accent-color); box-shadow: 0 4px 10px rgba(255, 64, 129, .28); }
.btn-outline {
  background: transparent; border: 2px solid var(--primary-color);
  color: var(--primary-color); box-shadow: none;
}
.btn-outline:hover { background: var(--primary-color); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-icon {
  padding: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--light-color); color: var(--dark-color); box-shadow: none;
}
.btn-icon:hover { background: var(--primary-color); color: #fff; }
.icon-btn {
  background: transparent; border: 0; cursor: pointer; width: 34px; height: 34px;
  border-radius: 50%; display: grid; place-items: center; color: var(--muted-color);
  transition: var(--transition);
}
.icon-btn:hover { background: var(--light-color); color: var(--danger); }

/* -------------------------------------------------------------------- yerleşim */

.ad-container { display: flex; justify-content: center; margin: 18px auto; }
.ad-text {
  padding: 10px 22px; background: var(--light-color); color: var(--secondary-color);
  border: 1px dashed #cfd8dc; border-radius: 25px; font-size: .82rem; font-weight: 500;
}

.main-container {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--box-shadow);
  margin: 20px auto; padding: 30px;
}

.content-area { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.content-area.tek-sutun { grid-template-columns: minmax(0, 1fr); }
.right-content[hidden] { display: none; }
.content-area > * { min-width: 0; }
.left-content-area { min-width: 0; }
.right-content {
  background: var(--surface-soft); border-radius: var(--border-radius); padding: 18px;
  position: sticky; top: 90px;
}

.section-heading { margin-bottom: 18px; }
.section-heading h2 {
  font-size: 1.2rem; color: var(--dark-color); padding-bottom: 8px;
  position: relative; display: inline-block;
}
.section-heading h2::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 46px; height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color)); border-radius: 2px;
}

.discover-container { display: grid; gap: 10px; margin-bottom: 14px; }
.discover-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-soft);
  transition: var(--transition);
}
.discover-card:hover { transform: translateX(4px); box-shadow: var(--box-shadow); }
.discover-card > i { color: var(--primary-color); margin-top: 4px; width: 18px; text-align: center; }
.discover-card strong { display: block; font-size: .9rem; color: var(--dark-color); line-height: 1.3; }
.discover-card small {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .76rem; color: var(--muted-color); line-height: 1.35;
}

/* ---------------------------------------------------------------------- hero */

.hero {
  text-align: center; padding: 34px 20px 30px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(0, 188, 212, .09), rgba(255, 64, 129, .07));
  border-radius: var(--radius-lg);
}
.hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.25; color: var(--dark-color); }
.hero h1 span {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero > p { color: var(--muted-color); margin: 12px auto 22px; max-width: 620px; }
.hero-search { position: relative; max-width: 560px; margin: 0 auto; }
.hero-search i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted-color); }
.hero-search input {
  width: 100%; padding: 15px 20px 15px 50px; border: 1px solid var(--line-color);
  border-radius: 30px; font: inherit; font-size: 1rem; background: #fff;
  box-shadow: var(--shadow-soft); transition: var(--transition);
}
.hero-search input:focus {
  outline: none; border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 188, 212, .16);
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.tag {
  padding: 6px 14px; background: #fff; border-radius: 20px; font-size: .82rem;
  color: var(--secondary-color); box-shadow: var(--shadow-soft); transition: var(--transition);
}
.tag:hover { background: var(--primary-color); color: #fff; transform: translateY(-2px); }

/* --------------------------------------------------------------------- başlık */

.page-header { margin: 30px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line-color); }
.page-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--dark-color); display: flex; align-items: center; gap: 12px; }
.page-header h2 { font-size: 1.35rem; color: var(--dark-color); }
.page-header p { color: var(--muted-color); font-size: .93rem; margin-top: 6px; }

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: .84rem; color: var(--muted-color); margin-bottom: 6px;
}
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb i { font-size: .65rem; }

.filter-bar { margin: 14px 0 4px; }
.filter-bar input {
  width: 100%; max-width: 420px; padding: 11px 16px; border: 1px solid var(--line-color);
  border-radius: 24px; font: inherit; background: #fff; transition: var(--transition);
}
.filter-bar input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 188, 212, .15); }

.empty-state { text-align: center; color: var(--muted-color); padding: 40px 0; }

/* --------------------------------------------------------------------- kart */

.categories-container {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px; margin: 18px 0;
}
.category-card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 24px 18px; min-height: 175px;
  background: #fff; border: 1px solid var(--line-color); border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft); transition: var(--transition); overflow: hidden;
}
.category-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--c, var(--primary-color)), var(--accent-color));
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--box-shadow-hover); border-color: transparent; }
.category-icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  margin-bottom: 12px; font-size: 21px;
  background: color-mix(in srgb, var(--c, #00bcd4) 15%, #fff);
  color: var(--c, var(--primary-color));
}
.category-card h3 { font-size: 1.05rem; color: var(--dark-color); margin-bottom: 5px; }
.category-card p { font-size: .8rem; color: var(--muted-color); line-height: 1.4; }
.category-count {
  margin-top: 10px; font-size: .72rem; font-weight: 600; color: var(--c, var(--primary-color));
  background: color-mix(in srgb, var(--c, #00bcd4) 12%, #fff);
  padding: 3px 12px; border-radius: 12px;
}

.tools-container {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px; margin: 18px 0;
}
.tool-card {
  position: relative; display: flex; flex-direction: column; min-height: 138px;
  background: #fff; border: 1px solid var(--line-color); border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft); transition: var(--transition); overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0; transition: opacity .25s;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: var(--box-shadow-hover); }
.tool-card:hover::before { opacity: 1; }
.tool-header { display: flex; align-items: center; gap: 11px; padding: 16px 16px 6px; }
.tool-icon {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  flex-shrink: 0; font-size: 16px;
  background: color-mix(in srgb, var(--c, #00bcd4) 14%, #fff);
  color: var(--c, var(--primary-color));
}
.tool-icon.lg { width: 58px; height: 58px; font-size: 24px; }
.tool-title { font-size: 1rem; font-weight: 600; color: var(--dark-color); line-height: 1.3; }
.tool-body { padding: 4px 16px 12px; flex-grow: 1; }
.tool-body p { font-size: .82rem; color: var(--muted-color); line-height: 1.45; }
.tool-cat {
  padding: 0 16px 14px; font-size: .72rem; color: var(--primary-dark); font-weight: 500;
}

/* -------------------------------------------------------------- arama modalı */

.search-modal {
  position: fixed; inset: 0; z-index: 2000; background: rgba(38, 50, 56, .55);
  backdrop-filter: blur(4px); display: none; padding: 8vh 20px 20px; overflow-y: auto;
}
.search-modal.active { display: block; }
body.modal-open { overflow: hidden; }
.search-panel {
  max-width: 620px; margin: 0 auto; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--box-shadow-hover); overflow: hidden;
}
.search-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line-color); }
.search-head > i { color: var(--muted-color); }
.search-head input { flex: 1; border: 0; font: inherit; font-size: 1.03rem; background: transparent; }
.search-head input:focus { outline: none; }
.search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.search-hint { padding: 24px; text-align: center; color: var(--muted-color); font-size: .88rem; }
.search-item {
  display: flex; gap: 13px; align-items: flex-start; padding: 11px 13px;
  border-radius: var(--radius-sm); transition: background .18s;
}
.search-item:hover { background: var(--surface-soft); }
.search-item > i { color: var(--primary-color); margin-top: 4px; width: 18px; text-align: center; }
.search-item strong { display: block; font-size: .93rem; color: var(--dark-color); }
.search-item small { font-size: .78rem; color: var(--muted-color); }

/* ------------------------------------------------------------------- toast */

.toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 3000; display: grid; gap: 10px; }
.toast {
  background: var(--dark-color); color: #fff; padding: 12px 20px; border-radius: 24px;
  font-size: .88rem; box-shadow: var(--box-shadow-hover); animation: toast-in .28s ease;
}
.toast.out { opacity: 0; transform: translateY(8px); transition: all .45s ease; }
.toast.tone-warn { background: var(--warn); }
.toast.tone-danger { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------------------------- footer */

.main-footer { background: var(--dark-color); color: #b0bec5; margin-top: 40px; padding: 22px 0; }
.footer-satirlar { display: grid; gap: 10px; }
.footer-satir {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px 18px; margin: 0; text-align: center;
}

.footer-marka { font-size: .9rem; }
.footer-marka .logo-mark { width: 30px; height: 30px; border-radius: 9px; box-shadow: none; }
.footer-marka strong { color: #fff; font-size: 1.02rem; }
.footer-marka span { color: #90a4ae; }

.footer-gelistirici { font-size: .85rem; padding: 9px 0; border-block: 1px solid rgba(255, 255, 255, .08); }
.footer-oge {
  display: inline-flex; align-items: center; gap: 7px;
  color: #cfd8dc; transition: color .2s;
}
.footer-oge i { color: var(--primary-color); font-size: .85rem; }
a.footer-oge:hover { color: var(--primary-color); }
.footer-gelistirici b { color: #fff; font-weight: 600; }

.footer-yasal { font-size: .78rem; color: #78909c; }
.footer-yasal a { color: #90a4ae; text-decoration: underline; text-underline-offset: 2px; }
.footer-yasal a:hover { color: var(--primary-color); }

@media (max-width: 620px) {
  .footer-satir { gap: 6px 12px; }
  .footer-gelistirici { font-size: .8rem; }
}

/* --------------------------------------------------------------------- 404 */

.error-page { text-align: center; padding: 60px 20px; }
.error-code {
  font-size: 5rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-page h1 { font-size: 1.4rem; margin: 12px 0 8px; color: var(--dark-color); }
.error-page p { color: var(--muted-color); }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ------------------------------------------------------------------ duyarlı */

@media (max-width: 1080px) {
  .content-area { grid-template-columns: 1fr; }
  .right-content { position: static; order: 2; }
}

.js-menu { display: none !important; }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .js-menu { display: inline-flex !important; }
  .hide-sm { display: none; }
  .main-container { padding: 20px 16px; border-radius: 12px; }
  .mobile-nav {
    display: grid; gap: 2px; padding: 10px 20px 16px;
    border-top: 1px solid var(--line-color); margin-top: 12px;
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: 8px; font-size: .92rem; }
  .mobile-nav a:hover { background: var(--surface-soft); }
  .mobile-nav a small { margin-left: auto; color: var(--muted-color); }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .categories-container { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .tools-container { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
}

@media (max-width: 520px) {
  .container { padding: 0 12px; }
  .hero { padding: 26px 14px; }
  .categories-container, .tools-container { grid-template-columns: 1fr 1fr; }
  .category-card { min-height: 150px; padding: 18px 10px; }
  .ad-container { display: none; }
}

@media print {
  .main-header, .main-footer, .right-content, .ad-container,
  .result-toolbar, .form-actions, .breadcrumb, .tools-container { display: none !important; }
  .main-container { box-shadow: none; margin: 0; padding: 0; }
  body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------- ana sayfa araç kataloğu */

.katalog { display: grid; gap: 10px; margin: 18px 0; }
.katalog-bolum { border: 1px solid var(--line-color); border-radius: var(--border-radius); overflow: hidden; background: #fff; }
.katalog-baslik {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; border: 0; background: transparent; cursor: pointer; text-align: left;
  transition: background .18s;
}
.katalog-baslik:hover { background: var(--surface-soft); }
.katalog-ikon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, #00bcd4) 14%, #fff); color: var(--c, var(--primary-color)); font-size: .92rem;
}
.katalog-ad { font-weight: 600; font-size: .97rem; color: var(--dark-color); flex: 1; min-width: 0; }
.katalog-sayi {
  font-size: .72rem; font-weight: 600; padding: 2px 10px; border-radius: 11px;
  background: color-mix(in srgb, var(--c, #00bcd4) 12%, #fff); color: var(--c, var(--primary-color));
}
.katalog-ok { color: var(--muted-color); font-size: .78rem; transition: transform .22s ease; }
.katalog-bolum.acik .katalog-ok { transform: rotate(180deg); }
.katalog-icerik {
  display: none; flex-wrap: wrap; gap: 6px;
  padding: 0 16px 14px; border-top: 1px solid var(--line-color); padding-top: 12px;
}
.katalog-bolum.acik .katalog-icerik { display: flex; }
.katalog-link {
  padding: 5px 12px; border-radius: 14px; background: var(--surface-soft);
  font-size: .8rem; color: var(--text-color); transition: var(--transition);
}
.katalog-link:hover { background: var(--c, var(--primary-color)); color: #fff; }

/* ============================================================== rehberler ==
   Rehber tarafı, hesaplama tarafından RENKLE ayrışır: araçlar turkuaz,
   rehberler kehribar. Düzen, bileşen ve etkileşim aynı kalır ki kullanıcı
   iki bölüm arasında geçerken yeniden öğrenmek zorunda kalmasın.        */
:root {
  --rehber: #f59e0b;
  --rehber-koyu: #b45309;
  --rehber-acik: #fef3c7;
  --rehber-yumusak: #fffbeb;
}

.nav-rehber { color: var(--rehber-koyu); text-decoration: none; }
.nav-rehber:hover { background: var(--rehber-acik); color: var(--rehber-koyu); }
.nav-rehber i { font-size: .85rem; }
.mobil-rehber {
  display: flex; align-items: center; gap: 10px; font-weight: 600;
  color: var(--rehber-koyu) !important; background: var(--rehber-yumusak);
  border-bottom: 1px solid var(--rehber-acik);
}
.mobil-rehber small {
  margin-left: auto; background: var(--rehber); color: #fff;
  border-radius: 20px; padding: 1px 9px; font-size: .72rem;
}

.hero-rehber {
  background: linear-gradient(135deg, rgba(245, 158, 11, .13), rgba(217, 119, 6, .07));
}
.hero-rehber h1 span {
  background: linear-gradient(to right, var(--rehber), var(--rehber-koyu));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-rehber .hero-search input:focus {
  border-color: var(--rehber); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}
.hero-rehber .tag { color: var(--rehber-koyu); }
.hero-rehber .tag:hover { background: var(--rehber); color: #fff; }
button.tag { border: 0; font: inherit; cursor: pointer; }

.hero-rozet {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 5px 14px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--rehber); color: #fff;
}

.rehber-grid {
  display: grid; gap: 14px; margin-bottom: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.rehber-kart {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px;
  align-items: start; position: relative;
  padding: 16px 18px; background: var(--surface); border-radius: var(--border-radius);
  border: 1px solid var(--line-color); border-left: 3px solid var(--rehber);
  box-shadow: var(--shadow-soft); text-decoration: none; color: inherit;
  transition: var(--transition);
}
.rehber-kart:hover {
  transform: translateY(-2px); box-shadow: var(--box-shadow);
  border-color: var(--rehber);
}
.rehber-kart-ikon {
  width: 42px; height: 42px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 12px; background: var(--rehber-acik); color: var(--rehber-koyu);
}
.rehber-kart-metin { min-width: 0; }
.rehber-kart-metin strong { display: block; font-size: .98rem; margin-bottom: 3px; }
.rehber-kart-metin small {
  color: var(--muted-color); font-size: .82rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rehber-kart-etiket {
  position: absolute; top: 10px; right: 12px; font-size: .68rem;
  color: var(--rehber-koyu); background: var(--rehber-yumusak);
  padding: 2px 8px; border-radius: 12px;
}
.rehber-kart-metin strong { padding-right: 96px; }

.katalog-rehber .katalog-baslik { border-left-color: var(--rehber); }
.katalog-rehber .katalog-link:hover { color: var(--rehber-koyu); background: var(--rehber-yumusak); }

/* ================================================================= atölye ==
   Atölye, hesaplama araçlarından görsel olarak da ayrışır: araçlar turkuaz,
   rehberler kehribar, atölye mor/pembe. Her aracın kendi rengi `--c` ile
   kayıttan gelir; buradaki hiçbir kural araç adı bilmez.               */
.nav-atolye { color: #7c3aed; text-decoration: none; }
.nav-atolye:hover { background: #f3e8ff; color: #6d28d9; }
.nav-atolye i { font-size: .85rem; }
.mobil-atolye {
  display: flex; align-items: center; gap: 10px; font-weight: 600;
  color: #6d28d9 !important; background: #faf5ff;
  border-bottom: 1px solid #f3e8ff;
}
.mobil-atolye small {
  margin-left: auto; background: #7c3aed; color: #fff;
  border-radius: 20px; padding: 1px 9px; font-size: .72rem;
}

.hero-atolye {
  background: linear-gradient(135deg, rgba(124, 58, 237, .14), rgba(236, 72, 153, .09));
}
.hero-atolye h1 span {
  background: linear-gradient(to right, #7c3aed, #ec4899);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-rozet-atolye { background: #7c3aed; }

.atolye-grid {
  display: grid; gap: 16px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
}
.atolye-kart {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px;
  align-items: center; padding: 20px;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line-color); border-left: 4px solid var(--c, #7c3aed);
  box-shadow: var(--shadow-soft); text-decoration: none; color: inherit;
  transition: var(--transition);
}
.atolye-kart:hover {
  transform: translateY(-3px); box-shadow: var(--box-shadow-hover);
  border-color: var(--c, #7c3aed);
}
.atolye-kart-ikon {
  width: 54px; height: 54px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 15px; font-size: 1.3rem;
  background: color-mix(in srgb, var(--c, #7c3aed) 13%, #fff); color: var(--c, #7c3aed);
}
.atolye-kart-metin { min-width: 0; }
.atolye-kart-metin strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.atolye-kart-metin small { color: var(--muted-color); font-size: .85rem; line-height: 1.55; display: block; }
.atolye-etiketler { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.atolye-etiketler em {
  font-style: normal; font-size: .7rem; padding: 2px 9px; border-radius: 12px;
  background: color-mix(in srgb, var(--c, #7c3aed) 11%, #fff); color: var(--c, #7c3aed);
}
.atolye-kart-ok { color: var(--c, #7c3aed); flex-shrink: 0; }

.atolye-not {
  display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 8px;
  padding: 14px 16px; border-radius: var(--border-radius);
  background: var(--surface-soft); color: var(--muted-color); font-size: .86rem;
}
.atolye-not i { color: #7c3aed; margin-top: 3px; }

/* ------------------------------------------------------------ araç sayfası */
.atolye-baslik { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.atolye-baslik-ikon {
  width: 60px; height: 60px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 18px; font-size: 1.5rem;
  background: color-mix(in srgb, var(--c, #7c3aed) 13%, #fff); color: var(--c, #7c3aed);
}
.atolye-baslik h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 3px; }
.atolye-baslik p { color: var(--muted-color); font-size: .92rem; }

.atolye-kap { margin-bottom: 22px; }
.atolye-yukleniyor {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 320px; border-radius: var(--radius-lg);
  background: var(--surface-soft); color: var(--muted-color);
}

.atolye-sahne {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--box-shadow);
}
.atolye-sahne[data-tema="koyu"] { background: #05060a; }
.atolye-sahne[data-tema="acik"] { background: var(--surface); border: 1px solid var(--line-color); }
.atolye-sahne:fullscreen { border-radius: 0; }

.atolye-tuval { display: block; width: 100%; height: min(68vh, 620px); touch-action: none; cursor: crosshair; }
.atolye-sahne:fullscreen .atolye-tuval { height: 100vh; }

.atolye-ust-cubuk {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.atolye-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 0; border-radius: 20px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
  backdrop-filter: blur(8px); font: inherit; font-size: .82rem; font-weight: 500;
  transition: background .2s ease, transform .2s ease;
}
.atolye-btn:hover { background: rgba(255, 255, 255, .24); transform: translateY(-1px); }
.atolye-btn.etkin { background: #7c3aed; }
.atolye-btn-panel { margin-left: auto; }
.atolye-btn-genis { width: 100%; justify-content: center; background: rgba(255, 255, 255, .14); }

.atolye-panel {
  position: absolute; top: 60px; right: 12px; bottom: 12px; z-index: 6;
  width: min(92vw, 320px); display: flex; flex-direction: column;
  background: rgba(12, 14, 22, .92); backdrop-filter: blur(14px);
  border-radius: 16px; color: #e5e7eb;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.atolye-panel[hidden] { display: none; }
.atolye-panel-bas {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-size: .92rem;
}
.atolye-panel-kapat {
  border: 0; background: transparent; color: #9ca3af; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
}
.atolye-panel-kapat:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.atolye-panel-govde { flex: 1; overflow-y: auto; padding: 6px 16px 14px; }
.atolye-panel-alt { padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, .1); }

.atolye-bolum { margin-top: 14px; }
.atolye-bolum h3 {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  color: #a78bfa; margin-bottom: 8px;
}
.atolye-alan { display: block; margin-bottom: 13px; font-size: .82rem; }
.atolye-alan-ad { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.atolye-ipucu { display: block; color: #9ca3af; font-size: .7rem; line-height: 1.35; margin-top: 2px; }
.atolye-deger { margin-left: auto; color: #a78bfa; font-variant-numeric: tabular-nums; font-size: .78rem; }
.atolye-alan-pasif { opacity: .38; pointer-events: none; }

.atolye-kaydirac {
  width: 100%; height: 4px; border-radius: 3px; appearance: none;
  background: rgba(255, 255, 255, .18); outline: none; cursor: pointer;
}
.atolye-kaydirac::-webkit-slider-thumb {
  appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: #a78bfa; cursor: pointer; border: 0;
}
.atolye-kaydirac::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: #a78bfa; border: 0; cursor: pointer;
}
.atolye-secim {
  width: 100%; padding: 7px 10px; border-radius: 8px; font: inherit; font-size: .82rem;
  background: rgba(255, 255, 255, .09); color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, .14);
}
.atolye-secim option { background: #12141c; color: #e5e7eb; }

.atolye-alan-anahtar { display: flex; align-items: center; gap: 10px; }
.atolye-alan-anahtar .atolye-alan-ad { flex: 1; margin-bottom: 0; display: block; }
.atolye-alan-anahtar input { position: absolute; opacity: 0; width: 0; height: 0; }
.atolye-switch {
  position: relative; width: 38px; height: 21px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255, 255, 255, .2); transition: background .2s ease;
}
.atolye-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 15px; height: 15px; border-radius: 50%; background: #fff;
  transition: transform .2s ease;
}
.atolye-alan-anahtar input:checked ~ .atolye-switch { background: #7c3aed; }
.atolye-alan-anahtar input:checked ~ .atolye-switch::after { transform: translateX(17px); }

.atolye-yardim {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  z-index: 4; padding: 6px 14px; border-radius: 16px; white-space: nowrap;
  background: rgba(0, 0, 0, .42); color: rgba(255, 255, 255, .82);
  font-size: .74rem; backdrop-filter: blur(6px); pointer-events: none;
}
.atolye-sahne[data-tema="acik"] .atolye-yardim {
  background: var(--surface-soft); color: var(--muted-color); border: 1px solid var(--line-color);
}
.atolye-yardim kbd {
  padding: 1px 6px; border-radius: 5px; font-family: inherit; font-size: .92em;
  background: rgba(255, 255, 255, .16);
}
.atolye-sahne[data-tema="acik"] .atolye-yardim kbd { background: #fff; border: 1px solid var(--line-color); }

.atolye-hata {
  display: grid; place-items: center; gap: 12px; text-align: center;
  min-height: 320px; padding: 30px; border-radius: var(--radius-lg);
  background: var(--surface-soft);
}
.atolye-hata i { font-size: 2.2rem; color: var(--warn); }
.atolye-hata p { color: var(--muted-color); max-width: 460px; }

.atolye-bilgi {
  display: grid; gap: 14px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.atolye-bilgi-kart {
  padding: 18px; border-radius: var(--border-radius);
  background: var(--surface); border: 1px solid var(--line-color);
}
.atolye-bilgi-kart h2 { font-size: 1rem; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.atolye-bilgi-kart h2 i { color: #7c3aed; }
.atolye-bilgi-kart ul { padding-left: 18px; }
.atolye-bilgi-kart li, .atolye-bilgi-kart p { color: var(--muted-color); font-size: .88rem; line-height: 1.65; }
.atolye-diger { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------- boyama stüdyosu -- */
.boyama-arac-cubugu {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-color);
  background: var(--surface-soft);
}
.boyama-grup { display: flex; gap: 6px; }
.boyama-eylem { margin-left: auto; }
.boyama-arac {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line-color); border-radius: 10px; cursor: pointer;
  background: var(--surface); color: var(--text-color); font-size: .92rem;
  transition: var(--transition);
}
.boyama-arac:hover:not(:disabled) { border-color: #ec4899; color: #ec4899; }
.boyama-arac.etkin { background: #ec4899; border-color: #ec4899; color: #fff; }
.boyama-arac:disabled { opacity: .35; cursor: not-allowed; }

.boyama-kalinlik { display: flex; align-items: center; gap: 9px; font-size: .8rem; }
.boyama-kalinlik i { color: var(--muted-color); font-size: .6rem; }
.boyama-kalinlik input { width: 110px; accent-color: #ec4899; }
.boyama-kalinlik b { min-width: 20px; color: var(--muted-color); font-variant-numeric: tabular-nums; }

.boyama-govde {
  display: grid; gap: 14px; padding: 14px;
  grid-template-columns: minmax(0, 1fr) 220px;
}
.boyama-tuval-kap {
  min-width: 0; display: grid; place-items: center;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 18px 18px;
  border-radius: var(--border-radius); overflow: hidden;
}
#boyamaTuval { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.boyama-kova-imleci { cursor: cell; }

.boyama-yan { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.boyama-yan h3 {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-color); margin-bottom: 8px;
}
.boyama-palet { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.boyama-renk {
  aspect-ratio: 1; border-radius: 8px; cursor: pointer;
  background: var(--r); border: 2px solid var(--line-color);
  transition: transform .15s ease, border-color .15s ease;
}
.boyama-renk:hover { transform: scale(1.12); }
.boyama-renk.etkin { border-color: var(--dark-color); transform: scale(1.12); }
.boyama-ozel {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: .78rem; color: var(--muted-color);
}
.boyama-ozel input { width: 34px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }

.boyama-sablonlar { display: flex; flex-direction: column; gap: 5px; }
.boyama-sablon {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px;
  border: 1px solid var(--line-color); border-radius: 9px; cursor: pointer;
  background: var(--surface); color: var(--text-color);
  font: inherit; font-size: .82rem; text-align: left;
  transition: var(--transition);
}
.boyama-sablon i { color: #ec4899; width: 16px; text-align: center; }
.boyama-sablon:hover { border-color: #ec4899; }
.boyama-sablon.etkin { background: #fdf2f8; border-color: #ec4899; color: #be185d; font-weight: 600; }
.boyama-sahne .atolye-yardim { position: static; transform: none; margin: 0 14px 14px; text-align: center; }

@media (max-width: 860px) {
  .boyama-govde { grid-template-columns: minmax(0, 1fr); }
  .boyama-palet { grid-template-columns: repeat(9, 1fr); }
  .boyama-sablonlar { flex-direction: row; flex-wrap: wrap; }
  .atolye-panel { left: 12px; width: auto; }
  .atolye-yardim { display: none; }
}
