/*
Theme Name: Blogsy Modern
Theme URI: https://example.com/blogsy-modern
Author: Antigravity
Author URI: https://example.com
Description: Modern yayıncılar, teknoloji ve yaşam dergileri için Blogsy / Blocksy tarzında; koyu mod (dark mode), trend öne çıkanlar vitrini, okuma ilerleme çubuğu ve zengin kenar çubuklu yeni nesil WordPress teması.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blogsy-modern
Tags: blog, news, magazine, dark-mode, right-sidebar, grid-layout, custom-header
*/

:root {
  /* Light Mode Colors */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #eff6ff;
  --accent: #f59e0b;
  --danger: #ef4444;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.12);

  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-elevated: #1e293b;
  --border-color: #1e293b;
  --border-light: #182234;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --primary-light: rgba(59, 130, 246, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.5);
}

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

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Reading Progress Bar (Top of screen) */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Top Bar */
.blogsy-top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 24px;
}

.top-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trending-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-trending {
  background: var(--danger);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header */
.blogsy-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease;
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-main);
}

.brand-title span {
  color: var(--primary);
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.main-navigation a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.main-navigation a:hover, .main-navigation .current-menu-item a {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle-btn, .search-toggle-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.theme-toggle-btn:hover, .search-toggle-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-subscribe {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-subscribe:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Featured / Trending Hero Grid (Blogsy Style) */
.hero-featured-section {
  max-width: var(--container-max);
  margin: 32px auto 48px;
  padding: 0 24px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 220px);
  gap: 20px;
}

.featured-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.featured-card.main-featured {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.featured-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .featured-bg-img {
  transform: scale(1.05);
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #ffffff;
}

.post-cat-pill {
  display: inline-block;
  padding: 4px 10px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.featured-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #ffffff;
}

.featured-card:not(.main-featured) .featured-title {
  font-size: 16px;
  font-weight: 700;
}

.featured-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Main Layout: Feed + Sidebar */
.site-main-layout {
  max-width: var(--container-max);
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 40px;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 12px;
}

.feed-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  position: relative;
}

.feed-title::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--primary);
}

/* Blogsy Cards Grid */
.posts-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blogsy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blogsy-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.blogsy-thumb-box {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: var(--bg-elevated);
}

.blogsy-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blogsy-card:hover .blogsy-thumb-box img {
  transform: scale(1.05);
}

.blogsy-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card-excerpt {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-main);
}

.author-avatar-tiny {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Sidebar Widgets */
.blogsy-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.widget-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 20px;
  position: relative;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--primary);
}

/* Author Widget */
.author-widget {
  text-align: center;
}

.author-widget-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}

.author-widget h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.author-widget p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Popular Posts Widget */
.popular-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popular-post-item {
  display: flex;
  gap: 14px;
  align-items: center;
}

.popular-number {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-subtle);
  min-width: 28px;
}

.popular-info h5 {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}

.popular-info span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-surface) 100%);
  border-color: var(--primary);
}

.newsletter-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 14px;
  margin-bottom: 10px;
}

.newsletter-form button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: var(--primary-hover);
}

/* Single Post Layout */
.single-article-container {
  max-width: 860px;
  margin: 40px auto 90px;
  padding: 0 24px;
}

.article-header {
  margin-bottom: 30px;
}

.article-breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-title {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin-bottom: 20px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

.article-featured-image {
  margin: 32px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-body-content {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-main);
}

.article-body-content p {
  margin-bottom: 24px;
}

.article-body-content h2, .article-body-content h3 {
  margin: 38px 0 16px;
  font-weight: 800;
}

.article-body-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: 20px;
}

/* Social Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.share-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}

.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }
.share-linkedin { background: #0077b5; }
.share-copy { background: var(--bg-elevated); color: var(--text-main) !important; border: 1px solid var(--border-color); cursor: pointer; }

/* Author Bio Box */
.author-bio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 40px 0;
}

/* Footer */
.blogsy-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 60px 24px 30px;
  transition: background-color 0.25s ease;
}

.footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom-bar {
  max-width: var(--container-max);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Mobile Drawer */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-menu-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  z-index: 2001;
  padding: 24px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.mobile-drawer.is-active {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-main);
  cursor: pointer;
  line-height: 1;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.mobile-nav-list a {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
  padding: 8px 0;
}

.mobile-nav-list a:hover {
  color: var(--primary);
}

/* Modal Search Overlay */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.search-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.search-modal-card {
  width: 100%;
  max-width: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.search-modal-backdrop.is-active .search-modal-card {
  transform: scale(1);
}

.search-modal-close {
  background: var(--bg-elevated);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Back to Top Floating Button */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 900;
}

.back-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}

/* Comments Form & List */
.comment-body {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.comment-author .avatar {
  border-radius: 50%;
}

.comment-author .fn {
  font-weight: 700;
  color: var(--text-main);
}

.comment-content {
  font-size: 15px;
  line-height: 1.6;
}

.comment-reply-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  margin-top: 10px;
}

.comment-respond label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .featured-card.main-featured {
    grid-column: 1 / 3;
    height: 340px;
  }
  .site-main-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  .main-navigation {
    display: none;
  }
  .top-bar-inner {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .featured-card.main-featured {
    grid-column: 1 / 2;
    height: 280px;
  }
  .header-container {
    padding: 14px 18px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
