/*
Theme Name: Korayspor Blog
Theme URI: https://korayspor.com
Author: Korayspor
Description: Minimal, profesyonel blog teması — Korayspor Blog için özel olarak tasarlandı. Sade grid layout, hızlı yüklenme, mobil uyumlu.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: ksblog
*/

/* ---------- Reset & base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px;line-height:1.65;color:#1a1a1a;background:#fff;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:#ee5b1a;text-decoration:none;transition:color .15s ease}
a:hover{color:#c64812}
h1,h2,h3,h4,h5,h6{font-weight:700;line-height:1.25;margin:0 0 .6em;color:#1a1a1a;letter-spacing:-.01em}
h1{font-size:2.25rem}
h2{font-size:1.6rem}
h3{font-size:1.25rem}
p{margin:0 0 1em}
button,input,select,textarea{font:inherit;color:inherit}

:root{
  --brand:#ee5b1a;
  --brand-dark:#c64812;
  --ink:#1a1a1a;
  --text:#3a3a3a;
  --muted:#7a7a7a;
  --border:#e8e8e8;
  --bg:#fff;
  --bg-soft:#f7f7f7;
  --container:1200px;
  --gap:24px;
  --radius:8px;
}

/* ---------- Layout ---------- */
.container{max-width:var(--container);margin:0 auto;padding:0 20px}
.skip-link{position:absolute;left:-9999px;top:0;background:#000;color:#fff;padding:10px 16px;z-index:9999}
.skip-link:focus{left:10px;top:10px}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.96);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--border)}
.site-header__inner{display:flex;align-items:center;gap:24px;padding:14px 0}
.site-logo{flex:0 0 auto;display:inline-flex;align-items:center}
.site-logo img{height:38px;width:auto}
.site-logo .text-logo{font-weight:800;font-size:1.4rem;color:var(--ink);letter-spacing:-.02em}
.site-logo .text-logo span{color:var(--brand)}
.primary-nav{flex:1 1 auto}
.primary-nav ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0;justify-content:center}
.primary-nav a{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:38px;padding:0 12px;color:var(--ink);font-weight:600;font-size:.82rem;text-transform:uppercase;letter-spacing:.04em;border-radius:6px;transition:all .15s ease;line-height:1}
.primary-nav a > svg{display:block;width:17px;height:17px;flex-shrink:0;color:var(--muted);transition:color .15s ease}
.primary-nav a:hover > svg,.primary-nav .current-menu-item > a > svg,.primary-nav .current_page_item > a > svg{color:var(--brand)}
.nav-label{display:inline-block;line-height:1}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.primary-nav a:hover,.primary-nav .current-menu-item > a,.primary-nav .current_page_item > a{background:var(--bg-soft);color:var(--brand)}
.header-search{flex:0 0 auto;position:relative}
.header-search__toggle{background:none;border:1px solid var(--border);width:40px;height:40px;border-radius:50%;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--ink);transition:all .15s ease}
.header-search__toggle:hover{border-color:var(--brand);color:var(--brand)}
.header-search__form{position:absolute;top:calc(100% + 10px);right:0;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:10px;box-shadow:0 8px 32px rgba(0,0,0,.08);display:none;min-width:320px}
.header-search.open .header-search__form{display:flex;gap:8px}
.header-search__form input[type=search]{flex:1;border:1px solid var(--border);border-radius:6px;padding:10px 12px;outline:none;transition:border-color .15s ease}
.header-search__form input[type=search]:focus{border-color:var(--brand)}
.header-search__form button{background:var(--brand);color:#fff;border:none;border-radius:6px;padding:10px 16px;cursor:pointer;font-weight:600}
.header-search__form button:hover{background:var(--brand-dark)}

/* Mobile menu toggle */
.menu-toggle{display:none;background:none;border:1px solid var(--border);width:40px;height:40px;border-radius:50%;cursor:pointer;align-items:center;justify-content:center}

/* ---------- Page header ---------- */
.page-header{padding:48px 0 24px;border-bottom:1px solid var(--border);margin-bottom:32px}
.page-header__eyebrow{color:var(--brand);font-size:.85rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px}
.page-header h1{margin:0;font-size:2.25rem}
.page-header__desc{color:var(--muted);margin-top:8px;font-size:1.05rem}

/* ---------- Post grid ---------- */
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px 24px;padding:8px 0 48px}
.post-card{display:flex;flex-direction:column;background:#fff;border-radius:var(--radius);overflow:hidden;transition:transform .2s ease,box-shadow .2s ease}
.post-card:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(0,0,0,.06)}
.post-card__thumb{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--bg-soft);border-radius:var(--radius)}
.post-card__thumb img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.post-card:hover .post-card__thumb img{transform:scale(1.04)}
.post-card__category{position:absolute;top:12px;left:12px;background:var(--brand);color:#fff;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:5px 10px;border-radius:4px}
.post-card__body{padding:16px 4px 0}
.post-card__title{font-size:1.1rem;line-height:1.35;margin:0 0 8px;font-weight:700}
.post-card__title a{color:var(--ink)}
.post-card__title a:hover{color:var(--brand)}
.post-card__excerpt{color:var(--text);font-size:.92rem;line-height:1.55;margin:0 0 12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.post-card__meta{color:var(--muted);font-size:.82rem;display:flex;gap:12px;align-items:center}
.post-card__meta time{color:var(--muted)}

/* ---------- Pagination ---------- */
.pagination{display:flex;justify-content:center;gap:6px;padding:24px 0 64px;flex-wrap:wrap}
.pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 14px;border:1px solid var(--border);border-radius:6px;color:var(--ink);font-weight:600;transition:all .15s ease}
.pagination .page-numbers:hover{border-color:var(--brand);color:var(--brand)}
.pagination .page-numbers.current{background:var(--brand);border-color:var(--brand);color:#fff}
.pagination .dots{border:none}

/* ---------- Single post ---------- */
.single-post-wrap{max-width:780px;margin:0 auto;padding:32px 0 48px}
.single-post-header{margin-bottom:28px}
.single-post-category{display:inline-block;background:var(--brand);color:#fff;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:5px 12px;border-radius:4px;margin-bottom:16px}
.single-post-title{font-size:2.4rem;line-height:1.2;margin:0 0 16px}
.single-post-meta{color:var(--muted);font-size:.92rem;display:flex;flex-wrap:wrap;gap:14px;align-items:center;padding-bottom:20px;border-bottom:1px solid var(--border)}
.single-post-meta strong{color:var(--ink);font-weight:600}
.single-post-thumb{margin:0 0 28px;border-radius:var(--radius);overflow:hidden}
.single-post-thumb img{width:100%;height:auto}
.entry-content{font-size:1.05rem;line-height:1.75;color:var(--text)}
.entry-content > *{margin-bottom:1.2em}
.entry-content h2{font-size:1.7rem;margin-top:2em;color:var(--ink)}
.entry-content h3{font-size:1.3rem;margin-top:1.8em;color:var(--ink)}
.entry-content img{border-radius:var(--radius);margin:1.5em auto}
.entry-content blockquote{border-left:4px solid var(--brand);padding:6px 0 6px 18px;color:var(--ink);font-style:italic;margin:1.6em 0;background:var(--bg-soft);border-radius:0 6px 6px 0;padding:14px 18px}
.entry-content ul,.entry-content ol{padding-left:1.5em}
.entry-content code{background:var(--bg-soft);padding:2px 6px;border-radius:4px;font-size:.92em}
.entry-content a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.post-tags{padding:28px 0;margin-top:32px;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.post-tags strong{margin-right:6px;color:var(--ink)}
.post-tags a{display:inline-block;padding:5px 12px;background:var(--bg-soft);border:1px solid var(--border);border-radius:20px;color:var(--text);font-size:.82rem;transition:all .15s ease}
.post-tags a:hover{background:var(--brand);color:#fff;border-color:var(--brand)}

/* ---------- Search results ---------- */
.search-results-header{padding:48px 0 16px}
.search-results-header form{display:flex;gap:8px;max-width:560px;margin-top:16px}
.search-results-header input[type=search]{flex:1;border:1px solid var(--border);border-radius:6px;padding:12px 14px;font-size:1rem;outline:none}
.search-results-header input[type=search]:focus{border-color:var(--brand)}
.search-results-header button{background:var(--brand);color:#fff;border:none;border-radius:6px;padding:12px 24px;cursor:pointer;font-weight:600}
.search-results-header button:hover{background:var(--brand-dark)}
.no-results{text-align:center;padding:64px 16px;color:var(--muted)}
.no-results h2{color:var(--ink);margin-bottom:8px}

/* ---------- Footer ---------- */
.site-footer{background:#0f0f10;color:#9a9a9a;padding:56px 0 22px;margin-top:72px;font-size:.93rem}
.site-footer__inner{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:56px;padding-bottom:36px;border-bottom:1px solid #1e1e1f}
.site-footer h4{color:#fff;font-size:.82rem;font-weight:700;margin:0 0 18px;text-transform:uppercase;letter-spacing:.1em}
.footer-logo{height:40px;width:auto;filter:brightness(0) invert(1);margin-bottom:18px;opacity:.95}
.footer-about{color:#9a9a9a;font-size:.92rem;line-height:1.65;margin:0 0 18px;max-width:340px}
.footer-postlist{list-style:none;margin:0;padding:0}
.footer-postlist li{padding:9px 0;border-bottom:1px solid #1c1c1d}
.footer-postlist li:last-child{border-bottom:none}
.footer-postlist a{display:block;color:#cfcfcf;font-size:.91rem;line-height:1.4;transition:color .15s ease;margin-bottom:2px}
.footer-postlist a:hover{color:var(--brand)}
.footer-postlist time{color:#6a6a6a;font-size:.75rem}
.social-links{display:flex;gap:10px;margin-top:4px}
.social-links a{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;background:#1c1c1d;border-radius:50%;color:#9a9a9a;transition:all .15s ease}
.social-links a:hover{background:var(--brand);color:#fff;transform:translateY(-1px)}
/* Legal & contact info row */
.site-footer__legal{display:grid;grid-template-columns:1.4fr 1fr;gap:56px;padding:32px 0;border-bottom:1px solid #1e1e1f}
.site-footer__legal h5{color:#fff;font-size:.72rem;font-weight:700;margin:0 0 14px;text-transform:uppercase;letter-spacing:.14em}
.legal-company{color:#e5e5e5;font-size:.92rem;font-weight:600;margin:0 0 14px;line-height:1.4;padding-bottom:12px;border-bottom:1px solid #1e1e1f}
.legal-list{margin:0;display:block;font-size:.8rem;line-height:1.5}
.legal-row{display:flex;align-items:baseline;gap:14px;padding:5px 0}
.legal-row dt{color:#7a7a7a;font-weight:500;flex:0 0 130px;letter-spacing:.01em}
.legal-row dd{margin:0;color:#cfcfcf;flex:1 1 auto;word-break:break-word}

/* Contact list with icons */
.contact-list{list-style:none;margin:0;padding:0}
.contact-list li{display:flex;align-items:flex-start;gap:12px;padding:8px 0}
.contact-icon{flex:0 0 36px;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;background:#1c1c1d;border-radius:50%;color:var(--brand);transition:all .15s ease}
.contact-list li:hover .contact-icon{background:var(--brand);color:#fff}
.contact-list li > div{flex:1 1 auto;min-width:0;padding-top:2px}
.contact-label{display:block;color:#7a7a7a;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;margin-bottom:2px}
.contact-list a{display:block;color:#e5e5e5;font-size:.88rem;font-weight:500;transition:color .15s ease;word-break:break-word;line-height:1.35}
.contact-list a:hover{color:var(--brand)}
.site-footer__bottom{padding-top:22px;display:flex;justify-content:space-between;align-items:center;color:#6a6a6a;font-size:.82rem}
.site-footer__bottom strong{color:#cfcfcf;font-weight:600}
.site-footer__bottom a{color:#9a9a9a}
.site-footer__bottom a:hover{color:var(--brand)}

/* ---------- Comments ---------- */
.comments-area{max-width:780px;margin:48px auto 0;padding:36px 0 0;border-top:1px solid var(--border)}
.comments-title{font-size:1.35rem;margin-bottom:24px;color:var(--ink)}
.comment-list{list-style:none;padding:0;margin:0 0 40px}
.comment-list .children{list-style:none;padding-left:36px;margin-top:18px}
.comment-item{padding:20px 0;border-bottom:1px solid var(--border)}
.comment-item:last-child{border-bottom:none}
.comment-body{display:flex;gap:14px}
.comment-avatar img{border-radius:50%;display:block}
.comment-content{flex:1;min-width:0}
.comment-meta{display:flex;align-items:baseline;gap:10px;margin-bottom:6px;flex-wrap:wrap}
.comment-author{font-weight:600;color:var(--ink);font-style:normal}
.comment-author a{color:var(--ink)}
.comment-date{color:var(--muted);font-size:.82rem}
.comment-text{color:var(--text);font-size:.95rem;line-height:1.65}
.comment-text p:last-child{margin-bottom:8px}
.comment-reply-link{display:inline-block;color:var(--brand);font-size:.82rem;font-weight:600;margin-top:4px}
.comment-reply-link:hover{text-decoration:underline}

/* Comment form */
#respond{margin-top:0}
.comment-respond{background:var(--bg-soft);border-radius:var(--radius);padding:28px;margin-top:8px}
.comment-reply-title{font-size:1.25rem;margin:0 0 6px;color:var(--ink)}
.comment-reply-title small{font-size:.85rem;font-weight:400;margin-left:8px}
.comment-reply-title small a{color:var(--muted)}
.logged-in-as{color:var(--muted);font-size:.88rem;margin-bottom:18px}
.logged-in-as a{color:var(--brand)}
.comment-form{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px;margin-top:14px}
.comment-form-comment{grid-column:1 / -1;margin:0}
.comment-form-author,.comment-form-email{margin:0}
.comment-form label{display:block;font-size:.82rem;font-weight:600;color:var(--ink);margin-bottom:6px;text-transform:uppercase;letter-spacing:.04em}
.comment-form .required{color:var(--brand)}
.comment-form input[type=text],.comment-form input[type=email],.comment-form textarea{width:100%;border:1px solid var(--border);background:#fff;border-radius:6px;padding:11px 13px;font-size:.95rem;line-height:1.5;font-family:inherit;outline:none;transition:border-color .15s ease,box-shadow .15s ease}
.comment-form input[type=text]:focus,.comment-form input[type=email]:focus,.comment-form textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(238,91,26,.12)}
.comment-form textarea{resize:vertical;min-height:120px}
.form-submit{grid-column:1 / -1;margin:6px 0 0}
.form-submit .submit{background:var(--brand);color:#fff;border:none;border-radius:6px;padding:12px 28px;font-size:.95rem;font-weight:600;cursor:pointer;transition:background .15s ease}
.form-submit .submit:hover{background:var(--brand-dark)}
.comments-area .comment-navigation,.comments-area .comments-pagination{margin:24px 0}
.no-comments{color:var(--muted);font-style:italic}

/* ---------- 404 ---------- */
.error-404{text-align:center;padding:96px 16px}
.error-404 h1{font-size:6rem;color:var(--brand);margin:0}
.error-404 h2{margin:8px 0 16px}
.error-404 p{color:var(--muted);margin-bottom:24px}

/* ---------- Buttons ---------- */
.btn{display:inline-block;background:var(--brand);color:#fff;padding:12px 24px;border-radius:6px;font-weight:600;transition:background .15s ease}
.btn:hover{background:var(--brand-dark);color:#fff}

/* ---------- Responsive ---------- */
@media (max-width:960px){
  .posts-grid{grid-template-columns:repeat(2,1fr);gap:28px 20px}
  .single-post-title{font-size:1.9rem}
  h1{font-size:1.9rem}
  .site-footer__inner{grid-template-columns:1fr 1fr;gap:36px}
  .footer-col--brand{grid-column:1 / -1}
  .footer-about{max-width:none}
}
@media (max-width:780px){
  /* ===== Mobile header — rewritten for stability ===== */
  .site-header__inner{position:relative;padding:12px 0;gap:12px;justify-content:space-between;flex-wrap:nowrap}
  .site-logo{flex:1 1 auto;min-width:0;overflow:hidden}
  .site-logo img{height:34px;max-width:160px;object-fit:contain;object-position:left center}
  .menu-toggle{display:inline-flex;flex:0 0 auto;order:2;margin-left:auto}
  .header-search{flex:0 0 auto;order:1}
  .header-search__toggle,.menu-toggle{width:38px;height:38px}
  .primary-nav{order:3;position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid var(--border);padding:8px 0;display:none;box-shadow:0 8px 24px rgba(0,0,0,.08);max-height:calc(100vh - 80px);overflow-y:auto}
  .primary-nav.open{display:block}
  .primary-nav ul{flex-direction:column;gap:0;align-items:stretch;padding:0 16px}
  .primary-nav a{padding:13px 8px;border-radius:0;border-bottom:1px solid var(--border);display:block}
  .primary-nav li:last-child a{border-bottom:none}
  .header-search__form{position:fixed;top:64px;left:16px;right:16px;min-width:0;max-width:none;padding:12px;box-shadow:0 12px 32px rgba(0,0,0,.1);z-index:99}

  .posts-grid{grid-template-columns:1fr;gap:24px}
  .page-header{padding:32px 0 16px}
  .page-header h1{font-size:1.7rem}
  .single-post-wrap{padding:20px 0 32px}
  .single-post-title{font-size:1.55rem}
  .entry-content{font-size:1rem}
  .comment-form{grid-template-columns:1fr}
  .comment-respond{padding:20px}
  .site-footer__inner{grid-template-columns:1fr;gap:32px;text-align:left}
  .footer-col--brand{text-align:left}
  .site-footer__legal{grid-template-columns:1fr;gap:28px;padding:24px 0}
  .legal-row{flex-wrap:wrap;gap:4px}
  .legal-row dt{flex:1 1 100%}
  .site-footer__bottom{flex-direction:column;gap:8px;text-align:center}
}
@media (max-width:480px){
  .site-logo img{height:30px;max-width:140px}
  .container{padding:0 16px}
}
