/*
Theme Name: G Tech Group Blog
Theme URI: https://gtechgroup.it/blog
Author: G Tech Group
Author URI: https://gtechgroup.it
Description: Tema custom per il blog di G Tech Group — design coerente con il sito Next.js
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: gtechgroup-blog
*/

/* ===== CSS Custom Properties ===== */
:root {
  --color-background: #ffffff;
  --color-background-alt: #f5f7fa;
  --color-background-card: #ffffff;
  --color-background-glass: rgba(255, 255, 255, 0.85);
  --color-foreground: #000222;
  --color-foreground-muted: #4a4a6a;
  --color-foreground-dim: #7a7a9a;
  --color-primary: #5e90d1;
  --color-primary-dark: #4a7bc0;
  --color-secondary: #254573;
  --color-secondary-dark: #1a3560;
  --color-border: rgba(0, 0, 34, 0.1);
  --color-border-hover: rgba(94, 144, 209, 0.4);
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --font-heading: "Poppins", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1280px;
  --header-height: 80px;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
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: 700;
  line-height: 1.3;
  color: var(--color-foreground);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

b, strong { color: var(--color-primary); }

::selection {
  background-color: rgba(94, 144, 209, 0.25);
  color: var(--color-foreground);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f5f7fa; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 34, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 34, 0.25); }

/* ===== HEADER ===== */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.header-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 1rem;
}

@media (min-width: 640px) { .header-nav { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .header-nav { padding: 0 2rem; } }

/* Logo */
.header-logo img {
  height: 2rem;
  width: auto;
  transition: all 0.3s;
}

@media (min-width: 640px) { .header-logo img { height: 2.5rem; } }

.site-header:not(.scrolled) .header-logo img {
  filter: brightness(0) invert(1);
}

/* Desktop Navigation */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

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

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  white-space: nowrap;
}

.site-header:not(.scrolled) .nav-link { color: rgba(255, 255, 255, 0.9); }
.site-header:not(.scrolled) .nav-link:hover { color: #ffffff; }
.site-header.scrolled .nav-link { color: var(--color-foreground-muted); }
.site-header.scrolled .nav-link:hover { color: var(--color-foreground); }

/* Promo del Mese special styling */
.nav-link--promo { color: #fbbf24 !important; }
.nav-link--promo:hover { color: #fcd34d !important; }

.promo-badge {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}

.promo-badge-ping {
  position: absolute;
  display: inline-flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fbbf24;
  opacity: 0.75;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.promo-badge-dot {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* Chevron icon */
.nav-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.nav-item:hover .nav-chevron { transform: rotate(180deg); }

/* Mega Menu */
.mega-menu {
  position: absolute;
  left: 50%;
  top: 100%;
  padding-top: 0.75rem;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.nav-item:hover > .mega-menu {
  opacity: 1;
  visibility: visible;
}

.mega-menu-inner {
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 34, 0.06);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.mega-menu--cols-4 .mega-menu-inner { width: 1020px; }
.mega-menu--cols-3 .mega-menu-inner { width: 780px; }
.mega-menu--cols-2 .mega-menu-inner { width: 480px; }

.mega-menu-grid {
  display: grid;
  gap: 1.25rem;
}

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

.mega-menu-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.625rem;
}

.mega-menu-group-title::before {
  content: '';
  display: block;
  width: 1rem;
  height: 1px;
  background: rgba(94, 144, 209, 0.4);
}

.mega-menu-subitem {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem;
  border-radius: 0.75rem;
  transition: background 0.15s;
  text-decoration: none;
}

.mega-menu-subitem:hover { background: rgba(94, 144, 209, 0.05); }

.mega-menu-icon {
  margin-top: 2px;
  display: flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(94, 144, 209, 0.08), rgba(37, 69, 115, 0.08));
  color: var(--color-primary);
  transition: background 0.15s;
}

.mega-menu-subitem:hover .mega-menu-icon {
  background: linear-gradient(135deg, rgba(94, 144, 209, 0.15), rgba(37, 69, 115, 0.15));
}

.mega-menu-icon svg { width: 1rem; height: 1rem; }

.mega-menu-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground);
  transition: color 0.15s;
}

.mega-menu-subitem:hover .mega-menu-label { color: var(--color-primary); }

.mega-menu-desc {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-foreground-dim);
  margin-top: 2px;
}

.mega-menu-footer {
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 0, 34, 0.04);
  padding-top: 0.75rem;
}

.mega-menu-footer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-foreground-dim);
  transition: color 0.2s;
  text-decoration: none;
}

.mega-menu-footer a:hover { color: var(--color-primary); }
.mega-menu-footer a svg { width: 12px; height: 12px; transition: transform 0.2s; }
.mega-menu-footer a:hover svg { transform: translateX(2px); }

/* CTA Button */
.header-cta {
  display: none;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.3s;
  min-height: 44px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  background: #638dd8;
}

.btn-primary:hover {
  background: var(--color-secondary);
  color: #ffffff;
}

.btn-primary--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-primary--md { padding: 0.75rem 1.5rem; font-size: 0.875rem; }
.btn-primary--full { width: 100%; }

/* Mobile Menu Toggle */
.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  border-radius: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
}

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

.site-header:not(.scrolled) .mobile-toggle { color: rgba(255, 255, 255, 0.8); }
.site-header.scrolled .mobile-toggle { color: var(--color-foreground-muted); }

.mobile-toggle svg { width: 24px; height: 24px; }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  z-index: 99998;
  overflow-y: auto;
  background: var(--color-background);
}

.mobile-menu.open { display: block; }

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

.mobile-menu-inner { padding: 1.5rem; }
.mobile-menu-inner > * + * { margin-top: 0.25rem; }

.mobile-nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-foreground-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
}

.mobile-nav-link:hover { background: rgba(94, 144, 209, 0.05); color: var(--color-foreground); }

.mobile-nav-link--promo {
  color: #fbbf24 !important;
  gap: 0.5rem;
}

.mobile-nav-link--promo:hover { background: rgba(251, 191, 36, 0.05); color: #fcd34d !important; }

.mobile-nav-link--dropdown {
  justify-content: space-between;
}

.mobile-nav-link--dropdown .nav-chevron {
  transition: transform 0.2s;
}

.mobile-nav-link--dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.mobile-submenu {
  display: none;
  padding: 0.25rem 0 0.75rem 0.5rem;
}

.mobile-submenu.open { display: block; }

.mobile-submenu-group + .mobile-submenu-group { margin-top: 1rem; }

.mobile-submenu-title {
  padding: 0 1rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.mobile-submenu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.mobile-submenu-link:hover { background: rgba(94, 144, 209, 0.05); color: var(--color-foreground); }

.mobile-submenu-icon {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(94, 144, 209, 0.08);
  color: var(--color-primary);
}

.mobile-submenu-icon svg { width: 14px; height: 14px; }

.mobile-cta { padding-top: 1rem; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-background-alt);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1rem;
}

@media (min-width: 640px) { .footer-inner { padding: 4rem 1.5rem; } }
@media (min-width: 1024px) { .footer-inner { padding: 4rem 2rem; } }

.footer-grid {
  display: grid;
  gap: 3rem;
}

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

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

/* Company Info */
.footer-company-logo img { height: 2.5rem; width: auto; }

.footer-company-desc {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-foreground-muted);
}

.footer-contact { margin-top: 1.5rem; }
.footer-contact > * + * { margin-top: 0.75rem; }

.footer-contact a,
.footer-contact span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  transition: color 0.2s;
  text-decoration: none;
}

.footer-contact a:hover { color: var(--color-primary); }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Social Links */
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.footer-social a {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  color: var(--color-foreground-muted);
  transition: all 0.2s;
  text-decoration: none;
}

.footer-social a:hover {
  border-color: rgba(94, 144, 209, 0.3);
  color: var(--color-primary);
  box-shadow: 0 2px 16px rgba(94, 144, 209, 0.1);
}

.footer-social a svg { width: 16px; height: 16px; }

/* Link Groups */
.footer-link-group-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-foreground);
}

.footer-link-list {
  margin-top: 1rem;
  list-style: none;
}

.footer-link-list li + li { margin-top: 0.625rem; }

.footer-link-list a {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  transition: color 0.2s;
  text-decoration: none;
}

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

/* Photo Credits */
.footer-credits {
  margin-top: 3rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}

.footer-credits p {
  font-size: 0.75rem;
  color: var(--color-foreground-dim);
}

.footer-credits a {
  color: var(--color-foreground-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-credits a:hover { color: var(--color-foreground-muted); }

/* Bottom Bar */
.footer-bottom {
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }

.footer-copyright {
  font-size: 0.75rem;
  color: var(--color-foreground-dim);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-legal a {
  font-size: 0.75rem;
  color: var(--color-foreground-dim);
  transition: color 0.2s;
  text-decoration: none;
}

.footer-legal a:hover { color: var(--color-foreground-muted); }

/* ===== BLOG LAYOUT ===== */
.blog-hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 40%, var(--color-primary) 100%);
  padding: calc(var(--header-height) + 4rem) 1rem 4rem;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
}

/* Homepage hero with landscape background */
.blog-hero--home {
  padding: calc(var(--header-height) + 5rem) 1rem 5rem;
  background:
    linear-gradient(135deg, rgba(26, 53, 96, 0.88) 0%, rgba(37, 69, 115, 0.82) 40%, rgba(94, 144, 209, 0.78) 100%),
    url('/images/heroes/chi-siamo--pexels-sergey-nikolaev-3146816.jpg') center/cover no-repeat;
}

@media (min-width: 768px) {
  .blog-hero--home { padding: calc(var(--header-height) + 6rem) 1rem 6rem; }
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--color-background), transparent);
  pointer-events: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.blog-hero-badge svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.blog-hero h1 {
  color: #ffffff;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) { .blog-hero h1 { font-size: 3rem; } }

.blog-hero p {
  margin-top: 1rem;
  font-size: 1.125rem;
  opacity: 0.85;
  line-height: 1.6;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.blog-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
}

@media (min-width: 640px) { .blog-container { padding: 3rem 1.5rem; } }
@media (min-width: 1024px) { .blog-container { padding: 4rem 2rem; } }

/* Section heading */
.blog-section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.blog-section-heading h2 {
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.blog-section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--color-border), transparent);
}

/* Post Grid */
.post-grid {
  display: grid;
  gap: 1.75rem;
}

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

/* Featured Post (first post larger) */
.post-grid .post-card:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .post-grid .post-card:first-child {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
  }

  .post-grid .post-card:first-child .post-card-thumbnail {
    aspect-ratio: auto;
    min-height: 320px;
  }

  .post-grid .post-card:first-child .post-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2.5rem;
  }

  .post-grid .post-card:first-child .post-card-title {
    font-size: 1.5rem;
    line-height: 1.35;
  }

  .post-grid .post-card:first-child .post-card-excerpt {
    -webkit-line-clamp: 4;
    font-size: 0.9375rem;
  }
}

/* Post Card */
.post-card {
  background: var(--color-background-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  box-shadow: 0 12px 40px rgba(94, 144, 209, 0.12), 0 4px 12px rgba(0, 0, 34, 0.04);
}

.post-card-thumbnail {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-background-alt);
  position: relative;
}

.post-card-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 2, 34, 0.08), transparent 40%);
  pointer-events: none;
  z-index: 1;
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}

.post-card:hover .post-card-thumbnail img { transform: scale(1.05); }

/* Placeholder for posts without featured image */
.post-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
  position: relative;
}

.post-card-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.post-card-placeholder svg {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.25);
}

.post-card:hover .post-card-placeholder svg {
  color: rgba(255, 255, 255, 0.35);
}

.post-card-body { padding: 1.5rem; }

.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-foreground-dim);
  margin-bottom: 0.75rem;
}

.post-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, rgba(94, 144, 209, 0.1), rgba(37, 69, 115, 0.06));
  color: var(--color-primary);
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  color: var(--color-foreground);
  text-decoration: none;
  transition: color 0.2s;
}

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

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: gap 0.3s var(--ease-out-expo), color 0.2s;
}

.post-card-readmore:hover { gap: 0.75rem; color: var(--color-primary-dark); }
.post-card-readmore svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease-out-expo); }
.post-card-readmore:hover svg { transform: translateX(2px); }

/* ===== SINGLE POST ===== */
.single-hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 40%, var(--color-primary) 100%);
  padding: calc(var(--header-height) + 3rem) 1rem 4rem;
  color: #ffffff;
  overflow: hidden;
}

.single-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.single-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--color-background), transparent);
  pointer-events: none;
}

.single-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 768px;
  margin: 0 auto;
}

.single-hero .post-card-category {
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.single-hero h1 {
  color: #ffffff;
  font-size: 2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) { .single-hero h1 { font-size: 2.75rem; } }

.single-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.single-hero-meta .author-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.single-content {
  max-width: 768px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

@media (min-width: 640px) { .single-content { padding: 3rem 1.5rem; } }

/* Featured image */
.single-featured-image {
  margin: -2.5rem 0 2.5rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 34, 0.12);
  border: 1px solid var(--color-border);
}

.single-featured-image img {
  width: 100%;
  display: block;
}

/* Article Content Styles */
.entry-content h2 { margin: 2.5rem 0 1rem; font-size: 1.5rem; }
.entry-content h3 { margin: 2rem 0 0.75rem; font-size: 1.25rem; }
.entry-content h4 { margin: 1.5rem 0 0.5rem; font-size: 1.125rem; }

.entry-content p { margin-bottom: 1.25rem; color: var(--color-foreground-muted); }

.entry-content ul, .entry-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--color-foreground-muted);
}

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

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-background-alt);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--color-foreground-muted);
  font-style: italic;
}

.entry-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--color-foreground);
  color: #e2e8f0;
  border-radius: 0.75rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.entry-content code {
  padding: 0.125rem 0.375rem;
  background: var(--color-background-alt);
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.entry-content pre code { padding: 0; background: none; border-radius: 0; }

.entry-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

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

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.entry-content th, .entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.entry-content th {
  background: var(--color-background-alt);
  font-weight: 600;
  font-family: var(--font-heading);
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-tags a {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--color-background-alt);
  color: var(--color-foreground-muted);
  border-radius: 9999px;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.post-tags a:hover { background: rgba(94, 144, 209, 0.1); color: var(--color-primary); }

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

.post-nav a {
  display: block;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-nav a:hover {
  border-color: var(--color-border-hover);
  box-shadow: 0 2px 12px rgba(94, 144, 209, 0.06);
}

.post-nav-label {
  font-size: 0.75rem;
  color: var(--color-foreground-dim);
  margin-bottom: 0.25rem;
}

.post-nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-foreground);
}

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

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a {
  color: var(--color-foreground-muted);
  border: 1px solid var(--color-border);
}

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

.pagination .current {
  background: var(--color-primary);
  color: #ffffff;
  border: 1px solid var(--color-primary);
}

/* ===== 404 Page ===== */
.error-404 {
  text-align: center;
  padding: calc(var(--header-height) + 4rem) 1rem 6rem;
  max-width: 600px;
  margin: 0 auto;
}

.error-404 h1 {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-404 h2 { margin-top: 1rem; }

.error-404 p {
  margin-top: 1rem;
  color: var(--color-foreground-muted);
}

.error-404 .btn-primary { margin-top: 2rem; }

/* ===== WordPress Core ===== */
.wp-caption { max-width: 100%; margin-bottom: 1.5rem; }
.wp-caption-text { font-size: 0.8125rem; color: var(--color-foreground-dim); margin-top: 0.5rem; text-align: center; }

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* WP Block Styles */
.wp-block-image { margin: 1.5rem 0; }
.wp-block-image img { border-radius: 0.75rem; }
.wp-block-image figcaption { font-size: 0.8125rem; color: var(--color-foreground-dim); margin-top: 0.5rem; text-align: center; }

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