/*
Theme Name: Fictioneer Child
Theme URI: https://example.com/
Description: Fictioneer için child theme. Performans ve özelleştirme kodları burada tutulur.
Author: Sen
Template: fictioneer
Version: 1.0.0
Text Domain: fictioneer-child
*/

/* ==========================================================================
   Global Header Cleanup
   Fictioneer'in devasa global site başlığını tüm sitede gizler.
   Story/sayfa içerik başlıklarını gizlemez.
   ========================================================================== */

.text-center-header,
.text-center-header__content,
.header__title,
.header__title-heading,
.header__title-link,
.site-title {
  display: none !important;
}

/* Dev başlık kalkınca kalan global header boşluğunu azalt */
.header,
.site-header {
  min-height: 0 !important;
  height: auto !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  margin-bottom: 0 !important;
}

/* ==========================================================================
   ParagonReads Home Layout
   Sadece anasayfada Home/sayfa başlığını gizler ve geniş alan kullanır.
   ========================================================================== */

body.home .singular__header,
body.front-page .singular__header,
body.home .singular__title,
body.front-page .singular__title,
body.home .entry-title,
body.front-page .entry-title {
  display: none !important;
}

body.home,
body.front-page {
  --site-width: 1440px;
  --container-width: 1440px;
  --content-width: 1440px;
  --wp--style--global--content-size: 1440px;
  --wp--style--global--wide-size: 1440px;
}

body.home .main,
body.front-page .main,
body.home .main__wrapper,
body.front-page .main__wrapper {
  width: 100% !important;
  max-width: 1440px !important;
}

body.home .main,
body.front-page .main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.home .main__wrapper,
body.front-page .main__wrapper {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: clamp(28px, 4vw, 56px) !important;
  padding-left: clamp(16px, 3vw, 48px) !important;
  padding-right: clamp(16px, 3vw, 48px) !important;
}

body.home .singular,
body.front-page .singular,
body.home .singular__article,
body.front-page .singular__article,
body.home .singular__content,
body.front-page .singular__content,
body.home .entry-content,
body.front-page .entry-content,
body.home .post-content,
body.front-page .post-content,
body.home .page-content,
body.front-page .page-content {
  width: 100% !important;
  max-width: none !important;
}

body.home .singular__content,
body.front-page .singular__content,
body.home .entry-content,
body.front-page .entry-content {
  margin-top: 0 !important;
}

/* ==========================================================================
   ParagonReads Lightweight Home Hero
   HTML + CSS only. Görsel yok, JS yok, hız dostu.
   ========================================================================== */

.pr-home-hero,
.pr-home-hero *,
.pr-home-hero *::before,
.pr-home-hero *::after {
  box-sizing: border-box;
}

.pr-home-hero {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 28px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.015));
}

.pr-home-hero__inner {
  width: 100%;
  max-width: 760px;
}

.pr-home-hero__eyebrow {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.pr-home-hero__title {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.pr-home-hero__text {
  margin: 18px 0 0;
  max-width: 680px;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  opacity: 0.78;
}

.pr-home-hero__search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin-top: 26px;
}

.pr-home-hero__search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  background: var(--input-background, #fff);
  color: inherit;
}

.pr-home-hero__search button {
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.pr-home-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pr-home-hero__links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  opacity: 0.88;
}

.pr-home-hero__links a:hover {
  opacity: 1;
}

@media (min-width: 1000px) {
  .pr-home-hero {
    padding-top: clamp(52px, 5vw, 72px);
    padding-bottom: clamp(44px, 5vw, 64px);
  }
}

/* ==========================================================================
   ParagonReads Home Content Sections
   Latest Updates, Recommended Reads, Browse by Genre, Latest Stories.
   ========================================================================== */

.pr-home-section {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 36px;
}

.pr-home-section__head {
  margin: 0 0 16px;
}

.pr-home-section__head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pr-home-section__head p {
  margin: 6px 0 0;
  font-size: 0.98rem;
  opacity: 0.72;
}

.pr-genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pr-genre-grid a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 34%),
    rgba(15, 23, 42, 0.018);
}

.pr-genre-grid a:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   ParagonReads Small Home Link
   İç sayfalarda ana sayfaya dönüş linki.
   Anasayfada functions.php tarafında gösterilmiyor.
   ========================================================================== */

.pr-site-home-link {
  position: fixed;
  top: 26px;
  left: clamp(16px, 3vw, 36px);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(10px);
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.88;
}

.pr-site-home-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

body.admin-bar .pr-site-home-link {
  top: 58px;
}

/* ==========================================================================
   Mobile
   Anasayfada hero/form taşmasını ve header çizgisi çakışmasını engeller.
   Genre alanını uzunluğa göre akan chip görünümüne çevirir.
   ========================================================================== */

@media (max-width: 768px) {
  .header,
  .site-header {
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  body.home .header,
  body.front-page .header,
  body.home .site-header,
  body.front-page .site-header {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.home .main,
  body.front-page .main,
  body.home .main__wrapper,
  body.front-page .main__wrapper,
  body.home .singular,
  body.front-page .singular,
  body.home .singular__article,
  body.front-page .singular__article,
  body.home .singular__content,
  body.front-page .singular__content,
  body.home .entry-content,
  body.front-page .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body.home .main__wrapper,
  body.front-page .main__wrapper {
    padding-top: 64px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .pr-home-hero {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 24px !important;
    padding: 24px 16px !important;
    border-radius: 18px !important;
  }

  .pr-home-hero__inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pr-home-hero__eyebrow {
    font-size: 0.75rem !important;
  }

  .pr-home-hero__title {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: clamp(2.15rem, 10vw, 3.15rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.04em !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .pr-home-hero__text {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .pr-home-hero__search {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
  }

  .pr-home-hero__search input,
  .pr-home-hero__search button {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pr-home-hero__links {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  .pr-home-hero__links a {
    max-width: 100% !important;
    white-space: normal !important;
  }

  .pr-home-section {
    max-width: 100%;
    margin-bottom: 30px;
  }

  .pr-genre-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .pr-genre-grid a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-size: 0.9rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .pr-site-home-link {
    top: 24px;
    left: 16px;
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.82rem;
  }

  body.admin-bar .pr-site-home-link {
    top: 58px;
  }
}

@media (max-width: 420px) {
  body.home .main__wrapper,
  body.front-page .main__wrapper {
    padding-top: 56px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .pr-home-hero {
    padding: 22px 14px !important;
  }

  .pr-home-hero__title {
    font-size: clamp(2rem, 10vw, 2.75rem) !important;
  }

  .pr-home-hero__text {
    font-size: 0.95rem !important;
  }

  .pr-genre-grid {
    gap: 7px !important;
  }

  .pr-genre-grid a {
    min-height: 36px !important;
    padding: 7px 10px !important;
    font-size: 0.86rem !important;
  }
}
