/*
Theme Name: PcSayar
Theme URI: https://pcsayar.com
Description: SEO odaklı, hızlı teknoloji blogu teması
Version: 1.0
Author: PcSayar
Text Domain: pcsayar
*/

:root {
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --dark: #111827;
  --text: #1F2937;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --max-w: 1200px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
#masthead {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 20px;
}

.site-logo a {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
}

.site-logo span { color: var(--blue); }

.site-logo {
  overflow: hidden;
  flex-shrink: 0;
  max-width: 200px;
}

.site-logo img,
.site-logo .custom-logo {
  max-height: 50px !important;
  max-width: 180px !important;
  width: auto !important;
  height: auto !important;
  display: block;
  object-fit: contain;
}

/* ── NAV ── */
#primary-nav ul { list-style: none; display: flex; gap: 4px; }

#primary-nav a {
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}

#primary-nav a:hover,
#primary-nav .current-menu-item > a {
  background: rgba(0,0,0,.06);
  color: #111827;
}

.search-form-header {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  overflow: hidden;
}

.search-form-header input {
  background: transparent;
  border: none;
  color: #111827;
  padding: 7px 12px;
  font-size: 14px;
  width: 160px;
  outline: none;
}

.search-form-header input::placeholder { color: #94A3B8; }

.search-form-header button {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 15px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #111827;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 6px; }

/* ── MAIN LAYOUT ── */
#content { padding: 36px 0 60px; }

.content-area { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }

.primary-content { min-width: 0; overflow: hidden; }
.sidebar { min-width: 0; }

@media (max-width: 960px) { .content-area { grid-template-columns: 1fr; } }

/* ── POST GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .posts-grid { grid-template-columns: 1fr; } }

/* ── CARD ── */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
}

.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.post-card-cat a {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--blue);
  background: #EFF6FF;
  padding: 2px 8px;
  border-radius: 4px;
}

.post-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--blue); }

.post-card-excerpt {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.post-card-meta time { display: flex; align-items: center; gap: 4px; }

/* ── FEATURED POST ── */
.featured-post {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow .25s;
}

.featured-post:hover { box-shadow: var(--shadow-md); }

.featured-post .post-card-thumb { aspect-ratio: auto; height: 100%; min-height: 260px; }

.featured-post .post-card-body { padding: 28px; justify-content: center; }

.featured-post .post-card-title { font-size: 20px; -webkit-line-clamp: 4; }

@media (max-width: 700px) { .featured-post { grid-template-columns: 1fr; } }

/* ── PAGINATION ── */
.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all .2s;
}

.pagination .page-numbers:hover,
.pagination .current {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.pagination .prev, .pagination .next { width: auto; padding: 0 14px; }

/* ── SINGLE POST ── */
.single-post-wrap { max-width: 780px; }

.single-header { margin-bottom: 28px; }

.single-cats { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.single-cats a {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--blue);
  background: #EFF6FF;
  padding: 3px 10px;
  border-radius: 4px;
}

.single-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--dark);
  margin-bottom: 16px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}

.single-meta a { color: var(--muted); }
.single-meta a:hover { color: var(--blue); }
.reading-time { display: flex; align-items: center; gap: 5px; }

.single-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16/9;
}

.single-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── ARTICLE CONTENT ── */
.entry-content {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.entry-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 12px; color: var(--dark); }
.entry-content h3 { font-size: 20px; font-weight: 700; margin: 24px 0 10px; color: var(--dark); }
.entry-content h4 { font-size: 17px; font-weight: 700; margin: 20px 0 8px; color: var(--dark); }
.entry-content p { margin-bottom: 20px; }
.entry-content ul, .entry-content ol { margin: 0 0 20px 24px; }
.entry-content li { margin-bottom: 6px; }

.entry-content a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,.3);
  text-underline-offset: 3px;
}

.entry-content a:hover { text-decoration-color: var(--blue); }

.entry-content img {
  border-radius: var(--radius);
  margin: 20px auto;
  box-shadow: var(--shadow);
}

.entry-content blockquote {
  border-left: 4px solid var(--blue);
  padding: 14px 20px;
  margin: 24px 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--muted);
}

.entry-content pre {
  background: var(--dark);
  color: #E2E8F0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.entry-content code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: #DC2626;
  border: 1px solid var(--border);
}

.entry-content pre code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.entry-content th, .entry-content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th { background: var(--bg-alt); font-weight: 600; }
.entry-content tr:nth-child(even) { background: var(--bg-alt); }

/* ── TAGS ── */
.post-tags { margin: 32px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.post-tags .tag-label { font-size: 13px; font-weight: 600; color: var(--muted); }

.post-tags a {
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  transition: all .2s;
}

.post-tags a:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── AUTHOR BOX ── */
.author-box {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
}

.author-avatar img { width: 64px; height: 64px; border-radius: 50%; }

.author-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--dark); }
.author-info p { font-size: 14px; color: var(--muted); }

/* ── RELATED POSTS ── */
.related-posts { margin: 40px 0; }

.related-posts h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--dark);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

@media (max-width: 640px) { .related-grid { grid-template-columns: 1fr; } }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 80px; }

.widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.widget-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue);
}

/* Recent posts widget */
.widget-recent ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.widget-recent li { display: flex; gap: 12px; align-items: flex-start; }

.widget-recent .thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }

.widget-recent .thumb img { width: 100%; height: 100%; object-fit: cover; }

.widget-recent .info { flex: 1; }

.widget-recent .info a {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.widget-recent .info a:hover { color: var(--blue); }
.widget-recent .info time { font-size: 11px; color: var(--muted); }

/* Category widget */
.widget-cats ul { list-style: none; }

.widget-cats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.widget-cats li:last-child { border-bottom: none; }
.widget-cats a { color: var(--text); font-weight: 500; }
.widget-cats a:hover { color: var(--blue); }
.widget-cats .count {
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
}

/* ── SECTION HEADING ── */
.section-heading {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-heading a { font-size: 13px; font-weight: 500; color: var(--blue); }

/* ── ARCHIVE HEADER ── */
.archive-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  margin-bottom: 8px;
}

.archive-title { font-size: 28px; font-weight: 800; color: var(--dark); }
.archive-description { font-size: 15px; color: var(--muted); margin-top: 6px; }

/* ── SEARCH ── */
.search-header { text-align: center; padding: 40px 20px 20px; }
.search-header h1 { font-size: 28px; font-weight: 800; color: var(--dark); }

.search-form-main {
  display: flex;
  max-width: 540px;
  margin: 20px auto;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}

.search-form-main:focus-within { border-color: var(--blue); }

.search-form-main input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: 16px;
  outline: none;
  color: var(--text);
}

.search-form-main button {
  background: var(--blue);
  border: none;
  color: #fff;
  padding: 0 20px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s;
}

.search-form-main button:hover { background: var(--blue-dark); }

/* ── 404 ── */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 .error-code { font-size: 100px; font-weight: 900; color: var(--blue); line-height: 1; }
.error-404 h1 { font-size: 28px; font-weight: 700; color: var(--dark); margin: 12px 0; }
.error-404 p { color: var(--muted); margin-bottom: 24px; }
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .2s;
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; }

/* ── FOOTER ── */
#colophon {
  background: var(--dark);
  color: #94A3B8;
  padding: 48px 0 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand .logo span { color: var(--blue); }
.footer-brand p { font-size: 14px; line-height: 1.7; }

.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #fff; margin-bottom: 14px; }

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer-col a {
  font-size: 14px;
  color: #94A3B8;
  transition: color .2s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a { color: #94A3B8; }
.footer-bottom a:hover { color: #fff; }

/* ── COMMENTS ── */
.comments-area { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--border); }
.comments-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; color: var(--dark); }

.comment-list { list-style: none; }

.comment {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.comment-avatar img { width: 44px; height: 44px; border-radius: 50%; }

.comment-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment-author { font-weight: 700; color: var(--dark); margin-right: 8px; }
.comment-content p { font-size: 15px; }

.comment-reply-link {
  font-size: 12px;
  color: var(--blue);
  margin-top: 6px;
  display: inline-block;
}

.comment-respond { margin-top: 32px; }
.comment-respond h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--dark); }

.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
  margin-bottom: 16px;
}

.comment-form input:focus, .comment-form textarea:focus { border-color: var(--blue); }
.comment-form textarea { resize: vertical; min-height: 120px; }

.comment-form input[type="submit"] {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.comment-form input[type="submit"]:hover { background: var(--blue-dark); }

/* ── READING PROGRESS ── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--blue);
  z-index: 200;
  width: 0%;
  transition: width .1s;
}

/* ── UTILITY ── */
.no-results { text-align: center; padding: 60px 20px; }
.no-results h2 { font-size: 24px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.no-results p { color: var(--muted); }

/* ── MOBILE MENU ── */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  #primary-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 0;
  }

  #primary-nav.open { display: block; }
  #primary-nav ul { flex-direction: column; gap: 0; padding: 0 16px; }
  #primary-nav a { display: block; padding: 10px 12px; }

  .search-form-header { display: none; }
  #masthead { position: relative; }
}
