/* ============================================================
   JOGI Blog — Public Blog CSS
   Matching main site dark gold theme
   ============================================================ */

:root {
  --gold:       #F59E0B;
  --gold-dark:  #D97706;
  --gold-light: #FDE68A;
  --cream:      #FFFBEB;
  --dark:       #0D1117;
  --dark-card:  #1E293B;
  --dark-nav:   rgba(13, 17, 23, 0.95);
  --muted:      #94A3B8;
  --border:     rgba(245, 158, 11, 0.15);
  --border2:    rgba(255, 255, 255, 0.06);
  --text:       #e2e8f0;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--dark);
  color: var(--cream);
  font-family: 'Noto Sans Kannada', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

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

/* ============================================================
   NAVBAR
   ============================================================ */

.blog-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--dark-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-navbar-brand {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.blog-navbar-brand:hover { color: var(--gold-light); }

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.blog-nav-links a {
  color: var(--cream);
  font-size: 0.9rem;
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: none;
}

.blog-nav-links a:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
}

.blog-nav-links a.active { color: var(--gold); }

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1a2234;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 180px;
  padding: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: none;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
}

.nav-dropdown-menu a:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--gold);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.4rem;
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */

.blog-main {
  padding-top: 64px;
  min-height: 100vh;
}

/* ============================================================
   HERO
   ============================================================ */

.blog-hero {
  background: linear-gradient(135deg, #0d1117 0%, #1a2234 50%, #0d1117 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,.06) 0%, transparent 70%);
  pointer-events: none;
}

.blog-hero h1 {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  color: var(--cream);
  position: relative;
}

.blog-hero h1 span { color: var(--gold); }

.blog-hero .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
  list-style: none;
}

.blog-hero .breadcrumb a { color: var(--gold); }
.blog-hero .breadcrumb .sep { color: var(--muted); }

/* ============================================================
   CONTAINER
   ============================================================ */

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   POST GRID
   ============================================================ */

.blog-section {
  padding: 3rem 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ============================================================
   POST CARD
   ============================================================ */

.post-card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.post-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.post-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #1a2234, #0d1117);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 158, 11, 0.2);
  font-size: 3rem;
}

.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.25);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.15s;
}

.cat-badge:hover {
  background: rgba(245, 158, 11, 0.22);
  color: var(--gold-light);
}

.post-card-title {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.45;
  margin-bottom: 0.6rem;
  flex: 1;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

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

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border2);
  flex-wrap: wrap;
}

.post-card-meta i { color: var(--gold); }

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  gap: 0.4rem;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--dark-card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.15s;
}

.page-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
}

.page-link.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
  font-weight: 700;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.sidebar-widget-title {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

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

.cat-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border2);
}

.cat-list-item:last-child { border-bottom: none; }

.cat-list-item a {
  color: var(--text);
  font-size: 0.875rem;
  transition: color 0.15s;
}

.cat-list-item a:hover { color: var(--gold); }

.cat-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255,255,255,.05);
  padding: 1px 7px;
  border-radius: 999px;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill-link {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.2);
  text-decoration: none;
  transition: all 0.15s;
}

.tag-pill-link:hover {
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold-light);
}

/* ============================================================
   POST HERO (Single Post)
   ============================================================ */

.post-hero {
  position: relative;
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}

.post-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,17,23,0.2) 0%, rgba(13,17,23,0.85) 100%);
}

.post-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
}

.post-hero-title {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* ============================================================
   SINGLE POST
   ============================================================ */

.post-single {
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.post-title-plain {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
  margin-bottom: 1.25rem;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.post-meta-bar i { color: var(--gold); }

.post-meta-cats {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ============================================================
   POST CONTENT
   ============================================================ */

.post-content {
  font-family: 'Noto Sans Kannada', sans-serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
}

.post-content h2 {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cream);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.post-content h3 {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  margin: 2rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
}

.post-content blockquote {
  border-left: 3px solid var(--gold);
  background: rgba(245, 158, 11, 0.06);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  color: var(--cream);
  font-style: italic;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(245,158,11,.3);
}

.post-content a:hover {
  color: var(--gold-light);
  text-decoration-color: var(--gold-light);
}

.post-content strong { color: var(--cream); }

.post-content code {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}

.post-content pre {
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
}

/* ============================================================
   POST TAGS
   ============================================================ */

.post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-tags-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 0.25rem;
}

.tag-pill {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.2);
  text-decoration: none;
  transition: all 0.15s;
}

.tag-pill:hover {
  background: rgba(245, 158, 11, 0.18);
  color: var(--gold-light);
}

/* ============================================================
   RELATED POSTS
   ============================================================ */

.related-section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.section-title {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.section-title span { color: var(--gold); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245,158,11,.4);
}

.related-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.related-card-img-placeholder {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, #1a2234, #0d1117);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245,158,11,.2);
  font-size: 2rem;
}

.related-card-body {
  padding: 0.875rem;
}

.related-card-title {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ============================================================
   COMMENTS
   ============================================================ */

.comments-section {
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--border);
}

.comment-list {
  list-style: none;
  margin-bottom: 2rem;
}

.comment-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border2);
}

.comment-card:last-child { border-bottom: none; }

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(245,158,11,.15);
  border: 1px solid rgba(245,158,11,.25);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Baloo Tamma 2', cursive;
}

.comment-body {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.comment-name {
  font-weight: 600;
  color: var(--cream);
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.7;
}

/* Comment form */
.comment-form-wrap {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 2rem;
}

.comment-form-title {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.875rem;
  color: var(--cream);
  font-family: 'Noto Sans Kannada', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,158,11,.1);
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
  color: rgba(148,163,184,.4);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

.comment-pending-msg {
  background: rgba(245,158,11,.08);
  border: 1px solid var(--border);
  color: var(--gold-light);
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Submit button */
.btn-submit {
  background: var(--gold);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: 'Noto Sans Kannada', sans-serif;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-submit:hover { background: var(--gold-dark); }

/* ============================================================
   FOOTER
   ============================================================ */

.blog-footer {
  background: #080c12;
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  text-align: center;
}

.blog-footer-brand {
  font-family: 'Baloo Tamma 2', cursive;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.blog-footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.blog-footer-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.15s;
}

.blog-footer-links a:hover { color: var(--gold); }

.blog-footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============================================================
   FILTER HEADER
   ============================================================ */

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-info {
  font-size: 0.875rem;
  color: var(--muted);
}

.filter-badge {
  background: rgba(245,158,11,.12);
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.3rem 0.875rem;
  border-radius: 999px;
  font-size: 0.82rem;
}

/* ============================================================
   NO POSTS
   ============================================================ */

.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.no-posts i {
  font-size: 3rem;
  color: rgba(245,158,11,.2);
  margin-bottom: 1rem;
  display: block;
}

.no-posts p { font-size: 1rem; margin-bottom: 1rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .blog-navbar { padding: 0 1rem; }
  .blog-nav-links { display: none; }
  .nav-toggle { display: block; }
  .blog-nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: #0d1117;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
    z-index: 999;
  }
  .blog-hero { padding: 3rem 1rem 2rem; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .post-hero { max-height: 320px; }
  .post-single { padding: 2rem 1rem 3rem; }
}

@media (max-width: 480px) {
  .related-grid { grid-template-columns: 1fr; }
  .comment-form-wrap { padding: 1.25rem; }
}
