/*============================================================================================
  Mutfaktan Yarına - Herkese Açık Sayfa Kabuğu: Kapsayıcı, Üst Menü, Alt Bilgi, Bölüm Başlığı ve Ritmi (site-chrome.css)
  İşaretleme: partials/header-public.html ve partials/footer.html (build.sh ile sayfalara işlenir).
  Kullanan sayfalar: index, sss, hibe-sartlari, hibe-yonergesi. base.css'ten sonra yüklenir.
  Ana sayfadaki header/footer kuralları index.css'ten buraya taşındı (kopya yok).
============================================================================================*/

/*------------------------------------------------------------------
  0. TEK KAPSAYICI
  Üst menü içeriği, hero içeriği, sayfa yerleşimi (yan menü + içerik), mobil sekme çubuğu, alt bilgi ve
  tek sütunlu sayfalar (hibe, SSS) aynı kenarlarda hizalanır. Genişlik/boşluk token'ları: base.css :root.
  Bileşen kuralları burada yazılanı (genişlik, yatay iç boşluk, ortalama) yeniden yazmaz; yalnızca dikey boşluk verir.
------------------------------------------------------------------*/
.main-header > div,
.hero-content-wrapper,
.subnav-container,
.page-layout-wrapper,
.main-footer > div,
.hibe-page,
.sss-main {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Tek sütunlu sayfalar (hibe, SSS): üst/alt boşluk --section-gap; okuma sütunu kapsayıcı içinde ortalı, sol ve sağ boşluk eşit */
.hibe-page,
.sss-main {
  flex: 1;
  padding-block: var(--section-gap);
}

.hibe-page > section,
.sss-main > section {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

/*------------------------------------------------------------------
  1. ÜST MENÜ (Main Header)
  Ortalanmış menü, yalnızca Mutfaktan Yarına logosu (≥ 114 px), sağda Başvuru düğmesi
------------------------------------------------------------------*/
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-h);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.main-header > div {
  padding-block: 0.85rem;
  min-height: calc(var(--header-h) - 1px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo bağlantısı ve Başvuru düğmesi daralmaz */
.main-header > div > a {
  flex-shrink: 0;
}

.main-header .brand-logo {
  width: 128px;
}

/* Ortalanmış ve ince fontlu menü */
.main-header nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-header ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.1rem;
}

.main-header nav a {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: 0.04em;
  padding: 0.4rem 0.15rem;
  display: inline-block;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.main-header nav a:hover {
  color: var(--primary);
}

.main-header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.main-header nav a:hover::after,
.main-header nav a[aria-current="page"]::after {
  width: 100%;
}

.main-header nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* Dar masaüstü: menü tek satırda kalsın, aralıklar daralsın */
@media (max-width: 1280px) {
  .main-header > div { gap: 1rem; }
  .main-header nav a { font-size: 0.78rem; letter-spacing: 0.02em; }
}

/* Mobil menü düğmesi (davranış: site-chrome.js) */
.main-header button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.main-header button > span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Mobil menü: açılır panel */
@media (max-width: 1140px) {
  .main-header button {
    display: flex;
  }

  .main-header nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--gutter) 2rem;
    gap: 1.5rem;
    display: none;
  }

  .main-header nav.mobile-open {
    display: flex;
  }

  /* Kısa ekranda (yatay telefon) menü görünüm yüksekliğini aşmasın */
  .main-header nav {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .main-header ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1rem;
  }

  .main-header nav a {
    font-size: 0.95rem;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .main-header > div {
    padding-block: 0.55rem;
    gap: 0.5rem;
  }

  .main-header .brand-logo {
    width: var(--logo-w-sm);
  }
}

/* Mobil menü (≤1140px): dokunma hedefi ≥44px (menü düğmesi, menü bağlantıları) */
@media (max-width: 1140px) {
  .main-header button {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .main-header ul {
    gap: 0.25rem;
  }

  .main-header nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
}

/* 320-340px: logo + BAŞVURU + menü düğmesi tek satıra sığsın */
@media (max-width: 340px) {
  .main-header .btn-sm {
    padding-inline: 0.75rem;
    gap: 0.4rem;
  }
}

/*------------------------------------------------------------------
  2. ALT BİLGİ (Main Footer)
------------------------------------------------------------------*/
.main-footer {
  margin-top: auto;
  background: var(--dark);
  color: var(--gray-200);
  border-top: 1px solid var(--gray-800);
  padding-block: 4rem 2.25rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.15fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--gray-800);
}

.footer-top h2 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
}

.footer-top ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-top li > a {
  font-size: 0.86rem;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.footer-top li > a:hover {
  color: var(--primary-80);
}

.footer-top p {
  font-size: 0.86rem;
  color: var(--gray-400);
  line-height: 1.6;
}

.footer-top .brand-logo-card > img {
  width: var(--logo-w-md);
}

.footer-top > div:first-child > p {
  margin-top: 1.25rem;
}

.footer-top > div:last-child > p {
  margin-bottom: 1.15rem;
}

/* İletişim düğmesi: son sütunun tek <a> çocuğu */
.footer-top > div:last-child > a {
  display: inline-block;
  background: transparent;
  border: 1.5px solid var(--gray-800);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.footer-top > div:last-child > a:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.footer-bottom {
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--gray-400);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom > nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-bottom a {
  color: var(--gray-400);
}

.footer-bottom a:hover {
  color: var(--white);
}

.footer-bottom a + a::before {
  content: '•';
  margin-right: 0.75rem;
  color: var(--gray-600);
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* Mobil (≤768px) ve dokunmatik cihazlar: alt bilgi bağlantıları ≥44px hedef */
@media (max-width: 768px), (pointer: coarse) {
  .footer-top ul {
    gap: 0;
  }

  .footer-top li > a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .footer-bottom a,
  .footer-top > div:last-child > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/*------------------------------------------------------------------
  3. BÖLÜM BAŞLIĞI VE İÇ RİTİM (index, hibe, SSS ortak)
  Tek kural: .content-section içinde bitişik kardeşler --block-gap; rozet → başlık --badge-gap;
  başlık → ilk giriş bloğu --head-gap. Çocuk bileşenler kendi dış boşluğunu (margin) yazmaz.
------------------------------------------------------------------*/
.content-section {
  scroll-margin-top: calc(var(--sticky-offset) + 1.5rem);
}

.content-section > * + * {
  margin-top: var(--block-gap);
}

.content-section > .section-badge + * {
  margin-top: var(--badge-gap);
}

.content-section > .section-heading + * {
  margin-top: var(--head-gap);
}

.section-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
  text-transform: uppercase;
}

.badge-red-dash {
  width: 16px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
}

.section-heading {
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.section-subtext {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--gray-700);
}

@media (max-width: 640px) {
  .section-heading {
    font-size: 1.4rem;
  }
}
