/*
 * IGDA DC site styles.
 * Loaded after styles.css (the Bootstrap theme). Everything specific to this site lives here.
 */

@import url("https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900");
@import url("https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i");

:root {
  --igda-red: #D72027;
  --navbar-height: 80px;
  --content-width: 850px;
}

/* ------------------------------------------------------------------ */
/* Page layout                                                         */
/* ------------------------------------------------------------------ */

body {
  background-color: var(--igda-red);
}

/* White column in the middle of the red background. */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: var(--navbar-height); /* room for the fixed navbar */
  background-color: white;
  border-style: double;
  border-width: 0 10px;
}

/* Main content column used on every page. */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 0.75rem 3rem;
}

.page-content section + section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
}

.page-content h2:not(.display-4) {
  margin-top: 2rem;
}

.page-content img {
  max-width: 100%;
  height: auto;
}

/* Hero image at the top of event pages. */
.banner {
  display: block;
  margin-bottom: 1.5rem;
}

/* Highlighted notice, e.g. "this program is on hiatus". */
.notice {
  color: red;
}

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */

.navbar-custom {
  color: black;
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: white;
  border-bottom: #000 double;
}

.navbar-custom .navbar-brand {
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.1rem;
  font-weight: 700;
}

.navbar-custom .navbar-nav .nav-item .nav-link {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
}

#navbarResponsive .navbar-nav > li {
  display: inline-block;
  padding: 0 7px;
  position: relative;
}

/* Thin divider between top-level nav links. */
#navbarResponsive .navbar-nav > li:not(:last-child)::after {
  content: "";
  border: 1px solid #e2e2e2;
  border-width: 1px 1px 0 0;
  position: absolute;
  right: -3px;
  top: 0;
  height: 100%;
}

/* ------------------------------------------------------------------ */
/* Home page banner                                                    */
/* ------------------------------------------------------------------ */

header.masthead {
  padding: 12rem 0;
  background: white url("../images/LogoBanner.png") no-repeat center center;
  background-size: auto 100%;
}

/* ------------------------------------------------------------------ */
/* Brand colors and round social buttons                               */
/* ------------------------------------------------------------------ */

.facebook { background: #3B5998; border-color: #3B5998; }
.twitter  { background: #55ACEE; border-color: #55ACEE; }
.meetup   { background: #e51937; border-color: #e51937; }
.discord  { background: #7289da; border-color: #7289da; }

.facebook, .twitter, .meetup, .discord,
.facebook:hover, .twitter:hover, .meetup:hover, .discord:hover {
  color: white;
}

.meetup:hover, .meetup:active { background: #e51937; border-color: #e51937; }
.discord:hover, .discord:active { background: #7289da; border-color: #7289da; }

/* Round icon buttons in the footer. */
.holder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  margin: 0 2px;
  font-size: 30px;
  text-decoration: none;
  border-radius: 50%;
}

.holder:hover {
  opacity: 0.7;
}

.social-links {
  width: fit-content;
  margin: 0 auto 1.5rem;
}

/* ------------------------------------------------------------------ */
/* Embeds                                                              */
/* ------------------------------------------------------------------ */

.calendar-embed {
  display: block;
  width: 100%;
  height: 600px;
  border: 1px solid #777;
}

.steamframe {
  display: block;
  border: none;
  max-width: 100%;
}

/* Two-column grid of Steam/itch widgets (one column on small screens). */
.steam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 1em;
  justify-items: center;
  align-items: center;
}

.steam-grid.single-column {
  grid-template-columns: 1fr;
}

@media (max-width: 646px) {
  .steam-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ */
/* Local groups directory                                              */
/* ------------------------------------------------------------------ */

.card-group {
  margin-bottom: 1.5rem;
}

.card-group > .card,
.card-group > .card-spacer {
  width: 18rem;
}

.card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ------------------------------------------------------------------ */
/* Photo gallery (filled in by js/gallery.js)                          */
/* ------------------------------------------------------------------ */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.photo-gallery img {
  width: 100%;
  height: 175px;
  object-fit: cover;
}

/* ------------------------------------------------------------------ */
/* History page (filled in by js/history.js)                           */
/* ------------------------------------------------------------------ */

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.page-content .history-year {
  margin-top: 2rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--igda-red);
}

.history-entry {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

/* Thumbnail on the left, text on the right; stacked on small screens. */
.history-entry.has-image {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Scale the whole image to the column width, keeping its aspect ratio (never cropped).
   Very tall images are capped and shrink to fit instead. */
.page-content .history-image {
  width: 180px;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  object-position: center top;
  border-radius: 0.25rem;
}

@media (max-width: 576px) {
  .history-entry.has-image {
    grid-template-columns: 1fr;
  }

  .page-content .history-image {
    width: 100%;
    max-height: 300px;
  }
}

.history-entry h3 {
  margin: 0.25rem 0;
  font-size: 1.4rem;
}

.history-entry p {
  margin-bottom: 0.5rem;
}

.history-meta {
  color: #6c757d;
  font-size: 0.9rem;
}

.history-people {
  margin-bottom: 0.5rem;
}

.history-badge {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: white;
}

.history-badge.event      { background: var(--igda-red); }
.history-badge.initiative { background: #2a6f97; }
.history-badge.election   { background: #6c4f9e; }
.history-badge.type       { background: #e9ecef; color: #333; }

/* Small totals in the top right of the History page, next to the title. */
.history-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem 1rem;
}

.history-summary {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  color: #6c757d;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.history-stat-number {
  margin-right: 0.25rem;
  font-weight: 700;
  color: var(--igda-red);
}
