/*
Theme Name: My Theme
Theme URI: https://example.com/my-theme
Author: Hieu
Author URI: https://example.com
Description: A modern, premium WordPress blog theme with clean design, responsive layout, and beautiful typography.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: my-theme
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors */
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f3f5;
  --color-border: #e1e5ea;
  --color-border-light: #edf0f3;

  --color-text: #1a1a2e;
  --color-text-secondary: #6c757d;
  --color-text-muted: #adb5bd;

  --color-primary: #6c5ce7;
  --color-primary-dark: #5a4bd1;
  --color-primary-light: #a29bfe;
  --color-primary-bg: rgba(108, 92, 231, 0.08);

  --color-accent: #00cec9;
  --color-accent-dark: #00b5b0;

  --color-danger: #e17055;
  --color-warning: #fdcb6e;
  --color-success: #00b894;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3.25rem;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-normal: 1.7;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --sidebar-width: 320px;
  --header-height: 72px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

ul, ol {
  list-style: none;
}

blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--space-lg) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

pre, code {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

pre {
  background: var(--color-text);
  color: #e9ecef;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

code {
  background: var(--color-surface-alt);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

pre code {
  background: none;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  text-align: left;
}

th {
  background: var(--color-surface-alt);
  font-weight: var(--fw-semibold);
}

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: var(--color-surface);
  clip: auto !important;
  display: block;
  height: auto;
  left: 5px;
  padding: var(--space-md);
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.site-content {
  display: flex;
  gap: var(--space-3xl);
  padding: var(--space-3xl) 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.content-area {
  flex: 1;
  min-width: 0;
}

.no-sidebar .site-content {
  display: block;
}

.no-sidebar .content-area {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-branding .custom-logo {
  height: 40px;
  width: auto;
}

.site-title {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
}

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

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

.site-description {
  display: none;
}

/* Navigation */
.main-navigation ul {
  display: flex;
  gap: var(--space-xs);
}

.main-navigation a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

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

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  min-width: 200px;
  flex-direction: column;
  z-index: 100;
}

.main-navigation li {
  position: relative;
}

.main-navigation li:hover > .sub-menu {
  display: flex;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
}

.menu-toggle .hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
}

.menu-toggle .hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.menu-toggle.active .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Post Card (Blog Listing)
   ========================================================================== */

.posts-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.post-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
}

.post-card__thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-card__thumbnail img {
  transform: scale(1.03);
}

.post-card__category {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 2;
}

.post-card__category a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background var(--transition-fast);
}

.post-card__category a:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.post-card__body {
  padding: var(--space-xl);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

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

.post-card__meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.post-card__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-md);
  line-height: var(--lh-snug);
}

.post-card__title a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

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

.post-card__excerpt {
  color: var(--color-text-secondary);
  line-height: var(--lh-normal);
  margin-bottom: var(--space-lg);
}

.post-card__excerpt p {
  margin: 0;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  transition: all var(--transition-fast);
}

.read-more:hover {
  gap: var(--space-md);
  color: var(--color-primary-dark);
}

.read-more svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.read-more:hover svg {
  transform: translateX(2px);
}

/* Sticky Post Badge */
.post-card.sticky {
  border-color: var(--color-primary-light);
  border-width: 2px;
}

.sticky-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 3px 10px;
  background: var(--color-warning);
  color: var(--color-text);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.single-post__header {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-2xl);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.single-post__categories {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.single-post__categories a {
  display: inline-block;
  padding: 4px 14px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
}

.single-post__categories a:hover {
  background: var(--color-primary);
  color: #fff;
}

.single-post__title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  line-height: var(--lh-tight);
}

.single-post__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
}

.single-post__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.single-post__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

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

.single-post__featured {
  margin-bottom: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.single-post__featured img {
  width: 100%;
  height: auto;
}

/* Post Content */
.post-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
}

.post-content p {
  margin-bottom: var(--space-lg);
}

.post-content h2 {
  font-size: var(--fs-2xl);
  margin: var(--space-3xl) 0 var(--space-lg);
}

.post-content h3 {
  font-size: var(--fs-xl);
  margin: var(--space-2xl) 0 var(--space-md);
}

.post-content h4 {
  font-size: var(--fs-lg);
  margin: var(--space-xl) 0 var(--space-md);
}

.post-content ul,
.post-content ol {
  margin: var(--space-lg) 0;
  padding-left: var(--space-xl);
}

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li {
  margin-bottom: var(--space-sm);
}

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

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

.post-content a:hover {
  text-decoration-color: var(--color-primary);
}

.post-content .wp-caption {
  margin: var(--space-xl) 0;
}

.post-content .wp-caption-text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

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

.post-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.post-tags a:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

/* Post Navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-light);
}

.post-navigation__link {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.post-navigation__link:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.post-navigation__label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
}

.post-navigation__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  line-height: var(--lh-snug);
}

.post-navigation__link--next {
  text-align: right;
}

/* ==========================================================================
   Page Template
   ========================================================================== */

.page-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: var(--space-2xl);
}

.page-header__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
}

.page-header__description {
  margin-top: var(--space-md);
  color: var(--color-text-secondary);
  font-size: var(--fs-md);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.widget-area {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.widget ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.widget ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--color-border-light);
}

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

.widget ul li a:hover {
  color: var(--color-primary);
  padding-left: var(--space-sm);
}

/* Search Widget */
.widget .search-form {
  display: flex;
  gap: 0;
}

.widget .search-field {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  outline: none;
  transition: border-color var(--transition-fast);
}

.widget .search-field:focus {
  border-color: var(--color-primary);
}

.widget .search-submit {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.widget .search-submit:hover {
  background: var(--color-primary-dark);
}

/* Tag Cloud Widget */
.widget .tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.widget .tagcloud a {
  padding: 4px 12px;
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  font-size: var(--fs-sm) !important;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
  max-width: var(--container-narrow);
  margin: var(--space-3xl) auto 0;
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-light);
}

.comments-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-xl);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.comment {
  display: flex;
  gap: var(--space-md);
}

.comment .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.comment-author {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}

.comment-author a {
  color: var(--color-text);
}

.comment-metadata {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

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

.comment-content {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.comment-content p {
  margin-bottom: var(--space-sm);
}

.reply a {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  margin-top: var(--space-sm);
  display: inline-block;
}

/* Children comments */
.comment .children {
  margin-top: var(--space-lg);
  padding-left: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Comment Form */
.comment-respond {
  margin-top: var(--space-2xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.comment-reply-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-lg);
}

.comment-form label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  margin-bottom: var(--space-md);
  transition: border-color var(--transition-fast);
  outline: none;
}

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

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

.comment-form .submit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.comment-form .submit:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-light);
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-fast);
}

.pagination .page-numbers:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

.pagination .dots {
  border: none;
  background: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-text);
  color: #adb5bd;
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-3xl);
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets .widget {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.footer-widgets .widget-title {
  color: #fff;
  border-bottom-color: var(--color-primary);
}

.footer-widgets .widget ul li a {
  color: #adb5bd;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.footer-widgets .widget ul li a:hover {
  color: var(--color-primary-light);
}

.site-info {
  text-align: center;
  font-size: var(--fs-sm);
  color: #6c757d;
}

.site-info a {
  color: var(--color-primary-light);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.error-404__code {
  font-size: 8rem;
  font-weight: var(--fw-extrabold);
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-lg);
}

.error-404__title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-md);
}

.error-404__description {
  color: var(--color-text-secondary);
  font-size: var(--fs-md);
  margin-bottom: var(--space-2xl);
}

.error-404 .search-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
}

.error-404 .search-field {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  outline: none;
}

.error-404 .search-field:focus {
  border-color: var(--color-primary);
}

.error-404 .search-submit {
  padding: var(--space-md) var(--space-xl);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.error-404 .search-submit:hover {
  background: var(--color-primary-dark);
}

/* ==========================================================================
   Archive Header
   ========================================================================== */

.archive-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: var(--space-2xl);
}

.archive-header__label {
  display: inline-block;
  padding: 4px 14px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.archive-header__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
}

.archive-header__description {
  margin-top: var(--space-md);
  color: var(--color-text-secondary);
  font-size: var(--fs-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Search Results
   ========================================================================== */

.search-header {
  padding: var(--space-3xl) 0 var(--space-xl);
  text-align: center;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: var(--space-2xl);
}

.search-header__title {
  font-size: var(--fs-2xl);
}

.search-header__query {
  color: var(--color-primary);
}

/* No Results */
.no-results {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.no-results__title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-md);
}

.no-results__description {
  color: var(--color-text-secondary);
  font-size: var(--fs-md);
  margin-bottom: var(--space-2xl);
}

.no-results .search-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
}

.no-results .search-field {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  outline: none;
}

.no-results .search-submit {
  padding: var(--space-md) var(--space-xl);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

/* ==========================================================================
   Scroll to Top Button
   ========================================================================== */

.scroll-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 999;
}

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

.scroll-to-top:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   WordPress Alignments & Gallery
   ========================================================================== */

.alignleft {
  float: left;
  margin-right: var(--space-xl);
  margin-bottom: var(--space-md);
}

.alignright {
  float: right;
  margin-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignwide {
  max-width: calc(var(--container-max) + var(--space-3xl));
  margin-left: calc(50% - (var(--container-max) + var(--space-3xl)) / 2);
  margin-right: calc(50% - (var(--container-max) + var(--space-3xl)) / 2);
}

.alignfull {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .site-content {
    flex-direction: column;
  }

  .widget-area {
    width: 100%;
  }

  .footer-widgets {
    grid-template-columns: 1fr 1fr;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-4xl: 2.25rem;
    --fs-3xl: 1.85rem;
    --fs-2xl: 1.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .menu-toggle {
    display: flex;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md);
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
  }

  .post-card__body {
    padding: var(--space-md);
  }

  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .single-post__title {
    font-size: var(--fs-2xl);
  }

  .site-content {
    padding: var(--space-xl) 0;
  }

  .error-404__code {
    font-size: 5rem;
  }
}

@media (max-width: 480px) {
  .single-post__meta {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .post-card__meta {
    flex-wrap: wrap;
  }

  .pagination .page-numbers {
    min-width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.post-card {
  animation: fadeInUp var(--transition-slow) ease both;
}

.post-card:nth-child(1) { animation-delay: 0ms; }
.post-card:nth-child(2) { animation-delay: 80ms; }
.post-card:nth-child(3) { animation-delay: 160ms; }
.post-card:nth-child(4) { animation-delay: 240ms; }
.post-card:nth-child(5) { animation-delay: 320ms; }
.post-card:nth-child(6) { animation-delay: 400ms; }
