/* ============================================
   BayurNews Premium Enhancements v2
   Clean padding, spacing, typography
   ============================================ */

/* --- Base Spacing Reset --- */
.site-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.scrolled {
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 4px 30px rgba(0,0,0,.08);
}

/* --- Card Padding & Spacing --- */
.premium-card,
article.rounded-xl,
article.rounded-2xl {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Featured section cards - better padding */
.backdrop-blur-xl.bg-white\\/80,
.backdrop-blur-lg.bg-white\\/90 {
  padding: 1rem !important;
}
@media (min-width: 768px) {
  .backdrop-blur-xl.bg-white\\/80,
  .backdrop-blur-lg.bg-white\\/90 {
    padding: 1.25rem !important;
  }
}
@media (min-width: 1024px) {
  .backdrop-blur-xl.bg-white\\/80,
  .backdrop-blur-lg.bg-white\\/90 {
    padding: 1.5rem !important;
  }
}

/* Sidebar latest news - more breathing room */
.lg\\:col-span-4 .space-y-2 > div {
  padding: 0.5rem 0.25rem !important;
}

/* --- Reading Progress Premium --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f97316, #eab308);
  z-index: 100;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px rgba(239,68,68,0.4);
}

/* --- Section Title Premium --- */
.section-title-premium {
  position: relative;
  display: inline-block;
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
}
.section-title-premium::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 2px;
  margin-top: 0.5rem;
}

/* --- Legacy Article Header Premium (back-compat) --- */
.article-header-premium .category-badge {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  box-shadow: 0 2px 10px rgba(239,68,68,0.3);
  transition: all 0.3s ease;
}
.article-header-premium .category-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(239,68,68,0.4);
}

/* --- Typography Premium --- */
.article-content {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1.125rem;
  line-height: 1.85;
}
.dark .article-content {
  color: #e5e7eb;
}
.article-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
  letter-spacing: 0.01em;
}
.article-content p:first-of-type::first-letter {
  font-size: 3.5rem;
  font-weight: 700;
  float: left;
  line-height: 1;
  margin-right: 0.5rem;
  color: #ef4444;
  font-family: 'Georgia', serif;
}
.article-content h2 {
  font-size: 1.65rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1rem;
}
.article-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ef4444, #f97316);
  border-radius: 2px;
}
.article-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.article-content blockquote {
  border-left: 4px solid #ef4444;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, rgba(239,68,68,0.04), transparent);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}
.dark .article-content blockquote {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), transparent);
}
.article-content img {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin: 2rem auto;
}

/* --- Featured Image Premium --- */
.featured-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.dark .featured-image-wrapper {
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.featured-image-wrapper img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  height: auto;
  display: block;
}
.featured-image-wrapper:hover img {
  transform: scale(1.02);
}

/* --- Share Float (Desktop) --- */
@media (min-width: 1024px) {
  .share-float {
    position: fixed;
    left: max(0.75rem, calc((100vw - 64rem) / 2 - 4rem));
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 40;
  }
  .share-float a,
  .share-float button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    cursor: pointer;
  }
  .dark .share-float a,
  .dark .share-float button {
    background: #1f2937;
    color: #9ca3af;
    border-color: rgba(255,255,255,0.05);
  }
  .share-float a:hover,
  .share-float button:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }
}

/* --- Author Bio Premium --- */
.author-bio-premium {
  background: linear-gradient(135deg, rgba(239,68,68,0.03), rgba(249,115,22,0.03));
  border: 1px solid rgba(239,68,68,0.1);
  border-radius: 16px;
  padding: 1.5rem;
}
.dark .author-bio-premium {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(249,115,22,0.08));
  border-color: rgba(239,68,68,0.2);
}

/* --- Tag Premium --- */
.tag-premium {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(239,68,68,0.06);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.1);
  transition: all 0.3s ease;
}
.dark .tag-premium {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.2);
  color: #fca5a5;
}
.tag-premium:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

/* --- Related Posts Premium --- */
.related-post-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  overflow: hidden;
}
.dark .related-post-card {
  border-color: rgba(255,255,255,0.04);
}
.related-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.dark .related-post-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

/* --- Premium Divider --- */
.premium-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,0.2), transparent);
  margin: 3rem 0;
}

/* --- Homepage Featured Cards - Better Padding --- */
.homepage article .absolute.bottom-6 {
  padding: 1.5rem !important;
}

/* --- Nav active indicator --- */
.nav-container .current-menu-item > a,
.nav-container .current-menu-ancestor > a {
  position: relative;
  color: #ef4444 !important;
}
.nav-container .current-menu-item > a::after,
.nav-container .current-menu-ancestor > a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 2px;
}

/* --- Nav link hover --- */
.nav-container a {
  position: relative;
  transition: color 0.3s ease;
}
.nav-container a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-container a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* --- Image fade on load --- */
img {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img.loaded,
img[src],
img[srcset] {
  opacity: 1;
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .article-content {
    font-size: 1rem;
    line-height: 1.75;
  }
  .article-content p:first-of-type::first-letter {
    font-size: 2.5rem;
  }
  .article-content h2 {
    font-size: 1.3rem;
  }
}
