/* Compact layout - maximize content, minimize spacing, fill all space */

/* Full-width fluid container - fills viewport */
.container {
  max-width: 100%;
  width: 100%;
  padding-left: 40px;
  padding-right: 40px;
}

/* Reduce section padding */
.section { padding: 30px 0; }
.section-sm { padding: 20px 0; }

/* Tighter article cards */
.post-item { margin-bottom: 15px; }

/* Featured images */
.post-item img,
.card-img-top,
article img {
  max-height: 250px;
  object-fit: cover;
  width: 100%;
}

/* Reduce header spacing */
.navigation { padding: 5px 0; }
.navigation .navbar { padding: 0.25rem 0; }
.navigation .navbar-brand { padding: 5px 0; font-size: 1.4rem; }

/* Search input responsive */
.search input { max-width: 100%; width: auto; }

/* Compact sidebar - reduce widget gaps */
.sidebar .widget { margin-bottom: 15px !important; padding: 12px; }
.widget { margin-bottom: 15px !important; }
.widget-body { padding: 12px !important; }

/* Tighter typography */
.content h1 { margin-top: 1rem; margin-bottom: 0.5rem; }
.content h2 { margin-top: 0.8rem; margin-bottom: 0.4rem; }
.content h3, .content h4 { margin-top: 0.6rem; margin-bottom: 0.3rem; }
.content p { margin-bottom: 0.6rem; }

/* Wider content area on desktop - fill space */
@media (min-width: 992px) {
  .col-lg-8 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-4 { flex: 0 0 25%; max-width: 25%; }
}

/* Extra wide screens - tighten gutters */
@media (min-width: 1400px) {
  .container { padding-left: 60px; padding-right: 60px; }
}

/* Reduce Bootstrap row gutters for tighter layout */
.row { margin-left: -8px; margin-right: -8px; }
.row > [class*="col-"] { padding-left: 8px; padding-right: 8px; }

/* Footer compact */
footer.bg-primary .section { padding: 20px 0; }
.copyright { padding: 10px 0; }

/* Widget headers - no black bar */
.widget-header {
  background-color: transparent !important;
  color: var(--text-primary, #333) !important;
  border: none;
  border-bottom: 2px solid var(--border-primary, #000);
  border-radius: 0;
  padding: 8px 0;
}
.widget-header::before {
  display: none !important;
}
.widget-body {
  border-radius: 5px;
}

/* Responsive tables */
.content table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Code blocks overflow */
.content pre {
  overflow-x: auto;
  max-width: 100%;
}

/* Pagination responsive */
.pagination { flex-wrap: wrap; gap: 4px; }

/* ===== Tablet (max-width: 767px) ===== */
@media (max-width: 767px) {
  .container { padding-left: 15px; padding-right: 15px; }

  .section { padding: 20px 0; }
  .section-sm { padding: 15px 0; }

  h1, .h1 { font-size: 1.6rem; }
  h2, .h2 { font-size: 1.3rem; }
  h3, .h3 { font-size: 1.1rem; }

  .content blockquote p { font-size: 18px; }

  .post-item img,
  .card-img-top { max-height: 180px; }

  .search { width: 100%; }
  .search input { max-width: 100%; width: 100%; }

  /* Restore default gutters on mobile */
  .row { margin-left: -15px; margin-right: -15px; }
  .row > [class*="col-"] { padding-left: 15px; padding-right: 15px; }
}

/* ===== Mobile (max-width: 575px) ===== */
@media (max-width: 575px) {
  .container { padding-left: 12px; padding-right: 12px; }

  .pagination .page-link { width: 34px; height: 34px; font-size: 13px; }

  .author-thumb-sm { width: 100px; height: 100px; }
  .post-thumb-sm { width: 80px; height: 60px; }

  .book-card { padding: 16px; }

  .navigation .navbar-brand { font-size: 1.2rem; }
}

/* ===== Tags footer section ===== */
.tags-footer {
  padding: 25px 0;
  border-top: 1px solid var(--border-secondary, rgba(0,0,0,0.1));
}
.tags-footer-header {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 12px;
  color: var(--text-secondary, #666) !important;
}
.tags-footer .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* View all tags link */
.tags-view-all {
  font-size: 0.8rem;
  margin-left: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* All-tags page */
.tag-cloud-full {
  justify-content: flex-start;
}
.tag-count {
  font-size: 0.75em;
  opacity: 0.6;
}

/* ===== Cross-site navigation links ===== */
.nav-separator {
  border-right: none !important;
  width: 10px;
}

/* ===== Extra small (max-width: 400px) ===== */
@media (max-width: 400px) {
  h1, .h1 { font-size: 1.4rem; }
}
