/*
Theme Name: Medical v3.1
Author: Serkan Sezer
Description: Mobil ortalama ve liste tarih ayarlari.
Version: 3.1
*/

:root {
    --primary-color: #004d40;
    --link-color: #004d40;
    --text-color: #333;
    --bg-color: #f5f7f8;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --references-title: 'References'; 
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0; padding: 0;
}

/* HEADER */
.site-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

.header-inner {
    display: flex; justify-content: space-between; align-items: center;
}

.site-title a {
    color: var(--white); text-decoration: none; font-size: 24px; font-weight: bold;
}

.header-search input {
    width: 400px; padding: 10px; border-radius: 4px; border: none; font-size: 16px;
}

/* LAYOUT */
.content-area {
    display: grid; grid-template-columns: 250px 1fr; gap: 30px;
    margin-top: 30px; margin-bottom: 50px;
}

/* SIDEBAR (TOC) */
.toc-sidebar {
    position: sticky; top: 20px; height: fit-content;
    padding-right: 20px; border-right: 1px solid var(--border-color); font-size: 14px;
}
.toc-sidebar h3 {
    margin-top: 0; font-size: 14px; text-transform: uppercase; color: #666; letter-spacing: 1px;
}
.toc-sidebar ul { list-style: none; padding: 0; }
.toc-sidebar li { margin-bottom: 8px; }
.toc-sidebar a {
    color: #555; text-decoration: none; display: block; padding: 5px 0;
}
.toc-sidebar a:hover {
    color: var(--primary-color); border-left: 2px solid var(--primary-color); padding-left: 8px; transition: 0.2s;
}

/* MAIN ARTICLE */
.main-article {
    background: var(--white); padding: 40px;
    border: 1px solid var(--border-color); border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

h1.entry-title {
    font-size: 28px; margin-top: 0; color: var(--primary-color);
    border-bottom: 1px solid #eee; padding-bottom: 15px;
}

h2 { margin-top: 40px; font-size: 22px; color: var(--primary-color); border-bottom: 1px solid #eee; padding-bottom: 5px;}
h3 { margin-top: 30px; font-size: 18px; color: #333; font-weight: bold;}

.entry-content a {
    color: var(--primary-color); font-weight: 700; text-decoration: underline;
}
.entry-content a:hover { background-color: #e0f2f1; }

/* META INFO */
.meta-info {
    font-size: 13px; color: #555; background: #eef3f7;
    padding: 15px 20px; display: block; width: 100%; border-radius: 4px; 
    margin-bottom: 25px; border-left: 4px solid var(--primary-color);
}
.meta-line {
    display: block; margin-bottom: 5px;
}
.meta-line:last-child { margin-bottom: 0; }

/* SOCIAL BUTTONS */
.article-tools {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0;
}
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-share {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 4px; background: #f5f7f8;
    color: #555; transition: all 0.2s ease;
}
.btn-share:hover { color: #fff; transform: translateY(-2px); text-decoration: none; }
.whatsapp:hover { background-color: #25D366; }
.twitter:hover { background-color: #000000; }
.facebook:hover { background-color: #1877F2; }
.linkedin:hover { background-color: #0A66C2; }
.bluesky:hover { background-color: #0560FF; }
.email:hover { background-color: #ea4335; }

.btn-print {
    background: #fff; border: 1px solid #ddd; padding: 6px 15px;
    border-radius: 4px; font-size: 13px; cursor: pointer;
    color: #333; display: flex; align-items: center; font-weight: 500;
}
.btn-print:hover { background: #f0f0f0; border-color: #ccc; }

/* REKLAM ALANLARI */
.ad-container {
    margin: 30px 0; text-align: center; background: #f9f9f9; padding: 10px; border: 1px dashed #ddd;
}

/* COMMENTS ACCORDION */
.comments-accordion {
    margin-top: 60px; border: 1px solid #ddd; border-radius: 8px; overflow: hidden;
}
.comments-accordion summary {
    background: #f8f9fa; padding: 15px 20px; cursor: pointer;
    font-weight: 600; font-size: 16px; color: var(--primary-color);
    list-style: none; display: flex; justify-content: space-between; align-items: center;
    transition: background 0.3s;
}
.comments-accordion summary:hover { background: #f1f3f4; }
.comments-accordion summary::after { content: '+'; font-size: 20px; color: #777; font-weight: normal; }
.comments-accordion[open] summary { border-bottom: 1px solid #ddd; background: #fff; }
.comments-accordion[open] summary::after { content: '-'; }
.comments-inner { padding: 30px; background: #fff; }

.comment-form textarea, .comment-form input {
    width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 15px; font-family: inherit; font-size: 14px;
}
.comment-form textarea:focus, .comment-form input:focus {
    border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 2px rgba(0,77,64, 0.1);
}
.form-submit .submit {
    background-color: var(--primary-color); color: #fff; border: none; padding: 10px 25px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* PAGINATION */
.pagination {
    margin-top: 60px; margin-bottom: 40px; text-align: center;
    display: flex; justify-content: center; width: 100%;
}
.nav-links {
    display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.pagination .page-numbers {
    display: flex; align-items: center; justify-content: center;
    height: 44px; min-width: 44px; padding: 0 15px;
    background: #fff; border: 1px solid #e0e0e0; color: #555; text-decoration: none;
    border-radius: 6px; font-weight: 600; font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.pagination a.page-numbers:hover {
    border-color: var(--primary-color); color: var(--primary-color);
    background: #f4fcf9; transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 77, 64, 0.15);
}
.pagination .current {
    background: var(--primary-color); color: #fff; border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 77, 64, 0.3); cursor: default; pointer-events: none;
}
.pagination .prev, .pagination .next {
    font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; padding: 0 20px;
}
.pagination .dots {
    border: none; background: transparent; box-shadow: none; cursor: default; color: #999;
}

/* NATIVE FOOTNOTES */
sup { vertical-align: super; font-size: smaller; }
a[data-fn] {
    color: var(--primary-color); font-weight: 900; text-decoration: none; margin-left: 2px; font-size: 12px; opacity: 0.9;
}
a[data-fn]:hover { text-decoration: underline; opacity: 1; }
.wp-block-footnotes {
    margin-top: 60px !important; padding-top: 20px; border-top: 2px solid #eee; color: #555; font-size: 13px;
}
.wp-block-footnotes::before {
    content: var(--references-title); display: block; font-size: 18px; font-weight: bold; color: #333; margin-bottom: 15px; font-family: inherit;
}
.wp-block-footnotes ol { padding-left: 20px; }
.wp-block-footnotes li { margin-bottom: 10px; }
.wp-block-footnotes a { color: var(--primary-color); text-decoration: none; }


/* RESPONSIVE (MOBİL GÖRÜNÜM AYARLARI) */
@media (max-width: 768px) {
    /* 1. Başlık ve Arama Kutusu: ORTALAMA DÜZELTİLDİ */
    .header-inner {
        flex-direction: column; /* Alt alta diz */
        align-items: center; /* ORTALA */
        text-align: center; /* Metni ortala */
    }
    .header-search {
        width: 100%;
        margin-top: 15px;
    }
    .header-search input {
        width: 100%;
    }

    /* 2. İçerik Genişliğini Artır */
    .container { padding: 0 10px; }
    .main-article { padding: 20px; }

    /* 3. Buton Gizleme */
    .btn-share.whatsapp, .btn-share.email { display: none !important; }

    .content-area { grid-template-columns: 1fr; }
    .toc-sidebar { display: none; }
    .pagination .page-numbers { height: 36px; min-width: 36px; font-size: 13px; padding: 0 10px; }
    .pagination .prev, .pagination .next { padding: 0 12px; }
}

/* PRINT CSS */
@media print {
    body * { visibility: hidden; }
    .main-article, .main-article * { visibility: visible; }
    .site-header, .toc-sidebar, .article-tools, .header-search, footer, .comments-accordion, .ad-container { display: none !important; }
    .main-article { position: absolute; left: 0; top: 0; width: 100% !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
    h1.entry-title { font-size: 18pt; border-bottom: 2px solid #000; }
    a { text-decoration: none; color: #000 !important; }
    .wp-block-footnotes { display: block !important; border-top: 1px solid #000; }
    .wp-block-footnotes::before { color: #000; }
}