/* ==========================================================================
   خلفياتي | Khalfiyati - Complete Universal Design System
   Self-Contained Root CSS (No subfolder dependencies)
   Arabic (RTL) & English (LTR) with Dark / Light Theme
   ========================================================================== */

@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('assets/fonts/cairo-arabic.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
  /* Light Theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.92);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #e11d48;
  --primary-hover: #be123c;
  --primary-light: #ffe4e6;
  
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-light: #ede9fe;
  
  --gradient-main: linear-gradient(135deg, #e11d48 0%, #8b5cf6 50%, #3b82f6 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(225, 29, 72, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg-primary: #24272e;
  --bg-secondary: #1f2229;
  --bg-card: #1d2027;
  --bg-card-hover: #262932;
  --bg-glass: rgba(31, 34, 41, 0.95);
  
  --text-main: #ffffff;
  --text-muted: #9ea3ae;
  --text-light: #6c727f;
  
  --primary: #9afb22;
  --primary-hover: #b4ff47;
  --primary-light: rgba(154, 251, 34, 0.15);
  
  --accent: #9afb22;
  --accent-hover: #b4ff47;
  --accent-light: rgba(154, 251, 34, 0.15);
  
  --border-color: #343842;
  --border-light: #2b2e36;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.6);
  --shadow-xl: 0 20px 35px rgba(0,0,0,0.7);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Disable transitions until page is loaded to eliminate initial layout thrashing */
body:not(.theme-ready) *,
body:not(.theme-ready) *::before,
body:not(.theme-ready) *::after {
  transition: none !important;
}

/* Universal Robust Font Enforcement */
html[lang="ar"], html[dir="rtl"], body.lang-ar {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  direction: rtl;
  text-align: right;
}

html[lang="ar"] *, html[dir="rtl"] *, body.lang-ar *, body.lang-ar button, body.lang-ar input, body.lang-ar select {
  font-family: inherit;
}

html[lang="en"], html[dir="ltr"], body.lang-en {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  direction: ltr;
  text-align: left;
}

html[lang="en"] *, html[dir="ltr"] *, body.lang-en *, body.lang-en button, body.lang-en input, body.lang-en select {
  font-family: inherit;
}

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

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

/* Layout Wrappers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  padding: 24px 20px;
  flex: 1;
}

/* Header & Sticky Navbar */
.top-header {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo-area {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-logo .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.site-logo .sparkle {
  font-size: 20px;
  display: inline-block;
  animation: pulse 2.2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(6deg); }
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: clamp(8px, 1vw, 16px);
  row-gap: 2px;
}

.nav-link {
  flex: 0 0 auto;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  padding: 6px 2px;
  white-space: nowrap;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

/* Control Buttons */
.btn-control {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  font-family: inherit;
}

.btn-control:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-cta {
  background: var(--gradient-main);
  color: #ffffff !important;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.35);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.btn-cta:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.45);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero-banner {
  background: var(--gradient-main);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 50px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 65%);
  pointer-events: none;
  animation: spin 30s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 17px;
  max-width: 680px;
  margin: 0 auto 24px;
  opacity: 0.95;
  line-height: 1.65;
}

.search-box-wrap {
  max-width: 560px;
  margin: 0 auto 22px;
  position: relative;
}

.search-bar {
  background: #ffffff;
  border-radius: var(--radius-full);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.search-input {
  border: none;
  background: transparent;
  flex: 1;
  padding: 12px 18px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
}

.search-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-btn:hover {
  background: var(--primary);
}

.random-btn {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin-inline-start: 6px;
}

.random-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.random-btn:active {
  transform: scale(0.95);
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

/* Category Filter Tabs */
.category-filter-wrap {
  margin: 24px 0 20px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.category-filter-wrap::-webkit-scrollbar {
  height: 5px;
}
.category-filter-wrap::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.category-tabs {
  display: flex;
  gap: 10px;
  padding: 4px 2px;
}

.cat-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.cat-tab:hover,
.cat-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
  transform: translateY(-1px);
}

/* Color Palette Mood Filter */
.color-moods-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 20px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.color-mood-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-dots-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.color-dot {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.color-dot::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot-color, #e11d48);
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.4);
}

.color-dot:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.color-dot.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.35);
}

.color-dot.active::before {
  border-color: #ffffff;
  transform: scale(1.15);
}

/* Section Headings */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* Card Sorting Toolbar */
.sort-bar-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.sort-bar-wrap:focus-within,
.sort-bar-wrap:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.12);
}

.sort-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.sort-select-custom {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sort-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px 6px 30px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

body.lang-en .sort-select,
html[dir="ltr"] .sort-select {
  padding: 6px 30px 6px 14px;
}

.sort-select:hover,
.sort-select:focus {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

.sort-select-custom::after {
  content: "▾";
  position: absolute;
  left: 12px;
  right: auto;
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

body.lang-en .sort-select-custom::after,
html[dir="ltr"] .sort-select-custom::after {
  right: 12px;
  left: auto;
}

.sort-select-custom:hover::after {
  color: var(--primary);
}

@media (max-width: 640px) {
  .sort-bar-wrap {
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
  }
  .sort-select {
    flex: 1;
    max-width: 220px;
  }
}

/* Adsterra Advertisement Slots */
.ad-slot-container {
  margin: 24px 0;
  text-align: center;
}

.ad-slot {
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ad-slot:hover {
  border-color: var(--primary);
}

.ad-badge {
  display: inline-block;
  background: var(--gradient-subtle);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.ad-slot .ad-desc {
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

[data-theme="dark"] .ad-slot .ad-desc {
  color: #cbd5e1;
}

/* Floating Bottom Sticky Bar (for Adsterra Social Bar) */
.sticky-ad-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 99;
  padding: 10px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform var(--transition-normal);
}

.sticky-ad-bar.hidden {
  transform: translateY(100%);
}

.sticky-ad-close {
  position: absolute;
  top: 7px;
  left: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}
html[dir="ltr"] .sticky-ad-close, body.lang-en .sticky-ad-close {
  left: auto;
  right: 14px;
}

/* Grid Layouts */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  margin-bottom: 34px;
}

.guides-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

/* Article & Wallpaper Card */
.art-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  position: relative;
}

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

.art-thumb-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(90deg, #0e1526 25%, #18243c 50%, #0e1526 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite ease-in-out;
}

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

.art-thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease-in, transform 0.5s ease;
}

.art-thumb.loaded {
  opacity: 1;
}

.art-card:hover .art-thumb {
  transform: scale(1.06);
}

.art-tag-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 2;
}

html[dir="ltr"] .art-tag-badge, body.lang-en .art-tag-badge {
  right: auto;
  left: 12px;
}

.art-count-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}

html[dir="ltr"] .art-count-badge, body.lang-en .art-count-badge {
  left: auto;
  right: 10px;
}

.art-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.art-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text-main);
  transition: color var(--transition-fast);
}

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

.art-excerpt {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 14px;
  flex: 1;
}

.art-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  font-size: 12px;
  color: var(--text-light);
  font-weight: 700;
}

.art-btn-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 800;
}

.art-stat-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.art-downloads-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-card-hover);
  color: #475569;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

[data-theme="dark"] .art-downloads-count {
  color: #cbd5e1;
}

.art-rating-stars {
  color: #b45309;
  font-weight: 800;
}

[data-theme="dark"] .art-rating-stars {
  color: #fbbf24;
}

/* Feature Spotlight / Special Card */
.special-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 34px 28px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.special-card-content {
  max-width: 650px;
}

.special-card h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.special-card p {
  color: #c7d2fe;
  font-size: 15px;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* Content Card */
.content-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.article-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.article-meta-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}

.article-meta-tags .tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.article-main-title {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 16px;
}

.article-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.article-featured-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

/* Quick Specs Box */
.specs-box {
  background: var(--gradient-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
}

.spec-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin: 24px 0 32px;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.gallery-img-wrap {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(90deg, #0e1526 25%, #18243c 50%, #0e1526 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite ease-in-out;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease-in, transform 0.4s ease;
}

.gallery-img.loaded {
  opacity: 1;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity var(--transition-fast);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.btn-icon-action {
  background: #ffffff;
  color: #0f172a;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-size: 18px;
  transition: transform var(--transition-fast);
}

.btn-icon-action:hover {
  transform: scale(1.15);
  color: var(--primary);
}

.gallery-actions {
  padding: 12px 14px;
  background: var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.btn-download-hd {
  background: var(--primary);
  color: #ffffff !important;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
  transition: background var(--transition-fast);
  font-family: inherit;
}

.btn-download-hd:hover {
  background: var(--primary-hover);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img-container {
  position: relative;
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: all 0.35s ease;
}

/* Phone Mockup Mode (Lock Screen Preview) */
.lightbox-img-container.in-phone-mode {
  width: 290px;
  height: 590px;
  max-height: 75vh;
  border-radius: 42px;
  border: 8px solid #0f172a;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(255,255,255,0.2);
  overflow: hidden;
  background: #000;
}

.lightbox-img-container.in-phone-mode .lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
  max-height: none;
}

/* Phone Mockup Overlay Details */
.phone-mockup-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 18px 16px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
  z-index: 10;
  font-family: var(--font-ar);
}

body.lang-en .phone-mockup-overlay {
  font-family: var(--font-en);
}

.lightbox-img-container.in-phone-mode .phone-mockup-overlay {
  display: flex;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  width: 100%;
  padding: 0 4px;
}

.phone-island {
  width: 76px;
  height: 20px;
  background: #000000;
  border-radius: 20px;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.phone-lock-center {
  text-align: center;
  margin-top: 10px;
}

.phone-lock-date {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.95;
  margin-bottom: 2px;
}

.phone-lock-clock {
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}

.phone-lock-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 4px;
}

.phone-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 1px solid rgba(255,255,255,0.25);
}

.phone-home-indicator {
  width: 110px;
  height: 4px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-preview-toggle {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-preview-toggle:hover,
.btn-preview-toggle.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-footer-btn {
  margin-top: 14px;
}

/* Social Share Bar */
.social-share-wrap {
  margin: 30px 0;
  padding: 18px 22px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.share-label {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-share {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.btn-share:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Related Wallpapers Section */
.related-wallpapers-wrap {
  margin: 36px 0 16px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}

.related-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 18px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.related-thumb-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: linear-gradient(90deg, #0e1526 25%, #18243c 50%, #0e1526 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s infinite ease-in-out;
}

.related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease-in, transform 0.4s ease;
}

.related-thumb.loaded {
  opacity: 1;
}
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-card:hover .related-thumb {
  transform: scale(1.08);
}

.related-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

html[dir="ltr"] .related-card-badge, body.lang-en .related-card-badge {
  right: auto;
  left: 8px;
}

.related-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.related-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0;
  transition: color var(--transition-fast);
}

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

.related-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* Editorial details shared by the newer wallpaper articles */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
}

.article-tags .tag {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
}

.article-text-body {
  margin: 30px 0;
  color: var(--text-main);
  line-height: 1.9;
}

.article-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.article-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: cover;
}

.article-brand p {
  margin: 0;
}

.article-brand span {
  color: var(--text-muted);
  font-size: 13px;
}

.share-box {
  margin: 30px 0;
  padding: 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: center;
}

.share-box h3 {
  margin: 0 0 8px;
  color: var(--text-main);
}

.share-box p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.btn-whatsapp:hover {
  background: #1fb95a;
  color: #fff;
  transform: translateY(-2px);
}

.related-articles-section {
  margin: 42px 0 24px;
}

.related-articles-section h2 {
  margin-bottom: 16px;
}

.related-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.related-cards-grid .related-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-cards-grid .related-card > span {
  display: block;
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-section {
  margin: 36px 0;
}

.faq-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-question {
  padding: 16px 20px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  user-select: none;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-toggle-icon {
  font-size: 18px;
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-xl);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
}

html[dir="ltr"] .toast-notice, body.lang-en .toast-notice {
  right: auto;
  left: 24px;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
   PWA Install Button
   ============================================================ */
.btn-pwa-install {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #ffffff !important;
  border: none !important;
  animation: pwa-pulse 2.5s infinite;
  font-weight: 800 !important;
}

.btn-pwa-install:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5) !important;
}

@keyframes pwa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50%       { box-shadow: 0 0 0 7px rgba(99, 102, 241, 0); }
}

/* PWA Install Banner (bottom sheet on mobile) */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--primary);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3000;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-banner.show {
  transform: translateY(0);
}

.pwa-banner-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
}

.pwa-banner-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 2px;
}

.pwa-banner-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.pwa-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-pwa-confirm {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.btn-pwa-confirm:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.btn-pwa-dismiss {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 9px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   Color Mood Filter Bar
   ============================================================ */
.color-moods-wrap {
  max-width: 1100px;
  margin: 0 auto 10px;
  padding: 0 20px;
}

.color-moods-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-dots-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.color-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 8px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  user-select: none;
}

.color-dot:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.color-dot.active {
  border-color: currentColor;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.1);
}

/* swatch colors */
.color-dot[data-color="all"]    .color-swatch { background: conic-gradient(red,yellow,lime,cyan,blue,magenta,red); }
.color-dot[data-color="dark"]   .color-swatch { background: #0d0d0d; border-color: rgba(255,255,255,0.2); }
.color-dot[data-color="blue"]   .color-swatch { background: linear-gradient(135deg,#1e40af,#0ea5e9); }
.color-dot[data-color="purple"] .color-swatch { background: linear-gradient(135deg,#7c3aed,#c026d3); }
.color-dot[data-color="green"]  .color-swatch { background: linear-gradient(135deg,#16a34a,#84cc16); }
.color-dot[data-color="pink"]   .color-swatch { background: linear-gradient(135deg,#ec4899,#f9a8d4); }
.color-dot[data-color="red"]    .color-swatch { background: linear-gradient(135deg,#dc2626,#f97316); }

/* Trending Keywords Tags Cloud */
.tags-cloud-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 16px auto 0;
  max-width: 880px;
  padding: 0 10px;
}

.tags-cloud-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  white-space: nowrap;
}

.tags-cloud-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
}

.tag-pill {
  appearance: none;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
}

.tag-pill:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.15);
}

.tag-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 12px rgba(225, 29, 72, 0.35);
  transform: translateY(-1px);
}

/* Quote Cards & Instant Copy Feature */
.quote-card {
  background: var(--bg-card-hover);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border-right: 4px solid var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

html[dir="ltr"] .quote-card, body.lang-en .quote-card {
  border-right: none;
  border-left: 4px solid var(--primary);
}

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

.quote-card.quote-accent {
  border-color: var(--accent);
}

.quote-text {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-main);
  margin: 0;
}

.quote-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.quote-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
}

.btn-copy-quote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-copy-quote:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.2);
}

.btn-copy-quote.copied {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}

/* Back to Top Floating Button */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition-normal);
}

html[dir="ltr"] .back-to-top-btn, body.lang-en .back-to-top-btn {
  left: auto;
  right: 24px;
}

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

.back-to-top-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35);
}

/* Newsletter / VIP Club Box */
.newsletter-club-wrap {
  margin: 36px auto 20px;
  max-width: 900px;
  background: linear-gradient(135deg, #0e1526 0%, #162035 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 38px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.newsletter-club-wrap::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  background: var(--primary);
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
}

.newsletter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(225, 29, 72, 0.15);
  color: var(--primary);
  border: 1px solid rgba(225, 29, 72, 0.3);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.newsletter-title {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-size: 14px;
  color: #cbd5e1;
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  border: 1px solid #334155;
  background: #090e1a;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.newsletter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.2);
}

.newsletter-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.newsletter-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
}

/* Modern Footer */
.site-footer {
  background: #090d16;
  color: #94a3b8;
  padding: 50px 20px 24px;
  font-size: 14px;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 36px;
}

.footer-col h3,
.footer-col h4 {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.footer-col h3::after,
.footer-col h4::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--primary);
  margin-top: 6px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #cbd5e1;
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.footer-brand p {
  line-height: 1.7;
  margin-top: 12px;
  color: #cbd5e1;
  max-width: 340px;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid #182238;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
}

.footer-bottom-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: #94a3b8;
}

.footer-bottom-links a:hover {
  color: #f8fafc;
}

/* Responsive */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 101;
  }
  .nav-links.open .nav-link {
    padding: 10px 12px;
  }
  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 26px;
  }
  .hero-banner {
    padding: 36px 18px;
  }
  .special-card {
    flex-direction: column;
    text-align: center;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .content-card {
    padding: 22px 16px;
  }
  .gallery-img-wrap {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 10px 12px;
    gap: 8px;
  }
  .site-logo {
    font-size: 20px;
  }
  .nav-actions {
    gap: 6px;
  }
  .btn-control {
    padding: 7px 10px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  .site-logo {
    font-size: 18px;
  }
  .nav-actions {
    gap: 4px;
  }
  .nav-actions .btn-control {
    padding: 5px 6px !important;
    font-size: 10px !important;
    white-space: nowrap;
  }
}

/* --- Viral Interactive Enhancements & Phone Mockup --- */
.btn-fav-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.25s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.lang-ar .btn-fav-heart {
  right: auto;
  left: 10px;
}

.btn-fav-heart:hover {
  transform: scale(1.18);
  background: rgba(225, 29, 72, 0.85);
}

.btn-fav-heart.is-fav {
  background: rgba(225, 29, 72, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  animation: heartPulse 0.4s ease-out;
}

@keyframes heartPulse {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.floating-fav-bar {
  position: fixed;
  bottom: 80px;
  left: 20px;
  z-index: 99;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(236, 72, 153, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

body.lang-ar .floating-fav-bar {
  left: auto;
  right: 20px;
}

.floating-fav-bar:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(236, 72, 153, 0.35);
}

.floating-fav-bar .fav-count {
  background: linear-gradient(135deg, #e11d48, #ec4899);
  color: #fff;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

/* Homepage refresh */
.home-page {
  --home-accent: #d946ef;
  --home-blue: #6366f1;
  background:
    radial-gradient(ellipse at 12% 18%, rgba(99, 102, 241, 0.065), transparent 30rem),
    var(--bg-primary);
}

.home-page .nav-container {
  max-width: 1360px;
  min-height: 72px;
}

.home-page .wrap {
  max-width: 1360px;
  padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 32px);
}

.home-page .top-header {
  background: color-mix(in srgb, var(--bg-glass) 90%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border-color) 76%, transparent);
}

.home-page .hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.82fr);
  grid-template-areas:
    "copy visual"
    "discovery discovery";
  align-items: center;
  gap: 26px clamp(28px, 5vw, 72px);
  min-height: 0;
  margin-bottom: clamp(26px, 4vw, 46px);
  padding: clamp(28px, 5vw, 60px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 32px;
  background:
    radial-gradient(ellipse at 78% 12%, rgba(168, 85, 247, 0.32), transparent 38%),
    radial-gradient(ellipse at 12% 85%, rgba(59, 130, 246, 0.27), transparent 36%),
    linear-gradient(130deg, #101426 0%, #171a36 52%, #25204a 100%);
  box-shadow: 0 28px 70px rgba(36, 31, 82, 0.2);
  text-align: start;
  isolation: isolate;
}

.home-page .hero-banner::before {
  inset: auto auto -190px -140px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.22), transparent 68%);
  animation: none;
}

.hero-copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.home-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 14px;
  border-color: rgba(196, 181, 253, 0.26);
  background: rgba(139, 92, 246, 0.16);
  color: #e9ddff;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.home-page .hero-title {
  max-width: 680px;
  margin-bottom: 16px;
  font-size: clamp(2.15rem, 3.4vw, 3rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.home-page .hero-desc {
  max-width: 590px;
  margin: 0 0 28px;
  color: #d5d8e8;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.85;
  opacity: 1;
}

.home-page .search-box-wrap {
  width: min(100%, 650px);
  max-width: none;
  margin: 0;
}

.home-page .search-bar {
  min-height: 66px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 19px;
  box-shadow: 0 14px 34px rgba(3, 7, 18, 0.28);
}

.home-page .search-input {
  min-width: 0;
  padding-inline: 16px;
}

.home-page .search-input:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: -2px;
  border-radius: 12px;
}

.home-page .search-btn,
.home-page .random-btn {
  min-height: 48px;
  padding-inline: 18px;
  border-radius: 14px;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.home-page .search-btn {
  background: #171a31;
}

.home-page .search-btn:hover {
  background: #30345c;
}

.home-page .random-btn {
  margin-inline-start: 4px;
  background: linear-gradient(135deg, #9333ea, #6366f1);
}

.home-page .hero-showcase {
  grid-area: visual;
  position: relative;
  min-width: 0;
  min-height: 370px;
  aspect-ratio: 1.08;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  background: #222442;
  box-shadow: 0 24px 55px rgba(4, 6, 20, 0.34);
  isolation: isolate;
}

.hero-showcase-image,
.hero-showcase-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.hero-showcase-image {
  z-index: -2;
  object-fit: cover;
  object-position: center 36%;
}

.hero-showcase-shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 12, 27, 0.12) 36%, rgba(10, 12, 27, 0.84) 100%),
    linear-gradient(135deg, rgba(99, 102, 241, 0.18), transparent 55%);
}

.hero-showcase-top {
  position: absolute;
  inset: 16px 16px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-showcase-top strong {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.3);
  font-size: 12px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
}

.hero-showcase-caption {
  position: absolute;
  inset: auto 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-showcase-caption span {
  color: #ddd6fe;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hero-showcase-caption strong {
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.4;
}

.hero-showcase-float {
  position: absolute;
  inset-block-start: 48%;
  inset-inline-start: -34px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(240px, 72%);
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.94);
  color: #182035;
  box-shadow: 0 16px 38px rgba(5, 8, 24, 0.24);
  transform: translateY(-50%);
}

.hero-showcase-float img {
  width: 48px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.hero-showcase-float span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.hero-showcase-float strong {
  font-size: 12px;
}

.hero-showcase-float small {
  color: #64748b;
  font-size: 10px;
}

.hero-discovery {
  grid-area: discovery;
  min-width: 0;
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.home-page .tags-cloud-wrap {
  justify-content: flex-start;
  gap: 10px 14px;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.home-page .tags-cloud-title {
  color: #d9d7e9;
}

.home-page .tags-cloud-list {
  min-width: 0;
  flex: 1 1 0;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-color: rgba(226, 232, 240, 0.35) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.home-page .tag-pill {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #f0effa;
  box-shadow: none;
}

.home-page .tag-pill:hover,
.home-page .tag-pill:focus-visible {
  border-color: rgba(196, 181, 253, 0.64);
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
}

.home-page .hero-stats {
  justify-content: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: #e5e7f2;
  font-size: 12px;
}

.home-page .stat-item {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
}

.home-page .ad-slot-container {
  margin: 0 0 30px;
}

.home-page .ad-slot {
  border-width: 1px;
  border-style: solid;
  border-radius: 18px;
}

.home-page .color-moods-wrap {
  padding: 15px 18px;
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

.home-page .color-dot,
.home-page .cat-tab {
  min-height: 40px;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.home-page .category-filter-wrap {
  margin: 16px 0 8px;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.home-page .category-tabs {
  width: max-content;
  min-width: 100%;
}

.home-page .cat-tab {
  padding-inline: 16px;
}

.home-page .section-head {
  align-items: end;
  margin: 30px 0 20px;
}

.home-page .section-title {
  font-size: clamp(20px, 2.2vw, 27px);
  letter-spacing: -0.025em;
}

.home-page .section-subtitle {
  margin-top: 5px;
}

.home-page .articles-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 275px), 1fr));
  gap: 22px;
}

.home-page .art-card {
  border-radius: 20px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.055);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.home-page .art-card > a {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.home-page .art-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.48);
  box-shadow: 0 18px 36px rgba(47, 42, 97, 0.14);
}

.home-page .art-thumb-wrap {
  height: auto;
  aspect-ratio: 1.62;
  animation: none;
}

.home-page .art-thumb {
  opacity: 1;
}

.home-page .art-content {
  padding: 17px 18px 18px;
}

.home-page .art-title {
  font-size: 16px;
}

.home-page .art-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-page :is(a, button, input, select):focus-visible {
  outline: 3px solid #8b5cf6;
  outline-offset: 3px;
}

html[lang="ar"] body,
body.lang-ar {
  font-family: var(--font-ar);
}

@media (max-width: 900px) {
  .home-page .hero-banner {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.78fr);
    gap: 24px 34px;
    padding: 34px;
  }

  .home-page .hero-showcase {
    min-height: 320px;
    aspect-ratio: 1.02;
  }

  .home-page .hero-showcase-float {
    inset-inline-start: -20px;
  }
}

@media (max-width: 680px) {
  .home-page .wrap {
    padding: 16px 14px 28px;
  }

  .home-page .hero-banner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "visual"
      "copy"
      "discovery";
    gap: 24px;
    padding: 18px;
    border-radius: 25px;
  }

  .home-page .hero-showcase {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1.72;
    border-radius: 19px;
  }

  .hero-showcase-float {
    inset-inline-start: 10px;
    inset-block-start: auto;
    inset-block-end: 14px;
    width: auto;
    max-width: 68%;
    padding: 6px;
    border-radius: 13px;
    transform: none;
  }

  .hero-showcase-float img {
    width: 38px;
    height: 45px;
    border-radius: 8px;
  }

  .hero-showcase-float strong {
    font-size: 11px;
  }

  .hero-showcase-float small {
    font-size: 9px;
  }

  .hero-showcase-caption {
    inset-inline: 14px;
    inset-block-end: 16px;
    max-width: 72%;
  }

  .hero-showcase-caption strong {
    font-size: 16px;
  }

  .hero-showcase-caption span {
    font-size: 9px;
  }

  .home-page .hero-copy {
    text-align: center;
  }

  .home-page .hero-badge {
    margin-bottom: 15px;
    font-size: 11px;
  }

  .home-page .hero-title {
    margin-bottom: 11px;
    font-size: clamp(1.9rem, 7.5vw, 2.45rem);
  }

  .home-page .hero-desc {
    margin: 0 auto 16px;
    font-size: 13px;
    line-height: 1.7;
  }

  .home-page .search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
    border-radius: 17px;
  }

  .home-page .search-input {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    padding-inline: 11px;
    font-size: 14px;
  }

  .home-page .search-btn,
  .home-page .random-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding-inline: 8px;
    border-radius: 12px;
    font-size: 13px;
  }

  .home-page .hero-discovery {
    padding-top: 17px;
  }

  .home-page .tags-cloud-wrap {
    display: block;
  }

  .home-page .tags-cloud-title {
    display: block;
    margin-bottom: 6px;
  }

  .home-page .tags-cloud-list {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 1px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-page .tags-cloud-list::-webkit-scrollbar {
    display: none;
  }

  .home-page .tag-pill {
    flex: 0 0 auto;
    min-height: 36px;
    font-size: 11px;
  }

  .home-page .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
    font-size: 9px;
  }

  .home-page .stat-item {
    justify-content: center;
    min-height: 33px;
    padding: 5px 7px;
    text-align: center;
  }

  .home-page .stat-item:last-child {
    grid-column: 1 / -1;
  }

  .home-page .color-moods-wrap {
    padding: 13px;
    border-radius: 16px;
  }

  .home-page .color-dots-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-page .color-dots-list::-webkit-scrollbar {
    display: none;
  }

  .home-page .color-dot {
    flex: 0 0 auto;
    min-height: 37px;
  }

  .home-page .section-head {
    align-items: stretch;
    gap: 10px;
    margin: 24px 0 15px;
  }

  .home-page .section-head > div:first-child {
    width: 100%;
  }

  .home-page .sort-bar-wrap {
    margin-top: 0;
  }

  .home-page .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .home-page .art-card {
    border-radius: 15px;
  }

  .home-page .art-thumb-wrap {
    aspect-ratio: 0.94;
  }

  .home-page .art-tag-badge {
    inset-block-start: 8px;
    inset-inline-start: 8px;
    inset-inline-end: auto;
    max-width: calc(100% - 16px);
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-page .art-count-badge {
    inset-block-end: 7px;
    inset-inline-start: 7px;
    inset-inline-end: auto;
    max-width: calc(100% - 14px);
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-page .art-content {
    padding: 11px 11px 12px;
  }

  .home-page .art-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.8em;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .home-page .art-excerpt {
    margin-bottom: 9px;
    font-size: 11px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
  }

  .home-page .art-footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding-top: 9px;
    font-size: 10px;
  }

  .home-page .art-stat-meta {
    gap: 5px;
    font-size: 10px;
  }

  .home-page .ad-slot {
    padding: 16px 12px;
  }

  body:not(.home-page) .wrap {
    padding: 16px 12px 28px;
  }

  .article-content {
    padding: 20px 14px;
    border-radius: 18px;
  }

  .article-title {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .article-meta {
    gap: 6px 10px;
    padding: 10px;
    font-size: 11px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 26px;
  }

  .gallery-item {
    min-width: 0;
    border-radius: 13px;
  }

  .gallery-img-wrap {
    height: auto;
    aspect-ratio: 0.78;
  }

  .gallery-actions {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 9px;
  }

  .gallery-actions > span {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px !important;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .btn-download-hd {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .home-page .articles-grid {
    gap: 9px;
  }

  .home-page .art-content {
    padding: 9px;
  }

  .home-page .art-title {
    font-size: 12px;
  }

  .home-page .hero-banner {
    padding: 14px;
  }

  .home-page .hero-showcase {
    aspect-ratio: 1.3;
  }
}

/* Shared article and wallpaper browsing experience */
body:not(.home-page) .wrap {
  max-width: 1160px;
  padding: clamp(18px, 3vw, 34px) clamp(14px, 3vw, 28px);
}

.top-header {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.045);
}

.nav-link {
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:focus-visible,
.btn-control:focus-visible,
.mobile-toggle:focus-visible,
.gallery-actions a:focus-visible,
.breadcrumb a:focus-visible {
  outline: 3px solid #8b5cf6;
  outline-offset: 3px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: auto;
  margin: 4px 0 18px;
  padding: 11px 15px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  scrollbar-width: thin;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.breadcrumb .separator {
  color: var(--text-light);
}

.article-content {
  max-width: 1050px;
  margin: 0 auto 34px;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.055);
}

.article-title {
  margin: 0 0 17px;
  color: var(--text-main);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 24px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.article-intro {
  max-width: 860px;
  margin: 0 auto 26px;
  color: var(--text-muted);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.9;
}

.article-intro p + p {
  margin-top: 12px;
}

.article-content > h2,
.article-content > h3 {
  margin: 34px 0 14px;
  color: var(--text-main);
  font-weight: 900;
  line-height: 1.4;
  text-wrap: balance;
}

.article-content > h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
}

.article-content > h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
}

.gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: 17px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
}

.gallery-item:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.48);
  box-shadow: 0 14px 28px rgba(47, 42, 97, 0.12);
}

.gallery-actions {
  min-height: 64px;
  padding: 11px;
}

.gallery-actions > span {
  line-height: 1.45;
}

.btn-download-hd {
  min-height: 40px;
  border-radius: 12px;
}

.content-card {
  border-radius: 22px;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.055);
}

.article-featured-image {
  border-radius: 18px;
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

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

/* Modern Card Pagination Controller */
.card-hidden-page {
  display: none !important;
}

.btn-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(225, 29, 72, 0.45) !important;
}

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

/* ==========================================================================
   2026 UI/UX MODERNIZATION ADDONS: WallPixora Mobile App & Luxury Experience
   ========================================================================== */

/* 1. Card Hover Glow & Micro-Interactions */
.art-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease !important;
}

.art-card:hover {
  transform: translateY(-6px) scale(1.01) !important;
  box-shadow: 0 20px 40px -10px rgba(225, 29, 72, 0.2), 0 10px 20px -8px rgba(139, 92, 246, 0.15) !important;
  border-color: rgba(225, 29, 72, 0.45) !important;
}

/* Pulsing Badge for Trending & New Collections */
@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.art-tag-badge {
  animation: pulse-badge 2.8s infinite ease-in-out;
}

/* 2. Download Full ZIP Pack Button (In Article Pages) */
.btn-download-pack-wrap {
  display: flex;
  justify-content: center;
  margin: 20px auto 26px;
  width: 100%;
}

.btn-download-pack {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #78350f 100%);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  max-width: 100%;
}

.btn-download-pack:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.55);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #92400e 100%);
}

.btn-download-pack-dark {
  background: linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%);
  box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
}

.btn-download-pack-dark:hover {
  box-shadow: 0 10px 30px rgba(51, 65, 85, 0.6);
  background: linear-gradient(135deg, #64748b 0%, #475569 50%, #334155 100%);
}

/* 3. Floating Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 85px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e11d48, #8b5cf6);
  color: #ffffff;
  border: none;
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.back-to-top-btn:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 25px rgba(225, 29, 72, 0.5);
}

/* 4. Floating Mobile App Bottom Bar (Glassmorphism) */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(15, 23, 42, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.45);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
  }

  [data-theme="light"] .mobile-bottom-bar {
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.09);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: 12px;
    color: var(--text-muted, #94a3b8);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-height: 46px;
  }

  .bottom-nav-item .nav-icon {
    font-size: 20px;
    line-height: 1.1;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
  }

  .bottom-nav-item:hover .nav-icon,
  .bottom-nav-item.active .nav-icon {
    transform: translateY(-2px) scale(1.15);
  }

  .bottom-nav-item.active {
    color: var(--primary, #e11d48);
  }

  /* Prevent bottom bar overlap on mobile */
  body {
    padding-bottom: 74px;
  }

  #adsterraStickyBar {
    bottom: 62px !important;
  }

  .back-to-top-btn {
    bottom: 75px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
}

/* ==========================================================================
   2026 ADVANCED UI/UX: Hot Drops Shelf, OS Switcher & Next Pack Teaser
   ========================================================================== */

/* --- 1. Hot Drops Horizontal Shelf --- */
.hot-drops-section {
  margin: 24px 0 28px;
  width: 100%;
}

.shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.shelf-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shelf-icon {
  font-size: 22px;
}

.shelf-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.shelf-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--gradient-main, linear-gradient(135deg, #e11d48, #8b5cf6));
  color: #fff;
  letter-spacing: 0.5px;
}

.shelf-arrows {
  display: flex;
  gap: 8px;
}

.btn-shelf-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-shelf-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.shelf-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 4px 14px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.shelf-track::-webkit-scrollbar {
  height: 6px;
}

.shelf-track::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.shelf-item {
  flex: 0 0 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.shelf-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.shelf-item-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.shelf-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.shelf-item:hover .shelf-item-thumb img {
  transform: scale(1.06);
}

.shelf-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.shelf-stat {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fde047;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.shelf-item-info {
  padding: 10px 12px;
}

.shelf-item-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 3px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shelf-item-info p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* --- 2. Lightbox OS Switcher (iOS vs Android) --- */
.mockup-os-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-os-switch {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-os-switch.active {
  background: var(--primary, #e11d48);
  border-color: var(--primary, #e11d48);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

/* Android Mode Transformations */
.in-phone-mode.mode-android .phone-island {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  background: #000 !important;
}

.in-phone-mode.mode-android .phone-lock-clock {
  font-family: "Roboto", -apple-system, sans-serif !important;
  font-weight: 300 !important;
  font-size: 48px !important;
  letter-spacing: -1px !important;
}

.in-phone-mode.mode-android .phone-lock-date {
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* --- 3. Next Pack Sticky Teaser (Article End Discovery Loop) --- */
.next-pack-teaser {
  position: fixed;
  bottom: 80px;
  left: 20px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 8px 14px 8px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 9997;
  max-width: 320px;
  transform: translateY(100px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.next-pack-teaser.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.next-pack-teaser:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 14px 35px rgba(225, 29, 72, 0.35);
}

.teaser-thumb {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.teaser-text {
  display: flex;
  flex-direction: column;
}

.teaser-label {
  font-size: 10px;
  font-weight: 800;
  color: #fb7185;
  letter-spacing: 0.5px;
}

.teaser-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .next-pack-teaser {
    bottom: 74px;
    left: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
  }
}


/* ==========================================================================
   4KWALLPAPERS DESIGN SYSTEM (GRAPHITE SLATE & ELECTRIC NEON LIME)
   ========================================================================== */

/* Brand Logo (4K Wallpapers Style) */
.site-logo-4k {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--font-en), -apple-system, sans-serif;
  font-weight: 900;
  user-select: none;
}

.logo-badge-neon {
  color: #9afb22;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-shadow: 0 0 16px rgba(154, 251, 34, 0.45);
}

.logo-text-white {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Header Container Adjustments */
.top-header {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1440px !important;
  width: 100%;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
}

/* Center Search Bar */
.header-search-wrap {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
}

.header-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: #191c22;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  transition: all var(--transition-fast);
}

.header-search-box:focus-within {
  border-color: #9afb22;
  box-shadow: 0 0 0 3px rgba(154, 251, 34, 0.18);
  background: #14171c;
}

.header-search-input {
  width: 100%;
  padding: 9px 42px 9px 18px;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
}

.header-search-input::placeholder {
  color: #7b8290;
}

.header-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8b92a0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.header-search-btn:hover {
  color: #9afb22;
}

/* Categories Mega Button */
.btn-categories-4k {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #2b2f38;
  color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-categories-4k:hover,
.btn-categories-4k[aria-expanded="true"] {
  background: #363b46;
  border-color: #9afb22;
  color: #ffffff;
}

.btn-categories-4k .cat-icon {
  display: flex;
  align-items: center;
}

/* Mega Categories Dropdown Flyout */
.categories-mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 24px;
  width: 440px;
  max-width: calc(100vw - 32px);
  background: #20242b;
  border: 1px solid #363a44;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 16px;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.categories-mega-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.mega-menu-inner::-webkit-scrollbar {
  width: 5px;
}
.mega-menu-inner::-webkit-scrollbar-thumb {
  background: #3a3f4c;
  border-radius: 4px;
}

.mega-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: #cfd4dc;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mega-item:hover,
.mega-item.active {
  background: #2a2f3a;
  color: #9afb22;
  transform: translateX(3px);
}

.mega-item .arrow {
  color: #69707e;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.mega-item:hover .arrow {
  color: #9afb22;
}

/* Sub-Navigation Pill Bar */
.subnav-pill-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 20px 10px;
  background: transparent;
}

.subnav-pill-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b1e25;
  border: 1px solid var(--border-color);
  padding: 5px;
  border-radius: 9999px;
  overflow-x: auto;
  max-width: 100%;
}

.nav-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  background: transparent;
  color: #9ea3ae;
  border: none;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.nav-pill:hover {
  color: #ffffff;
  background: #262a34;
}

.nav-pill.active {
  background: #282c37;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.pill-indicator {
  display: none;
  width: 3px;
  height: 14px;
  background: #9afb22;
  border-radius: 2px;
  margin-right: -2px;
}

.nav-pill.active .pill-indicator {
  display: inline-block;
}

/* Horizontal Trending Chips Scroller */
.trending-chips-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 6px auto 22px;
  padding: 0 24px;
}

.trending-chips-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.84rem;
}

.trending-label {
  color: #727986;
  font-weight: 600;
  margin-right: 4px;
}

.chip-item {
  background: none;
  border: none;
  color: #a4abb8;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chip-item:hover {
  color: #9afb22;
  background: rgba(154, 251, 34, 0.08);
}

.chip-item.highlight {
  color: #ffcc00;
}

.chip-badge {
  color: #ff3366;
  font-weight: 900;
  margin-left: 2px;
}

.chip-sep {
  color: #434855;
  user-select: none;
}

/* Section Header (4K Wallpapers Style) */
.section-head-4k {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 18px auto 20px;
  padding: 0 24px;
}

.section-title-wrap-4k {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vertical-green-bar {
  display: inline-block;
  width: 4px;
  height: 22px;
  background: #9afb22;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(154, 251, 34, 0.6);
}

.section-title-4k {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 0;
}

/* Modern 4K Wallpapers Card Styling */
.articles-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
  gap: 22px !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  padding: 0 24px 60px !important;
}

.art-card {
  background: #1d2027 !important;
  border: 1px solid #2e333d !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
  display: flex !important;
  flex-direction: column !important;
}

.art-card:hover {
  transform: translateY(-5px) !important;
  border-color: rgba(154, 251, 34, 0.45) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(154, 251, 34, 0.12) !important;
}

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

.art-thumb-wrap {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 16 / 9.5 !important;
  overflow: hidden !important;
  background: #14171d !important;
}

.art-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.art-card:hover .art-thumb {
  transform: scale(1.035) !important;
}

.art-tag-badge {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  background: rgba(20, 23, 30, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  color: #9afb22 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(154, 251, 34, 0.25) !important;
  letter-spacing: 0.3px !important;
}

.art-count-badge {
  position: absolute !important;
  bottom: 10px !important;
  right: 10px !important;
  background: rgba(15, 18, 24, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.art-content {
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: #1d2027 !important;
  flex: 1 !important;
}

.art-title {
  color: #e5e8ee !important;
  font-size: 0.94rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  transition: color var(--transition-fast) !important;
}

.art-card:hover .art-title {
  color: #9afb22 !important;
}

.art-excerpt {
  color: #8c93a1 !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.art-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  color: #69707e !important;
  font-size: 0.75rem !important;
  margin-top: auto !important;
  padding-top: 8px !important;
  border-top: 1px solid #282c35 !important;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .header-search-wrap {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
  }
  .nav-container {
    flex-wrap: wrap;
    padding: 10px 16px;
  }
  .categories-mega-menu {
    right: 16px;
    width: calc(100vw - 32px);
  }
}

@media (max-width: 600px) {
  .mega-menu-inner {
    grid-template-columns: 1fr;
  }
  .articles-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px 40px !important;
  }
  .subnav-pill-container {
    padding: 3px;
  }
  .nav-pill {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
