/* ===================================================================
   OFFICE.INFO.PL — Main Stylesheet
   Business-class, modern, clean design
   =================================================================== */

/* --- VARIABLES --- */
:root {
  /* Category colors */
  --excel: #217346;
  --excel-light: #e8f5ec;
  --word: #2b579a;
  --word-light: #e8eef7;
  --ppt: #d24726;
  --ppt-light: #fdeee8;
  --purple: #5B2D8E;
  --purple-light: #f0e8f7;

  /* Neutrals */
  --bg: #f8f9fb;
  --bg-alt: #f1f3f6;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8b8da3;
  --border: #e2e4ea;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;

  /* Typography */
  --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --section-py: 4rem;
  --container-max: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--word); }

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

ul, ol { list-style: none; }

/* --- UTILITIES --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-py) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--ai {
  background: linear-gradient(135deg, var(--purple-light), var(--word-light));
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--purple);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--purple);
  color: var(--white);
}
.btn:hover {
  background: #4a2375;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn--outline {
  background: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn--outline:hover {
  background: var(--purple);
  color: var(--white);
}

/* --- PAGE WRAPPER --- max-width for content, menu stays full */
.site-content {
  max-width: var(--container-max);
  margin: 0 auto;
}

/* --- HEADER --- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  height: 35px;
  width: auto;
}

.logo-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  transition: opacity 0.2s;
}
.logo:hover .logo-name { opacity: 0.7; }

.logo-dot {
  color: var(--purple);
  font-weight: 900;
}

/* Legacy logo fallback — kept for reference */
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1.1rem;
}

.logo-dot { color: var(--purple); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-link:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.nav-link.active {
  color: var(--purple);
  font-weight: 600;
}

.nav-excel:hover, .nav-excel.active { color: var(--excel); }
.nav-word:hover, .nav-word.active { color: var(--word); }
.nav-ppt:hover, .nav-ppt.active { color: var(--ppt); }
.nav-office:hover, .nav-office.active { color: var(--purple); }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Nav favorites badge */
.nav-fav {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.6rem !important;
}
.nav-fav svg {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  transition: color 0.2s;
}
.nav-fav:hover svg { color: #e74c3c; }
.nav-fav.active svg { color: #e74c3c; }

.nav-fav-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  display: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.nav-fav-badge.visible { display: block; }

/* --- HERO --- */
.hero {
  position: relative;
  overflow: visible;
  background: url('/images/baner.png') center / cover no-repeat;
  background-color: #1a1a2e;
  /* Full width — breaks out of site-content */
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.hero-banner {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  /* Aspect ratio: 316/1080 = 29.26% */
  padding-bottom: min(29.26%, 316px);
}

.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
}

.hero-text {
  max-width: 620px;
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(0.8rem, 2vw, 1.25rem) clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--radius);
}

.hero h1 {
  font-size: clamp(1rem, 2.2vw, 1.75rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0;
  letter-spacing: -0.3px;
  line-height: 1.25;
  text-align: left;
}

.hero h1 + h1 {
  margin-bottom: clamp(0.3rem, 0.8vw, 0.5rem);
}

.hero-subtitle {
  font-size: clamp(0.65rem, 1.1vw, 0.85rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: clamp(0.4rem, 1vw, 0.75rem);
  line-height: 1.5;
  text-align: left;
}

.search-box--hero {
  margin: 0;
}

.search-box--hero input {
  font-size: clamp(0.8rem, 1vw, 1rem);
  padding: clamp(0.5rem, 1vw, 1rem) 3.5rem clamp(0.5rem, 1vw, 1rem) 1rem;
}

@media (max-width: 600px) {
  .hero-text { max-width: 90%; }
}

@media (max-width: 480px) {
  .hero-text { max-width: 70%; }
}

/* --- SEARCH BOX --- */
.search-box {
  position: relative;
  max-width: 600px;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.2s;
  outline: none;
}

.search-box input:focus {
  border-color: var(--purple);
  box-shadow: 0 4px 20px rgba(91,45,142,0.2);
}

.search-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: color 0.2s;
}
.search-btn:hover { color: var(--purple); }

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  max-height: 420px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  border: 1px solid var(--border);
}

.search-box--hero {
  position: relative;
  z-index: 90;
}

.search-dropdown.visible { display: block; }

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--bg-alt); }

.search-result-img {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.search-result-icon {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.search-result-type {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.search-result-cat {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}


.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- CATEGORIES GRID (tiles) --- */
/* Layout: gap - tile - gap - tile - gap - tile - gap
   3 tiles + 4 gaps. Tiles are auto-sized from images.
   justify-content: space-evenly handles even spacing. */
.categories-grid {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem 0;
}

.category-tile {
  position: relative;
  display: inline-block;
  transition: transform 0.25s, box-shadow 0.25s;
  border-radius: var(--radius);
  overflow: hidden;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-tile-img {
  display: block;
  height: auto;
  max-width: 100%;
  border-radius: var(--radius);
}

.category-tile-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  display: none;
}
.category-tile-badge.visible { display: block; }

@media (max-width: 600px) {
  .categories-grid { flex-direction: column; align-items: center; }
  .category-tile { width: 70%; max-width: 260px; }
}

/* --- ARTICLES GRID --- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.article-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg-alt);
}

.article-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.article-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-card-difficulty {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-card-difficulty--easy {
  background: #e8f5ec;
  color: #217346;
}
.article-card-difficulty--medium {
  background: #fef3c7;
  color: #92400e;
}
.article-card-difficulty--hard {
  background: #fdeee8;
  color: #d24726;
}
.diff-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.diff-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.diff-dot--on { background: currentColor; }
.diff-dot--off { background: currentColor; opacity: 0.2; }

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.article-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--purple);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.article-card-tag:hover {
  background: var(--purple);
  color: #fff;
}

.article-card-category--excel { color: var(--excel); }
.article-card-category--word { color: var(--word); }
.article-card-category--powerpoint { color: var(--ppt); }
.article-card-category--office { color: var(--purple); }

.article-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.article-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.article-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-card-fav {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 4px;
}
.article-card-fav:hover,
.article-card-fav.active {
  color: #e74c3c;
}
.article-card-fav.active svg { fill: #e74c3c; }

/* --- PAGE HEADER --- */
.page-header {
  padding: 2.25rem 0 1.75rem;
  background: linear-gradient(135deg, #1a1a2e, #2b1a4e);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.page-header .container:not(.page-header-flex) {
  padding-left: 50%;
}

.page-header-flex {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.page-header-icon {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  animation: headerFadeIn 0.6s ease-out both;
}

.page-header-stats {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
  animation: headerFadeIn 0.8s ease-out 0.3s both;
}

.page-header-stat {
  text-align: center;
}

.page-header-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.page-header-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

/* Decorative circles */
.page-header--tips::before,
.page-header--blog::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  top: -60px;
  right: 10%;
  pointer-events: none;
}

.page-header--tips::after,
.page-header--blog::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  bottom: -30px;
  right: 25%;
  pointer-events: none;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  text-shadow: 2px 3px 6px rgba(0,0,0,0.7), 1px 1px 2px rgba(0,0,0,0.5);
  animation: headerFadeIn 0.8s ease-out both;
}

.page-header p {
  color: rgba(255,255,255,0.9);
  margin-top: 0.5rem;
  font-size: 1.05rem;
  max-width: 500px;
  text-shadow: 2px 3px 5px rgba(0,0,0,0.7), 1px 1px 2px rgba(0,0,0,0.4);
  animation: headerFadeIn 0.8s ease-out 0.2s both;
}

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

.page-header--excel {
  background: linear-gradient(to right, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.12) 40%, rgba(0,0,0,0.40) 100%), url('/images/baner-produkt-excel.jpg') center/cover no-repeat;
}
.page-header--word {
  background: linear-gradient(to right, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.12) 40%, rgba(0,0,0,0.40) 100%), url('/images/baner-produkt-word.jpg') center/cover no-repeat;
}
.page-header--powerpoint {
  background: linear-gradient(to right, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.12) 40%, rgba(0,0,0,0.40) 100%), url('/images/baner-produkt-powerpoint.jpg') center/cover no-repeat;
}
.page-header--office { background: linear-gradient(135deg, #1a1a2e, var(--purple)); }

/* --- FILTER BAR --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.filter-bar .search-box {
  flex: 1;
  min-width: 250px;
}

.filter-bar .search-box input {
  box-shadow: var(--shadow);
  padding: 0.85rem 3rem 0.85rem 1rem;
}

.tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tag-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.tag-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.tag-btn.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

/* --- PAGINATION --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.page-btn:hover { border-color: var(--purple); color: var(--purple); }
.page-btn.active { background: var(--purple); color: var(--white); border-color: var(--purple); }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* --- ARTICLE PAGE --- */
.article-hero {
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #1a1a2e, #2b1a4e);
  overflow: hidden;
}
.article-hero--excel { background: linear-gradient(135deg, #1a3a2a, #217346); }
.article-hero--word { background: linear-gradient(135deg, #1a2a4a, #2b579a); }
.article-hero--powerpoint { background: linear-gradient(135deg, #3a1a10, #d24726); }
.article-hero--office { background: linear-gradient(135deg, #1a1a2e, #5B2D8E); }

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  z-index: 1;
}

.article-hero-content {
  position: relative;
  z-index: 2;
  padding: 1rem 0;
  color: var(--white);
}

.article-category-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}
.article-category-badge--excel { background: var(--excel); }
.article-category-badge--word { background: var(--word); }
.article-category-badge--powerpoint { background: var(--ppt); }
.article-category-badge--office { background: var(--purple); }

.article-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  max-width: 700px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.favorite-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s;
}
.favorite-btn:hover { color: #e74c3c; }
.favorite-btn.active { color: #e74c3c; }
.favorite-btn.active svg { fill: #e74c3c; }

/* Article layout */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  align-items: start;
}

.article-toc {
  position: sticky;
  top: 80px;
}

.article-toc h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-toc a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  transition: all 0.2s;
}

.article-toc a:hover,
.article-toc a.active {
  color: var(--purple);
  border-color: var(--purple);
}

/* Article content typography */
.article-content {
  max-width: 720px;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--text);
  scroll-margin-top: 80px;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.article-content ul, .article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content ol.article-steps { list-style: none; padding-left: 0; }

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.article-content pre {
  position: relative;
  background: #1a1a2e;
  color: #e8e8e8;
  padding: 1.25rem;
  padding-right: 5rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.article-content th, .article-content td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.article-content th {
  background: var(--bg-alt);
  font-weight: 600;
}

.article-content strong { color: var(--text); }

/* Difficulty badge in article hero */
.article-difficulty {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-difficulty--easy { background: rgba(33, 115, 70, 0.25); color: #a7f3d0; }
.article-difficulty--medium { background: rgba(234, 179, 8, 0.25); color: #fef08a; }
.article-difficulty--hard { background: rgba(210, 71, 38, 0.25); color: #fca5a5; }

/* Code copy button */
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Article sidebar */
.article-sidebar {
  display: none;
}

@media (min-width: 1100px) {
  .article-sidebar {
    display: block;
    position: sticky;
    top: 80px;
    align-self: start;
  }
  .article-layout {
    grid-template-columns: 220px 1fr 220px;
  }
}

.sidebar-widget {
  background: var(--bg-alt, #f8f8fc);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.sidebar-widget + .sidebar-widget {
  margin-top: 1rem;
}

.sidebar-widget h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted, #888);
  margin-bottom: 0.75rem;
}

.sidebar-info {
  list-style: none;
  padding: 0;
}

.sidebar-info li {
  padding: 0.4rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border, #eee);
  color: var(--text-secondary);
}

.sidebar-info li:last-child {
  border-bottom: none;
}

.sidebar-info strong {
  color: var(--text);
}

/* Sidebar category badge */
.sidebar-category-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.sidebar-category-badge--excel { background: var(--excel, #217346); }
.sidebar-category-badge--word { background: var(--word, #2b579a); }
.sidebar-category-badge--powerpoint { background: var(--ppt, #d24726); }
.sidebar-category-badge--office { background: var(--purple, #5B2D8E); }

/* Sidebar difficulty dots */
.sidebar-dots {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}
.sidebar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border, #ddd);
  display: inline-block;
}
.sidebar-dots--easy .sidebar-dot--active { background: #217346; }
.sidebar-dots--medium .sidebar-dot--active { background: #eab308; }
.sidebar-dots--hard .sidebar-dot--active { background: #d24726; }

/* Sidebar flag */
.sidebar-flag {
  font-size: 1.1rem;
  vertical-align: middle;
}

.sidebar-widget--see-also h3 {
  margin-bottom: 0.35rem;
}

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

.sidebar-related-item {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border, #eee);
}

.sidebar-related-item:first-child {
  padding-top: 0.2rem;
}

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

.sidebar-related-type {
  display: inline-block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-weight: 700;
}

.sidebar-related-type--article { background: #e3f0e8; color: #217346; }
.sidebar-related-type--tip { background: #fff3e0; color: #e65100; }
.sidebar-related-type--blog { background: #e8eaf6; color: #283593; }

.sidebar-related-diff-row {
  text-align: right;
  margin-top: 0.15rem;
}

.sidebar-related-diff {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.sidebar-related-diff--easy { color: #217346; }
.sidebar-related-diff--medium { color: #b45309; }
.sidebar-related-diff--hard { color: #d24726; }

.sidebar-related-link {
  display: block;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}

.sidebar-related-link:hover {
  color: var(--primary, #4f46e5);
}

/* Article images */
.article-figure {
  margin: 1.5rem 0;
  padding: 0;
  width: 100%;
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: block;
}

.article-figure img:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

.article-img-zoom {
  position: relative;
  display: block;
  cursor: zoom-in;
  text-decoration: none;
}

.zoom-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: var(--text);
}

.article-img-zoom:hover .zoom-icon {
  opacity: 1;
}

.article-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  text-align: center;
  font-style: italic;
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Inline code (not in pre) */
.article-content > p code,
.article-content > li code,
.article-content > blockquote code {
  background: var(--bg-alt, #f0f0f5);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--primary, #5B2D8E);
}

/* Blockquote tips/warnings */
.article-content blockquote {
  border-left: 4px solid var(--primary, #5B2D8E);
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--bg-alt, #f8f8fc);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

/* Article sections from AI-generated content */
.article-section {
  margin-bottom: 1.5rem;
}

.article-section.article-summary {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border, #eee);
}

.article-steps {
  counter-reset: step;
  padding-left: 0;
  list-style: none;
}

.article-steps li {
  counter-increment: step;
  padding: 0.75rem 0 0.75rem 2.5rem;
  position: relative;
  border-bottom: 1px solid var(--border, #eee);
}

.article-steps li:last-child {
  border-bottom: none;
}

.article-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--primary, #5B2D8E);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.article-tip {
  border-left: 4px solid var(--primary, #5B2D8E);
  margin: 1rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--bg-alt, #f8f8fc);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

/* Article tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Image zoom icon */
.article-image, .article-content figure {
  position: relative;
}
.article-image img, .article-content figure img {
  cursor: zoom-in;
}
.img-zoom-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #fff;
  font-size: 16px;
  backdrop-filter: blur(2px);
}

/* YouTube embed */
.article-youtube { margin: 2rem 0; }
.article-youtube h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.yt-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.12); }
.yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px; }

.article-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg-alt);
  color: var(--purple);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.article-tag:hover {
  background: var(--purple);
  color: #fff;
}

/* Tag results page */
.tag-section-title { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }
.tag-section-title:first-child { margin-top: 0; }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.tag-card { display: block; background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; text-decoration: none; color: inherit; transition: box-shadow 0.2s, border-color 0.2s; }
.tag-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: var(--purple); }
.tag-card-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.tag-card-cat--excel { color: var(--excel); }
.tag-card-cat--word { color: var(--word); }
.tag-card-cat--ppt { color: var(--powerpoint); }
.tag-card-cat--office { color: var(--purple); }
.tag-card-diff { margin-left: 8px; }
.tag-card-title { font-size: 1rem; font-weight: 600; margin: 0.5rem 0 0.25rem; line-height: 1.3; }
.tag-card-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; margin: 0; }

/* --- BLOG --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-alt);
}

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

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* --- TIPS --- */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.tip-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--purple);
  transition: all 0.2s;
}
.tip-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.tip-card--excel { border-left-color: #39C249; }
.tip-card--word { border-left-color: #1C7EDD; }
.tip-card--ppt { border-left-color: #F48D1F; }
.tip-card--office { border-left-color: var(--purple); }

.tip-card-icon {
  flex-shrink: 0;
  display: flex;
  align-self: flex-start;
  padding-top: 0.5rem;
}
.tip-card-icon img {
  width: 20px;
  height: 20px;
}

.tip-card-body { flex: 1; min-width: 0; }

.tip-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.tip-card-question {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0.25rem 0 0.4rem;
  color: var(--text);
}

.tip-card-answer {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tip-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.tip-card-fav {
  flex-shrink: 0;
  align-self: flex-start;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  margin-top: 2px;
  transition: color 0.2s;
}
.tip-card-fav:hover,
.tip-card-fav.active { color: #e74c3c; }

/* Tip detail page — modern layout */
.tip-detail-section { padding-top: 2rem; }

.tip-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.tip-breadcrumb a { color: var(--text-secondary); }
.tip-breadcrumb a:hover { color: var(--purple); }
.tip-breadcrumb-sep { color: var(--border); }

.tip-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* Main card */
.tip-hero-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--purple);
  margin-bottom: 1.5rem;
}

.tip-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.tip-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tip-hero-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tip-hero-question {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

/* Answer card */
.tip-answer-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.tip-answer-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tip-answer-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.tip-answer-content strong { color: var(--text); }

/* Tags row */
.tip-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tip-tag-link {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 500;
  transition: opacity 0.2s;
}
.tip-tag-link:hover { opacity: 0.7; }

.tip-meta-row {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Sidebar */
.tip-detail-sidebar {
  position: sticky;
  top: 80px;
}

.tip-detail-sidebar h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tip-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tip-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.tip-sidebar-item:last-child { border-bottom: none; }
.tip-sidebar-item:hover { opacity: 0.8; }

.tip-sidebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.tip-sidebar-text { flex: 1; min-width: 0; }

.tip-sidebar-cat {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.tip-sidebar-q {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .tip-detail-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .tip-detail-sidebar { position: relative; top: 0; }
  .tip-hero-question { font-size: 1.25rem; }
}

.page-header--tips {
  background: linear-gradient(135deg, #2b1a4e, #5B2D8E);
}

.page-header--blog {
  background: linear-gradient(135deg, #1a2a3e, #2563eb);
}

.tag-btn--excel.active { background: #39C249; color: #fff; border-color: #39C249; }
.tag-btn--word.active { background: #1C7EDD; color: #fff; border-color: #1C7EDD; }
.tag-btn--ppt.active { background: #F48D1F; color: #fff; border-color: #F48D1F; }

.blog-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.blog-card-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.article-body--blog {
  max-width: 720px;
  margin: 2rem auto;
}

/* --- HOME MAIN LAYOUT (articles + popular sidebar) --- */
.home-main-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.home-main-col { min-width: 0; }

.home-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--purple);
}

.popular-list {
  display: flex;
  flex-direction: column;
}

.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.15s;
}
.popular-item:last-child { border-bottom: none; }
.popular-item:hover { opacity: 0.75; }

.popular-rank {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.popular-info { flex: 1; min-width: 0; }

.popular-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.popular-type--article {
  background: var(--word-light);
  color: var(--word);
}

.popular-type--tip {
  background: #f0e8f7;
  color: var(--purple);
}

@media (max-width: 768px) {
  .home-main-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .home-sidebar { position: relative; top: 0; }
}

/* --- AI BANNER --- */
.ai-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ai-banner-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-light), var(--word-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
}

.ai-banner-text h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.ai-banner-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* --- FAVORITES EMPTY STATE --- */
.favorites-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.favorites-empty-icon {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.favorites-empty h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.favorites-empty p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.nav-fav {
  position: relative;
}

/* --- AD PLACEHOLDERS --- */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.ad-placeholder--article {
  margin-top: 2rem;
}

/* --- FOOTER --- */
.site-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-col ul li { margin-bottom: 0.5rem; }

.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--white); color: var(--white); }
.lang-btn.active { background: var(--purple); color: var(--white); border-color: var(--purple); }

/* --- TOAST NOTIFICATION --- */
.toast-notification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border-left: 4px solid var(--purple);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}
.toast-notification.visible { opacity: 1; transform: translateY(0); }

.toast-icon { flex-shrink: 0; color: var(--purple); margin-top: 1px; }

.toast-message {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  flex: 1;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.toast-close:hover { color: var(--text); }

@media (max-width: 480px) {
  .toast-notification { left: 1rem; right: 1rem; max-width: none; }
}

@media (max-width: 768px) {
  .page-header-flex { flex-wrap: wrap; }
  .page-header-stats { width: 100%; margin-left: 0; margin-top: 0.75rem; }
  .page-header-icon { width: 56px; height: 56px; min-width: 56px; border-radius: 12px; }
  .page-header-icon svg { width: 36px; height: 36px; }
  .page-header .container:not(.page-header-flex) { padding-left: 40%; }
}

@media (max-width: 480px) {
  .page-header .container:not(.page-header-flex) { padding-left: 5%; }
  .page-header-stats { gap: 1rem; }
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 968px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-toc {
    position: relative;
    top: 0;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 2.5rem;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-hover);
    border-bottom: 1px solid var(--border);
  }

  .main-nav.open { display: flex; }

  .mobile-menu-btn { display: flex; }

  .hero-text { max-width: 100%; }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-hero h1 { font-size: 1.5rem; }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-toc {
    position: static;
    order: 2;
  }

  .article-body {
    order: 1;
  }

  .article-sidebar {
    display: block;
    order: 3;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar .search-box {
    min-width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-title { font-size: 1.4rem; }

  .page-header h1 { font-size: 1.75rem; }

  .ai-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {

  .container { padding: 0 1rem; }
}
