/* Root variables definition for the HTML to reference */
:root {
  /* Primary accent (fall: pumpkin/rust) */
  --accent-primary: #c1602f;
  --accent-primary-dark: #a14c24;
  --accent-primary-darker: #7d3a1c;
  --accent-primary-light: #dd8a5c;
  --accent-primary-lighter: #f1cca8;

  /* Secondary accent (fall: amber/gold) */
  --accent-secondary: #c98a2e;
  --accent-secondary-dark: #a06f1f;
  --accent-secondary-light: #e0b35c;
  --accent-secondary-lighter: #f0d69a;
  --accent-secondary-lightest: #faf0d9;

  /* Secondary accent pastels */
  --accent-secondary-pastel-light: #faf3e2;
  --accent-secondary-pastel-dark: #cf9a42;
  /* Solid secondary accent for buttons (good contrast with white text) */
  --accent-secondary-solid: #b3791f;
  --accent-secondary-solid-dark: #8f5f18;
  /* Primary accent pastels */
  --accent-primary-pastel-light: #fbe8d4;
  --accent-primary-pastel-dark: #f1cca8;
  /* Solid primary accent for buttons (good contrast with white text) */
  --accent-primary-solid: #a8481f;
  --accent-primary-solid-dark: #8a3a19;

  /* Neutral colors */
  --background-dark: #252525;
  --white: #ffffff;
  --gray-light: #f9fafb;
  --gray-medium: #e0e0e0;
  --text-dark: #333;

  /* Accent colors */
  --text-accent: #7c2d12;
  --nav-background: #1e1e1e;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #252525;
  min-height: 100vh;
  color: #333;
}

/* Skip to content link — visible on focus for keyboard users */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent-secondary-solid);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Visible focus rings for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--accent-secondary);
  outline-offset: 2px;
}

header {
  background: linear-gradient(135deg, rgba(225, 160, 85, 0.32) 0%, rgba(180, 90, 40, 0.32) 100%),
    url('assets/middigs1_photos/group_photo.JPG') center 65%/cover no-repeat;
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-container {
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
}

.logo-placeholder {
  width: 200px;
  height: 200px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: visible;
  box-shadow: none;
}

.logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: 0;
  margin-bottom: 0;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--background-dark);
  padding: 1rem;
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.4); */
  position: sticky;
  top: 0;
  z-index: 100;
}

nav button {
  padding: 0.75rem 1.5rem;
  border: none;
  background: var(--accent-primary-solid);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  background: var(--accent-primary-solid-dark);
}

nav button.active {
  background: linear-gradient(135deg, var(--accent-secondary-solid) 0%, var(--accent-secondary-solid-dark) 100%);
}

main {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--gray-light);
  padding: 2.5rem;
  margin-top: 0;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tab {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.register-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-primary-light) 0%, var(--accent-primary) 100%);
  color: white;
  padding: 1.25rem 1.75rem;
  border-radius: 14px;
  margin-bottom: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(193, 96, 47, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.register-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(193, 96, 47, 0.35);
}

.register-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.register-banner-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.register-banner-sub {
  font-size: 0.9rem;
  opacity: 0.9;
}

.register-banner-cta {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  margin-left: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
}

h2 {
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--accent-primary);
  padding-bottom: 0.5rem;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.info-card h3 {
  color: var(--accent-secondary-dark);
  margin-bottom: 0.25rem;
}

.post-date {
  display: block;
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 0.75rem;
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

ul li:before {
  content: "•";
  position: absolute;
  left: 0;
}

.faq-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.faq-item strong {
  color: var(--accent-primary-dark);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.skill-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

.skill-table th {
  background: var(--accent-primary);
  color: white;
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 600;
}

.skill-table td {
  padding: 0.6rem 1rem;
  text-align: center;
  border: 1px solid var(--gray-medium);
  background: white;
  font-weight: 500;
}

.skill-descriptions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.skill-entry {
  padding: 0.75rem 1rem;
  background: white;
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 6px 6px 0;
}

.skill-entry strong {
  color: var(--accent-primary-dark);
  display: block;
  margin-bottom: 0.25rem;
}

.skill-entry p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

.schedule-divider td {
  background: var(--gray-medium);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
  padding: 0.35rem 1rem;
  text-align: left;
}

iframe {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.registration-embed {
  display: flex;
  justify-content: center;
}

.shirt-order-btn {
  display: block;
  padding: 0.85rem 1.5rem;
  background: var(--accent-primary-solid);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-align: center;
  transition: background 0.2s;
}

.shirt-order-btn:hover {
  background: var(--accent-primary-solid-dark);
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 aspect ratio */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 0.75rem;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

footer {
  text-align: center;
  padding: 2rem;
  color: white;
  font-size: 0.95rem;
}

footer a {
  color: white;
  text-decoration: underline;
}

.highlight {
  background: linear-gradient(120deg, var(--accent-primary-pastel-light) 0%, var(--accent-primary-pastel-dark) 100%);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  color: #7c2d12;
}

@media (max-width: 768px) {
  header {
    padding: 1.5rem 1rem;
  }

  .logo-placeholder {
    width: 170px;
    height: 170px;
  }

  h1 {
    font-size: 1.8rem;
    line-height: 1.1;
    text-wrap: balance;
    margin-bottom: 0.35rem;
  }

  .subtitle {
    font-size: 1rem;
    line-height: 1.3;
    text-wrap: balance;
  }

  main {
    margin: 1rem;
    padding: 1.5rem;
  }

  main.teams-active {
    max-width: 100%;
    margin: 1rem;
  }

  .team-card {
    min-width: 0;
  }

  .player-list li {
    word-break: break-word;
  }

  nav {
    padding: 0.75rem;
    gap: 0.4rem;
  }

  nav button {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    flex: 1 1 150px;
    min-height: 44px; /* WCAG touch target */
  }

  .register-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .register-banner-cta {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .logo-placeholder {
    width: 150px;
    height: 150px;
  }

  h1 {
    font-size: 1.55rem;
  }

  nav button {
    flex-basis: 140px;
  }
}

main.teams-active {
  max-width: 1300px;
}


.bracket-section {
  margin-bottom: 2.5rem;
}

.bracket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-radius: 10px 10px 0 0;
  margin-bottom: 0;
}

.bracket-advanced {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
}

.bracket-intermediate {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-secondary-dark) 100%);
}

.bracket-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.03em;
}

.bracket-count {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.bracket-section .team-list {
  border: 2px solid;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 1rem;
  margin: 0;
}

.bracket-advanced + .team-list,
.bracket-section:has(.bracket-advanced) .team-list {
  border-color: var(--accent-primary);
}

.bracket-intermediate + .team-list,
.bracket-section:has(.bracket-intermediate) .team-list {
  border-color: var(--accent-secondary);
}

.team-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 769px) {
  .team-list {
    grid-template-columns: repeat(5, 1fr);
  }
}

.team-card {
  background: white;
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.team-card h4 {
  color: var(--accent-primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.team-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.team-card--advanced {
  border-color: var(--accent-primary);
}

.team-card--intermediate {
  border-color: var(--accent-secondary);
}

.team-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.team-card--advanced .team-name {
  color: var(--accent-primary-dark);
}

.team-card--intermediate .team-name {
  color: var(--accent-secondary-dark);
}

.player-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.player-list li:before {
  content: none;
}

.player-list li {
  font-size: 0.9rem;
  padding: 0.3rem 0.5rem;
  padding-left: 0.5rem;
  color: #444;
  border-bottom: 1px solid #f5f5f5;
}

.player-list li:last-child {
  border-bottom: none;
}

.team-card--advanced .player-list li:nth-child(odd) {
  background: var(--accent-primary-lighter);
}

.team-card--intermediate .player-list li:nth-child(odd) {
  background: var(--accent-secondary-lightest);
}

/* Past Events photo collage */
.photo-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
}

.collage-item {
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.collage-item.featured {
  grid-column: span 3;
  aspect-ratio: 16 / 7;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.collage-item img:hover {
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .photo-collage {
    grid-template-columns: repeat(2, 1fr);
  }

  .collage-item.featured {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }
}

.photo-album-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-secondary-solid);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}

.photo-album-btn:hover {
  background: var(--accent-secondary-solid-dark);
}

/* Contact tab */
.contact-email-btn {
  display: inline-block;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  margin-top: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary-solid);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}

.contact-email-btn:hover {
  background: var(--accent-primary-solid-dark);
}

/* Flex rather than grid so a partial last row of cards stays centered */
.admin-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.admin-card {
  flex: 0 1 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  padding: 1.25rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--accent-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.admin-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.admin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-primary-dark);
}

.admin-committees {
  list-style: none;
  padding: 0;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--accent-secondary-dark);
}

.admin-committees li {
  padding: 0;
  line-height: 1.4;
}

.admin-committees li:before {
  content: none;
}

@media (max-width: 600px) {
  .admin-card {
    flex-basis: 100%;
  }

  /* Keep the full address on one line in a narrow card */
  .contact-email-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }
}

/* Dropdown navigation */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  background: var(--nav-background);
  border-radius: 8px;
  padding: 0.4rem;
  min-width: 175px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  z-index: 200;
  flex-direction: column;
  gap: 0.25rem;
}

/* Invisible bridge that fills the gap so the hover area is continuous */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -0.35rem;
  left: 0;
  right: 0;
  height: 0.35rem;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-menu button {
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

.dropdown-menu button:disabled {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Flip 7 nav — "?" easter egg. To disable: see comment in index.html */
#btn-flip7 {
  position: relative;
  background: #1a1d2e;
  color: #ffd700;
  font-weight: 700;
  border: 2px solid #ffd700;
}

#btn-flip7:hover {
  background: #252940;
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

#btn-flip7.active {
  background: #0f1117;
  color: #ffd700;
}

.flip7-peek {
  display: none;
  font-size: 0.8rem;
  white-space: nowrap;
}

#btn-flip7:hover .flip7-label { display: none; }
#btn-flip7:hover .flip7-peek  { display: inline; }

/* Flip 7 cards */
.flip7-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: white;
  border: 2px solid var(--accent-secondary);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flip7-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.flip7-card-icon {
  font-size: 2rem;
}

.flip7-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-secondary-dark);
}

.flip7-card-desc {
  font-size: 0.85rem;
  color: #777;
  text-align: center;
}