/*
Theme Name: DigiLiner Modern
Theme URI: https://digiliner.org
Author: DigiLiner Team
Author URI: https://digiliner.org
Description: A modern, ultra-fast, responsive WordPress theme with 2-column small thumbnail cards and category filter navigation.
Version: 1.1.0
License: GNU General Public License v2 or later
Text Domain: digiliner
Tags: tech, blog, reviews, 3d, 2-column, clean, modern, responsive, fast
*/

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navbar */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.site-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

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

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

.main-navigation a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.header-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}

.header-cta:hover {
  background: var(--primary-hover);
}

/* Category Filter Bar */
.category-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 28px 0 36px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.category-pill .pill-count {
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 12px;
}

.category-pill.active .pill-count, .category-pill:hover .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Main Content Area */
.main-content {
  padding: 30px 0 80px;
}

/* 2-Column Post Grid Layout */
.posts-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 860px) {
  .posts-grid-2col {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Compact Horizontal Post Card with Small Thumbnail */
.card-item-horizontal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 150px;
}

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

.card-thumb-col {
  width: 140px;
  min-width: 140px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.card-thumb-col img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-item-horizontal:hover .card-thumb-col img {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .card-thumb-col {
    width: 110px;
    min-width: 110px;
  }
}

.card-body-col {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  display: inline-block;
}

.card-title-2col {
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 6px;
}

.card-title-2col a {
  color: var(--text-main);
}

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

.card-excerpt-2col {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-2col {
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.card-meta-2col a.read-more {
  color: var(--primary);
  font-weight: 600;
}

/* Single Post Layout */
.single-post-wrapper {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-surface);
  padding: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .single-post-wrapper {
    padding: 24px 18px;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

.post-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 24px;
}

.post-category-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.post-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .post-title {
    font-size: 1.65rem;
  }
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Typography & Gutenberg Content */
.post-content h2 {
  font-size: 1.6rem;
  font-weight: 750;
  color: var(--text-main);
  margin-top: 36px;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 28px;
  margin-bottom: 12px;
}

.post-content p {
  margin-bottom: 18px;
  font-size: 1.02rem;
  color: #334155;
}

.post-content ul, .post-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: #334155;
}

.post-content li {
  margin-bottom: 8px;
}

/* Tables inside content */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.post-content th, .post-content td {
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.post-content th {
  background-color: #f1f5f9;
  font-weight: 700;
  color: var(--text-main);
}

.post-content tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 30px;
  font-size: 0.92rem;
}

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

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

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
  font-weight: 700;
}

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

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}
