/*
Theme Name: Teman Pedia
Theme URI: https://temanpedia.my.id
Author: Yoki SLP
Author URI: https://temanpedia.my.id
Description: Tema WordPress modern, elegan, dan responsif untuk website teman pedia dengan tampilan seperti Mobile App saat dibuka di handphone. Dilengkapi bottom navigation, card-based layout, smooth transitions, dan dark mode support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: temanpedia
Tags: one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, blog, news, mobile-app-like
*/

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  /* Colors */
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --secondary: #00CEC9;
  --accent: #FD79A8;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #E17055;

  /* Neutrals */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FE;
  --bg-card: #FFFFFF;
  --bg-input: #F1F3F8;
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #B2BEC3;
  --border-color: #E8ECF1;
  --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.08);
  --shadow-md: 0 4px 16px rgba(108, 92, 231, 0.12);
  --shadow-lg: 0 8px 32px rgba(108, 92, 231, 0.16);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);

  /* Spacing */
  --container-max: 1200px;
  --content-max: 720px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Bottom Nav */
  --bottom-nav-height: 64px;
  --header-height: 56px;

  /* Font */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-primary);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #1A1A2E;
  --bg-secondary: #16213E;
  --bg-card: #1F2940;
  --bg-input: #253253;
  --text-primary: #E8ECF1;
  --text-secondary: #A0AEC0;
  --text-muted: #636E72;
  --border-color: #2D3A56;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* ============================================
   APP HEADER
   ============================================ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 var(--spacing-md);
  transition: all var(--transition-normal);
}

.app-header.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.header-logo img {
  max-height: 32px;
  width: auto;
}

.header-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.header-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

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

.header-btn svg {
  width: 20px;
  height: 20px;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.search-container {
  width: 90%;
  max-width: 600px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform var(--transition-normal);
}

.search-overlay.active .search-container {
  transform: translateY(0);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: var(--spacing-md);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 14px var(--spacing-md) 14px 48px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-primary);
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   BOTTOM NAVIGATION (Mobile App-like)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  height: var(--bottom-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: all var(--transition-normal);
}

.bottom-nav.hidden {
  transform: translateY(100%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  font-family: var(--font-primary);
  min-width: 56px;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  transition: all var(--transition-fast);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active svg {
  transform: scale(1.1);
}

.nav-item::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
  transition: transform var(--transition-fast);
}

.nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-item:hover {
  color: var(--primary);
}

/* Desktop: hide bottom nav */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.desktop-nav {
  display: none;
  align-items: center;
  gap: var(--spacing-lg);
}

@media (min-width: 769px) {
  .desktop-nav {
    display: flex;
  }
}

.desktop-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--spacing-xs) 0;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition-fast);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--primary);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  transform: scaleX(1);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.app-main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) 0;
}

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

/* ============================================
   FEATURED / HERO SECTION
   ============================================ */
.hero-section {
  margin-bottom: var(--spacing-lg);
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--transition-normal);
}

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

.hero-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

@media (min-width: 769px) {
  .hero-card-image {
    height: 380px;
  }
}

.hero-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: white;
}

.hero-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--spacing-sm);
}

.hero-title {
  font-size: 1.25rem;
  color: white;
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

@media (min-width: 769px) {
  .hero-title {
    font-size: 1.75rem;
  }
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ============================================
   STORIES / CATEGORIES HORIZONTAL SCROLL
   ============================================ */
.stories-section {
  margin-bottom: var(--spacing-lg);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stories-scroll {
  display: flex;
  gap: var(--spacing-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--spacing-sm);
  scrollbar-width: none;
}

.stories-scroll::-webkit-scrollbar {
  display: none;
}

.story-item {
  flex: 0 0 72px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.story-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary);
  padding: 2px;
}

.story-name {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 500;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   CATEGORY PILLS
   ============================================ */
.category-pills {
  display: flex;
  gap: var(--spacing-sm);
  overflow-x: auto;
  padding: var(--spacing-sm) 0;
  margin-bottom: var(--spacing-md);
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

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

/* ============================================
   ARTICLE CARDS
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

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

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

/* Card Type 1: Standard Card */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

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

.article-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.article-card-image-wrap {
  overflow: hidden;
  position: relative;
}

.article-card-category {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.article-card-body {
  padding: var(--spacing-md);
}

.article-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

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

.article-card-meta .author-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.article-card-meta .read-time {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Type 2: Horizontal Card */
.article-card-horizontal {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.article-card-horizontal:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.article-card-horizontal .article-card-image-wrap {
  flex: 0 0 120px;
}

.article-card-horizontal .article-card-image {
  height: 100%;
  min-height: 120px;
}

.article-card-horizontal .article-card-body {
  flex: 1;
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-card-horizontal .article-card-title {
  font-size: 0.88rem;
  -webkit-line-clamp: 2;
}

/* Card Type 3: Featured Large Card */
.article-card-featured {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 280px;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.article-card-featured .article-card-image {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.article-card-featured .article-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
}

.article-card-featured .article-card-title {
  color: white;
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
}

.article-card-featured .article-card-excerpt {
  color: rgba(255, 255, 255, 0.8);
  -webkit-line-clamp: 2;
}

/* ============================================
   TRENDING SECTION
   ============================================ */
.trending-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-card);
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-item:first-child {
  padding-top: 0;
}

.trending-number {
  flex: 0 0 36px;
  height: 36px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--primary);
}

.trending-item:nth-child(1) .trending-number {
  background: var(--primary);
  color: white;
}

.trending-item:nth-child(2) .trending-number {
  background: var(--primary-light);
  color: white;
}

.trending-item:nth-child(3) .trending-number {
  background: var(--bg-input);
  color: var(--primary);
}

.trending-content {
  flex: 1;
}

.trending-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.sidebar {
  display: none;
}

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

.sidebar-widget {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-card);
}

.sidebar-widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Newsletter Widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  text-align: center;
}

.newsletter-widget .sidebar-widget-title {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.3);
  justify-content: center;
}

.newsletter-widget p {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: var(--spacing-md);
}

.newsletter-input {
  width: 100%;
  padding: 12px var(--spacing-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-family: var(--font-primary);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
  width: 100%;
  padding: 12px var(--spacing-md);
  border: none;
  border-radius: var(--radius-md);
  background: white;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
}

.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Social Widget */
.social-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}

.social-link-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link-item:hover {
  transform: translateY(-1px);
  color: white;
}

.social-link-item.facebook { background: #1877F2; }
.social-link-item.twitter { background: #1DA1F2; }
.social-link-item.instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.social-link-item.youtube { background: #FF0000; }

/* ============================================
   SINGLE POST
   ============================================ */
.single-post {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

.single-post-header {
  margin-bottom: var(--spacing-lg);
}

.single-post-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

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

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

.single-post-title {
  font-size: 1.5rem;
  line-height: 1.35;
  margin-bottom: var(--spacing-md);
}

@media (min-width: 769px) {
  .single-post-title {
    font-size: 2rem;
  }
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.post-author-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

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

.single-post-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  max-height: 400px;
  object-fit: cover;
}

.single-post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.single-post-content p {
  margin-bottom: var(--spacing-md);
}

.single-post-content h2 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
  font-size: 1.35rem;
}

.single-post-content h3 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

.single-post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: var(--spacing-md) var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  background: var(--bg-input);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.single-post-content img {
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
}

.single-post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--primary-light);
  text-underline-offset: 2px;
}

.single-post-content ul,
.single-post-content ol {
  margin: var(--spacing-md) 0;
  padding-left: var(--spacing-lg);
}

.single-post-content li {
  margin-bottom: var(--spacing-xs);
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.post-tag:hover {
  background: var(--primary);
  color: white;
}

/* Share Buttons */
.share-section {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.share-label {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.share-buttons {
  display: flex;
  gap: var(--spacing-sm);
}

.share-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: white;
  font-size: 1rem;
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.telegram { background: #0088CC; }
.share-btn.copy-link { background: var(--text-muted); }

/* Author Box */
.author-box {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.author-box-avatar {
  flex: 0 0 64px;
}

.author-box-avatar img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.author-box-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.author-box-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
  margin-top: var(--spacing-2xl);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

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

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

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
  margin-top: var(--spacing-2xl);
  max-width: var(--content-max);
}

.comments-title {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
}

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

.comment {
  padding: var(--spacing-md);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-card);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.comment-author img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
}

.comment-author-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

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

.comment-reply-link {
  display: inline-block;
  margin-top: var(--spacing-sm);
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

/* Comment Form */
.comment-form {
  margin-top: var(--spacing-lg);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-primary);
  margin-bottom: var(--spacing-sm);
  transition: border-color var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-xl);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
}

.submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-xl) 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination a {
  background: var(--bg-primary);
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
}

.pagination a:hover {
  background: var(--primary);
  color: white;
}

.pagination .current {
  background: var(--primary);
  color: white;
}

.pagination .dots {
  background: none;
  color: var(--text-muted);
  box-shadow: none;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-md);
}

.error-404-number {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--spacing-md);
}

.error-404-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

.error-404-text {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.error-404 .search-form-404 {
  max-width: 400px;
  margin: 0 auto var(--spacing-lg);
  display: flex;
  gap: var(--spacing-sm);
}

.error-404 .search-form-404 input {
  flex: 1;
  padding: 12px var(--spacing-md);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-primary);
}

.error-404 .search-form-404 button {
  padding: 12px var(--spacing-lg);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
  margin-top: var(--spacing-2xl);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

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

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

.footer-brand {
  max-width: 300px;
}

.footer-brand .footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-column-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (min-width: 769px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-primary);
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

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

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

.mobile-menu-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.mobile-menu-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

.mobile-menu-nav a {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
  background: rgba(108, 92, 231, 0.08);
  color: var(--primary);
}

.mobile-menu-nav svg {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

.mobile-menu-nav a:hover svg,
.mobile-menu-nav a.active svg {
  color: var(--primary);
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.dark-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  padding: 2px;
  transition: background var(--transition-fast);
}

.dark-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: var(--radius-full);
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark-toggle.active {
  background: var(--primary);
}

.dark-toggle.active::after {
  transform: translateX(22px);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 16px);
  right: var(--spacing-md);
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
}

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

@media (min-width: 769px) {
  .back-to-top {
    bottom: var(--spacing-lg);
  }
}

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

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-color) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
  position: fixed;
  top: var(--header-height);
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 999;
  transition: width 0.1s linear;
  width: 0%;
}

/* ============================================
   WORDPRESS ALIGNMENTS
   ============================================ */
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: var(--spacing-md);
}

.alignright {
  float: right;
  margin-left: var(--spacing-md);
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--spacing-sm);
}

/* ============================================
   SCREEN READER TEXT
   ============================================ */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ============================================
   WORDPRESS GALLERY
   ============================================ */
.gallery {
  display: grid;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .app-header,
  .bottom-nav,
  .sidebar,
  .share-section,
  .back-to-top,
  .mobile-menu-overlay {
    display: none !important;
  }

  body {
    padding: 0;
    background: white;
    color: black;
  }

  .single-post-content {
    font-size: 12pt;
  }
}
