/* =========================================================
   NAVBAR — FINAL RESPONSIVE VERSION
   ========================================================= */

/* Logo */
.navbar-brand img {
  max-height: 60px;
  width: auto;
}

/* Make sure mobile logo is smaller */
@media (max-width: 767px) {
  .navbar-brand img {
    max-height: 40px;
  }
}

/* Center the navbar items for desktop */
@media (min-width: 768px) {
  .navbar-collapse {
    justify-content: center !important;
  }
  
  .navbar-nav {
    /* Let Bootstrap handle spacing, we’ll add only gaps */
    gap: 1.5rem;
  }
}

/* Nav link styles (visual only) */
.navbar-nav .nav-link {
  position: relative;
  color: #111;
  font-weight: 500;
  font-size: 18px;
  text-decoration: none;
  padding: 5px 0;
  transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 3px;
  width: 0;
  background-color: #CBF8DF;
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link:focus::after {
  width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #000;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"] {
  color: #222 !important;
  font-weight: 700;
}

.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link[aria-current="page"]::after {
  width: 100%;
  background-color: #e5b9ad;
}

/* =========================================================
   GLOBAL LINKS (exclude nav)
   ========================================================= */

main a:not(.nav-link):not(.toc-link):not(.listing-category) {
  color: inherit;
  text-decoration: none;
  border-bottom: 3px solid #CBF8DF;
  box-shadow: inset 0 -4px 0 #CBF8DF;
  transition: background 0.15s ease;
}

main a:not(.nav-link):not(.toc-link):not(.listing-category):hover {
  background: #CBF8DF;
}

.quarto-listing a,
.quarto-listing a:hover {
  border-bottom: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* =========================================================
   TOC
   ========================================================= */

.toc a,
#TOC a {
  color: #555 !important;
  text-decoration: none !important;
  border-left: 3px solid transparent;
  padding-left: 10px;
  transition: all 0.2s ease;
}

.toc a:hover,
#TOC a:hover {
  color: #111 !important;
  border-left-color: #CBF8DF;
}

.toc a.active,
#TOC a.active {
  color: #111 !important;
  font-weight: 700;
  border-left-color: #e5b9ad;
}

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

.sidebar a,
.sidebar li a,
.sidebar nav a {
  color: #555 !important;
  text-decoration: none !important;
}

.sidebar a:hover,
.sidebar li a:hover {
  color: #222 !important;
}

.sidebar a[aria-current="page"],
.sidebar li a.active {
  font-weight: 700 !important;
  color: #222 !important;
}

.sidebar-item.active .sidebar-item-container {
  border-left: 3px solid #e5b9ad;
  padding-left: 8px;
}

/* =========================================================
   CODE BLOCKS
   ========================================================= */

pre a,
.sourceLine a,
.code-line-anchor {
  text-decoration: none !important;
  box-shadow: none !important;
  border: none !important;
  background: transparent !important;
}

@media (min-width: 768px) {

  /* Center nav items block */
  .navbar-nav {
    margin-left: auto;
    margin-right: auto;
  }

}

/* =========================================================
   QUARTO GRID LISTING — GG-GRID PAGE
   ========================================================= */

.gg-grid .quarto-listing-container-grid {
  margin-top: 1.5rem;
}

/* ---------- GRID COLUMNS (CORRECT WAY) ---------- */

.gg-grid .list.grid {
  --bs-columns: 3;
  gap: 1.75rem;
}

@media (max-width: 992px) {
  .gg-grid .list.grid {
    --bs-columns: 2;
  }
}

@media (max-width: 576px) {
  .gg-grid .list.grid {
    --bs-columns: 1;
  }
}

/* ---------- CARD LINK ---------- */

.gg-grid .quarto-grid-link {
  text-decoration: none;
  color: inherit;
}

/* ---------- CARD ---------- */

.gg-grid .quarto-grid-item.card {
  height: 100%;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--bs-body-bg);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.gg-grid .quarto-grid-item.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

/* ---------- IMAGE ---------- */

.gg-grid .card-img-top img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* ---------- BODY ---------- */

.gg-grid .card-body {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.2rem 1.1rem;
}

/* ---------- TITLE ---------- */

.gg-grid .listing-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.45rem;
  display: inline-block;
  border-bottom: 2px solid rgba(0, 0, 0, 0.25);
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.gg-grid .quarto-grid-item.card:hover .listing-title {
  border-color: #e5b9ad;
  background-color: rgba(229, 185, 173, 0.15);
}

/* ---------- DESCRIPTION ---------- */

.gg-grid .listing-description {
  font-size: 0.9rem;
  color: var(--bs-body-color);
}

/* ---------- DATE ---------- */

.gg-grid .listing-date {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

/* ---------- CATEGORIES ---------- */

.gg-grid .listing-categories {
  margin-bottom: 0.4rem;
}

.gg-grid .listing-category {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gg-grid .listing-category:hover {
  background: rgba(13, 110, 253, 0.15);
}

.gg-grid .quarto-grid-link {
  font-weight: inherit;
}

.quarto-listing h5.listing-title {
  font-weight: 600;
  display: inline-block;
  border-bottom: 2px solid rgba(0, 0, 0, 0.25);
  padding-bottom: 2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.quarto-grid-item.card:hover h5.listing-title {
  border-color: #e5b9ad;
  background-color: rgba(229, 185, 173, 0.15);
}

.quarto-listing .card-other-values td:first-child {
  display: none;
}

@media (hover: none) {
  .quarto-grid-item.card:hover {
    transform: none;
    box-shadow: none;
  }
}