/* ==========================================================================
   MandoFest.online — Premium Gaming Theme (A to Z Optimized)
   High-performance, ultra-professional, eye-catching gaming portal theme.
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Sora:wght@600;700;800;900&display=swap');

/* ---------- Design Tokens & Variables ---------- */
:root {
  /* Dark Cyber / Obsidian Palette */
  --bg-deep: #06080d;
  --bg: #090c13;
  --bg-elevated: #0e1320;
  --surface: #131a2b;
  --surface-hover: #182238;
  --surface-glass: rgba(14, 19, 32, 0.75);
  --border: #1f2a42;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 106, 0, 0.4);

  /* Typography Colors */
  --text-main: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Brand Vibrant Gradient & Accents */
  --brand: #ff6a00;
  --brand-bright: #ff8533;
  --brand-gradient: linear-gradient(135deg, #ff6a00 0%, #ff3b30 50%, #ff8533 100%);
  --brand-glow: rgba(255, 106, 0, 0.35);
  --accent-cyan: #00f2fe;
  --accent-purple: #8b5cf6;

  /* Game Specific Category Palettes */
  --cat-gta: #10b981;
  --cat-gta-bg: rgba(16, 185, 129, 0.15);
  --cat-gta-glow: rgba(16, 185, 129, 0.4);

  --cat-er: #8b5cf6;
  --cat-er-bg: rgba(139, 92, 246, 0.15);
  --cat-er-glow: rgba(139, 92, 246, 0.4);

  --cat-fc: #2563eb;
  --cat-fc-bg: rgba(37, 99, 235, 0.15);
  --cat-fc-glow: rgba(37, 99, 235, 0.4);

  --cat-cod: #ef4444;
  --cat-cod-bg: rgba(239, 68, 68, 0.15);
  --cat-cod-glow: rgba(239, 68, 68, 0.4);

  /* Geometry & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(255, 106, 0, 0.25);

  /* Fonts */
  --font-display: 'Sora', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: dark;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient cyber glow background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(255, 106, 0, 0.12), transparent 70%),
    radial-gradient(900px 500px at 10% 20%, rgba(139, 92, 246, 0.09), transparent 60%),
    radial-gradient(800px 600px at 50% 90%, rgba(0, 242, 254, 0.05), transparent 70%);
  z-index: 0;
}

/* Subtle micro-grid overlay for tech gaming feel */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

header, main, footer, section, article {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--brand-bright);
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

a:hover {
  color: #ffa366;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.02em;
}

::selection {
  background: var(--brand);
  color: #ffffff;
}

/* Layout Utilities */
.wrap, .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Reading Progress Bar */
#progressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand-gradient);
  width: 0%;
  z-index: 1001;
  box-shadow: 0 0 12px var(--brand);
  transition: width 0.1s ease-out;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(6, 8, 13, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(6, 8, 13, 0.94);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
  border-bottom-color: rgba(255, 106, 0, 0.2);
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Brand Logo */
.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 106, 0, 0.45));
}

.logo.light {
  color: #ffffff;
}

/* Main Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  position: relative;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.main-nav a:hover {
  color: #ffffff;
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.main-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.18), rgba(255, 59, 48, 0.12));
  border-color: rgba(255, 106, 0, 0.35);
  box-shadow: 0 0 15px rgba(255, 106, 0, 0.2);
}

/* Header Action Buttons */
.search-btn, .nav-toggle, .menu-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.search-btn:hover, .nav-toggle:hover, .menu-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--brand-bright);
  box-shadow: 0 0 16px var(--brand-glow);
  transform: translateY(-1px);
}

.nav-toggle, .menu-toggle {
  display: none;
}

/* Interactive Search Dropdown */
.search-box {
  display: none;
  background: rgba(10, 14, 22, 0.98);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-box input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #ffffff;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.search-box input:focus {
  border-color: var(--brand);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

#searchResults {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

#searchResults a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

#searchResults a:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  transform: translateX(4px);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

#searchResults a span.sr-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 106, 0, 0.15);
  color: var(--brand-bright);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-gradient);
  color: #ffffff !important;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px var(--brand-glow);
  transition: all var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  letter-spacing: -0.01em;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 106, 0, 0.5);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(0);
}

.btn.ghost, .btn-outline {
  background: var(--surface);
  color: var(--text-main) !important;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover, .btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: #ffffff !important;
  box-shadow: 0 0 18px var(--brand-glow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   HOMEPAGE HERO SECTION
   ========================================================================== */
.hero {
  position: relative;
  padding: 85px 0 50px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, rgba(255, 106, 0, 0.12), transparent 70%);
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  max-width: 900px;
  margin: 0 auto 0.45em;
  line-height: 1.15;
}

.hero h1 span, .hero h1 .grad, .hero .grad, .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(255, 106, 0, 0.4));
}

.hero p {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 680px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

/* Section Title */
.sec-title {
  font-size: clamp(1.5rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 50px 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), rgba(255, 255, 255, 0.02));
  margin-left: 10px;
}

/* ==========================================================================
   FEATURED HERO CARD
   ========================================================================== */
.featured {
  margin: 30px 0 16px;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.4), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.featured-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 106, 0, 0.45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 106, 0, 0.2);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
  transition: transform 0.5s ease;
}

.featured-card:hover img {
  transform: scale(1.04);
}

.featured-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.featured-body h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.3;
  color: #ffffff;
  transition: color var(--transition-fast);
}

.featured-card:hover .featured-body h3 {
  color: var(--brand-bright);
}

.featured-body p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0;
}

.hot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 106, 0, 0.14);
  color: var(--brand-bright);
  border: 1px solid rgba(255, 106, 0, 0.4);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 0 14px rgba(255, 106, 0, 0.15);
}

/* ==========================================================================
   CATEGORY EXPLORER GRID
   ========================================================================== */
.cat-grid, .categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.cat-box, .category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: #ffffff;
  min-height: 175px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: var(--surface);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.cat-box::before, .category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 19, 32, 0.1) 0%, rgba(9, 12, 19, 0.95) 100%);
  z-index: 1;
}

.cat-box:hover, .category-card:hover {
  transform: translateY(-5px);
  border-color: var(--c, var(--brand));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 28px var(--c, var(--brand-glow));
}

.cat-box span:first-child, .category-icon {
  position: relative;
  z-index: 2;
  font-size: 2.2rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform var(--transition-fast);
}

.cat-box:hover span:first-child, .category-card:hover .category-icon {
  transform: scale(1.15) rotate(5deg);
}

.cat-box h3, .category-name {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.cat-box p {
  position: relative;
  z-index: 2;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 0;
}

/* ==========================================================================
   ARTICLE CARDS & GRID
   ========================================================================== */
.grid, .articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md), 0 0 20px rgba(0, 0, 0, 0.5);
}

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

.card-cover, .card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
}

.card-cover img, .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-cover img, .card:hover .card-img img {
  transform: scale(1.08);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(6, 8, 13, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body .badge {
  align-self: flex-start;
  margin-bottom: 10px;
}

.card-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.4;
  color: #ffffff;
  transition: color var(--transition-fast);
}

.card:hover .card-body h3 {
  color: var(--brand-bright);
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-body .meta {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

/* ==========================================================================
   ARTICLE PAGE DETAIL
   ========================================================================== */
.breadcrumbs {
  font-size: 0.86rem;
  color: var(--text-dim);
  margin: 28px auto 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--brand-bright);
}

article.article, article.post {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 20px 24px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  padding: 40px 0;
}

.article-cover, .post-cover, .article-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin: 20px 0 28px;
  position: relative;
}

.article-cover img, .post-cover img, .article-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

article h1, .post h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 16px 0 14px;
  line-height: 1.2;
}

.article-meta, .post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

article .lead {
  font-size: 1.18rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-left: 4px solid var(--brand);
  background: linear-gradient(90deg, rgba(255, 106, 0, 0.08), transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 24px;
  margin: 24px 0 32px;
}

/* Table of Contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.toc strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #ffffff;
  display: block;
  margin-bottom: 12px;
}

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

.toc li {
  margin: 8px 0;
}

.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.toc a:hover {
  color: var(--brand-bright);
  transform: translateX(4px);
}

/* Typography Inside Article */
article h2, .article-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 44px 0 16px;
  color: #ffffff;
  scroll-margin-top: 100px;
  position: relative;
  padding-bottom: 8px;
}

article h2::after, .article-content h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45px;
  height: 3px;
  background: var(--brand-gradient);
  border-radius: var(--radius-pill);
}

article h3, .article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: #ffffff;
}

article p, .article-content p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.8;
  margin: 0 0 18px;
}

article ul, article ol, .article-content ul, .article-content ol {
  color: var(--text-secondary);
  padding-left: 24px;
  margin: 0 0 20px;
  font-size: 1.02rem;
}

article ul { list-style: disc; }
article ol { list-style: decimal; }

article li, .article-content li {
  margin: 8px 0;
  line-height: 1.65;
}

article strong, .article-content strong {
  color: #ffffff;
  font-weight: 700;
}

article a, .article-content a {
  color: var(--brand-bright);
  text-decoration: underline;
  text-underline-offset: 4px;
}

article a:hover, .article-content a:hover {
  color: #ffaa75;
}

/* Polished Tables */
article table, .article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  font-size: 0.94rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

article th, article td, .article-content th, .article-content td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

article th, .article-content th {
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

article tr:last-child td, .article-content tr:last-child td {
  border-bottom: none;
}

article tr:nth-child(even) td, .article-content tr:nth-child(even) td {
  background: rgba(19, 26, 43, 0.45);
}

article tr:hover td, .article-content tr:hover td {
  background: rgba(255, 106, 0, 0.05);
}

/* Callout Blockquotes */
article blockquote, .article-content blockquote {
  border-left: 4px solid var(--accent-cyan);
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.07), var(--surface));
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-main);
  font-style: normal;
  box-shadow: var(--shadow-sm);
}

article blockquote p, .article-content blockquote p {
  margin: 0;
  color: var(--text-secondary);
}

/* FAQ Component */
.faq, .home-faq {
  margin: 40px 0 20px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 12px 0;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.faq-item:hover {
  border-color: rgba(255, 106, 0, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Share Box */
.share-box, .share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin: 36px 0 20px;
  box-shadow: var(--shadow-sm);
}

.share-box span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  color: #ffffff;
}

.share-box a, .share-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main) !important;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none !important;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-box a:hover, .share-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff !important;
  box-shadow: 0 0 16px var(--brand-glow);
  transform: translateY(-2px);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0 32px;
  box-shadow: var(--shadow-sm);
}

.author-ava {
  font-size: 2rem;
  background: var(--brand-gradient);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--brand-glow);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.author-box strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #ffffff;
}

.author-box p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.cat-link, .post-cat-link {
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin: 20px 0 32px;
  font-size: 0.92rem;
}

.related-sec {
  margin: 20px 0 60px;
}

/* Sidebar on Article Pages */
.sidebar {
  position: sticky;
  top: 90px;
}

.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-block h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

.sidebar-block .related-link {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-block .related-link:last-child {
  border-bottom: none;
}

.sidebar-block .related-link:hover {
  color: var(--brand-bright);
  transform: translateX(4px);
}

/* ==========================================================================
   CATEGORY PAGES
   ========================================================================== */
.cat-hero, .category-header {
  display: flex;
  gap: 28px;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 32px 0 28px;
  color: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cat-hero img {
  border-radius: var(--radius-md);
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cat-hero h1, .category-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 900;
}

.cat-hero p {
  margin: 0;
  color: var(--text-secondary);
  max-width: 680px;
  font-size: 1.05rem;
}

.cat-intro {
  color: var(--text-secondary);
  max-width: 860px;
  margin: 0 0 24px;
  font-size: 1.06rem;
  line-height: 1.65;
}

/* ==========================================================================
   STATIC PAGES (Contact, About, 404)
   ========================================================================== */
.page, .static-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.page h1, .static-page h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.page p, .static-page p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin-bottom: 18px;
}

/* Contact Form */
form.contact-form, form[name="contacto"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 28px 0;
  box-shadow: var(--shadow-md);
}

form label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

form input, form textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 13px 18px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  margin-bottom: 18px;
  outline: none;
  transition: all var(--transition-fast);
}

form input:focus, form textarea:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.2);
}

/* 404 Page */
.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.page-404 h1 {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 900;
  line-height: 1;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px var(--brand-glow));
  margin-bottom: 10px;
}

.page-404 p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* About Strip (Homepage) */
.about-strip {
  color: var(--text-muted);
  text-align: center;
  padding: 24px 20px 10px;
  max-width: 800px;
  margin: 0 auto;
}

.about-strip h2 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.about-strip p {
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: 80px;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, #040508 100%);
  border-top: 1px solid var(--border);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

.foot-grid, .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-top: 50px;
  padding-bottom: 20px;
}

.foot-grid h4, .footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.foot-grid ul, .footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-grid li {
  margin: 10px 0;
}

.foot-grid a, .footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.93rem;
  transition: all var(--transition-fast);
  display: inline-block;
}

.foot-grid a:hover, .footer-col a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.foot-grid p, .footer-col p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.6;
  margin: 14px 0 0;
}

.foot-bottom, .footer-bottom {
  border-top: 1px solid var(--border-light);
  margin-top: 30px;
  padding: 24px 0 36px;
  color: var(--text-dim);
  font-size: 0.86rem;
  text-align: center;
  line-height: 1.6;
}

/* ==========================================================================
   FLOATING TOAST & BACK TO TOP
   ========================================================================== */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 998;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 20px var(--brand-glow);
  transform: translateY(-3px);
}

.mando-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  color: #ffffff;
  border: 1px solid var(--brand);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg), 0 0 20px var(--brand-glow);
  font-size: 0.92rem;
  font-weight: 600;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mando-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .foot-grid, .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header-in {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .nav-toggle, .menu-toggle {
    display: inline-flex;
  }
  .main-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: rgba(6, 8, 13, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    gap: 10px;
    display: none;
    z-index: 998;
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  .hero {
    padding: 55px 0 35px;
  }
  .cat-hero, .category-header {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  .grid, .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 540px) {
  .wrap, .container {
    padding: 0 16px;
  }
  .foot-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .grid, .articles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cat-grid, .categories-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    width: 100%;
  }
  .hero h1 {
    font-size: 1.95rem;
  }
}

/* Accessibility: respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
