/*
Theme Name: Howk Blog
Theme URI: https://blog.howk.in
Author: Howk
Author URI: https://howk.in
Description: Official blog theme for Howk - competitive exam preparation platform. Matches the howk.in brand identity with orange, green, and dark accents.
Version: 1.0.2
License: GNU General Public License v2 or later
Tags: blog, education, competitive-exams
Text Domain: howk-blog
*/

/* === Brand Variables === */
:root {
  --color-brand: #ff9600;
  --color-brand-alt: #2c97ea;
  --color-accent: #17a43b;
  --color-accent-2: #4ab866;
  --color-heading: #24353b;
  --color-text: #4a5568;
  --color-muted: #6c777d;
  --color-nav: #211d1e;
  --font-sans: 'Roboto', ui-sans-serif, system-ui, sans-serif;
  --max-width: 1200px;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: #f8fafc;
  line-height: 1.7;
}

a { color: var(--color-brand-alt); text-decoration: none; }
a:hover { color: var(--color-brand); }

img { max-width: 100%; height: auto; display: block; }

h1,h2,h3,h4,h5,h6 {
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.3;
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === Header — matches howk_laravel new_header.blade.php === */
#site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #4ab866;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Desktop nav — hidden on mobile, shown on md+ via CSS (no JS needed) */
#desktop-nav {
  display: none;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  justify-content: center;
}
@media (min-width: 768px) {
  #desktop-nav { display: flex; }
}

.hnav-link {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s;
}
.hnav-link:hover { color: #fff; }
.hnav-link--active { color: #fff; font-weight: 600; }

/* Login button — hidden on mobile */
.header-login-btn {
  display: none;
  align-items: center;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.15);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .header-login-btn { display: inline-flex; }
}
.header-login-btn:hover { background: rgba(255,255,255,0.25); color: #fff; }

/* Hamburger — shown on mobile only */
.hamburger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  transition: background 0.15s;
}
@media (min-width: 768px) {
  .hamburger-btn { display: none; }
}
.hamburger-btn:hover { background: rgba(255,255,255,0.1); }

/* Mobile nav — hidden by default, toggled by JS class */
#mnav {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #4ab866;
  padding: 0.75rem 1rem 1rem;
}
#mnav.mnav--open { display: block; }

/* Hide mobile nav entirely on desktop regardless of JS state */
@media (min-width: 768px) {
  #mnav { display: none !important; }
}

.mnav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.15s;
}
.mnav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.mnav-link--login {
  background: rgba(255,255,255,0.15);
  color: #fff;
  margin-top: 0.25rem;
}
.mnav-link--login:hover { background: rgba(255,255,255,0.25); }

/* WP admin bar offset */
.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #site-header { top: 46px; } }

/* === Hero Banner === */
.blog-hero {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(44,151,234,0.15) 0%, transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(74,184,102,0.15) 0%, transparent 60%),
              linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
  padding: 3.5rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.blog-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--color-heading);
  margin-bottom: 0.75rem;
}

.blog-hero p {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* === Main Content Area === */
#main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  #main { grid-template-columns: 1fr; }
  #sidebar { display: none; }
}

/* === Post Grid (Archive) === */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(2,6,23,0.1);
  transform: translateY(-2px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f1f5f9;
}

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

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

.post-card-body { padding: 1.25rem; }

.post-category {
  display: inline-block;
  background: rgba(255,150,0,0.1);
  color: var(--color-brand);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

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

.post-card-excerpt {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}

.post-meta .dot { opacity: 0.4; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-brand-alt);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

.read-more:hover { color: var(--color-brand); }

/* === Reading Progress Bar === */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-brand-alt));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* === Single Post Hero === */
.post-hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(74,184,102,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(44,151,234,0.15) 0%, transparent 60%),
    linear-gradient(160deg, #0f172a 0%, #1a2f3a 60%, #1e3a2f 100%);
  color: #fff;
  padding: 4rem 1.25rem 5rem;
  position: relative;
  overflow: hidden;
}

/* subtle dot grid texture */
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.post-hero-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.post-breadcrumb a { color: rgba(255,255,255,0.6); transition: color 0.15s; }
.post-breadcrumb a:hover { color: var(--color-brand); }
.post-breadcrumb .sep { opacity: 0.4; }
.post-breadcrumb .current { color: rgba(255,255,255,0.85); }

/* Category pill */
.post-hero .post-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,150,0,0.18);
  border: 1px solid rgba(255,150,0,0.35);
  color: #ffb840;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1.1rem;
}

/* Post title */
.post-hero h1 {
  color: #fff;
  font-size: clamp(1.65rem, 4vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

/* Meta row */
.post-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.post-hero-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-accent-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.author-info { line-height: 1.3; }
.author-name { font-size: 0.875rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.author-role { font-size: 0.72rem; color: rgba(255,255,255,0.5); }

.post-hero-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.post-hero-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}
.post-stat svg { opacity: 0.6; }

/* === Featured Image === */
.post-featured-image {
  max-width: 900px;
  margin: -3.5rem auto 0;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}

.post-featured-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.15);
  display: block;
}

/* === Post Layout === */
.post-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 960px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
}

/* Top spacing when no featured image */
.post-layout--no-thumb { padding-top: 1.5rem; }

/* === Article Body === */
.post-article {
  min-width: 0;
}

.post-body {
  background: #fff;
  border-radius: 16px;
  padding: 2.75rem 2.75rem 2.25rem;
  border: 1px solid #e8edf2;
  box-shadow: 0 2px 12px rgba(15,23,42,0.04);
  font-size: 1.0625rem;
  line-height: 1.9;
  color: #374151;
}

@media (max-width: 640px) { .post-body { padding: 1.5rem 1.25rem; } }

/* Headings inside article */
.post-body h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-heading);
  margin: 2.5rem 0 0.8rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--color-brand);
  line-height: 1.3;
}

.post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-heading);
  margin: 2rem 0 0.6rem;
}

.post-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.5rem;
}

.post-body p { margin-bottom: 1.35rem; }

.post-body ul,
.post-body ol {
  margin: 0.75rem 0 1.5rem 0;
  padding-left: 1.6rem;
}

.post-body li { margin-bottom: 0.5rem; }

.post-body ul li::marker { color: var(--color-brand); }
.post-body ol li::marker { color: var(--color-brand); font-weight: 700; }

.post-body strong { color: var(--color-heading); font-weight: 700; }

.post-body blockquote {
  position: relative;
  border-left: none;
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  background: linear-gradient(135deg, #fffbf2 0%, #fff8e8 100%);
  margin: 2rem 0;
  border-radius: 12px;
  font-size: 1.05rem;
  font-style: italic;
  color: #3d3219;
  box-shadow: inset 4px 0 0 var(--color-brand);
}

.post-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.25rem;
  left: 1rem;
  font-size: 3.5rem;
  font-family: Georgia, serif;
  color: var(--color-brand);
  opacity: 0.35;
  line-height: 1;
}

.post-body code {
  background: #f1f5f9;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  font-size: 0.875em;
  color: #c7254e;
  font-family: 'Courier New', monospace;
}

.post-body pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.7;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.post-body pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

.post-body a { color: var(--color-brand-alt); text-decoration: underline; text-decoration-color: rgba(44,151,234,0.35); text-underline-offset: 3px; }
.post-body a:hover { color: var(--color-brand); text-decoration-color: var(--color-brand); }

.post-body img {
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.post-body hr {
  border: none;
  border-top: 2px dashed #e2e8f0;
  margin: 2.5rem 0;
}

/* Key takeaway box */
.post-body .wp-block-quote,
.post-body .key-takeaway {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

/* === Post Footer (tags + share) === */
.post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
}

.post-tags-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.post-tags-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
  padding-top: 0.25rem;
  flex-shrink: 0;
}

/* Share row */
.post-share-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-share-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none !important;
}
.share-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.share-btn--twitter { background: #000; color: #fff !important; }
.share-btn--whatsapp { background: #25d366; color: #fff !important; }
.share-btn--copy { background: #f1f5f9; color: var(--color-heading) !important; cursor: pointer; border: none; font-family: var(--font-sans); }
.share-btn--copy:hover { background: #e2e8f0; }

/* === Author Card === */
.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f7ff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.author-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-2) 0%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(74,184,102,0.35);
}

.author-card-info { flex: 1; min-width: 0; }
.author-card-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--color-muted); margin-bottom: 0.25rem; }
.author-card-name { font-size: 1.05rem; font-weight: 800; color: var(--color-heading); margin-bottom: 0.4rem; }
.author-card-bio { font-size: 0.875rem; color: var(--color-muted); line-height: 1.6; }

/* === Table of Contents === */
.post-toc {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  position: sticky;
  top: 80px;
}

.post-toc h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.post-toc ul { list-style: none; }
.post-toc li { margin-bottom: 0.4rem; }
.post-toc a { color: var(--color-muted); font-size: 0.875rem; }
.post-toc a:hover { color: var(--color-brand-alt); }

/* === Post Sidebar === */
.post-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 1.25rem; }

/* === Related Posts Grid === */
.related-posts-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.related-posts-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.related-posts-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* === Sidebar === */
#sidebar { position: sticky; top: 80px; }

.widget {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-brand);
  display: inline-block;
}

.widget ul { list-style: none; }
.widget li { padding: 0.4rem 0; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
.widget li:last-child { border: none; }
.widget a { color: var(--color-heading); }
.widget a:hover { color: var(--color-brand); }

/* Howk CTA widget */
.widget-howk-cta {
  background: linear-gradient(135deg, var(--color-accent-2) 0%, var(--color-accent) 100%);
  color: #fff;
  text-align: center;
  border: none;
}

.widget-howk-cta .widget-title { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.5); }
.widget-howk-cta h3 { color: #fff; font-size: 1.1rem; margin-bottom: 0.5rem; }
.widget-howk-cta p { color: rgba(255,255,255,0.85); font-size: 0.875rem; margin-bottom: 1rem; }
.btn-cta {
  display: inline-block;
  background: var(--color-brand);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.15s, transform 0.15s;
}
.btn-cta:hover { background: #e08500; color: #fff; transform: translateY(-1px); }

/* === Search Box === */
.search-form { display: flex; gap: 0.5rem; }
.search-form input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
}
.search-form input:focus { border-color: var(--color-brand-alt); }
.search-form button {
  background: var(--color-brand);
  color: #fff;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* === Tags Cloud === */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud-link {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 0.8rem !important;
  color: var(--color-muted);
  transition: background 0.15s, color 0.15s;
}
.tag-cloud-link:hover { background: var(--color-brand); color: #fff; }

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--color-heading);
  font-size: 0.9rem;
  transition: all 0.15s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

/* === Post Navigation === */
.post-navigation {
  max-width: 1120px;
  margin: 0 auto 1rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.nav-post-link {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e8edf2;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.nav-post-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-brand), var(--color-brand-alt));
  transform: scaleX(0);
  transition: transform 0.2s;
  transform-origin: left;
}
.nav-post-link:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.09); transform: translateY(-2px); border-color: #d1dce8; }
.nav-post-link:hover::before { transform: scaleX(1); }
.nav-post-link--next { text-align: right; }
.nav-post-link--next::before { transform-origin: right; }

.nav-post-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
}

.nav-post-title { font-size: 0.925rem; font-weight: 700; color: var(--color-heading); line-height: 1.4; }

/* === Comments === */
.comments-area {
  max-width: 1120px;
  margin: 0 auto 3.5rem;
  padding: 0 1.25rem;
}

.comments-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.comments-title::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

.comment-list { list-style: none; }

.comment-body {
  background: #fff;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  border: 1px solid #e8edf2;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.comment-author { font-weight: 700; color: var(--color-heading); margin-bottom: 0.2rem; }
.comment-meta { font-size: 0.78rem; color: var(--color-muted); margin-bottom: 0.75rem; }

/* Comment form */
#respond { background: #fff; border-radius: 16px; border: 1px solid #e8edf2; padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
#reply-title { font-size: 1.1rem; font-weight: 800; color: var(--color-heading); margin-bottom: 1.5rem; }
.comment-form label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--color-heading); }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafbfc;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-brand-alt); box-shadow: 0 0 0 3px rgba(44,151,234,0.1); background: #fff; }
.comment-form .submit {
  background: var(--color-brand);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.comment-form .submit:hover { background: #e08500; transform: translateY(-1px); }

/* === Footer === */
#site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-top: 0.75rem; }

.footer-brand img {
  height: 32px;
  width: auto;
  filter: brightness(2) opacity(0.8);
}

.footer-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #94a3b8; font-size: 0.875rem; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
}

/* === Utility === */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-orange { color: var(--color-brand); }
.badge-exam {
  display: inline-block;
  background: rgba(44,151,234,0.1);
  color: var(--color-brand-alt);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
