/* Snail Theme - Bootstrap overrides */

/* Constrain all content to 800px */
.container {
  max-width: 800px;
}

/* Typography - Barbieri font for headings only */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: barbieri, sans-serif;
  font-weight: 700;
}

h1 {
  color: var(--bs-dark);
  padding-bottom: 0.5em;
}

[data-bs-theme="dark"] h1 {
  color: white;
}

/* Links */
a {
  color: #1a5f3c;
}

a:hover {
  color: #0d3d26;
}

[data-bs-theme="dark"] a {
  color: #72C5A4;
}

[data-bs-theme="dark"] a:hover {
  color: #8fd4b8;
}

h2 {
  color: var(--bs-dark);
  font-family: barbieri, sans-serif;
  font-weight: 300;
  font-style: normal;
  padding-bottom: 0.5em;
}

[data-bs-theme="dark"] h2 {
  color: var(--bs-secondary);
}

h3 {
  color: var(--bs-primary);
  font-family: barbieri, sans-serif;
  font-weight: 200;
  font-style: normal;
  padding-bottom: 0.5em;
}

/* Navbar */
.navbar .container {
  justify-content: space-between;
}

.nav-links {
  width: 100%;
  justify-content: center;
  height: 40px;
}

.nav-links .nav-link {
  line-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
}

.navbar-brand img {
  height: 40px;
  width: auto;
}

.icon-sun { display: none; }
.icon-moon { display: inline; }

[data-bs-theme="dark"] .icon-sun {
  display: inline;
  filter: brightness(0) saturate(100%) invert(85%) sepia(5%) saturate(300%) hue-rotate(190deg) brightness(95%) contrast(90%);
}
[data-bs-theme="dark"] .icon-moon { display: none; }

/* Desktop: single row with centered nav */
@media (min-width: 768px) {
  .nav-links {
    width: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    order: unset;
  }
}

/* Tag badges */
.badge {
  font-size: 1rem;
  padding: 0.5em 0.75em;
}

.badge-sm {
  font-size: 0.5rem;
  padding: 0.25em 0.5em;
}

/* Post prev/next navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
}

@media (max-width: 767.98px) {
  .post-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  .post-nav .btn {
    text-align: center;
  }
}

/* Game cards */
.card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-img-top {
  object-fit: cover;
  height: 200px;
}

/* Tables */
table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  table-layout: fixed;
}

table th,
table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--bs-border-color);
}

table tbody tr:nth-child(odd) {
  background-color: var(--bs-tertiary-bg);
}

table thead th {
  border-bottom: 2px solid var(--bs-border-color);
}

/* Column widths: Year 15%, Title 55%, Role 30% */
table th:nth-child(1),
table td:nth-child(1) {
  width: 15%;
}

table th:nth-child(2),
table td:nth-child(2) {
  width: 55%;
}

table th:nth-child(3),
table td:nth-child(3) {
  width: 30%;
}

/* Blog post hero image - no borders, like game pages */
.post-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: center center;
}

/* Blog post content images only (from markdown) */
article > p > img,
article > img {
  display: block;
  max-width: 100%;
  margin: 1.5rem auto;
  padding: 1rem;
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Game page */
.game-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.game-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.game-content p {
  margin-bottom: 1.25rem;
}

/* CTA buttons */
.game-content {
  text-align: center;
}

.game-content p {
  text-align: left;
}

.cta-section {
  background-color: #f0f0f0;
  padding: 2rem;
  margin: 40px 0 0 0;
  text-align: center;
}

[data-bs-theme="dark"] .cta-section {
  background-color: #2a2a2a;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  color: white !important;
  text-decoration: none;
  border-radius: 0.375rem;
  font-weight: 500;
  margin: 0.5rem;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.85;
}

.cta-icon {
  width: 36px;
  height: 36px;
  vertical-align: middle;
  margin-right: 10px;
  filter: brightness(0) invert(1);
}

/* Kickstarter green */
.cta-kickstarter {
  background-color: #05ce78;
}

/* Steam blue */
.cta-steam {
  background-color: #1b2838;
}

/* Website blue */
.cta-website {
  background-color: #0d6efd;
}

/* Substack orange */
.cta-substack {
  background-color: #ff6719;
}

/* Quote section */
.quote-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 60px 0 80px 0;
  text-align: center;
  font-style: italic;
  background-color: var(--bs-tertiary-bg);
}

/* Footer */
footer .tagline {
  padding-top: 40px;
  padding-bottom: 40px;
  margin: 0;
}

footer .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

footer .social-links a {
  opacity: 0.6;
  transition: opacity 0.2s;
}

footer .social-links a:hover {
  opacity: 1;
}

[data-bs-theme="dark"] footer .social-links img {
  filter: invert(1);
}

footer .copyright {
  font-size: 0.875rem;
  font-weight: 300;
  margin: 0;
}

footer .credits {
  font-size: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 80px;
}
