/* ===== PAST CONTESTS PAGE STYLES =====
   Save this as: pastcontents.css (in same folder as pastcontests.html)
*/

/* Root Variables (same as main site) */
:root {
  --primary-color: hsl(253, 34%, 46%);
  --dark-color: #000000;
  --white-color: #ffffff;
  --light-pink: #ffd6e7;
  --pink: #ffb6c1;
  --header-font: 'Montserrat', sans-serif;
  --body-font: 'Lato', sans-serif;
}

/* General Page Styling */
body {
  font-family: var(--body-font);
  margin: 0;
  background-color: var(--white-color);
  color: var(--dark-color);
}

/* ===== Hero Section =====
   Uses homepage image at parent folder: ../homepage image.png
*/
.hero {
  position: relative;
  background-image: url('../homepage image.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-family: var(--header-font);
  font-size: 3.8rem;
  font-weight: 700;
  color: var(--white-color);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease-out forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Contest Container Layout ===== */
.contest-container {
  display: flex;
  flex-wrap: wrap;
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
  gap: 20px;
}

/* ===== Year Sidebar ===== */
.year-subnav {
  flex: 1 1 240px;
  background-color: var(--light-pink);
  padding: 22px;
  border-radius: 12px;
  height: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.year-subnav h3 {
  font-family: var(--header-font);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.year-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.year-list li { margin-bottom: 8px; }

.year-link {
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  padding: 6px 8px;
  border-radius: 6px;
}

.year-link:hover,
.year-link.active {
  background: rgba(0,0,0,0.03);
  color: var(--primary-color);
}

/* ===== Contest Content Area ===== */
.contest-content {
  flex: 3 1 760px;
  padding: 20px 26px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-left: 0;
}

/* hide all.year-content until activated */
.year-content { display: none; }

.year-content.active { display: block; }

.year-content h2 {
  font-family: var(--header-font);
  color: var(--primary-color);
  margin-bottom: 12px;
}

.year-content h3 {
  font-family: var(--header-font);
  font-size: 1.1rem;
  color: var(--dark-color);
  margin-top: 18px;
}

.year-content ul { list-style-type: disc; padding-left: 22px; }

.year-content li { margin-bottom: 8px; }

.year-content a { color: var(--primary-color); text-decoration: none; }
.year-content a:hover { text-decoration: underline; }

/* ===== Default Content Message ===== */
.default-content {
  text-align: center;
  color: var(--dark-color);
  font-style: italic;
  padding: 24px;
  flex-basis: 100%;
}

/* ===== Responsive Design ===== */
@media (max-width: 960px) {
  .contest-container { padding: 0 16px; }
  .hero h1 { font-size: 3rem; }
  .contest-content { padding: 18px; }
}

@media (max-width: 768px) {
  .contest-container { flex-direction: column; }
  .year-subnav { width: 100%; margin-bottom: 14px; }
  .contest-content { margin-left: 0; }
  .hero { height: 40vh; background-attachment: scroll; }
  .hero h1 { font-size: 2.4rem; }
}
