/**
 * NewsBlaze — Main Stylesheet
 * Complete compiled styles (non-critical, loaded deferred)
 *
 * @package NewsBlaze
 * @author  Sourav Mahapatra — infoheadline.com
 */

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
#site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#site-header.header-scrolled {
  box-shadow: var(--shadow);
}

#site-header.header-hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 20px;
}

.site-branding { flex-shrink: 0; }

.site-logo img {
  max-height: 48px;
  width: auto;
}

.site-name-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.site-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.site-description {
  font-size: 11px;
  color: var(--gray-text);
}

/* Primary Nav */
#primary-navigation { flex: 1; overflow: hidden; }

#primary-nav {
  display: flex;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
}

#primary-nav .nav-item {
  position: relative;
}

#primary-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: var(--transition);
}

#primary-nav .nav-link:hover,
#primary-nav .current-menu-item > .nav-link {
  color: var(--primary);
  background: var(--primary-light);
}

.chevron-down { transition: transform 0.2s ease; }
.nav-item.is-open .chevron-down { transform: rotate(180deg); }

/* Dropdown */
.sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: var(--z-dropdown);
  padding: 6px;
}

.nav-item.is-open .sub-menu,
.nav-item:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu .nav-link {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--dark);
  border-radius: var(--radius-sm);
}

.sub-menu .nav-link:hover {
  background: var(--light-bg);
  color: var(--primary);
}

.dropdown-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray-text);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.search-toggle,
.mobile-menu-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--dark);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.search-toggle:hover,
.mobile-menu-toggle:hover {
  background: var(--light-bg);
  border-color: var(--border-dark);
}

.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 1px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-menu-toggle { display: none; }

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: calc(var(--z-sticky) - 1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.mobile-nav.is-open { transform: translateX(0); }

.mobile-nav-inner { padding: 16px; }

.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--border); }
.mobile-nav a {
  display: block;
  padding: 14px 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
}
.mobile-nav a:hover { color: var(--primary); }

/* Reading progress bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  z-index: calc(var(--z-sticky) + 1);
  transition: width 0.1s linear;
  width: 0%;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: var(--light-bg);
  padding: 60px 0;
  text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-tagline {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 12px;
}

.hero-subheading {
  font-size: 16px;
  color: var(--gray-text);
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Search */
.search-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto 24px;
}

.search-wrap form {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 27px;
  overflow: hidden;
  height: 54px;
  padding: 0 8px 0 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-wrap form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.search-icon {
  flex-shrink: 0;
  margin-right: 10px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--dark);
  background: transparent;
}

.search-input::placeholder { color: var(--gray-text); }

.search-submit {
  height: 38px;
  padding: 0 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.search-submit:hover { background: var(--primary-dark); }

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-height: 400px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--dark);
  transition: background 0.15s ease;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover,
.search-result-item.is-active {
  background: var(--light-bg);
}

.search-result-thumb {
  width: 50px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-result-thumb-placeholder {
  width: 50px;
  height: 38px;
  background: var(--border);
  border-radius: 4px;
  flex-shrink: 0;
}

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

.search-result-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 2px;
}

.result-cat {
  color: var(--primary);
  font-weight: 600;
}

.search-no-results {
  padding: 32px 20px;
  text-align: center;
  color: var(--gray-text);
}

.search-no-results p { margin-top: 10px; font-size: 14px; }

/* Trending Tags */
.trending-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.trending-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  flex-shrink: 0;
}

.tag-pill {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--gray-text);
  text-decoration: none;
  transition: var(--transition);
}

.tag-pill:hover, .trending-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.category-grid-section { background: var(--white); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cat-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--primary);
}

.cat-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
}

.cat-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.cat-posts-count {
  font-size: 12px;
  color: var(--gray-text);
}

/* ============================================================
   SOCIAL COMMUNITY CARDS
   ============================================================ */
.social-community-section { background: var(--light-bg); }

.social-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.social-card {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.social-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.social-card--telegram { background: linear-gradient(135deg, #0088cc, #006da8); }
.social-card--whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.social-card--facebook { background: linear-gradient(135deg, #1877F2, #0d5ed9); }

.social-card-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  color: white;
}

.social-card-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.social-card-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
  line-height: 1.5;
}

.social-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-card--telegram .social-card-btn { color: #0088cc; }
.social-card--whatsapp .social-card-btn { color: #128C7E; }
.social-card--facebook .social-card-btn { color: #1877F2; }

.social-card-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ============================================================
   POST CARDS
   ============================================================ */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.post-card.will-animate {
  opacity: 0;
  transform: translateY(10px);
}

.post-card.will-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.post-card-category { margin-bottom: 10px; }

.post-card-inner {
  display: flex;
  gap: 14px;
}

.post-card-thumb {
  flex-shrink: 0;
}

.post-card-thumb a {
  display: block;
  width: 120px;
  height: 90px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--border);
}

.post-thumb-img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumb-img { transform: scale(1.04); }

.post-thumb-placeholder {
  width: 120px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-bg);
  border-radius: 6px;
}

.post-card-content { flex: 1; min-width: 0; }

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 8px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-item svg { color: var(--gray-text); flex-shrink: 0; }

.meta-item a { color: var(--gray-text); }
.meta-item a:hover { color: var(--primary); }

.post-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a {
  color: var(--dark);
  text-decoration: none;
}

.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--gray-text);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-read-more {
  font-size: 13px;
  padding: 5px 14px;
  float: right;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: relative;
}

.sidebar-sticky {
  position: sticky;
  top: 84px;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
  margin-bottom: 16px;
  line-height: 1.3;
}

/* Popular posts widget */
.popular-posts-list { list-style: none; margin: 0; padding: 0; }

.popular-post-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.popular-post-item:last-child { border-bottom: none; padding-bottom: 0; }

.popular-post-link {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
}

.popular-post-thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.popular-post-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.popular-post-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.popular-post-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
}

.popular-post-date {
  font-size: 11px;
  color: var(--gray-text);
}

.popular-post-link:hover .popular-post-title { color: var(--primary); }

/* Category list */
.category-list { list-style: none; margin: 0; padding: 0; }

.category-list-item { border-bottom: 1px solid var(--border); }
.category-list-item:last-child { border-bottom: none; }

.category-list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--dark);
  text-decoration: none;
}

.category-list-link:hover { color: var(--primary); }

.cat-count {
  font-size: 11px;
  background: var(--light-bg);
  border-radius: 10px;
  padding: 2px 8px;
  color: var(--gray-text);
  font-weight: 600;
}

/* Social follow */
.social-follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.social-follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.social-follow-btn:hover { opacity: 0.88; color: white; }

/* Recent comments */
.recent-comments-list { list-style: none; margin: 0; padding: 0; }

.recent-comment-item {
  font-size: 13px;
  color: var(--gray-text);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.recent-comment-item:last-child { border-bottom: none; }
.recent-comment-item .comment-author { font-weight: 600; color: var(--dark); }
.recent-comment-item a { color: var(--gray-text); }
.recent-comment-item a:hover { color: var(--primary); }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.breadcrumb-bar {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}

.breadcrumb-nav { /* schema item wraps below */ }

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  padding: 0;
  margin: 0;
}

.breadcrumb-item { display: inline-flex; align-items: center; gap: 6px; }

.breadcrumb-list a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-list a:hover { text-decoration: underline; }

.breadcrumb-current {
  color: var(--dark);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
  display: inline-block;
}

.breadcrumb-sep { color: var(--gray-text); }

/* Post header */
.post-header { padding-bottom: 24px; }

.post-category { margin-bottom: 12px; }

.post-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 16px;
  max-width: 800px;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--gray-text);
  margin-bottom: 20px;
}

.author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.post-featured-image {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 400px;
}

.post-featured-image .featured-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
}

.image-caption {
  font-size: 13px;
  color: var(--gray-text);
  text-align: center;
  padding: 8px;
  font-style: italic;
}

/* Post content */
.post-content {
  max-width: 740px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--dark);
}

.post-content p        { margin-bottom: 1.5em; }
.post-content h2       { font-size: 22px; font-weight: 700; border-left: 4px solid var(--primary); padding-left: 12px; margin: 2em 0 0.75em; }
.post-content h3       { font-size: 18px; font-weight: 600; margin: 1.75em 0 0.6em; }
.post-content h4       { font-size: 16px; font-weight: 600; margin: 1.5em 0 0.5em; }
.post-content a        { color: var(--primary); text-decoration: underline dotted; }
.post-content a:hover  { text-decoration: underline solid; }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  background: #f0f7ff;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  margin: 2em 0;
  color: var(--dark);
}
.post-content ul       { padding-left: 1.5em; margin-bottom: 1.5em; list-style: disc; }
.post-content ol       { padding-left: 1.5em; margin-bottom: 1.5em; list-style: decimal; }
.post-content li       { margin-bottom: 0.5em; }
.post-content img      { max-width: 100%; height: auto; border-radius: 6px; margin: 1em 0; }
.post-content table    { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.post-content th, .post-content td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.post-content th       { background: var(--light-bg); font-weight: 600; }
.post-content tr:nth-child(even) { background: #fafafa; }
.post-content code     { background: #f1f3f4; padding: 2px 6px; border-radius: 3px; font-family: var(--font-mono); font-size: 14px; }
.post-content pre      { background: #1c1c1e; color: #f8f9fa; padding: 20px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; line-height: 1.6; }
.post-content pre code { background: none; padding: 0; font-size: inherit; }

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

/* Author bio */
.author-bio-box {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
}

.author-bio-avatar { flex-shrink: 0; }

.author-bio-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
}

.author-bio-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.author-bio-name a { color: var(--dark); }
.author-bio-name a:hover { color: var(--primary); }

.author-bio-desc {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 10px;
  line-height: 1.6;
}

.author-view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* ============================================================
   SOCIAL SHARE BUTTONS
   ============================================================ */
.social-share {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-text);
  display: block;
  margin-bottom: 12px;
}

.social-share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  height: 40px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  color: white;
}

.share-btn:hover { opacity: 0.88; transform: translateY(-1px); color: white; }
.share-btn--whatsapp { background: var(--whatsapp); }
.share-btn--telegram { background: var(--telegram); }
.share-btn--facebook { background: var(--facebook); }
.share-btn--twitter  { background: var(--twitter); }
.share-btn--copy     { background: var(--gray-text); }
.share-btn--copy.is-copied { background: var(--secondary); }

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts-section { margin-top: 48px; }

.related-posts-heading {
  font-size: 22px;
  font-weight: 700;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  margin-bottom: 24px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.related-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.related-post-thumb-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
}

.related-post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-thumb { transform: scale(1.04); }

.related-post-placeholder {
  width: 100%;
  height: 100%;
  background: var(--light-bg);
}

.related-post-body { padding: 16px; }

.related-post-title {
  font-size: 15px;
  font-weight: 600;
  margin: 8px 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-post-title a { color: var(--dark); }
.related-post-title a:hover { color: var(--primary); }

.related-post-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--gray-text);
}

/* ============================================================
   WEB STORIES GRID
   ============================================================ */
.web-stories-section { background: var(--white); }

.web-stories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.story-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--border);
  text-decoration: none;
  display: block;
  transition: transform 0.3s ease;
  scroll-snap-align: start;
}

.story-card:hover { transform: scale(1.03); }

.story-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.story-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--border), var(--border-dark));
}

.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 50%);
}

.story-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 8px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   IMPORTANT LINKS TABLE
   ============================================================ */
.important-links-box {
  margin: 2em 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.important-links-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}

.table-responsive { overflow-x: auto; }

.important-links-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.important-links-table thead tr {
  background: var(--primary);
  color: white;
}

.important-links-table th,
.important-links-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.important-links-table th { font-weight: 700; }

.important-links-table tr:last-child td { border-bottom: none; }
.important-links-table tr:nth-child(even) td { background: #fafafa; }

.btn-link-click {
  display: inline-flex;
  align-items: center;
  background: var(--secondary);
  color: white;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-link-click:hover {
  background: var(--secondary-dark);
  color: white;
}

/* ============================================================
   FLOATING BUTTONS
   ============================================================ */
.floating-buttons {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.fab:hover { transform: scale(1.1); box-shadow: 0 4px 20px rgba(0,0,0,0.25); }

.fab--scroll-top { background: var(--primary); color: white; }
.fab--whatsapp   { background: var(--whatsapp); color: white; }
.fab--telegram   { background: var(--telegram); color: white; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: #1c1c1e;
  color: #e9ecef;
  margin-top: 48px;
}

.footer-widgets {
  background: #252525;
  padding: 48px 0 32px;
  border-bottom: 1px solid #333;
}

.footer-widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-widget-col .widget-title { color: white; }

.footer-widget-col a { color: #a0a0a0; }
.footer-widget-col a:hover { color: white; }

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid #333;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copyright p {
  font-size: 13px;
  color: #a0a0a0;
  margin: 0;
}

.footer-copyright a { color: #e9ecef; }
.footer-copyright a:hover { color: white; }

.footer-policy-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-policy-nav a {
  font-size: 13px;
  color: #a0a0a0;
  text-decoration: none;
}

.footer-policy-nav a:hover { color: white; text-decoration: underline; }

.footer-nav { padding-block: 16px; }

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav-list a { font-size: 13px; color: #a0a0a0; }
.footer-nav-list a:hover { color: white; }

/* ============================================================
   ARCHIVE / SEARCH HEADERS
   ============================================================ */
.archive-header, .search-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.archive-title, .search-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-title span { color: var(--primary); }

.archive-description {
  font-size: 15px;
  color: var(--gray-text);
  margin-top: 8px;
  line-height: 1.6;
}

.search-count {
  font-size: 14px;
  color: var(--gray-text);
  margin-top: 6px;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.error-404-content { text-align: center; max-width: 520px; }

.error-404-icon {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}

.error-404-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: 900;
  color: var(--border-dark);
}

.error-404-title {
  font-size: 28px;
  margin-bottom: 12px;
}

.error-404-desc {
  font-size: 16px;
  color: var(--gray-text);
  margin-bottom: 24px;
}

.error-404-search { margin-bottom: 24px; }
.error-404-links { display: flex; gap: 12px; justify-content: center; margin-bottom: 32px; }

.error-404-recent h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--gray-text);
}

.recent-posts-404 { list-style: none; text-align: left; }
.recent-posts-404 li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.recent-posts-404 li:last-child { border-bottom: none; }

/* ============================================================
   NO POSTS / NO RESULTS
   ============================================================ */
.no-posts-message, .no-results {
  padding: 48px 24px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.no-results { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.no-results h2 { font-size: 22px; }
.no-results p { color: var(--gray-text); }

/* ============================================================
   PAGINATION
   ============================================================ */
/* (base styles in style.css) */

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .web-stories-grid { grid-template-columns: repeat(4, 1fr); }
  .category-grid    { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  /* Header */
  #primary-navigation { display: none; }
  .mobile-menu-toggle { display: flex; flex-direction: column; }

  .hero-section { padding: 36px 0; }
  .hero-tagline { font-size: 22px; }

  /* Category grid */
  .category-grid { grid-template-columns: repeat(2, 1fr); }

  /* Social cards */
  .social-cards-grid { grid-template-columns: 1fr; }

  /* Post card */
  .post-card-inner { flex-direction: column; }
  .post-card-thumb a,
  .post-thumb-img,
  .post-thumb-placeholder { width: 100%; height: 160px; }

  /* Content sidebar */
  .content-with-sidebar { grid-template-columns: 1fr; }

  /* Related posts */
  .related-posts-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-widgets-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  /* Web stories */
  .web-stories-grid {
    grid-template-columns: repeat(3, 140px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .web-stories-grid::-webkit-scrollbar { display: none; }
  .story-card { width: 140px; }

  /* Post title */
  .post-title { font-size: 22px; }

  /* Share buttons */
  .share-label { display: none; }
  .share-btn   { padding: 8px; }
}

@media (max-width: 480px) {
  .social-cards-grid { grid-template-columns: 1fr; }
  .category-grid     { grid-template-columns: repeat(2, 1fr); }
  .related-posts-grid { grid-template-columns: 1fr; }
  .floating-buttons  { bottom: 16px; right: 12px; }

  .hero-section { padding: 24px 0; }
}

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

.social-card { animation: fadeInUp 0.4s ease both; }
.social-card:nth-child(2) { animation-delay: 0.1s; }
.social-card:nth-child(3) { animation-delay: 0.2s; }

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.category-grid-section { padding: 60px 0; background: #fff; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-top: 30px; }
.category-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; transition: var(--transition); text-decoration: none; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.cat-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); border-radius: 50%; margin-bottom: 16px; font-size: 24px; }
.cat-icon svg { width: 24px; height: 24px; }
.cat-name { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.cat-posts-count { font-size: 13px; color: var(--gray-text); }

/* ============================================================
   SOCIAL COMMUNITY CARDS
   ============================================================ */
.social-community-section { padding: 60px 0; background: var(--light-bg); }
.social-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.social-card { position: relative; padding: 30px; border-radius: var(--radius-lg); color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; transition: var(--transition); }
.social-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.social-card-icon { margin-bottom: 20px; opacity: 0.9; }
.social-card-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; color: #fff; }
.social-card-desc { font-size: 14px; opacity: 0.85; margin: 0 0 24px; }
.social-card-btn { display: inline-block; padding: 10px 24px; background: #fff; border-radius: 20px; font-size: 14px; font-weight: 600; text-decoration: none; transition: var(--transition); }
.social-card-btn:hover { background: #f8f9fa; transform: scale(1.05); }
.social-card--telegram { background: #0088cc; }
.social-card--telegram .social-card-btn { color: #0088cc; }
.social-card--whatsapp { background: #25D366; }
.social-card--whatsapp .social-card-btn { color: #25D366; }
.social-card--facebook { background: #1877F2; }
.social-card--facebook .social-card-btn { color: #1877F2; }

@media (max-width: 991px) { .social-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .social-cards-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ACCESSIBILITY UTILITIES
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }


/* ============================================================
   CUSTOMIZED USER COLORS & LAYOUT (OVERRIDES)
   ============================================================ */

/* 1. Header + Hero matching attached gradient image */
body.home #site-header { background: transparent; border-bottom: none; box-shadow: none; }
body:not(.home) #site-header { background: linear-gradient(180deg, #3bb3f1 0%, #06cbd3 100%); border-bottom: none; box-shadow: none; }

/* Increased specificity so it properly overrides the transparent background upon scrolling */
body #site-header.header-scrolled { background: rgba(26, 171, 226, 0.95) !important; backdrop-filter: blur(10px); }
.header-inner .site-name, .header-inner .nav-link, .search-toggle { color: #fff !important; }
.hamburger-bar { background: #fff !important; }

/* The gradient container wrapping header and hero (Homepage only) */
.hero-section {
    background: linear-gradient(180deg, #3bb3f1 0%, #06cbd3 100%);
    padding-top: 100px; /* offset for transparent absolute header */
    color: #fff;
}
.hero-tagline, .hero-subheading, .trending-label { color: #fff !important; }
.trending-pill { color: rgba(255,255,255,0.8) !important; border-color: rgba(255,255,255,0.4) !important; }
.trending-pill:hover { background: #fff !important; color: #06cbd3 !important; }

/* If header is transparent, we need to position it absolutely above hero (Homepage only) */
body.home:not(.scrolled) #site-header { position: absolute; width: 100%; top: 0; }

/* 2. Category Grid: 5 columns desktop, 2 mobile. Sky blue background */
.category-grid-section { background: #d4efff !important; } /* Sky Blue */
.category-grid { grid-template-columns: repeat(5, 1fr) !important; }
@media (max-width: 991px) { .category-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 768px) { .category-grid { grid-template-columns: repeat(2, 1fr) !important; } }

/* 3. Posts section = Normal white */
.latest-posts-section { background: #ffffff !important; }

/* 4. Footer = Dark Blackish Blue */
#site-footer { background: #050a15 !important; color: #a9b5c2 !important; border-top: none; }
.footer-widgets-grid { padding-top: 60px; padding-bottom: 40px; }
.footer-widget-col .widget-title { color: #ffffff !important; border-left-color: #3bb3f1; }
.footer-bottom { background: #02050a !important; border-top: 1px solid rgba(255,255,255,0.05); padding: 24px 0; }
.footer-copyright { color: #8795a3; }
.footer-copyright a { color: #fff; text-decoration: none; }
.footer-copyright a:hover { color: #3bb3f1; }
.footer-policy-nav a { color: #8795a3 !important; }
.footer-policy-nav a:hover { color: #fff !important; }


/* 5. Post Buttons / Links to Blue */
.post-card-read-more, .view-all { 
    background: #1a73e8 !important; 
    color: #ffffff !important; 
    border-radius: 4px; 
    padding: 8px 16px; 
    text-decoration: none; 
    font-weight: 600; 
    transition: background 0.2s ease; 
}
.post-card-read-more:hover, .view-all:hover { 
    background: #1557b0 !important; 
}

/* 6. Enlarge Footer for Widgets */
.footer-widgets {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
    border-top: 5px solid #1a73e8 !important; /* Big blue border overhead */
}
.footer-widget-col {
    min-height: 200px; /* Force minimum height so it looks big even if empty */
    background: rgba(255,255,255,0.03); /* Slight contrast panel for empty widgets */
    border: 1px dashed rgba(255,255,255,0.1); /* Helper border so user knows where to drop widgets */
    border-radius: 8px;
    padding: 24px;
}
.footer-widget-col:empty::after {
    content: "Add a widget here via Appearance > Customize > Widgets";
    display: block;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    text-align: center;
    margin-top: 60px;
}


/* 7. Section Heading Styles (from user screenshot) */
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.section-heading h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    padding-left: 12px;
    border-left: 4px solid #1a73e8; /* Blue left border */
    line-height: 1.2;
}

/* Category Grid background update: User requested "sky color not light sky color, which you set in header menu section" */
.category-grid-section { 
    background: #3bb3f1 !important; /* Proper sky blue matching the header/hero shade */
}
.category-grid-section .section-heading h2 {
    color: #ffffff;
    border-left-color: #ffffff; /* Make the left border white on the dark sky background */
}

/* 8. Custom Comment Form (User Screenshot Match) */
.custom-comment-form-box {
    margin-top: 50px;
    padding: 30px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
}

/* Break the title out of the box and overlap the top border, like a fieldset legend */
.comment-reply-title {
    position: absolute;
    top: -24px;
    left: 20px;
    background: #ffffff;
    padding: 0 20px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
    border: 1px solid #1c1c1e;
    border-radius: 24px;
    line-height: 46px;
    height: 48px;
    display: flex;
    align-items: center;
}

/* Form structure */
.custom-comment-form-box form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

/* Textarea full width */
.comment-form-comment { width: 100%; }
.comment-form-comment textarea {
    width: 100%;
    border: 1px solid #6c757d;
    border-radius: 0; /* Sharp corners like screenshot */
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

/* Inputs half width */
.comment-form-author, .comment-form-email, .comment-form-url {
    width: 50%;
}
.comment-form-author input, .comment-form-email input, .comment-form-url input {
    width: 100%;
    border: 1px solid #6c757d;
    border-radius: 0;
    padding: 12px;
    font-size: 14px;
    outline: none;
}

@media (max-width: 768px) {
    .comment-form-author, .comment-form-email, .comment-form-url { width: 100%; }
}

/* Checkbox alignment */
.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a4a4a;
    margin-top: 4px;
}

/* Green Submit Button */
.custom-btn-submit {
    background: #00c897 !important; /* Bright green from screenshot */
    color: #ffffff !important;
    border: none;
    border-radius: 24px !important; /* Fully rounded pill shape */
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start; /* Don't stretch */
    margin-top: 10px;
    transition: background 0.2s;
}
.custom-btn-submit:hover {
    background: #00a87d !important;
}

/* Hide logged-in as text if needed */
.logged-in-as { font-size: 13px; color: #6c757d; margin-bottom: 20px; }

/* 9. Light Sky Color for Widget Sections */
.sidebar-widget,
.footer-widget-col {
    background-color: #f0f8ff !important; /* AliceBlue / Light Sky */
    border-color: #d4efff !important;
}

/* Ensure text in the footer widget remains legible on the light background */
#site-footer .footer-widget-col {
    color: #0b192c !important; /* Dark text for contrast */
}
#site-footer .footer-widget-col .widget-title {
    color: #0b192c !important; /* Dark title for contrast */
}
#site-footer .footer-widget-col a {
    color: #1a73e8 !important;
}
#site-footer .footer-widget-col a:hover {
    color: #0b192c !important;
}
#site-footer .footer-widget-col:empty::after {
    color: #6c757d; /* Adjust empty state text color */
}

/* ============================================================
   SINGLE POST & INNER PAGE LAYOUT
   ============================================================ */
.content-with-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
}
.single-article,
.main-column {
    flex: 1 1 0%;
    min-width: 0;
}
.sidebar {
    width: 320px;
    flex-shrink: 0;
}
@media (max-width: 991px) {
    .content-with-sidebar {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        margin-top: 40px;
    }
}

/* Breadcrumbs Spacing */
.breadcrumb-bar {
    margin-top: 30px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #4a4a4a;
    border-left: 4px solid var(--primary);
}
.breadcrumb-bar a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb-bar a:hover {
    text-decoration: underline;
}

/* Post Content Formatting */
.post-content {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
    margin-top: 30px;
}
.post-content h2, .post-content h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--dark);
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}
.post-content p {
    margin-bottom: 20px;
}
