:root {
  --primary: #0d4f6b;
  --primary-dark: #083344;
  --primary-light: #1a7a9e;
  --accent: #e8a838;
  --accent-light: #f5c842;
  --surface: #ffffff;
  --bg: #f0f4f8;
  --bg-alt: #e4eef4;
  --text: #1a2a3a;
  --text-secondary: #5a6a7a;
  --text-muted: #8a9aaa;
  --gradient-hero: linear-gradient(135deg, #083344 0%, #0d4f6b 50%, #1a7a9e 100%);
  --gradient-card: linear-gradient(135deg, #0d4f6b 0%, #1a7a9e 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
  opacity: 0; animation: fadeIn 0.4s ease forwards;
  display: flex; flex-direction: column; min-height: 100vh;
}
body.page-exit { opacity: 0; transition: opacity 0.2s ease; }
@keyframes fadeIn { to { opacity: 1; } }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.header {
  background: var(--gradient-hero); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px; height: 64px;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon { width: 36px; height: 36px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; box-shadow: 0 2px 8px rgba(232,168,56,0.4); }
.logo-text { display: flex; flex-direction: column; }
.logo-text h1 { font-size: 1.2rem; color: #fff; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.logo-text span { font-size: 0.7rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav a {
  padding: 8px 14px; color: rgba(255,255,255,0.75); font-size: 0.85rem; font-weight: 500;
  border-radius: var(--radius-sm); transition: all var(--transition); position: relative;
}
.nav a::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%) scaleX(0);
  width: 60%; height: 2px; background: var(--accent); border-radius: 2px;
  transition: transform var(--transition);
}
.nav a:hover { color: #fff; background: rgba(255,255,255,0.1); text-decoration: none; }
.nav a:hover::after { transform: translateX(-50%) scaleX(1); }
.search-form { display: flex; align-items: center; flex-shrink: 0; }
.search-form input {
  padding: 8px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
  background: rgba(255,255,255,0.1); color: #fff; font-size: 0.85rem;
  width: 180px; transition: all var(--transition); outline: none;
}
.search-form input::placeholder { color: rgba(255,255,255,0.4); }
.search-form input:focus { width: 240px; background: rgba(255,255,255,0.2); border-color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 4px; }

/* ===== CONTAINER ===== */
.page-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; flex: 1; width: 100%; }
.page-wrap.wide { max-width: 100%; padding: 0; }

/* ===== HERO ===== */
.hero {
  background: var(--gradient-hero); padding: 60px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.06; mix-blend-mode: overlay;
}
.hero::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 80px;
  background: var(--bg); clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 720px; margin: 0 auto; }
.hero-content h1 { font-size: 2.5rem; color: #fff; font-weight: 800; line-height: 1.15; margin-bottom: 12px; }
.hero-content p { font-size: 1.05rem; color: rgba(255,255,255,0.7); margin-bottom: 28px; }
.hero-search {
  display: flex; max-width: 500px; margin: 0 auto; background: rgba(255,255,255,0.12);
  border-radius: 50px; padding: 4px; backdrop-filter: blur(10px);
}
.hero-search input {
  flex: 1; border: none; background: transparent; padding: 12px 20px;
  color: #fff; font-size: 1rem; outline: none;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.4); }
.hero-search button {
  padding: 10px 28px; background: var(--accent); border: none; border-radius: 50px;
  color: #083344; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  transition: all var(--transition);
}
.hero-search button:hover { background: var(--accent-light); transform: scale(1.02); }

/* ===== SECTION ===== */
.section {
  margin: 40px 0; opacity: 0; transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.section.visible { opacity: 1; transform: translateY(0); }
.section-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.section-header h2 {
  font-size: 1.4rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.section-header h2 .icon { font-size: 1.3rem; }
.section-link { font-size: 0.85rem; color: var(--primary-light); font-weight: 500; }
.section-link:hover { color: var(--accent); }

/* ===== FEATURED POSTS (Hero next) ===== */
.featured-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin-bottom: 40px;
}
.featured-grid .featured-main { grid-row: span 2; }
.featured-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); transition: all var(--transition);
  background: var(--surface); min-height: 240px;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.featured-card .card-bg {
  width: 100%; height: 100%; position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.featured-card .card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.featured-card .card-body {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 24px;
}
.featured-card .card-tag {
  display: inline-block; padding: 3px 10px; background: var(--accent); color: #083344;
  font-size: 0.75rem; font-weight: 700; border-radius: 4px; text-transform: uppercase;
  margin-bottom: 8px;
}
.featured-card h3 { font-size: 1.15rem; color: #fff; line-height: 1.3; margin-bottom: 6px; }
.featured-card h3 a { color: #fff; }
.featured-card h3 a:hover { color: var(--accent-light); }
.featured-card .card-date { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.featured-main { min-height: 400px; }
.featured-main h3 { font-size: 1.5rem; }

/* ===== POST CARDS ===== */
.posts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.post-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  display: flex; flex-direction: column; opacity: 0; transform: translateY(20px);
  position: relative;
}
.post-card.visible { opacity: 1; transform: translateY(0); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-card-image {
  height: 140px; background-size: cover; background-position: center; background-repeat: no-repeat; position: relative;
}
.post-card-image .card-tag {
  position: absolute; top: 12px; left: 12px; padding: 3px 10px;
  background: var(--accent); color: #083344; font-size: 0.7rem; font-weight: 700;
  border-radius: 4px; text-transform: uppercase;
}
.age-badge {
  position: absolute; top: 12px; right: 12px; font-size: 1.1rem; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.post-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.post-card-body h3 { font-size: 0.95rem; line-height: 1.3; margin-bottom: 6px; }
.post-card-body h3 a { color: var(--text); }
.post-card-body h3 a:hover { color: var(--primary-light); }
.post-card-excerpt { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4;
  flex: 1; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--bg-alt); font-size: 0.78rem;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.post-card-footer time { color: var(--text-muted); }
.post-card-stats { display: flex; gap: 12px; }
.post-card-stats span { display: flex; align-items: center; gap: 4px; color: var(--text-muted); }
.post-card-stats .liked { color: var(--accent); }

/* ===== CATEGORY BLOCKS ===== */
.category-blocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.category-block {
  background: var(--gradient-card); border-radius: var(--radius); padding: 24px;
  text-align: center; transition: all var(--transition); cursor: pointer;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
  opacity: 0; transform: translateY(20px);
}
.category-block.visible { opacity: 1; transform: translateY(0); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.category-block:nth-child(2) { background: linear-gradient(135deg, #1a5e3a 0%, #2d8a4e 100%); }
.category-block:nth-child(3) { background: linear-gradient(135deg, #7a4a1a 0%, #b87a2a 100%); }
.category-block:nth-child(4) { background: linear-gradient(135deg, #4a1a7a 0%, #7a3ab8 100%); }
.category-block:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); }
.category-block .icon { font-size: 2rem; margin-bottom: 8px; }
.category-block h3 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.category-block .count { color: rgba(255,255,255,0.6); font-size: 0.8rem; }

/* ===== POST PAGE ===== */
.post-page { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.post-article {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); animation: slideUp 0.5s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.post-article-header { padding: 32px 32px 0; }
.post-article-header .post-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.post-article-header .post-tags a {
  padding: 4px 12px; background: var(--bg-alt); border-radius: 20px;
  font-size: 0.8rem; color: var(--primary-light); font-weight: 500;
}
.post-article-header .post-tags a:hover { background: var(--primary); color: #fff; }
.post-article-header h1 { font-size: 2rem; color: var(--text); line-height: 1.25; margin-bottom: 12px; }
.post-article-meta {
  display: flex; align-items: center; gap: 16px; padding: 0 32px 20px;
  border-bottom: 1px solid var(--bg-alt); font-size: 0.88rem; color: var(--text-muted);
  flex-wrap: wrap;
}
.post-article-meta .author { color: var(--text-secondary); }
.post-article-image { margin: 0; }
.post-article-image { background: var(--bg-alt); }
.post-article-image img { width: 100%; height: auto; display: block; }
.post-article-body iframe,
.post-article-body video {
  width: 100%; aspect-ratio: 16 / 9; display: block; margin: 16px 0;
}
.post-embed {
  padding: 0 0 16px;
}
.post-embed iframe {
  width: 100%; aspect-ratio: 16 / 9; display: block;
}
.post-article-body { padding: 32px; font-size: 1.05rem; line-height: 1.8; color: var(--text); }
.post-article-body p { margin-bottom: 1.2em; }
.post-article-body h2, .post-article-body h3 { color: var(--primary-dark); margin: 1.5em 0 0.5em; }
.post-article-body h2 { font-size: 1.4rem; }
.post-article-body h3 { font-size: 1.2rem; }
.post-article-body ul, .post-article-body ol { margin: 1em 0; padding-left: 2em; }
.post-article-body blockquote {
  border-left: 4px solid var(--accent); padding: 12px 20px; margin: 1.5em 0;
  background: var(--bg-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--text-secondary);
}
.post-article-footer {
  padding: 20px 32px; border-top: 1px solid var(--bg-alt);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.post-article-footer .engagement { display: flex; gap: 20px; }
.engagement-btn {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  border: 1px solid var(--bg-alt); border-radius: 20px; background: none;
  font-size: 0.88rem; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.engagement-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(232,168,56,0.06); }
.engagement-btn.liked { border-color: var(--accent); color: var(--accent); background: rgba(232,168,56,0.1); }
.post-source { font-size: 0.85rem; }
.post-source a { color: var(--text-muted); }
.post-source a:hover { color: var(--primary-light); }

.post-source-card {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--bg-alt);
}
.post-source-card-inner a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  text-decoration: none;
  transition: all var(--transition);
}
.post-source-card-inner a:hover {
  border-color: var(--accent);
  background: rgba(232,168,56,0.04);
}
.source-logo {
  width: 20px; height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.source-name {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}
.source-action {
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
}

/* ===== RELATED POSTS ===== */
.related-section { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.related-section h2 {
  font-size: 1.3rem; color: var(--text); margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.related-card {
  background: var(--surface); border-radius: var(--radius-sm); padding: 16px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-card h3 { font-size: 0.95rem; line-height: 1.3; margin-bottom: 8px; }
.related-card h3 a { color: var(--text); }
.related-card h3 a:hover { color: var(--primary-light); }
.related-card time { font-size: 0.8rem; color: var(--text-muted); }

/* ===== CATEGORY PAGE ===== */
.category-page { padding: 32px 0; }
.category-header { margin-bottom: 32px; }
.category-header h1 { font-size: 2rem; color: var(--text); margin-bottom: 8px; }
.category-header p { color: var(--text-secondary); font-size: 1rem; }

/* ===== SEARCH ===== */
.search-page { padding: 32px 0; }
.search-page h1 { font-size: 1.5rem; margin-bottom: 8px; }
.search-page .query-note { color: var(--text-secondary); margin-bottom: 24px; }

/* ===== SIDEBAR ===== */
.layout-sidebar {
  display: grid; grid-template-columns: 1fr 300px; gap: 32px; padding: 32px 0;
}
.sidebar { }
.sidebar-widget {
  background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 2px solid var(--bg-alt);
}
.sidebar-cats { list-style: none; }
.sidebar-cats li { padding: 6px 0; }
.sidebar-cats a {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.9rem; color: var(--text-secondary); padding: 6px 10px;
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.sidebar-cats a:hover { background: var(--bg-alt); color: var(--primary-light); text-decoration: none; }
.sidebar-cats .count {
  background: var(--bg-alt); padding: 1px 8px; border-radius: 10px;
  font-size: 0.75rem; color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 40px 0;
}
.pagination a, .pagination span {
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: 0.9rem;
  transition: all var(--transition);
}
.pagination a { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.pagination a:hover { background: var(--primary); color: #fff; text-decoration: none; transform: translateY(-1px); }
.pagination .active { background: var(--primary); color: #fff; }

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.6); padding: 24px 0; margin-top: 32px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px;
}
.footer-brand h3 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; }
.footer-links h4 { color: #fff; font-size: 0.9rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-links a { display: block; color: rgba(255,255,255,0.5); font-size: 0.85rem; padding: 4px 0; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto; padding: 16px 24px 0; margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: 0.82rem;
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state p { font-size: 1.1rem; }

/* ===== CATEGORY GRADIENT BACKGROUNDS ===== */
.category-bg-zakony { background-image: linear-gradient(135deg, #8b1a1a 0%, #c0392b 100%); }
.category-bg-novosti { background-image: linear-gradient(135deg, #0d4f6b 0%, #1a7a9e 100%); }
.category-bg-otchety { background-image: linear-gradient(135deg, #1a5e3a 0%, #2d8a4e 100%); }
.category-bg-vodoemy { background-image: linear-gradient(135deg, #1a4a7a 0%, #2d7ab8 100%); }
.category-bg-snasti { background-image: linear-gradient(135deg, #7a4a1a 0%, #b87a2a 100%); }
.category-bg-podcasts { background-image: linear-gradient(135deg, #4a1a7a 0%, #7a3ab8 100%); }
.category-bg-sorevnovaniya { background-image: linear-gradient(135deg, #1a5a5a 0%, #2a8a8a 100%); }
.category-bg-default { background-image: linear-gradient(135deg, #0d4f6b 0%, #1a7a9e 100%); }

.post-card-image:not([style*="background-image"])::after {
  content: '🎣'; font-size: 3rem; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); opacity: 0.6;
}

/* ===== SOURCE BAR ON CARDS ===== */
.source-badge-corner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 5px 12px;
  background: #f8f8f8;
  border-bottom: 1px solid #e8e8e8;
  font-size: 0.85rem; text-decoration: none; color: #555;
  line-height: 1;
  font-weight: 500;
  width: 100%;
  transition: all var(--transition);
}
.source-badge-corner:hover { background: #f0f0f0; color: #333; }
.source-badge-corner-logo { width: 20px; height: 20px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.source-badge-corner-name { white-space: nowrap; }

/* ===== STAR RATING ===== */
.star-btn { cursor: pointer !important; user-select: none; transition: transform 0.15s ease; display: inline-flex; align-items: center; gap: 2px; background: none !important; border: none !important; padding: 0; font: inherit; color: inherit; outline: none; box-shadow: none !important; }
.star-btn:hover { background: none !important; border-color: transparent !important; }
.star-btn.star-btn:hover { border-color: transparent !important; }
.star-count { font-size: 0.8rem; color: var(--text-muted); min-width: 12px; pointer-events: none; }

/* ===== FAVORITES SIDEBAR ===== */
.fav-sidebar {
  width: 100px; position: sticky; top: 80px; align-self: flex-start; margin-top: 60px;
}
.fav-sidebar-title {
  font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.fav-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px;
}
.fav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-radius: 6px; cursor: pointer; transition: all 0.2s ease;
  background: var(--surface); border: 1px solid var(--bg-alt);
  overflow: hidden; text-decoration: none; padding: 4px;
}
.fav-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.fav-item-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.fav-item-name { font-size: 0.72rem; color: var(--text); text-align: center; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.fav-item-wrap {
  position: relative; border-radius: 6px; background: var(--surface);
  border: 1px solid var(--bg-alt); overflow: hidden;
}
.fav-item-wrap .fav-item { border: none; background: none; }
.fav-remove {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.45);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s; z-index: 2; padding: 0;
}
.fav-item-wrap:hover .fav-remove { opacity: 1; }
.fav-remove:hover { background: rgba(200,40,40,0.8); }
.fav-count {
  font-size: 0.7rem; color: var(--text-muted); font-weight: 400;
}
.fav-sidebar-empty {
  font-size: 0.78rem; color: var(--text-muted); text-align: center;
  padding: 12px 4px;
}

/* ===== POSTS LAYOUT (home sliders) ===== */
.posts-layout {
  display: flex; gap: 0;
  width: calc(100% + 120px); margin-left: -60px;
}
.posts-layout-main { flex: 1; min-width: 0; }
.posts-layout .fav-sidebar {
  margin-left: -60px; margin-right: 12px;
}

/* ===== SLIDER CAROUSEL (home) ===== */
.slider-wrap {
  overflow: hidden; margin-bottom: 16px; position: relative;
  cursor: grab;
  touch-action: none;
}
.slider-wrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.slider-wrap.is-dragging .s-card {
  pointer-events: none;
}
.slider-track {
  display: flex; gap: 16px; will-change: transform;
}
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 20;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.85); color: #333; font-size: 1.8rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2); transition: all 0.2s ease; backdrop-filter: blur(4px);
}
.slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.15); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.slider-arrow-left { left: 12px; }
.slider-arrow-right { right: 12px; }
.s-card {
  flex: 0 0 260px; background: var(--surface); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow 0.3s ease;
  display: flex; flex-direction: column;
}
.s-card:hover { box-shadow: var(--shadow-md); }
.s-card-img {
  width: 100%; height: auto; display: block;
  object-fit: contain; object-position: top center;
  background-color: var(--bg-alt);
  -webkit-user-drag: none;
  user-select: none;
}
.s-card-img-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; background: var(--bg-alt); height: 200px;
}
.s-body { padding: 12px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.s-body h3 { font-size: 0.9rem; line-height: 1.3; margin-bottom: 4px; min-width: 0; }
.s-body h3 a {
  display: block; color: var(--text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s-body h3 a:hover { color: var(--primary-light); }
.s-card-meta {
  font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s-author { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.s-date { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 4px; }
.s-body p {
  font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; flex: 1;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.s-body a { font-size: 0.8rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.s-body a:hover { text-decoration: underline; }

/* ===== FEATURED SLIDER ===== */
.featured-slider-wrap { overflow: hidden !important; position: relative; margin-bottom: 40px; width: 100%; }
.featured-slider { position: relative; width: 100%; overflow: hidden; }
.featured-track { display: flex; transition: transform 0.5s ease; gap: 0; }
.featured-slide {
  flex: none; width: 100%; min-width: 100%; position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 420px; background: var(--surface); box-sizing: border-box;
}
.featured-slide .card-bg {
  width: 100%; height: 100%; position: absolute; inset: 0;
  background-size: 100% auto; background-position: top; background-repeat: no-repeat;
}
.featured-slide .card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.featured-slide .card-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px; }
.featured-slide .card-tag {
  display: inline-block; padding: 4px 12px; background: var(--accent); color: #083344;
  font-size: 0.8rem; font-weight: 700; border-radius: 4px; text-transform: uppercase; margin-bottom: 10px;
}
.featured-slide h3 { font-size: 1.8rem; color: #fff; line-height: 1.2; margin-bottom: 8px; }
.featured-slide h3 a { color: #fff; text-decoration: none; }
.featured-slide .card-date { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.featured-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.85); color: #333; font-size: 2rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2); transition: all 0.2s ease;
}
.featured-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.1); }
.featured-arrow-left { left: 16px; }
.featured-arrow-right { right: 16px; }
@media (max-width: 768px) {
  .featured-slide { min-height: 300px; }
  .featured-slide h3 { font-size: 1.3rem; }
  .featured-arrow { width: 36px; height: 36px; font-size: 1.5rem; }
}

/* ===== SHOPS REGISTRY MARQUEE ===== */
.shops-registry {
  margin-top: 8px; border: 1px solid var(--bg-alt); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; padding: 8px 0;
}
.shops-marquee {
  overflow: hidden; white-space: nowrap; position: relative;
  mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}
.shops-track {
  display: inline-flex; gap: 12px; animation: scrollShops 50s linear infinite;
  padding: 4px 0; align-items: center;
}
.shops-marquee:hover .shops-track { animation-play-state: paused; }
@keyframes scrollShops {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.shop-marquee-item {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px;
  background: var(--bg); border-radius: 24px; text-decoration: none;
  transition: all var(--transition); white-space: nowrap; flex-shrink: 0;
}
.shop-marquee-item:hover { background: var(--accent); }
.shop-marquee-item:hover span, .shop-marquee-item:hover .shop-star { color: #083344; }
.shop-marquee-item img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.shop-marquee-item span { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.shop-star { font-size: 0.75rem; color: var(--accent); margin-left: 2px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .category-blocks { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid .featured-main { grid-row: auto; }
}
@media (max-width: 768px) {
  .header-inner { height: auto; padding: 12px 16px; flex-wrap: wrap; }
  .nav { display: none; flex-direction: column; width: 100%; padding: 12px 0; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .search-form { margin-left: auto; }
  .hero { padding: 40px 0 60px; }
  .hero-content h1 { font-size: 1.6rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-main { min-height: 280px; }
  .posts-grid { grid-template-columns: 1fr; }
  .category-blocks { grid-template-columns: repeat(2, 1fr); }
  .layout-sidebar { grid-template-columns: 1fr; }
  .post-article-header h1 { font-size: 1.4rem; }
  .post-article-header { padding: 20px 20px 0; }
  .post-article-body { padding: 20px; }
  .post-article-footer { padding: 16px 20px; }
  .post-article-meta { padding: 0 20px 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .category-blocks { grid-template-columns: 1fr; }
  .hero-search { flex-direction: column; background: transparent; gap: 8px; }
  .hero-search input { background: rgba(255,255,255,0.12); border-radius: 50px; }
  .search-form input { width: 120px; }
  .search-form input:focus { width: 160px; }
}

/* ===== SOURCE BADGE ===== */
.source-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; background: var(--surface);
  border: 1px solid var(--bg-alt); border-radius: 4px;
  font-size: 0.78rem; text-decoration: none; color: var(--text-muted);
  transition: all var(--transition);
}
.source-badge:hover { border-color: var(--accent); color: var(--accent); }
.source-badge-logo { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; flex-shrink: 0; }
.source-badge-name { line-height: 1; }
