/* ============================================================
   GOOD PLACE — BLOG (yalnızca /blog/ sayfalarında yüklenir)
   style.css değişkenlerini ve .btn / .blog-card / footer stillerini kullanır.
   ============================================================ */

/* ---------- Hero + Breadcrumb ---------- */
.blog-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(255,255,255,.12) 0%, transparent 45%),
        linear-gradient(135deg, #1f7a2c 0%, var(--primary-dark) 45%, var(--primary) 100%);
    color: #fff;
    padding: calc(var(--navbar-h) + 64px) 0 56px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: .85rem;
    margin-bottom: 18px;
    opacity: .92;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "›"; opacity: .7; }
.breadcrumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span[aria-current] { opacity: .85; }

.blog-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    max-width: 820px;
}
.blog-hero-sub {
    margin-top: 14px;
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 760px;
    opacity: .95;
}
.blog-hero-meta {
    margin-top: 18px;
    font-size: .88rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    opacity: .9;
}
.blog-hero-meta i { margin-right: 4px; }

/* ---------- Liste sayfası ---------- */
.blog-list-section { padding: 64px 0 80px; background: var(--bg-soft); }
.blog-grid--all { margin-bottom: 48px; }

/* Liste ve ilgili yazılar: düzen blog stil dosyasında açıkça tanımlıdır. */
.blog-page .blog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
    min-width: 0;
}
.blog-page .blog-card,
.blog-page .blog-card-link,
.blog-page .blog-card-content { min-width: 0; }
.blog-page .blog-card-title,
.blog-page .blog-card-excerpt { overflow-wrap: anywhere; }
.blog-page .blog-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    flex: 0 0 auto;
}
@media (min-width: 700px) {
    .blog-page .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .blog-page .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Yazı gövdesi ---------- */
.post { padding: 56px 0 24px; background: var(--bg) !important; }
.post-container { max-width: 820px; }

.post-body { font-size: 1.04rem; line-height: 1.8; color: var(--text); }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 {
    font-size: 1.55rem;
    line-height: 1.3;
    margin-top: 2.2em;
    padding-top: .2em;
    scroll-margin-top: calc(var(--navbar-h) + 16px);
}
.post-body h3 { font-size: 1.2rem; line-height: 1.35; margin-top: 1.8em; }
.post-body a:not(.btn) { color: var(--primary-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: .4em; }
.post-body strong { font-weight: 700; }

.post-lead {
    font-size: 1.12rem;
    color: var(--text);
    border-left: 4px solid var(--primary);
    padding: 4px 0 4px 18px;
}

/* İçindekiler */
.post-toc {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}
.post-toc strong { display: block; margin-bottom: 8px; }
.post-toc ol { margin: 0; }
.post-toc a { font-weight: 500 !important; }

/* Kısa cevap kutusu (AI / featured snippet için) */
.post-answer {
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 20px 24px;
}
.post-answer p { margin: 0; }

/* Tablolar */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-md); }
.post-body table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
.post-body caption { text-align: left; font-weight: 600; padding: 12px 16px; background: var(--bg-soft); }
.post-body th, .post-body td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.post-body thead th { background: var(--primary); color: #fff; font-weight: 600; }
.post-body tbody tr:nth-child(even) { background: var(--bg-soft); }

/* Not kutusu */
.post-note {
    background: #fff8e6;
    border: 1px solid #f5d98a;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-size: .95rem;
}

/* İsim listeleri */
.name-grid {
    list-style: none;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.name-grid li {
    margin: 0 !important;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: .95rem;
}
.name-grid li small { display: block; color: var(--text-muted); font-size: .8rem; line-height: 1.4; }

/* ---------- Yaş hesaplayıcı ---------- */
.age-calc {
    background: var(--bg);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    box-shadow: var(--shadow-green);
}
.age-calc h2 { margin-top: 0 !important; font-size: 1.3rem !important; }
.age-calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.age-calc label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.age-calc input, .age-calc select {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}
.age-calc input:focus, .age-calc select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.age-calc .btn { margin-top: 16px; }
.age-calc-result {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    font-size: 1.05rem;
}
.age-calc-result[hidden] { display: none; }
.age-calc-result strong { font-size: 1.6rem; color: var(--primary-dark); }

/* ---------- SSS ---------- */
.post-faq { margin-top: 2.6em !important; }
.post-faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    margin-top: 10px;
    overflow: hidden;
}
.post-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 48px 16px 20px;
    font-weight: 600;
    position: relative;
}
.post-faq-item summary::-webkit-details-marker { display: none; }
.post-faq-item summary::after {
    content: "+";
    position: absolute; right: 20px; top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem; color: var(--primary);
}
.post-faq-item[open] summary::after { content: "–"; }
.post-faq-item[open] summary { background: var(--primary-light); }
.post-faq-item p { padding: 14px 20px 18px; margin: 0; color: var(--text-muted); }

.post-updated { font-size: .88rem; color: var(--text-muted); margin-top: 2.4em !important; }

/* ---------- Yerel CTA kutusu ---------- */
.blog-local-cta {
    margin-top: 2.4em;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
    line-height: 1.65;
}
.blog-local-cta h2 { font-size: 1.3rem !important; margin: 6px 0 8px !important; padding: 0 !important; }
.blog-local-cta p { font-size: .96rem; margin: 0 0 8px; }
.blog-local-cta-tag { font-size: .8rem; font-weight: 600; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .04em; }
.blog-local-cta-nap { color: var(--text-muted); font-size: .9rem !important; }
.blog-local-cta-nap i { color: var(--primary); width: 16px; }
.blog-local-cta-actions { display: flex; flex-direction: column; gap: 10px; }
.blog-local-cta-actions .btn { justify-content: center; white-space: nowrap; }

/* ---------- İlgili yazılar ---------- */
.blog-related { padding: 56px 0 80px; background: var(--bg-soft) !important; }
.blog-related-title { font-size: 1.5rem; margin-bottom: 24px; }

/* main içindeki section'ların index.php'deki zebra arka planını devralmaması için */
.page-blog section { padding-top: 0; padding-bottom: 0; }
.page-blog .blog-list-section { padding: 64px 0 80px; }
.page-blog .blog-related { padding: 56px 0 80px; }
.page-blog .post-faq { padding: 0; background: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .blog-local-cta { grid-template-columns: 1fr; }
    .blog-local-cta-actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 640px) {
    .blog-hero { padding: calc(var(--navbar-h) + 40px) 0 40px; }
    .post { padding-top: 36px; }
    .post-body { font-size: 1rem; }
    .post-body h2 { font-size: 1.32rem; }
    .age-calc-row { grid-template-columns: 1fr; }
    .blog-local-cta { padding: 22px 20px; }
}
