/* =========================================================
   HSS MEKANİK — Statik alan ve kategori sayfaları + 404
   hizmetler/<alan-id>/, hizmetler/kategori/<kat-id>/, 404.html
   (tools/alan-sayfalari.js üretir). Ortak tasarım: css/style.css
   ========================================================= */

/* ---------- Üst bant ---------- */
.ap-hero { position: relative; overflow: hidden; padding-bottom: 64px; }
.ap-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(163, 176, 196, .07) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(163, 176, 196, .07) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse 55% 120% at 86% 40%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 55% 120% at 86% 40%, #000 0%, transparent 72%);
}
.ap-hero::after {
  content: ""; position: absolute; right: -8%; top: -50%; width: 55%; height: 200%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(43, 143, 224, .2), transparent);
}
.ap-hero .container { position: relative; z-index: 1; }
.ap-hero .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 26px; }
.ap-hero .breadcrumb [aria-current] { color: #fff; }
.ap-ayrac { opacity: .5; }
.ap-etiket {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; line-height: 1.3;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent-400);
}
.ap-etiket::before { content: ""; flex: none; width: 18px; height: 2px; border-radius: 2px; background: var(--brand-gradient); }
.ap-hero h1 { max-width: 22ch; font-size: clamp(2rem, 4.2vw, 3.3rem); }
.page-hero .ap-lead { max-width: 64ch; font-size: 1.12rem; line-height: 1.65; color: #c2cddb; }
.ap-hero-btn { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ap-hero-btn .btn-ghost svg:first-child { color: #25d366; }

/* ---------- Çizim + sistemler ---------- */
.ap-govde { padding-top: 56px; }
.ap-izgara {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: clamp(24px, 3vw, 52px); align-items: start;
}
.ap-cizim {
  margin: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(29, 35, 49, .05), 0 24px 48px -32px rgba(29, 35, 49, .35);
}
.ap-cizim-kutu {
  position: relative; padding: clamp(8px, 2.2vw, 28px);
  background:
    radial-gradient(ellipse 58% 54% at 50% 54%, rgba(76, 192, 236, .15), rgba(76, 192, 236, 0) 72%),
    linear-gradient(180deg, #ffffff 0, #fafcfe 120px, #eef3f9 100%);
}
.ap-cizim-kutu::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(27, 114, 204, .07) 1px, transparent 1px) 0 0 / 160px 160px,
    linear-gradient(90deg, rgba(27, 114, 204, .07) 1px, transparent 1px) 0 0 / 160px 160px,
    linear-gradient(rgba(27, 114, 204, .035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(27, 114, 204, .035) 1px, transparent 1px) 0 0 / 32px 32px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 30%, transparent 100%);
}
.ap-art { position: relative; z-index: 1; aspect-ratio: 4 / 3; }
.ap-art img { width: 100%; height: 100%; object-fit: contain; }
.ap-no {
  position: absolute; z-index: 2;
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: grid; place-items: center;
  border: 2px solid #fff; border-radius: 50%;
  background: var(--brand-gradient-strong); color: #fff;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; line-height: 1;
  box-shadow: 0 6px 14px -4px rgba(22, 96, 179, .55), 0 0 0 1px rgba(22, 96, 179, .25);
}
.ap-cizim-alt {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  padding: 14px 20px; border-top: 1px solid var(--border);
  font-size: .86rem; color: var(--text-muted);
}
.ap-etkilesim, .ap-metin-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--accent-600);
}
.ap-etkilesim svg, .ap-metin-link svg { transition: transform .2s var(--ease); }
.ap-etkilesim:hover, .ap-metin-link:hover { color: var(--accent-700); }
.ap-etkilesim:hover svg, .ap-metin-link:hover svg { transform: translateX(3px); }

.ap-sistemler { min-width: 0; }
.ap-sistemler h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); margin-bottom: 18px; }
.ap-sistem-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.ap-sistem { display: flex; gap: 14px; align-items: flex-start; padding: 14px 2px; border-bottom: 1px solid var(--border); }
.ap-sistem-no, .ap-sistem-nokta {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
}
.ap-sistem-no {
  background: var(--brand-gradient-strong); color: #fff;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500; line-height: 1;
  box-shadow: 0 3px 8px -3px rgba(22, 96, 179, .55);
}
.ap-sistem-nokta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--steel-300); }
.ap-sistem-metin { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-sistem-ad { font-weight: 700; color: var(--navy-900); line-height: 1.35; }
.ap-sistem-tanim { font-size: .92rem; line-height: 1.5; color: var(--text-muted); }
.ap-sistem-not { margin: 16px 0 0; font-size: .86rem; color: var(--steel-500); }

/* ---------- Süreç ---------- */
.ap-surec-izgara {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 80px); align-items: start;
}
.ap-surec-metin p:not(.eyebrow) { color: var(--text-muted); font-size: 1.04rem; max-width: 52ch; }
.ap-adimlar { list-style: none; margin: 0; padding: 0; counter-reset: adim; display: grid; gap: 10px; }
.ap-adimlar li {
  counter-increment: adim; position: relative;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; row-gap: 2px;
  padding: 16px 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
}
.ap-adimlar li::before {
  content: counter(adim, decimal-leading-zero);
  grid-row: 1 / span 2; align-self: start;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; letter-spacing: .06em;
  color: var(--accent-600); padding-top: 3px;
}
.ap-adim-ad { font-family: var(--font-display); font-weight: 700; font-size: 1.04rem; color: var(--navy-900); }
.ap-adim-metin { font-size: .93rem; line-height: 1.55; color: var(--text-muted); }

/* ---------- İç bağlantılar ---------- */
.ap-kardes-ust { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 22px; }
.ap-kardes-ust h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); margin: 0; }
.ap-kardes-ust p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.ap-kardes-ust p a { color: var(--accent-600); font-weight: 600; }
.ap-baglantilar {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px;
}
.ap-baglantilar a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%;
  padding: 13px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: .94rem; line-height: 1.35; color: var(--navy-800);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.ap-baglantilar a svg { flex: none; color: var(--steel-300); transition: transform .2s var(--ease), color .2s var(--ease); }
.ap-baglantilar a:hover { border-color: var(--steel-300); box-shadow: var(--shadow-sm); color: var(--navy-900); }
.ap-baglantilar a:hover svg { color: var(--accent-600); transform: translateX(3px); }
.section-alt .ap-baglantilar a { background: var(--bg); }

/* ---------- Kategori sayfası: alan kartları ---------- */
.ap-kartlar {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px;
}
.ap-kart {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  color: inherit; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.ap-kart:hover { color: inherit; border-color: var(--steel-300); box-shadow: var(--shadow); transform: translateY(-2px); }
.ap-kart-resim {
  display: block; aspect-ratio: 4 / 3; padding: 10px;
  background: radial-gradient(ellipse 60% 55% at 50% 55%, rgba(76, 192, 236, .14), rgba(76, 192, 236, 0) 72%), linear-gradient(180deg, #fff, #eef3f9);
  border-bottom: 1px solid var(--border);
}
.ap-kart-resim img { width: 100%; height: 100%; object-fit: contain; }
.ap-kart-govde { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 18px; }
.ap-kart-ad { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.25; color: var(--navy-900); }
.ap-kart-metin { font-size: .9rem; line-height: 1.5; color: var(--text-muted); }
.ap-kart-git { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--accent-600); }
.ap-kart:hover .ap-kart-git svg { transform: translateX(3px); }
.ap-kart-git svg { transition: transform .2s var(--ease); }
.ap-kat-alt { margin: 28px 0 0; }

/* ---------- Teklif bandı ---------- */
.ap-son { padding-top: 0; }
.ap-kardes + .ap-son, .ap-surec + .ap-son { padding-top: 0; }
.section-alt + .ap-son { padding-top: 80px; }
.ap-band h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.ap-band-btn { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 980px) {
  .ap-izgara, .ap-surec-izgara { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ap-hero { padding-bottom: 48px; }
  .ap-hero .breadcrumb { margin-bottom: 20px; }
  .ap-hero-btn, .ap-band-btn { flex-direction: column; align-items: stretch; }
  .ap-hero-btn .btn, .ap-band-btn .btn { width: 100%; white-space: normal; }
  .ap-govde { padding-top: 32px; }
  .ap-cizim { border-radius: 16px; }
  .ap-no { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: .64rem; border-width: 1.5px; }
  .ap-cizim-alt { padding: 12px 16px; }
  .ap-adimlar li { padding: 14px 16px; grid-template-columns: 32px minmax(0, 1fr); }
  .section-alt + .ap-son { padding-top: 56px; }
  .ap-baglantilar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ap-baglantilar a { padding: 11px 12px; font-size: .88rem; gap: 8px; }
  .ap-kardes-ust { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-kart, .ap-kart-git svg, .ap-baglantilar a, .ap-baglantilar a svg, .ap-etkilesim svg, .ap-metin-link svg { transition: none; }
  .ap-kart:hover { transform: none; }
}

@media (pointer: coarse) {
  .ap-etkilesim, .ap-metin-link { display: inline-flex; align-items: center; min-height: 40px; }
}
