/*
Theme Name: Xuper TV APK
Theme URI: https://xupertv-app.com
Author: XuperTV-APP
Author URI: https://xupertv-app.com
Description: A dark cinematic WordPress theme for Xuper TV APK informational website with crimson/magenta action colors.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: xupertv
Tags: dark, one-column, custom-colors, custom-logo, custom-menu, featured-images, theme-options, translation-ready
*/

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

/* CSS Variables - Dark Cinematic Palette */
:root {
  --radius: 0.875rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);

  --background: #1c1c1e;
  --foreground: #fafafa;
  --surface: #2c2c2e;
  --surface-2: #3a3a3c;
  --card: #2c2c2e;
  --card-foreground: #f5f5f5;
  --popover: #2c2c2e;
  --popover-foreground: #f5f5f5;
  --primary: #c41230;
  --primary-foreground: #ffffff;
  --primary-glow: #e63956;
  --secondary: #3a3a3c;
  --secondary-foreground: #f0f0f0;
  --muted: #3a3a3c;
  --muted-foreground: #98989f;
  --accent: #e63956;
  --accent-foreground: #ffffff;
  --destructive: #d32f2f;
  --destructive-foreground: #ffffff;
  --success: #34c759;
  --warning: #ffcc00;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.14);
  --ring: #c41230;

  --gradient-action: linear-gradient(135deg, var(--primary), var(--primary-glow));
  --gradient-surface: linear-gradient(160deg, rgba(44, 44, 46, 0.92), rgba(28, 28, 30, 0.92));
  --gradient-glow: radial-gradient(60% 60% at 50% 40%, rgba(196, 18, 48, 0.34), transparent 70%);
  --shadow-soft: 0 12px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 18px 60px -22px rgba(196, 18, 48, 0.55);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

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

* {
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

::selection {
  background: rgba(196, 18, 48, 0.45);
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Utility Classes */
.glass {
  background: var(--gradient-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.action-gradient {
  background-image: var(--gradient-action);
}

.text-gradient {
  background-image: var(--gradient-action);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.glow-ring {
  box-shadow: var(--shadow-glow);
}

.hero-glow {
  background-image: var(--gradient-glow);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.3s, border-color 0.3s;
}

.site-header.scrolled {
  background: var(--gradient-surface);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

/* Main Header (primary bar: logo + search + hamburger) */
.main-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: hidden;
}

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

.main-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 3.5rem;
  position: relative;
}

@media (min-width: 640px) {
  .main-header-inner {
    gap: 1rem;
    height: 4rem;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

/* Top Bar (secondary menu below primary header) */
.top-bar {
  display: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--background);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

@media (min-width: 1280px) {
  .top-bar {
    display: block;
  }
}

.top-bar::-webkit-scrollbar {
  display: none;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
}

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

.secondary-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.secondary-nav li {
  list-style: none;
}

.secondary-nav a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.secondary-nav a:hover {
  color: var(--foreground);
}

/* Secondary nav: text-only labels (no link) */
.secondary-nav span.menu-link {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  cursor: default;
}

/* Secondary nav: dropdown parent */
.secondary-nav li.menu-item-has-children {
  position: relative;
}

.secondary-nav li.menu-item-has-children > .dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.35rem;
  vertical-align: middle;
  border-top: 4px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  opacity: 0.5;
}

/* Secondary nav: sub-menu (desktop dropdown) */
.secondary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 200;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.375rem 0;
}

.secondary-nav li.menu-item-has-children:hover > .sub-menu {
  display: block;
}

.secondary-nav .sub-menu li {
  list-style: none;
}

.secondary-nav .sub-menu a,
.secondary-nav .sub-menu span.menu-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.secondary-nav .sub-menu a:hover,
.secondary-nav .sub-menu span.menu-link:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}

.site-logo img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
}

@media (min-width: 640px) {
  .site-logo img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
  }
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .site-logo-text {
    font-size: 1.125rem;
  }
}

/* Navigation */
.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

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

.main-nav a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-radius: 0.5rem;
  transition: background-color 0.2s, color 0.2s;
}

.main-nav a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background-color: var(--secondary);
  color: var(--foreground);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  background: var(--gradient-surface);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}

.mobile-nav.active {
  display: block;
}

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

.mobile-nav-inner {
  display: grid;
  gap: 0.25rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 0.75rem;
  transition: background-color 0.2s, color 0.2s;
}

.mobile-nav a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

/* Mobile nav: text-only labels */
.mobile-nav span.menu-link {
  display: block;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: 0.75rem;
  cursor: default;
}

/* Mobile nav: dropdown parent */
.mobile-nav li.menu-item-has-children > .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mobile-nav li.menu-item-has-children > .dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  opacity: 0.5;
  transition: transform 0.2s;
}

.mobile-nav li.menu-item-has-children.open > .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Mobile nav: sub-menu */
.mobile-nav .sub-menu {
  display: none;
  padding-left: 0.75rem;
  margin-top: 0.25rem;
}

.mobile-nav li.menu-item-has-children.open > .sub-menu {
  display: block;
}

.mobile-nav .sub-menu a,
.mobile-nav .sub-menu span.menu-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted-foreground);
  border-radius: 0.5rem;
}

.mobile-nav .sub-menu a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn:hover {
  transform: scale(1.03);
}

.btn-primary {
  background-image: var(--gradient-action);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--foreground);
}

.btn-lg {
  padding: 1rem 1.75rem;
  font-size: 1rem;
  border-radius: 1rem;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 4rem;
  padding-top: 7rem;
}

@media (min-width: 640px) {
  .hero {
    padding-top: 8rem;
  }
}

@media (min-width: 1024px) {
  .hero {
    padding-bottom: 6rem;
  }
}

.hero-glow-bg {
  position: absolute;
  top: -10rem;
  left: 50%;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  opacity: 0.7;
  pointer-events: none;
  background-image: var(--gradient-glow);
}

.hero-content {
  position: relative;
  display: grid;
  gap: 3rem;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
  padding: 0 1rem;
}

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

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-radius: 9999px;
}

.hero-title {
  margin-top: 1.25rem;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.08;
}

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

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

.hero-description {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .hero-description {
    font-size: 1.125rem;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

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

.stat-card {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.stat-label {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Hero Image */
.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
}

.hero-image-wrapper img {
  width: 100%;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  object-fit: cover;
}

.hero-image-badge {
  position: absolute;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  text-align: center;
}

.hero-image-badge-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.hero-image-badge-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.hero-image-badge.version {
  top: 2rem;
  left: -0.5rem;
}

@media (min-width: 640px) {
  .hero-image-badge.version {
    left: -1.5rem;
  }
}

.hero-image-badge.size {
  top: 33%;
  right: -0.5rem;
}

@media (min-width: 640px) {
  .hero-image-badge.size {
    right: -1.5rem;
  }
}

.hero-image-badge.status {
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero-image-badge.status .hero-image-badge-value {
  font-size: 0.875rem;
  color: var(--primary);
}

/* Device Tags */
.device-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.device-tag {
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  border-radius: 9999px;
}

/* Trust Bar */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: rgba(44, 44, 46, 0.4);
}

.trust-bar-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

@media (min-width: 640px) {
  .trust-bar-inner {
    padding: 2rem 1.5rem;
  }
}

@media (min-width: 768px) {
  .trust-bar-inner {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.trust-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}

@media (min-width: 640px) {
  .trust-value {
    font-size: 1.875rem;
  }
}

.trust-label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

/* Section Styles */
.section {
  scroll-margin-top: 6rem;
  padding: 3.5rem 0;
}

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

.section-header {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header.align-left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.section-eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-description {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

/* Card Styles */
.card {
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-4px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  background-image: var(--gradient-action);
  color: var(--primary-foreground);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.card-text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  gap: 1.25rem;
}

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

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

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

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

.grid-4 {
  display: grid;
  gap: 1.25rem;
}

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

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

/* Download Grid – 2×2 box layout */
.download-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

.download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.75rem 1.25rem 1.25rem;
  border-radius: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.download-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(77, 124, 254, 0.12);
  color: var(--primary);
  flex-shrink: 0;
}

.download-card-platform {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-foreground);
}

.download-card-title {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.3;
}

.download-card-text {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.download-card-btn {
  width: 100%;
  margin-top: 1rem;
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
}

/* Table Styles */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.info-table th,
.info-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.info-table th:last-child,
.info-table td:last-child {
  border-bottom: none;
}

.info-table thead th {
  background-color: rgba(58, 58, 60, 0.4);
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-table tbody th {
  font-weight: 600;
  color: var(--muted-foreground);
}

.info-table tbody td {
  font-weight: 500;
}

/* Mobile Info List */
.info-list {
  display: none;
}

@media (max-width: 639px) {
  .info-list {
    display: block;
  }
  .info-table {
    display: none;
  }
}

.info-list-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.info-list-item:last-child {
  border-bottom: none;
}

.info-list-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.info-list-value {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

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

.category-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
}

.category-item img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  transition: transform 0.5s;
}

.category-item:hover img {
  transform: scale(1.1);
}

.category-item-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(28, 28, 30, 0.7);
  transition: background-color 0.2s;
}

.category-item:hover .category-item-overlay {
  background-color: rgba(28, 28, 30, 0.5);
}

.category-item-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
}

.category-item-icon {
  font-size: 1.25rem;
}

.category-item-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
}

/* Sports Section */
.sports-section {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid var(--border);
}

.sports-section img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sports-content {
  position: relative;
  background-color: rgba(28, 28, 30, 0.8);
  padding: 2rem;
}

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

@media (min-width: 1024px) {
  .sports-content {
    padding: 4rem;
  }
}

.sports-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.sports-tag {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Tabs */
.tabs {
  max-width: 56rem;
  margin: 2.5rem auto 0;
}

.tabs-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  background-color: var(--secondary);
  padding: 0.25rem;
  border-radius: 0.5rem;
}

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

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

.tab-trigger {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.tab-trigger:hover,
.tab-trigger.active {
  background-color: var(--background);
  color: var(--foreground);
}

.tab-content {
  display: none;
  margin-top: 1rem;
}

.tab-content.active {
  display: block;
}

.tab-content ul {
  padding: 1.5rem;
  border-radius: 1.5rem;
}

.tab-content li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.tab-content li:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.tab-check {
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--primary);
}

/* Changelog */
.changelog {
  position: relative;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.changelog-header {
  text-align: center;
  margin-bottom: 2rem;
}

.changelog-version {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-foreground);
  border-radius: 9999px;
}

.changelog-list {
  list-style: none;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.changelog-item {
  position: relative;
  padding: 0 1.25rem 1rem;
}

.changelog-item::before {
  content: '';
  position: absolute;
  left: -1.9rem;
  top: 0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background-image: var(--gradient-action);
}

.changelog-item p {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Installation Steps */
.installation-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--primary-foreground);
}

.security-tip {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(196, 18, 48, 0.3);
}

.security-tip-icon {
  margin-top: 0.125rem;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--primary);
}

/* How to Use */
.how-to-use-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 640px) {
  .how-to-use-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.usage-list {
  list-style: none;
  margin-top: 2rem;
}

.usage-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-radius: 1rem;
  transition: background-color 0.2s;
}

.usage-item:hover {
  background-color: rgba(58, 58, 60, 0.3);
}

.usage-item-icon {
  font-size: 1.25rem;
}

.usage-item-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.usage-item-number {
  font-weight: 700;
  margin-right: 0.5rem;
  color: var(--foreground);
}

/* Accordion */
.accordion {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.accordion-item {
  border-radius: 0.5rem;
  overflow: hidden;
}

.accordion-item:not(:last-child) {
  margin-bottom: 0.25rem;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  transition: background-color 0.2s;
}

.accordion-trigger:hover {
  background-color: rgba(58, 58, 60, 0.3);
}

.accordion-trigger::after {
  content: '+';
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.accordion-item.active .accordion-trigger::after {
  content: '−';
}

.accordion-content {
  display: none;
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.accordion-item.active .accordion-content {
  display: block;
}

/* Alternatives Grid */
.alternatives-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

.alternative-card {
  padding: 0;
  overflow: hidden;
}

.alternative-card img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
}

.alternative-card-content {
  padding: 1.25rem;
}

/* Pros & Cons */
.pros-cons-grid {
  display: grid;
  gap: 1.25rem;
}

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

.pros-list,
.cons-list {
  list-style: none;
  margin-top: 1.25rem;
}

.pros-list li,
.cons-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.pros-list li:not(:last-child),
.cons-list li:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.pro-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: rgba(52, 199, 89, 0.15);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.con-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: rgba(255, 204, 0, 0.15);
  color: var(--warning);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Review Section */
.review-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .review-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
  }
}

.review-score {
  text-align: center;
  padding: 2rem;
}

.review-score-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
}

.review-score-value {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: 800;
  margin-top: 0.75rem;
}

.review-stars {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.review-stars svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--primary);
  color: var(--primary);
}

.review-details {
  margin-top: 1.75rem;
  text-align: left;
}

.review-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.review-detail-label {
  color: var(--muted-foreground);
}

.review-detail-stars {
  font-weight: 600;
  color: var(--primary);
}

/* CTA Section */
.cta-section {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .cta-section {
    padding: 5rem 3rem;
  }
}

.cta-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 40rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .cta-title {
    font-size: 3rem;
  }
}

.cta-description {
  margin-top: 1.25rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

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

.cta-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Note */
.note {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: rgba(58, 58, 60, 0.4);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
}

@media (min-width: 640px) {
  .note {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: rgba(44, 44, 46, 0.4);
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1rem;
}

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

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

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-links li {
  padding: 0.5rem 0;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

.footer-social {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

.footer-disclaimer {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

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

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

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

.category-card {
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.category-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.category-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

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

.category-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--muted-foreground);
}

.category-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.category-card-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(77, 124, 254, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.category-card-title {
  margin-top: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card-excerpt {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card-readmore {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
}

.category-pagination {
  margin-top: 3rem;
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Sticky Download Bar */
.sticky-download {
  display: none;
}

.sticky-download a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-foreground);
  border-radius: 1rem;
}

.sticky-download-version {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Reading Progress */
.reading-progress {
  position: fixed;
  inset-x: 0;
  top: 0;
  z-index: 60;
  height: 0.125rem;
  background-color: transparent;
}

.reading-progress-bar {
  height: 100%;
  background-image: var(--gradient-action);
  transform-origin: left;
  transition: width 0.15s;
}

/* Scroll offset for sticky header */
h2, h3 {
  scroll-margin-top: 5rem;
}

/* Table of Contents */
.toc {
  padding: 1.25rem;
}

.sidebar .toc {
  margin-bottom: 1rem;
}

/* Mobile TOC (above content, below breadcrumbs) */
.toc-mobile {
  display: block;
  margin: 0 1.5rem 1.5rem;
}

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

.toc-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.toc-mobile-toggle:hover {
  background: var(--secondary);
}

.toc-mobile-toggle svg {
  transition: transform 0.2s;
}

.toc-mobile-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.toc-mobile-content {
  display: none;
  margin-top: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.toc-mobile-content.open {
  display: block !important;
}

.toc-title {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list-child {
  margin-left: 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.toc-item {
  margin: 0;
}

.toc-item a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  border-radius: 0.5rem;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
}

.toc-item.level-2 > a {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--foreground);
}

.toc-item.level-3 > a {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.toc-item a:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

.toc-item a.active {
  background-color: var(--primary);
  color: #fff;
}

.toc-item.level-2 > a.active {
  color: #fff;
}

.toc-item-number {
  opacity: 0.4;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  min-width: 1.25rem;
}

.toc-item.level-3 .toc-item-number {
  opacity: 0.3;
}

/* Post Hero (featured image) */
.post-hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .post-hero {
    padding: 0 2rem;
  }
}

.post-hero-image {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Entry Content (post/page body typography) */
.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--foreground);
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content > p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.entry-content h2,
.entry-content > * h2 {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.entry-content h3,
.entry-content > * h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.entry-content h4,
.entry-content > * h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Target ALL paragraphs — direct children AND inside wrapper divs */
.entry-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(77, 124, 254, 0.4);
  text-underline-offset: 0.2em;
  font-weight: 500;
  transition: color 0.2s, text-decoration-color 0.2s;
}

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

.entry-content a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  margin: 1.25rem 0 1.5rem;
}

.entry-content li {
  padding: 0.35rem 0;
  line-height: 1.7;
}

.entry-content ul li {
  list-style-type: disc;
}

.entry-content ol li {
  list-style-type: decimal;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2rem 0;
}

.entry-content figure {
  margin: 2rem 0;
}

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

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.entry-content strong {
  font-weight: 700;
  color: var(--foreground);
}

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

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

.entry-content table th {
  background: var(--secondary);
  font-weight: 700;
  font-size: 0.875rem;
}

/* WordPress core align classes */
.entry-content .alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
  max-width: calc(100% + 4rem);
}

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

.entry-content .wp-caption {
  max-width: 100%;
  margin: 2rem 0;
}

.entry-content .wp-caption-text {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 0.5rem;
}

/* Horizontal rule */
.entry-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* WordPress Gutenberg block wrappers */
.entry-content .wp-block-group {
  margin-top: 1.5rem;
}

.entry-content .wp-block-group > * + * {
  margin-top: 1.5rem;
}

/* Fallback: direct .main-content > p in case .entry-content wrapper is missing */
.main-content > p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.main-content > p:last-child {
  margin-bottom: 0;
}

.main-content > h2,
.main-content > h3,
.main-content > h4 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.main-content > * + * {
  margin-top: 1.5rem;
}

/* Links inside main content (posts/pages) */
.main-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(77, 124, 254, 0.4);
  text-underline-offset: 0.2em;
  font-weight: 500;
  transition: color 0.2s, text-decoration-color 0.2s;
}

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

.main-content a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Buttons inside main content */
.main-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(77, 124, 254, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.main-content .wp-block-button__link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(77, 124, 254, 0.5);
}

.main-content .wp-block-button__link:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(77, 124, 254, 0.3);
}

.main-content .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

.main-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(77, 124, 254, 0.35);
}

.entry-content .wp-block-columns {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.entry-content .wp-block-column {
  flex: 1;
}

.entry-content .wp-block-button {
  margin: 1.5rem 0;
}

.entry-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(77, 124, 254, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.entry-content .wp-block-button__link:hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(77, 124, 254, 0.5);
}

.entry-content .wp-block-button__link:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(77, 124, 254, 0.3);
}

.entry-content .wp-block-button__link:focus-visible {
  outline: 2px solid var(--primary-glow);
  outline-offset: 3px;
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(77, 124, 254, 0.35);
}

/* Gallery blocks */
.entry-content .wp-block-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.entry-content .wp-block-image {
  margin: 1.5rem 0;
}

/* Main Content Layout */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

@media (min-width: 640px) {
  .main-layout {
    padding: 2.5rem 2rem 4rem;
  }
}

@media (min-width: 1024px) {
  .main-layout {
    flex-direction: row;
    padding: 3rem 2rem 4rem;
  }
}

.sidebar {
  display: none;
  width: 18rem;
  flex-shrink: 0;
}

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

.sidebar-inner {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-inner::-webkit-scrollbar {
  width: 4px;
}

.sidebar-inner::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-inner::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-inner::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

.main-content {
  min-width: 0;
  flex: 1;
  max-width: 780px;
  padding: 0.5rem 0;
}

@media (min-width: 1024px) {
  .main-content {
    padding-left: 1rem;
  }
}

/* Responsive Mobile Menu Spacer */
@media (max-width: 1023px) {
  .mobile-spacer {
    height: 5rem;
  }
}

/* SVG Icons */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* ========================================
   ADDITIONS (customizer, SEO, UX updates)
   ======================================== */

/* Skip to Content Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  color: #ffffff;
}

/* Breadcrumbs */
.breadcrumbs {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

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

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.breadcrumbs-sep {
  color: var(--muted-foreground);
  margin: 0 0.125rem;
  opacity: 0.6;
  list-style: none;
}

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

.breadcrumbs a:hover {
  color: var(--primary-glow);
  text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
  color: var(--muted-foreground);
}

/* Post Header (single.php / page.php) */
.post-header {
  padding: 1.25rem 0 1.5rem;
}

.post-header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .post-header-inner {
    padding: 0 2rem;
  }
}

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

.post-category {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: rgba(77, 124, 254, 0.1);
  color: var(--primary);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.post-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--foreground);
  margin: 0;
}

@media (min-width: 640px) {
  .post-title {
    font-size: 2.5rem;
  }
}

/* Header Search Right-Aligned */
.header-search {
  margin-left: auto;
  margin-right: 0;
  min-width: 0;
  flex: 1;
  max-width: 200px;
}

@media (min-width: 640px) {
  .header-search {
    max-width: 280px;
  }
}

/* Mobile header actions (search icon + hamburger) */
.header-actions-mobile {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  order: 1;
}

@media (min-width: 1280px) {
  .header-actions-mobile {
    display: none;
  }
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background-color: var(--secondary);
  color: var(--foreground);
  cursor: pointer;
}

.search-toggle:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Hide search form on mobile by default, show on toggle */
@media (max-width: 1279px) {
  .header-search {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .header-search.open {
    display: block;
  }

  .header-search .search-form {
    display: flex;
    max-width: 100%;
  }

  .header-search .search-field {
    flex: 1;
    min-width: 0;
  }
}

/* Desktop: always show search form */
@media (min-width: 1280px) {
  .header-search {
    position: static;
    display: block;
    padding: 0;
    border: none;
    box-shadow: none;
    max-width: 280px;
  }
}

.header-search .search-form {
  display: flex;
  align-items: center;
}

.header-search .search-field {
  padding: 0.4rem 0.625rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem 0 0 0.5rem;
  background: var(--background);
  color: var(--foreground);
  outline: none;
  width: 100%;
  min-width: 0;
  transition: border-color 0.2s;
}

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

.header-search .search-submit {
  padding: 0.4rem 0.625rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--secondary);
  color: var(--muted-foreground);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.header-search .search-submit:hover {
  background: var(--primary);
  color: #ffffff;
}

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

/* Secondary Mobile Menu */
.secondary-mobile {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.secondary-mobile-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.secondary-mobile-content {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.secondary-mobile-content::-webkit-scrollbar {
  width: 4px;
}

.secondary-mobile-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Footer 3-Column Equal Layout */
@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Button White Text Force */
.btn-primary {
  color: #ffffff !important;
}

.btn {
  color: #ffffff !important;
}

/* Share Buttons */
.share-btn:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

/* Search Results Page */
.search-results .site-main {
  min-height: 60vh;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

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

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

/* ========================================
   Popular Posts Carousel
   ======================================== */
.posts-carousel-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .posts-carousel-wrapper {
    margin: 0 -2rem;
    padding: 0 2rem;
  }
}

.posts-carousel-wrapper::before,
.posts-carousel-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3rem;
  z-index: 2;
  pointer-events: none;
}

.posts-carousel-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--background), transparent);
}

.posts-carousel-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--background), transparent);
}

/* Carousel Scroll Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.posts-carousel-wrapper:hover .carousel-btn {
  opacity: 1;
}

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

.carousel-btn-prev {
  left: 0.5rem;
}

.carousel-btn-next {
  right: 0.5rem;
}

@media (max-width: 639px) {
  .carousel-btn {
    width: 2rem;
    height: 2rem;
  }
  .carousel-btn svg {
    width: 16px;
    height: 16px;
  }
  .carousel-btn-prev {
    left: 0.25rem;
  }
  .carousel-btn-next {
    right: 0.25rem;
  }
}

.posts-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 1rem;
  scrollbar-width: none;
}

.posts-carousel::-webkit-scrollbar {
  display: none;
}

.post-carousel-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--secondary);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

@media (min-width: 640px) {
  .post-carousel-card {
    flex: 0 0 300px;
  }
}

.post-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.post-carousel-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-carousel-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.post-carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

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

.post-carousel-content {
  padding: 1rem;
}

.post-carousel-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--foreground);
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-carousel-date {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
