/*
Theme Name: SastraPro
Theme URI: https://sugeng.id/sastrapro
Author: Mas Sugeng
Author URI: https://sugeng.id
Description: Tema blog profesional dengan fitur lengkap: loading cepat, mobile-friendly, SEO ready, dark mode otomatis, daftar isi otomatis, artikel terkait, 8 pilihan warna, dan penempatan iklan mudah.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sastrapro
Domain Path: /languages
Tags: blog, news, responsive, custom-colors, custom-header, custom-menu, featured-images, rtl-language-support, threaded-comments, translation-ready, two-columns, right-sidebar, sticky-post, theme-options
Requires at least: 5.8
Requires PHP: 7.4
*/

/* CSS Variables - Default Blue Theme */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-900: #1e3a8a;
  
  --background: #ffffff;
  --foreground: #1f2937;
  --surface: #f9fafb;
  --border: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
}

/* Dark Mode Variables */
.dark-mode {
  --background: #0f172a;
  --foreground: #f1f5f9;
  --surface: #1e293b;
  --border: #374151;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.site-branding {
  display: flex;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--text-primary);
}

.site-title span:first-child {
  color: var(--primary);
}

/* Navigation */
.main-navigation {
  display: none;
}

@media (min-width: 1024px) {
  .main-navigation {
    display: block;
  }
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-navigation a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

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

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-btn:hover {
  background: var(--surface);
  color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--background);
  z-index: 1001;
  padding: 1.5rem;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.mobile-menu .site-title {
  margin-bottom: 2rem;
}

.mobile-navigation ul {
  list-style: none;
}

.mobile-navigation li {
  margin-bottom: 0.5rem;
}

.mobile-navigation a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 0.5rem;
}

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

/* Main Content */
.site-content {
  padding-top: 64px;
  min-height: calc(100vh - 64px);
}

/* Section Title */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 0.25rem;
  background: var(--primary);
  border-radius: 0.125rem;
}

/* Featured Section */
.featured-section {
  padding: 2rem 0;
}

.featured-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Article Cards */
.article-card {
  background: var(--background);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.article-card-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.05);
}

.article-card-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.article-card-content {
  padding: 1.5rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.article-card-title a {
  color: var(--text-primary);
}

.article-card-title a:hover {
  color: var(--primary);
}

.article-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Small Article Card */
.article-card-small {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.article-card-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-card-small-image {
  width: 120px;
  height: 90px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.article-card-small-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-small-content {
  flex: 1;
  min-width: 0;
}

.article-card-small-category {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.article-card-small-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.article-card-small-title a {
  color: var(--text-primary);
}

.article-card-small-title a:hover {
  color: var(--primary);
}

.article-card-small-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Load More Button */
.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  background: var(--primary-50);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.breadcrumb-current {
  color: var(--text-primary);
}

/* Single Article */
.single-article {
  padding: 2rem 0;
}

.single-article-header {
  margin-bottom: 2rem;
}

.single-article-image {
  aspect-ratio: 16/9;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

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

.single-article-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.single-article-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .single-article-title {
    font-size: 2.25rem;
  }
}

.single-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.single-article-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.single-article-author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Article Content */
.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content h2 {
  font-size: 1.5rem;
}

.article-content h3 {
  font-size: 1.25rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  text-decoration: underline;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.article-content img {
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

/* Table of Contents */
.table-of-contents {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: sticky;
  top: 80px;
}

.toc-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
}

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

.toc-list li {
  margin-bottom: 0.25rem;
}

.toc-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--primary);
  background: var(--primary-50);
}

.toc-list .toc-h3 {
  padding-left: 1.5rem;
}

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.related-articles-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 2.5rem;
  height: 0.25rem;
  background: var(--primary);
  border-radius: 0.125rem;
}

.related-articles-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .related-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 2rem;
}

.author-box-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-box-content {
  flex: 1;
}

.author-box-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-box-name a {
  color: var(--text-primary);
}

.author-box-name a:hover {
  color: var(--primary);
}

.author-box-bio {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.author-box-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
}

.author-box-link:hover {
  background: var(--primary-dark);
  color: white;
}

/* Social Share */
.social-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.social-share-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  color: white;
  transition: opacity 0.2s ease;
}

.social-share-btn:hover {
  opacity: 0.9;
  color: white;
}

.social-share-btn.facebook { background: #1877f2; }
.social-share-btn.twitter { background: #1da1f2; }
.social-share-btn.whatsapp { background: #25d366; }
.social-share-btn.email { background: #6b7280; }

.social-share-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.social-share-copy:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Post Navigation */
.post-navigation {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .post-navigation {
    grid-template-columns: 1fr 1fr;
  }
}

.post-navigation-link {
  display: block;
  padding: 1rem;
  background: var(--surface);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.post-navigation-link:hover {
  background: var(--border);
}

.post-navigation-link.next {
  text-align: right;
}

.post-navigation-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.post-navigation-link.next .post-navigation-label {
  justify-content: flex-end;
}

.post-navigation-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.post-navigation-link:hover .post-navigation-title {
  color: var(--primary);
}

/* Comments */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.comment-form {
  margin-bottom: 2rem;
}

.comment-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .comment-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-label .required {
  color: #ef4444;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.form-submit:hover {
  background: var(--primary-dark);
}

/* Comment List */
.comment-list {
  list-style: none;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-meta {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.comment-content {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.comment-reply {
  margin-top: 1rem;
}

.comment-reply a {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 80px;
}

.widget {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -0.375rem;
  left: 0;
  width: 2rem;
  height: 0.25rem;
  background: var(--primary);
  border-radius: 0.125rem;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--text-secondary);
}

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

/* Recent Posts Widget */
.widget_recent_entries li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.widget_recent_entries .post-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.widget_recent_entries a {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Categories Widget */
.widget_categories li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget_categories .cat-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Archive Widget */
.widget_archive select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* Ad Spaces */
.ad-space {
  background: var(--surface);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-space-header,
.ad-space-in-article,
.ad-space-footer {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 1.5rem auto;
}

.ad-space-sidebar {
  width: 100%;
  max-width: 300px;
  height: 250px;
  margin: 0 auto;
}

.ad-space-placeholder {
  text-align: center;
  padding: 1rem;
}

.ad-space-placeholder span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ad-space-placeholder small {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
}

.footer-widgets {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-widgets {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-widget {
  margin-bottom: 2rem;
}

.footer-widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.footer-widget-title::after {
  content: '';
  position: absolute;
  bottom: -0.375rem;
  left: 0;
  width: 2rem;
  height: 0.25rem;
  background: var(--primary);
  border-radius: 0.125rem;
}

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

.footer-widget li {
  padding: 0.375rem 0;
}

.footer-widget a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.footer-copyright {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--background);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

.cookie-consent-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .cookie-consent-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.cookie-consent-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cookie-consent-text a {
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 0.5rem;
}

.cookie-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-btn-accept {
  background: var(--primary);
  color: white;
  border: none;
}

.cookie-btn-accept:hover {
  background: var(--primary-dark);
}

.cookie-btn-decline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.cookie-btn-decline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Theme Selector Modal */
.theme-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.theme-modal.active {
  opacity: 1;
  visibility: visible;
}

.theme-modal-content {
  background: var(--background);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.theme-modal.active .theme-modal-content {
  transform: scale(1);
}

.theme-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.theme-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.theme-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 0.25rem;
}

.theme-modal-close:hover {
  background: var(--surface);
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-option:hover {
  border-color: var(--primary);
}

.theme-option.active {
  border-color: var(--primary);
  background: var(--primary-50);
}

.theme-option-color {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.theme-option-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1002;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.search-modal-content {
  background: var(--background);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 500px;
}

.search-form {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text-primary);
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.hidden { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .cookie-consent,
  .ad-space,
  .social-share,
  .post-navigation,
  .comments-section,
  .sidebar,
  .header-actions,
  .menu-toggle {
    display: none !important;
  }
  
  .site-content {
    padding-top: 0;
  }
  
  .single-article {
    max-width: 100%;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
