/* ═══════════════════════════════════════════════════════════════════════════
   Blog / Post CSS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── HERO SLIDER ────────────────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  height: 100svh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1);
  transition: transform 8s ease;
}

.swiper-slide-active .hero-slide__bg {
  transform: scale(1.05);
}

/* Dark overlay gradient */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(8,0,0,0.88) 0%,
    rgba(12,2,2,0.7) 40%,
    rgba(0,0,0,0.4) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.hero-content .container {
  padding: 0 var(--sp-xl);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,0,0,0.2);
  border: 1px solid rgba(139,0,0,0.5);
  color: var(--clr-accent);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--sp-lg);
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero__eyebrow i { font-size: 0.65rem; }

.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.12;
  color: #fff;
  max-width: 750px;
  margin-bottom: var(--sp-lg);
  animation: fadeInUp 0.6s ease 0.35s both;
}

.hero__title span {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__excerpt {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: var(--sp-xl);
  animation: fadeInUp 0.6s ease 0.5s both;
}

.hero__actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.65s both;
}

/* Hero navigation */
.hero-nav {
  position: absolute;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  z-index: 10;
  display: flex;
  gap: var(--sp-sm);
}

.hero-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}

.hero-nav-btn:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
}

/* Hero pagination dots */
.hero-pagination {
  position: absolute;
  bottom: var(--sp-xl);
  left: var(--sp-xl);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hero-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--clr-accent);
}

/* ─── CATEGORY STRIP ─────────────────────────────────────────────────────── */
.category-strip {
  background: var(--clr-bg-2);
  border-bottom: 1px solid var(--clr-border);
  padding: var(--sp-md) 0;
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  overflow: hidden;
}

.category-strip .container {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-strip .container::-webkit-scrollbar { display: none; }

/* ─── POST GRID ──────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

@media (max-width: 900px)  { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .posts-grid { grid-template-columns: 1fr; } }

/* ─── SIDEBAR + MAIN LAYOUT ──────────────────────────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-2xl);
  align-items: start;
}

.sticky-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-lg));
}

@media (max-width: 1024px) {
  .content-layout { grid-template-columns: 1fr; }
  .sticky-sidebar { position: static; }
}

/* ─── SIDEBAR WIDGETS ────────────────────────────────────────────────────── */
.widget {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

.widget__title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-text);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--clr-primary);
  display: inline-block;
  width: 100%;
}

/* Popular posts widget */
.popular-post {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--clr-border);
  text-decoration: none;
}

.popular-post:last-child { border: none; }

.popular-post:hover .popular-post__title { color: var(--clr-accent); }

.popular-post__num {
  font-size: 1.8rem;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--clr-border-2);
  line-height: 1;
  min-width: 32px;
}

.popular-post__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
  margin-bottom: 4px;
}

.popular-post__date {
  font-size: 0.72rem;
  color: var(--clr-text-dim);
}

/* ─── SINGLE POST ────────────────────────────────────────────────────────── */
.post-hero {
  position: relative;
  height: 55vw;
  max-height: 600px;
  min-height: 300px;
  overflow: hidden;
}

.post-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,8,8,0.95) 100%);
}

.post-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: var(--sp-2xl) 0 var(--sp-xl);
}

/* Post article content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #ddd;
}

.post-content h2 {
  font-size: 1.6rem;
  margin: var(--sp-xl) 0 var(--sp-md);
  color: #fff;
  border-left: 4px solid var(--clr-primary);
  padding-left: var(--sp-md);
}

.post-content h3 {
  font-size: 1.3rem;
  margin: var(--sp-lg) 0 var(--sp-sm);
  color: var(--clr-text);
}

.post-content p { margin-bottom: var(--sp-lg); }

.post-content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--sp-xl) 0;
  border: 1px solid var(--clr-border);
}

.post-content blockquote {
  border-left: 4px solid var(--clr-primary);
  background: rgba(139,0,0,0.06);
  padding: var(--sp-lg) var(--sp-xl);
  margin: var(--sp-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--clr-text-muted);
}

.post-content ul, .post-content ol {
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  list-style: disc;
}

.post-content ol { list-style: decimal; }

.post-content li {
  margin-bottom: 8px;
  color: #ccc;
}

.post-content a {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content strong { color: #fff; font-weight: 700; }

.post-content code {
  background: #1a0808;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #ff8080;
  font-family: 'Courier New', monospace;
}

.post-content pre {
  background: #0a0505;
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  overflow-x: auto;
  margin: var(--sp-lg) 0;
}

/* Post Author Box */
.author-box {
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
  background: var(--clr-card);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
  margin: var(--sp-2xl) 0;
}

.author-box__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--clr-primary);
  flex-shrink: 0;
}

.author-box__name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 4px;
}

.author-box__role {
  font-size: 0.78rem;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.author-box__bio {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin: 0;
}

@media (max-width: 600px) {
  .author-box { flex-direction: column; }
  .author-box__avatar { width: 64px; height: 64px; }
}

/* ─── COMMENTS ───────────────────────────────────────────────────────────── */
.comment {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--clr-border);
}

.comment:last-child { border: none; }

.comment__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-border-2);
  flex-shrink: 0;
}

.comment__header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-bottom: 8px;
}

.comment__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--clr-text);
}

.comment__date { font-size: 0.75rem; color: var(--clr-text-dim); }

.comment__text {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

/* ─── RELATED POSTS ──────────────────────────────────────────────────────── */
.related-posts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}

@media (max-width: 600px) {
  .related-posts { grid-template-columns: 1fr; }
}

/* ─── CATEGORY PAGE HEADER ───────────────────────────────────────────────── */
.category-page-header {
  padding: var(--sp-2xl) 0;
  position: relative;
  overflow: hidden;
}

.category-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(139,0,0,0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* ─── SEARCH PAGE ────────────────────────────────────────────────────────── */
.search-header {
  padding: var(--sp-2xl) 0;
  text-align: center;
}

.search-count {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  margin-top: var(--sp-sm);
}

.search-count span { color: var(--clr-accent); font-weight: 700; }

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

/* Staggered animation using custom properties */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Scroll-reveal (added by JS) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
