@import url('root-styles.css');
@import url('navbar.css');
@import url('footer.css');

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--main-font);
  color: #222;
  overflow-x: hidden;
  margin: 0;
}

#scrollTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0;
  transition: background .3s ease, transform .2s ease, opacity .3s ease;
}
#scrollTop.show { display: flex; opacity: 1; }
#scrollTop:hover { background: var(--grey); transform: translateY(-2px); }

/* ── ARTICLE HERO ── */
.article-hero {
  background: var(--navy);
  padding: 4rem 0 3rem;
  text-align: center;
  color: var(--white);
}
.article-hero-label {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: .8rem;
  display: block;
}
.article-hero h1 {
  font-weight: 800;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  color: var(--white);
  line-height: 1.25;
  max-width: 820px;
  margin: 0 auto .8rem;
}
.article-hero-date {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* ── ARTICLE BODY ── */
#article-body {
  background: var(--white);
  padding: 4rem 0 5rem;
}

/* ── MAIN ARTICLE ── */
.article-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(29,70,110,.12);
  display: block;
}
.article-content {
  font-size: .875rem;
  line-height: 1.6;
  color: #444;
  text-align: justify;
}
.article-content p {
  margin-bottom: 1.2rem;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--navy);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: none;
  margin-top: 1rem;
  transition: color .2s, transform .15s;
}
.article-back:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

/* ── SIDEBAR ── */
.article-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-widget {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(29,70,110,.06);
}

.sidebar-widget-title {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* Recent Posts */
.recent-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recent-post-item {
  border-bottom: 1px solid #f0f3f6;
  padding-bottom: 1rem;
}
.recent-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-post-link {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: opacity .2s;
}
.recent-post-link:hover { opacity: .75; }
.recent-post-link:hover .recent-post-title { color: var(--accent); }

.recent-post-thumb {
  width: 68px;
  height: 68px;
  min-width: 68px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--light-bg);
}
.recent-post-placeholder {
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 7px;
  background: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 1.3rem;
}

.recent-post-info {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
  min-width: 0;
}
.recent-post-title {
  font-size: .8rem;
  font-weight: 600;
  color: #1a2b3c;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.recent-post-date {
  font-size: .72rem;
  color: #8a9bb0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.sidebar-empty {
  font-size: .82rem;
  color: #8a9bb0;
  margin: 0;
}

/* Browse widget */
.sidebar-browse-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  padding: .75rem 1rem;
  border-radius: 7px;
  transition: background .2s, transform .15s;
}
.sidebar-browse-link:hover {
  background: var(--accent);
  color: var(--navy);
  transform: translateX(3px);
}
.sidebar-browse-link i {
  font-size: 1rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
  .article-hero { padding: 3.5rem 1rem 2.5rem; }
  #article-body { padding: 3rem 1rem 4rem; }
  .article-sidebar {
    display: none;
  }
}
@media (max-width: 575.98px) {
  .article-hero { padding: 2.5rem 1rem 2rem; }
  #article-body { padding: 2.5rem 1rem 3rem; }
  .article-img { border-radius: 8px; margin-bottom: 1.5rem; }
}
