/* ============================================================
   Blogify CMS — Main Stylesheet
   Premium minimalist magazine design
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --red: #ff2d2d;
  --red-dark: #e00;
  --black: #111111;
  --gray-soft: #f5f5f5;
  --gray-border: #eaeaea;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-muted: #999999;
  --white: #ffffff;
  --footer-bg: #0f1117;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.05);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --transition: .3s ease;
}
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: var(--white); color: var(--text-primary); font-size: 15px; line-height: 1.65; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; } /* reset for nav/widget lists only — post content overridden below */

/* --- Reading Progress --- */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--red); width: 0%; z-index: 9999;
  transition: width .1s linear;
}

/* --- Container --- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ==================== TOP BAR ==================== */
.top-bar { background: var(--white); border-bottom: 1px solid var(--gray-border); height: 40px; display: flex; align-items: center; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.trending { display: flex; align-items: center; gap: 8px; font-size: 12px; overflow: hidden; min-width: 0; }
.trending-label { background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 3px; white-space: nowrap; letter-spacing: .5px; flex-shrink: 0; }
.trending-text { color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; transition: var(--transition); }
.trending-text:hover { color: var(--red); }
.top-socials { display: flex; gap: 12px; flex-shrink: 0; }
.top-socials a { color: #888; font-size: 13px; transition: var(--transition); }
.top-socials a:hover { color: var(--red); }

/* ==================== HEADER ==================== */
.main-header { background: var(--white); border-bottom: 1px solid var(--gray-border); position: sticky; top: 0; z-index: 100; transition: box-shadow var(--transition); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo a { display: flex; flex-direction: column; text-decoration: none; }
.logo-img { height: 40px; width: auto; object-fit: contain; }
.logo-title { font-size: 28px; font-weight: 800; color: var(--black); letter-spacing: -1px; line-height: 1; }
.logo-title span { color: var(--red); }
.logo-tagline { font-size: 10px; color: var(--text-muted); letter-spacing: 2px; font-weight: 500; text-transform: uppercase; }
.main-nav ul { display: flex; list-style: none; gap: 2px; }
.main-nav ul li a { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); padding: 8px 10px; letter-spacing: .6px; border-bottom: 2px solid transparent; transition: var(--transition); display: block; white-space: nowrap; }
.main-nav ul li a:hover, .main-nav ul li a.active { color: var(--red); border-bottom-color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.search-btn { background: none; border: 1px solid var(--gray-border); width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; color: #555; font-size: 14px; transition: var(--transition); }
.search-btn:hover { border-color: var(--red); color: var(--red); }
.hamburger { background: none; border: 1px solid var(--gray-border); width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: var(--transition); }
.hamburger:hover { border-color: var(--red); }
.hamburger span { display: block; width: 16px; height: 2px; background: #555; transition: var(--transition); }

/* ==================== MAIN CONTENT ==================== */
.main-content { padding: 30px 0 60px; }
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; }

/* ==================== CATEGORY LABEL ==================== */
.category-label { display: inline-block; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 3px; letter-spacing: .8px; margin-bottom: 10px; transition: var(--transition); }
.category-label:hover { background: var(--red-dark); }
.category-label.sm { font-size: 9px; padding: 2px 7px; }

/* ==================== FEATURED POST ==================== */
.featured-post { margin-bottom: 30px; }
.featured-inner { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.featured-img { width: 100%; height: auto; display: block; transition: transform .5s ease; }
.featured-inner:hover .featured-img { transform: scale(1.03); }
.featured-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.18) 60%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 32px; }
.featured-title { font-size: 30px; font-weight: 700; color: #fff; line-height: 1.25; margin-bottom: 10px; max-width: 680px; }
.featured-title a { color: #fff; transition: var(--transition); }
.featured-title a:hover { color: rgba(255,255,255,.85); }
.featured-desc { color: rgba(255,255,255,.8); font-size: 14px; margin-bottom: 14px; max-width: 560px; }
.featured-meta { display: flex; gap: 18px; color: rgba(255,255,255,.7); font-size: 12px; flex-wrap: wrap; }
.featured-meta span { display: flex; align-items: center; gap: 5px; }

/* ==================== SECTION TITLE ==================== */
.section-title { font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--black); border-bottom: 2px solid var(--gray-border); padding-bottom: 12px; margin-bottom: 20px; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 40px; height: 2px; background: var(--red); }

/* ==================== POST CARDS ==================== */
.post-card { display: flex; gap: 16px; background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; transition: var(--transition); }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-thumb-link { flex-shrink: 0; overflow: hidden; border-radius: 8px; display: block; }
.post-thumb { width: 130px; height: 90px; object-fit: cover; border-radius: 8px; transition: transform var(--transition); display: block; }
.post-card:hover .post-thumb { transform: scale(1.04); }
.post-body { flex: 1; min-width: 0; }
.post-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin-bottom: 7px; }
.post-title a { color: var(--black); transition: var(--transition); }
.post-card:hover .post-title a { color: var(--red); }
.post-meta { display: flex; gap: 14px; font-size: 11px; color: var(--text-muted); margin-bottom: 7px; flex-wrap: wrap; }
.post-meta span { display: flex; align-items: center; gap: 4px; }
.post-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.page-btn { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid var(--gray-border); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: #555; transition: var(--transition); cursor: pointer; }
.page-btn:hover { border-color: var(--red); color: var(--red); }
.page-btn.active { background: var(--red); border-color: var(--red); color: #fff; }
.page-dots { color: var(--text-muted); padding: 0 4px; }

/* ==================== SIDEBAR ==================== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius-md); padding: 20px; }
.widget-title { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--black); border-bottom: 2px solid var(--gray-border); padding-bottom: 12px; margin-bottom: 16px; position: relative; }
.widget-title::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 30px; height: 2px; background: var(--red); }
.adsense-box { border: none; padding: 0; }
.ad-placeholder { background: var(--gray-soft); border: 2px dashed #ddd; border-radius: var(--radius-md); height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #bbb; gap: 8px; }
.ad-placeholder i { font-size: 32px; }
.ad-placeholder p { font-size: 14px; font-weight: 600; color: #bbb; }
.ad-placeholder span { font-size: 12px; }

/* Popular Posts */
.popular-posts li { border-bottom: 1px solid #f0f0f0; }
.popular-posts li:last-child { border-bottom: none; }
.popular-post-item { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.popular-post-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.popular-title { font-size: 13px; font-weight: 600; color: var(--black); line-height: 1.4; margin-bottom: 4px; transition: var(--transition); }
.popular-post-item:hover .popular-title { color: var(--red); }
.popular-date { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* Categories */
.categories-list li { border-bottom: 1px solid #f0f0f0; }
.categories-list li:last-child { border-bottom: none; }
.categories-list li a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13.5px; color: #333; font-weight: 500; transition: var(--transition); }
.categories-list li a:hover { color: var(--red); }
.categories-list li a span { background: #f0f0f0; color: #666; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }

/* Follow Buttons */
.follow-btns { display: flex; flex-direction: column; gap: 8px; }
.follow-btn { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #fff; transition: var(--transition); }
.follow-btn:hover { opacity: .9; transform: translateY(-1px); }
.follow-btn.facebook { background: #1877f2; }
.follow-btn.twitter { background: #000; }
.follow-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.follow-btn.pinterest { background: #e60023; }
.follow-btn.youtube { background: #ff0000; }

/* ==================== SINGLE POST ==================== */
.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--text-muted); transition: var(--transition); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .fas { font-size: 9px; }
.single-featured-img { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.single-featured-img img { width: 100%; height: auto; display: block; }
.post-header { margin-bottom: 28px; }
.single-title { font-size: 34px; font-weight: 700; line-height: 1.25; margin-bottom: 14px; color: var(--black); }
.single-meta { display: flex; gap: 20px; font-size: 12px; color: var(--text-muted); margin-bottom: 18px; flex-wrap: wrap; }
.single-meta span { display: flex; align-items: center; gap: 5px; }

/* Share Buttons */
.share-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-buttons > span { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); }
.share-btn { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; transition: var(--transition); border: none; cursor: pointer; }
.share-btn:hover { transform: translateY(-2px); opacity: .9; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000; }
.share-btn.pinterest { background: #e60023; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: #555; }

/* Post Content Typography */
.post-content, .entry-content { font-size: 16px; line-height: 1.85; color: var(--text-primary); margin-bottom: 30px; }
.post-content h2, .entry-content h2 { font-size: 24px; font-weight: 700; margin: 30px 0 14px; color: var(--black); }
.post-content h3, .entry-content h3 { font-size: 20px; font-weight: 600; margin: 25px 0 12px; color: var(--black); }
.post-content p, .entry-content p { margin-bottom: 18px; }
.post-content img, .entry-content img { max-width: 100%; border-radius: 8px; margin: 20px 0; }
.post-content ul,
.entry-content ul {
  list-style: disc !important;
  padding-left: 1.75em !important;
  margin: 14px 0 14px 0 !important;
}
.post-content ol,
.entry-content ol {
  list-style: decimal !important;
  padding-left: 1.75em !important;
  margin: 14px 0 14px 0 !important;
}
.post-content ul li,
.entry-content ul li {
  list-style-type: disc !important;
  display: list-item !important;
  margin-bottom: 6px;
  line-height: 1.75;
  color: #333;
}
.post-content ol li,
.entry-content ol li {
  list-style-type: decimal !important;
  display: list-item !important;
  margin-bottom: 6px;
  line-height: 1.75;
  color: #333;
}
.post-content ul ul,
.entry-content ul ul { list-style-type: circle !important; margin-left: 1.4em !important; }
.post-content ul ul ul,
.entry-content ul ul ul { list-style-type: square !important; }
.post-content ol ol,
.entry-content ol ol { list-style-type: lower-alpha !important; margin-left: 1.4em !important; }
.post-content li, .entry-content li { margin-bottom: 6px; }
.post-content blockquote, .entry-content blockquote { border-left: 4px solid var(--red); padding: 16px 20px; margin: 24px 0; background: #fff8f8; border-radius: 0 8px 8px 0; font-style: italic; font-size: 17px; color: #444; }
.post-content pre, .entry-content pre { background: #1e1e2e; color: #cdd6f4; padding: 20px; border-radius: 8px; overflow-x: auto; margin: 20px 0; font-size: 14px; line-height: 1.6; }
.post-content code, .entry-content code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.post-content a, .entry-content a { color: var(--red); text-decoration: underline; }
.post-content table, .entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; table-layout: auto; }
.post-content thead th,.entry-content thead th{background:#f5f5f5;font-weight:700;text-align:left}
.post-content th, .post-content td, .entry-content th, .entry-content td { border: 1px solid var(--gray-border); padding: 10px 14px; text-align: left; }

/* Tags */
.post-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; padding: 16px 0; border-top: 1px solid var(--gray-border); border-bottom: 1px solid var(--gray-border); }
.post-tags > span { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .5px; }
.tag-btn { background: var(--gray-soft); color: #555; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; transition: var(--transition); }
.tag-btn:hover { background: var(--red); color: #fff; }

/* Author Box */
.author-box { display: flex; gap: 20px; background: var(--gray-soft); border-radius: var(--radius-md); padding: 24px; margin-bottom: 30px; align-items: flex-start; }
.author-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author-initials { width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.author-info h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.author-info p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* Post Navigation */
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 30px; }
.nav-prev, .nav-next { background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius-md); padding: 16px; transition: var(--transition); }
.nav-prev { text-align: left; }
.nav-next { text-align: right; }
.nav-prev:hover, .nav-next:hover { border-color: var(--red); box-shadow: var(--shadow-sm); }
.nav-prev span, .nav-next span { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 5px; }
.nav-prev strong, .nav-next strong { font-size: 13px; color: var(--black); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Related Posts */
.related-posts { margin-bottom: 30px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card { border: 1px solid var(--gray-border); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-thumb-link { display: block; overflow: hidden; }
.related-thumb-link img { width: 100%; height: 120px; object-fit: cover; transition: transform var(--transition); }
.related-card:hover .related-thumb-link img { transform: scale(1.04); }
.related-body { padding: 12px; }
.related-body h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.related-body h4 a { color: var(--black); transition: var(--transition); }
.related-card:hover .related-body h4 a { color: var(--red); }
.related-date { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* Comments */
.comments-section { margin-bottom: 30px; }
.comments-list { margin-bottom: 30px; }
.comment { display: flex; gap: 14px; margin-bottom: 20px; }
.comment.reply { margin-left: 60px; }
.comment-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.comment-body { flex: 1; background: var(--gray-soft); border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md); padding: 14px 16px; }
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.comment-header strong { font-size: 13px; }
.comment-header span { font-size: 11px; color: var(--text-muted); }
.reply-toggle { background: none; border: 1px solid var(--gray-border); color: var(--text-muted); font-size: 11px; padding: 2px 10px; border-radius: 4px; cursor: pointer; font-family: 'Poppins', sans-serif; transition: var(--transition); }
.reply-toggle:hover { border-color: var(--red); color: var(--red); }
.comment-body p { font-size: 13px; line-height: 1.6; }
.reply-form-wrap { margin-top: 12px; }
.reply-form-wrap form { display: flex; flex-direction: column; gap: 8px; }
.reply-form-wrap input, .reply-form-wrap textarea { padding: 10px 14px; border: 1px solid var(--gray-border); border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 13px; outline: none; }
.reply-form-wrap button { background: var(--red); color: #fff; border: none; padding: 8px 18px; border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; align-self: flex-start; }
.comment-replies { margin-top: 16px; border-top: 1px solid var(--gray-border); padding-top: 16px; }
.comment-form-wrap { background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius-md); padding: 24px; }
.comment-form-wrap h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.comment-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comment-form input, .comment-form textarea { padding: 12px 14px; border: 1px solid var(--gray-border); border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 14px; outline: none; transition: var(--transition); }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--red); }
.btn-submit { background: var(--red); color: #fff; border: none; padding: 13px 30px; border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; letter-spacing: .5px; transition: var(--transition); align-self: flex-start; }
.btn-submit:hover { background: var(--red-dark); }

/* ==================== ARCHIVE HEADER ==================== */
.archive-header { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-border); }
.archive-title { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.archive-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; }
.archive-count { background: var(--gray-soft); color: var(--text-muted); font-size: 12px; padding: 4px 12px; border-radius: 20px; }

/* ==================== SEARCH ==================== */
.search-hero { margin-bottom: 28px; }
.search-form { display: flex; gap: 8px; margin-bottom: 12px; }
.search-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--gray-border); border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 15px; outline: none; transition: var(--transition); }
.search-form input:focus { border-color: var(--red); }
.search-form button { background: var(--red); color: #fff; border: none; padding: 12px 20px; border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: var(--transition); }
.search-form button:hover { background: var(--red-dark); }
.search-info { font-size: 14px; color: var(--text-secondary); }

/* ==================== ALERTS ==================== */
.alert { padding: 12px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.no-content { color: var(--text-muted); font-size: 14px; padding: 20px 0; }

/* ==================== FOOTER ==================== */
.footer { background: var(--footer-bg); }
.footer-main { padding: 50px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-logo { font-size: 26px; font-weight: 800; color: #fff; margin-bottom: 12px; letter-spacing: -1px; }
.footer-desc { font-size: 13px; color: #888; line-height: 1.7; margin-bottom: 18px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 34px; height: 34px; background: rgba(255,255,255,.07); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; transition: var(--transition); }
.footer-socials a:hover { background: var(--red); color: #fff; }
.footer-title { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: #fff; margin-bottom: 18px; position: relative; padding-bottom: 12px; }
.footer-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 24px; height: 2px; background: var(--red); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 13px; color: #888; display: flex; align-items: center; gap: 7px; transition: var(--transition); }
.footer-links a i { font-size: 9px; color: var(--red); }
.footer-links a:hover { color: #fff; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 11px 14px; color: #fff; font-family: 'Poppins', sans-serif; font-size: 13px; outline: none; transition: var(--transition); }
.newsletter-form input::placeholder { color: #666; }
.newsletter-form input:focus { border-color: var(--red); }
.newsletter-form button { background: var(--red); color: #fff; border: none; padding: 11px; border-radius: 6px; font-family: 'Poppins', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 1px; cursor: pointer; transition: var(--transition); }
.newsletter-form button:hover { background: var(--red-dark); }
.footer-ad-wrap { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.07); padding: 18px 0; }
.footer-bottom p { text-align: center; font-size: 12.5px; color: #555; }

/* ==================== STATIC PAGE ==================== */
.page-content { padding: 40px 0; }
.page-title { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.page-body { font-size: 16px; line-height: 1.85; color: var(--text-primary); }
.page-body h2 { font-size: 22px; font-weight: 700; margin: 24px 0 12px; }
.page-body p { margin-bottom: 16px; }
.page-body a { color: var(--red); }

/* ==================== DARK MODE ==================== */
body.dark-mode {
  --black: #f0f0f0;
  --text-primary: #e0e0e0;
  --text-secondary: #aaa;
  --text-muted: #777;
  --white: #1a1a2e;
  --gray-soft: #16213e;
  --gray-border: #2d2d44;
  background: #12121e;
  color: var(--text-primary);
}
body.dark-mode .main-header,
body.dark-mode .top-bar { background: #1a1a2e; }
body.dark-mode .post-card,
body.dark-mode .widget { background: #1a1a2e; }
body.dark-mode .logo-title,
body.dark-mode .main-nav ul li a { color: #ddd; }

/* ==================== RESPONSIVE ==================== */
@media(max-width:1024px) {
  .content-grid { grid-template-columns: 1fr 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .related-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
  .adsense-box { grid-column: span 2; }
  .main-nav { display: none; position: absolute; top: 110px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--gray-border); padding: 16px 20px; z-index: 99; box-shadow: var(--shadow-md); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul li a { padding: 12px 0; border-bottom: 1px solid #f5f5f5; border-left: none; }
  .hamburger { display: flex; }
  .featured-title { font-size: 22px; }
  .featured-overlay { padding: 20px; }
  .single-title { font-size: 26px; }
  .post-navigation { grid-template-columns: 1fr; }
}
@media(max-width:640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .adsense-box { grid-column: 1; }
  .post-thumb { width: 90px; height: 70px; }
  .featured-title { font-size: 18px; }
  .featured-meta { gap: 10px; }
  .top-socials { display: none; }
  .trending-text { max-width: 200px; }
  .form-row { grid-template-columns: 1fr; }
  .share-buttons { gap: 6px; }

  /* ── Single post mobile fixes ── */
  .single-title { font-size: 22px; line-height: 1.3; }
  .single-meta  { gap: 10px; font-size: 12px; }

  /* Related posts: 1 column on mobile, taller image */
  .related-grid { grid-template-columns: 1fr; gap: 12px; }
  .related-thumb-link img { height: 180px; }
  .related-body { padding: 14px; }
  .related-body h4 { font-size: 14px; }

  /* Post navigation: stack vertically */
  .post-navigation { grid-template-columns: 1fr !important; gap: 10px; }
  .nav-prev, .nav-next { padding: 14px; }
  .nav-next { text-align: left; }

  /* Author profile card: stack on mobile */
  .author-profile-card { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .author-profile-photo,
  .author-profile-initials { width: 60px; height: 60px; font-size: 20px; }

  /* Comments: tighter on mobile */
  .comment-form-wrap { padding: 16px; }
  .comment-form input,
  .comment-form textarea { font-size: 14px; padding: 10px 12px; }

  /* Tags row: wrap nicely */
  .post-tags { gap: 6px; padding: 12px 0; }

  /* Share buttons: smaller on mobile */
  .share-btn { width: 30px; height: 30px; font-size: 12px; }

  /* Post content: comfortable reading */
  .post-content, .entry-content { font-size: 15px; line-height: 1.8; }
  .post-content h2, .entry-content h2 { font-size: 20px; }
  .post-content h3, .entry-content h3 { font-size: 17px; }

  /* Footer bottom: stack */
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-nav { gap: 12px; }
}

@media(max-width:400px) {
  .post-card { flex-direction: column; }
  .post-thumb { width: 100%; height: 180px; }

  /* Tightest screens */
  .related-grid { grid-template-columns: 1fr; }
  .related-thumb-link img { height: 160px; }
  .featured-title { font-size: 16px; }
  .comment-body { font-size: 13px; }
  .comment-form-wrap { padding: 14px; }
}

/* ==================== MOBILE MENU DRAWER ==================== */

/* Hamburger visible on mobile */
.hamburger {
  background: none; border: 1px solid var(--gray-border);
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  cursor: pointer; display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  transition: var(--transition); padding: 0;
}
.hamburger:hover { border-color: var(--red); }
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: #555; border-radius: 2px; transition: var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Overlay */
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 998;
  backdrop-filter: blur(2px);
  transition: opacity .3s;
}
.mobile-overlay.visible { display: block; }

/* Mobile Menu Drawer */
.mobile-menu {
  position: fixed; top: 0; right: -320px;
  width: 300px; max-width: 90vw;
  height: 100vh; background: #fff;
  z-index: 999; display: flex; flex-direction: column;
  box-shadow: -4px 0 30px rgba(0,0,0,.15);
  transition: right .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-menu.is-open { right: 0; }

/* Mobile menu header */
.mobile-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--gray-border);
  flex-shrink: 0;
}
.mobile-menu-close {
  background: var(--gray-soft); border: none;
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: #555; font-size: 14px;
  transition: var(--transition);
}
.mobile-menu-close:hover { background: #fee2e2; color: var(--red); }

/* Mobile Search */
.mobile-search {
  padding: 14px 20px; border-bottom: 1px solid var(--gray-border);
  flex-shrink: 0;
}
.mobile-search form {
  display: flex; border: 1.5px solid var(--gray-border);
  border-radius: 8px; overflow: hidden; transition: border-color .2s;
}
.mobile-search form:focus-within { border-color: var(--red); }
.mobile-search input {
  flex: 1; border: none; padding: 9px 14px;
  font-family: 'Poppins', sans-serif; font-size: 13px;
  outline: none; background: transparent;
}
.mobile-search button {
  background: var(--red); border: none; padding: 0 14px;
  color: #fff; cursor: pointer; font-size: 13px;
  transition: background .2s;
}
.mobile-search button:hover { background: var(--red-dark); }

/* Mobile Nav Links */
.mobile-nav { flex: 1; padding: 10px 0; }
.mobile-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; color: #333; font-size: 14px; font-weight: 500;
  border-bottom: 1px solid #f5f5f5; transition: var(--transition);
  text-decoration: none;
}
.mobile-nav-item:hover { background: var(--gray-soft); color: var(--red); padding-left: 26px; }
.mobile-nav-item.active { color: var(--red); background: #fff0f0; font-weight: 700; }
.mobile-nav-item i { width: 16px; text-align: center; font-size: 12px; color: var(--red); }
.mobile-nav-item:last-child { border-bottom: none; }

/* Mobile Socials */
.mobile-socials {
  display: flex; gap: 10px; padding: 16px 20px;
  border-top: 1px solid var(--gray-border); flex-wrap: wrap;
  flex-shrink: 0;
}
.ms-btn {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; transition: var(--transition);
}
.ms-btn:hover { opacity: .85; transform: translateY(-2px); }
.ms-btn.facebook  { background: #1877f2; }
.ms-btn.twitter   { background: #000; }
.ms-btn.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.ms-btn.pinterest { background: #e60023; }
.ms-btn.youtube   { background: #ff0000; }

/* Show hamburger on mobile; hide desktop nav */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .main-nav  { display: none !important; } /* always hidden — replaced by drawer */
}

/* ==================== AUTHOR PUBLIC PROFILE ==================== */
.author-profile-card{display:flex;align-items:flex-start;gap:20px;background:var(--gray-soft);border-radius:var(--radius-md);padding:24px;margin-bottom:30px;border:1px solid var(--gray-border)}
.author-profile-photo{width:80px;height:80px;border-radius:50%;object-fit:cover;flex-shrink:0}
.author-profile-initials{width:80px;height:80px;border-radius:50%;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;flex-shrink:0}
.author-profile-info{flex:1;min-width:0}
.author-profile-name{font-size:18px;font-weight:700;margin-bottom:3px;color:var(--black)}
.author-profile-designation{font-size:13px;color:var(--text-muted);margin-bottom:8px}
.author-profile-bio{font-size:14px;color:var(--text-secondary);line-height:1.6;margin-bottom:10px}
.author-profile-socials{display:flex;gap:8px;flex-wrap:wrap}
.author-profile-social{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;transition:var(--transition)}
.author-profile-social:hover{opacity:.85;transform:translateY(-2px)}

/* ==================== TABLE FULL WIDTH NO SCROLL ==================== */
.post-content table,.entry-content table{width:100%!important;border-collapse:collapse;margin:16px 0;table-layout:auto;display:table!important}
.post-content th,.entry-content th,.post-content td,.entry-content td{border:1px solid #e5e7eb;padding:10px 14px;text-align:left;vertical-align:top;word-break:break-word}
.post-content thead tr,.entry-content thead tr{background:#f5f5f5;font-weight:700}

/* ==================== FOOTER BOTTOM BAR — 2 columns ==================== */
.footer-bottom{border-top:1px solid rgba(255,255,255,.07);padding:16px 0}
.footer-bottom-inner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.footer-copyright{font-size:12.5px;color:#888}
.footer-nav{display:flex;gap:16px;flex-wrap:wrap}
.footer-nav a{font-size:12.5px;color:#888;transition:var(--transition)}
.footer-nav a:hover{color:#fff}

/* ==================== HEADER DROPDOWN SUBMENU ==================== */
.main-nav ul li{position:relative}
.main-nav ul li:hover>.nav-dropdown{display:block}
.nav-dropdown{display:none;position:absolute;top:100%;left:0;background:#fff;border:1px solid var(--gray-border);border-radius:var(--radius-sm);box-shadow:0 8px 24px rgba(0,0,0,.1);min-width:200px;z-index:200;padding:6px 0}
.nav-dropdown a{display:block;padding:9px 16px;font-size:12px;font-weight:500;color:#444;white-space:nowrap;transition:var(--transition)}
.nav-dropdown a:hover{background:var(--gray-soft);color:var(--red)}
.nav-dropdown-arrow{font-size:8px;margin-left:4px;opacity:.6}



.category-label.secondary-cat { background: #f0f0f0; color: #555; }
.category-label.secondary-cat:hover { background: var(--red); color: #fff; }
/* ══════════════════════════════════════════════════════════════
   Table of Contents
   ══════════════════════════════════════════════════════════════ */
.toc-box {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-left: 4px solid #ff2d2d;
  border-radius: 10px;
  margin: 0 0 28px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  font-family: 'Poppins', system-ui, sans-serif;
}
.toc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background .2s;
}
.toc-header:hover { background: #f5f5f5; }
.toc-icon { color: var(--red); font-size: 14px; flex-shrink: 0; }
.toc-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  flex: 1;
  letter-spacing: .2px;
}
.toc-toggle { color: #aaa; font-size: 12px; transition: transform .25s; }

.toc-list { padding: 16px 20px 14px; }
.toc-list ol,
.toc-list ol ol { list-style: none !important; margin: 0; padding: 0; }

.toc-item { margin-bottom: 4px; }
.toc-h2 { }
.toc-h3 { margin-left: 16px; margin-bottom: 3px; }

.toc-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  color: #374151;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .15s;
  line-height: 1.45;
}
.toc-link:hover {
  background: #fff2f2;
  color: var(--red);
  padding-left: 12px;
}
.toc-link.toc-active {
  background: #fff2f2;
  color: var(--red);
  font-weight: 600;
  border-left: 3px solid var(--red);
  padding-left: 9px;
}

.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 1;
}
.toc-link:hover .toc-num,
.toc-link.toc-active .toc-num { background: #c80000; }

.toc-sub { list-style: none; padding: 0; margin: 2px 0 4px; }
.toc-sub-link { font-size: 12.5px; color: #6b7280; }
.toc-sub-link:hover { color: var(--red); }
.toc-sub-link.toc-active { color: var(--red); font-weight: 600; }
.toc-sub-dot { color: #d1d5db; font-size: 13px; flex-shrink: 0; width: 16px; }

/* Heading anchor styling */
.post-content h2[id],
.post-content h3[id],
.entry-content h2[id],
.entry-content h3[id] {
  scroll-margin-top: 90px; /* offset for sticky header */
}
.post-content h2[id]:hover::before,
.post-content h3[id]:hover::before,
.entry-content h2[id]:hover::before,
.entry-content h3[id]:hover::before {
  content: '# ';
  color: var(--red);
  font-weight: 400;
  opacity: .5;
}

/* Mobile TOC */
@media (max-width: 640px) {
  .toc-box { margin-bottom: 20px; }
  .toc-list { padding: 12px 14px 10px; }
  .toc-link { font-size: 13px; }
  .toc-h3 { margin-left: 10px; }
}

/* ── Inline Related Articles (in-content box) ── */
.inline-related-box {
  background: linear-gradient(135deg, #fff8f8 0%, #fff 100%);
  border: 1.5px solid #fecaca;
  border-left: 4px solid #ff2d2d;
  border-radius: 10px;
  padding: 16px 20px 14px;
  margin: 28px 0;
  clear: both;
}
.inline-related-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ff2d2d !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.inline-related-title i { font-size: 12px; }
.inline-related-title::after { display: none; } /* no heading underline */

.inline-related-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.inline-related-list li {
  list-style: none !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  padding: 7px 0 !important;
  border-bottom: 1px dashed #fecaca !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}
.inline-related-list li:last-child { border-bottom: none !important; }
.inline-related-list li::before {
  content: '→';
  color: #ff2d2d;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.inline-related-list a {
  font-size: 14px !important;
  color: #1e3a5f !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  transition: color .15s !important;
}
.inline-related-list a:hover {
  color: #ff2d2d !important;
  text-decoration: underline !important;
}
.inline-related-cat {
  display: inline-block;
  font-size: 10px !important;
  background: #ff2d2d !important;
  color: #fff !important;
  padding: 1px 7px !important;
  border-radius: 3px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
  flex-shrink: 0;
  margin-top: 1px;
}
@media (max-width: 640px) {
  .inline-related-box { padding: 13px 14px 11px; margin: 20px 0; }
  .inline-related-list a { font-size: 13px !important; }
}

/* ══════════════════════════════════════════
   Inline Related Box (.irb)
   ══════════════════════════════════════════ */
.irb {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-left: 4px solid #ff2d2d;
  border-radius: 10px;
  margin: 24px 0;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}
.irb-head {
  background: #fff2f2;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 800;
  color: #ff2d2d;
  text-transform: uppercase;
  letter-spacing: .8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #fecaca;
}
.irb-head i { font-size: 12px; }
.irb-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 6px 0 !important;
}
.irb-item {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #f5f5f5;
}
.irb-item:last-child { border-bottom: none; }
.irb-link {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  text-decoration: none !important;
  transition: background .15s !important;
}
.irb-link:hover { background: #fff8f8 !important; }
.irb-link::before {
  content: '›';
  color: #ff2d2d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  width: 12px;
}
.irb-cat {
  display: inline-block;
  font-size: 9px !important;
  font-weight: 700 !important;
  background: #ff2d2d !important;
  color: #fff !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.irb-title {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #1e3a5f !important;
  line-height: 1.4 !important;
}
.irb-link:hover .irb-title { color: #ff2d2d !important; }
@media (max-width:640px) {
  .irb { margin: 18px 0; }
  .irb-title { font-size: 12.5px !important; }
}