/* Fonts */

@font-face {
  font-family: "Parisienne";
  src: url("/assets/fonts/parisienne.regular.ttf") format(truetype);
}

/* Top-level */

body {
  background-color: #e6e6e6;
}

/* Grid */

div.tec-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "tec-grid-left" "tec-grid-main" "tec-grid-right";
}

@media (width <= 1150px) {
  div.tec-grid {
    grid-template-columns: 1fr 5fr 1fr;
  }
}

@media (width <= 805px) {
  div.tec-grid {
    grid-template-columns: 0fr 1fr 0fr;
  }
}

div.tec-grid-main {
  background-color: #ffffff;
  padding: 5px;
}

/* Headers and Footers */

header {
  div.logo {
    /* FIXME: 2026-10-02 These are quite specific. I'd rather they be done in a more
   flex-friendly way. */
    text-align: center;
    vertical-align: middle;
    font-size: 50px;
    height: 76px;
    line-height: 70px;

    img {
      float: left;
    }

    /* FIXME: 2026-11-03 This is not centered correctly. */
    span {
      font-family: "Parisienne";
    }
  }

  div.banner {
    display: flex;

    img {
      width: 100%;
    }
  }
}

nav.desktop-nav {
  text-transform: uppercase;
  font-family: sans;
  background-color: #610000;
  font-size: small;
  display: flex;
  justify-content: space-around;
  align-items: center;

  /* TODO: 2026-09-21 Vertically aligning text within links. Firefox problem? */
  a {
    color: white;
    text-decoration: none;
    padding: 5px;
    /* line-height: 1; */
  }

  a:hover {
    background-color: #bf0000;
  }

  a.active {
    background-color: #910000;
  }
}

div.mobile {
  display: none;
}

@media (width <= 580px) {
  div.monitor {
    display: none;
  }

  div.mobile {
    display: flex;
    justify-content: space-between;
    background-color: #610000;
    color: white;

    /* The TEC logo. Tweaked by hand to look decent */
    img {
      height: 35px;
      padding: 5px;
    }

    .menu-toggle {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    /* Collapsable side-navbar */
    .hamburger {
      position: relative;
      z-index: 30;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 32px;
      height: 32px;
      cursor: pointer;
      padding: 6px;
      border-radius: 6px;
    }

    /* The + operator only matches then the second arg immediately follows the first
   as a child of the same parent. */
    .hamburger:focus-visible,
    .menu-toggle:focus-visible + .hamburger {
      outline: 2px solid #818cf8;
      outline-offset: 2px;
    }

    .hamburger-line {
      display: block;
      width: 20px;
      height: 2px;
      background: #fff;
      border-radius: 2px;
      transition:
        transform 0.3s ease,
        opacity 0.2s ease;
    }

    /* Morph bars into an X when the hidden checkbox is checked */
    .menu-toggle:checked ~ .hamburger .hamburger-line1 {
      transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle:checked ~ .hamburger .hamburger-line2 {
      opacity: 0;
      transform: scaleX(0);
    }

    .menu-toggle:checked ~ .hamburger .hamburger-line3 {
      transform: translateY(-7px) rotate(-45deg);
    }

    nav.mobile-nav {
      position: absolute;
      top: 0;
      right: 0;
      height: 560px;
      width: 240px;
      background: #910000;
      display: flex;
      flex-direction: column;
      gap: 4px;
      padding: 84px 20px 20px;
      transform: translateX(100%);
      transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 20;

      a {
        /* Match the non-mobilel styling */
        color: white;
        text-decoration: none; /* Removes the link underline */
        text-transform: uppercase;

        /* Fanciness unique to mobile */
        padding: 12px 10px;
        border-radius: 8px;
        transition: background 0.15s;
      }

      /* This gives a nice hover effect that nicely matches the colour of what's
   beneath it, since it's just using opacity. */
      a:hover,
      a:focus-visible {
        background: rgba(255, 255, 255, 0.08);
      }
    }

    /* NOTE: 2026-10-16 The ~ is the "sibling combinator" and matches the second arg
   only when the first has already appeared somewhere as a child of the same
   parent. */
    .menu-toggle:checked ~ nav.mobile-nav {
      transform: translateX(0);
    }
  }
}

/* TODO: 2026-09-21 Make the footer sticky to the bottom of the window. */
footer {
  padding: 5px;
  background-color: #610000;
  color: white;
  text-align: center;
  font-size: small;
  text-transform: uppercase;
  font-family: sans;
}

/* Content */

div.content {
  padding: 10px;
}

div.mugshots {
  display: flex;
  justify-content: center;

  figure {
    /* float: right; */
    /* margin: 0; */
    /* margin-left: 1em; */

    img {
      border: 1px solid grey;
      border-radius: 5px;
      width: 100%;
    }

    figcaption {
      font-size: 80%;
      font-weight: bold;
      text-align: center;
    }
  }
}

/* Announcements */

p.notice {
  background-color: #a7cece;
  border: 2px solid #80a7a7;
  padding: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Concerts */

div.concerts {
  p {
    font-style: italic;
    text-align: center;
  }

  div.thumbnails {
    display: flex;
    flex-wrap: wrap;
    margin: 5px;

    img {
      width: 11em;
    }
  }
}

/* Images */

div.news-centered {
  display: flex;
  justify-content: center;

  img {
    border-radius: 5px;
  }
}

/* Social Media */

div.social-media-icons {
  display: flex;
  justify-content: center;
  gap: 20px; /* Space between icons */

  img {
    width: 40px;
    height: 40px;
  }
}

div.newsletter {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

/* Concert Announcements */

div.concert-announcement {
  border: 2px solid #d1cba5;
  padding: 6px;
  margin-top: 12px;
  margin-bottom: 12px;
  background-color: #fff7d8;
  display: flex;
  align-items: center;

  div.flyer {
    flex: 1;

    img {
      border: 1px solid gray;
      z-index: -1;
      width: 100%;
    }
  }

  @media (width <= 580px) {
    div.flyer {
      display: none;
    }
  }

  div.info {
    flex-grow: 2;

    div.presents {
      font-style: oblique;
      text-align: center;
    }

    h1 {
      text-align: center;
      font-family: cursive;
      margin-bottom: 0;
    }

    p.subtitle {
      margin-top: 0;
      text-align: center;
      font-style: italic;
    }

    div.timeplace {
      text-align: center;

      time {
        font-weight: bold;
      }

      place {
        font-weight: bold;
      }
    }
  }
}
