﻿/* MHS Cheer 2026-27 - Main Stylesheet */
:root {
  --royal-blue: #003087;
  --royal-blue-dark: #002060;
  --white: #ffffff;
  --black: #1a1a1a;
  --dark-gray: #333333;
  --silver: #c0c0c0;
  --silver-light: #e8e8e8;
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--black);
  background: var(--dark-gray);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== HEADER & NAVIGATION ========== */
.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), 0 8px 28px rgba(0, 0, 0, 0.35);
}

.nav-container {
  max-width: 896px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 56px;
}

.nav-bar {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  position: relative;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand:hover .site-logo-text {
  color: var(--royal-blue-dark);
}

.site-logo-img {
  height: 44px;
  width: auto;
  display: block;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  color: var(--royal-blue);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.site-logo-line {
  display: block;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.main-nav {
  align-self: center;
  flex: 1;
  min-width: 0;
}

.main-nav > ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding-right: 0.35rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.social-link:hover {
  color: var(--silver);
  background: rgba(255, 255, 255, 0.08);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 0.875rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--royal-blue-dark);
  color: var(--silver);
}

.has-submenu > .submenu-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.has-submenu > .submenu-toggle::after {
  content: '';
  font-size: 0.75rem;
}

.submenu {
  display: none;
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--black);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-top: 2px solid var(--silver);
  z-index: 1001;
}

@media (min-width: 769px) {
  .has-submenu:hover > .submenu {
    display: block;
  }
}

.submenu li a {
  padding: 0.65rem 0.75rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.submenu li:last-child a {
  border-bottom: none;
}

/* ========== MAIN CONTENT ========== */
main {
  flex: 1;
}

.hero {
  width: 100%;
  background: var(--dark-gray);
}

.hero-frame {
  max-width: 896px;
  width: 100%;
  margin: 0 auto;
  background: var(--dark-gray);
  text-align: center;
}

.hero-frame img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: var(--white);
}

h1 {
  color: var(--royal-blue);
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
}

.page-content h2 {
  color: var(--royal-blue-dark);
  margin: 1.5rem 0 0.75rem;
}

.page-content p {
  margin-bottom: 1rem;
}

/* ========== TEAM ROSTER ========== */
.page-content--home {
  max-width: 896px;
}

.page-content--roster h1 {
  margin-bottom: 2rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem 2.25rem;
}

.roster-card {
  text-align: center;
}

.roster-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  /* object-fit: cover; */
  display: block;
  border: 1px solid var(--silver-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--silver-light);
}

.roster-name {
  margin: 0.75rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--black);
  text-transform: none;
  letter-spacing: normal;
}

.roster-support {
  display: inline-block;
  padding: 0.45rem 1.35rem;
  background: #e8f0fa;
  color: var(--royal-blue);
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.roster-support:hover {
  background: var(--royal-blue);
  color: var(--white);
}

@media (max-width: 768px) {
  .roster-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem 1.75rem;
  }
}

@media (max-width: 480px) {
  .roster-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ========== SPONSORS ========== */
.sponsors-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.sponsor-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 520px;
  margin: 0 auto 3rem;
  padding: 0 0.5rem;
}

.carousel-viewport {
  flex: 1;
  text-align: center;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
}

.carousel-logo {
  max-width: 400px;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  padding: 0.75rem;
  border: 1px solid var(--silver-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--white);
}

.carousel-name {
  margin-top: 1rem;
}

.carousel-sponsor-name,
.sponsor-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--royal-blue);
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
}

a.carousel-sponsor-name:hover,
a.sponsor-name:hover {
  color: var(--royal-blue-dark);
  text-decoration: underline;
}

span.carousel-sponsor-name,
span.sponsor-name {
  color: var(--black);
}

.carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 2px solid var(--royal-blue);
  border-radius: 50%;
  background: var(--white);
  color: var(--royal-blue);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.carousel-btn:hover {
  background: var(--royal-blue);
  color: var(--white);
}

.sponsors-grid-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem 2.25rem;
}

.sponsor-card {
  text-align: center;
}

.sponsor-logo {
  width: 100%;
  max-width: 400px;
  max-height: 400px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  padding: 0.75rem;
  border: 1px solid var(--silver-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--white);
}

.sponsor-name {
  display: inline-block;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .sponsor-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem 1.75rem;
  }

  .carousel-viewport {
    min-height: 340px;
  }

  .carousel-logo {
    max-width: 280px;
    max-height: 280px;
  }
}

@media (max-width: 480px) {
  .sponsor-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 320px;
    margin: 0 auto;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
  }
}

/* ========== GALLERY ========== */
.gallery-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem 2.25rem;
}

.gallery-card {
  text-align: center;
}

.gallery-card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: center;
  font: inherit;
}

.gallery-card-btn:hover .gallery-thumbnail {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.3);
  border-color: var(--royal-blue);
}

.gallery-card-btn:hover .gallery-card-title {
  color: var(--royal-blue-dark);
}

.gallery-thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--silver-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--silver-light);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.gallery-card-title {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--royal-blue);
  text-transform: none;
  letter-spacing: normal;
}

body.gallery-modal-open {
  overflow: hidden;
}

.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.gallery-modal.gallery-modal--open {
  display: block;
}

.gallery-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.gallery-modal-content {
  position: relative;
  max-width: 900px;
  margin: 3vh auto;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-height: 94vh;
  overflow-y: auto;
}

.gallery-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--black);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.gallery-modal-close:hover {
  color: var(--royal-blue);
}

#gallery-modal-title {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--royal-blue);
  text-transform: none;
  letter-spacing: normal;
}

.gallery-modal-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.gallery-carousel-viewport {
  min-height: auto;
}

.gallery-carousel-image {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--silver-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  background: var(--silver-light);
}

.gallery-carousel-counter {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--black);
  text-align: center;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.25rem 1.75rem;
  }

  .gallery-modal-content {
    margin: 2vh 1rem;
    padding: 1.25rem 1rem;
  }

  .gallery-carousel-image {
    max-height: 55vh;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--black);
  color: var(--silver);
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: auto;
  border-top: 3px solid var(--royal-blue);
}

.site-footer p {
  font-size: 0.9rem;
}

.footer-powered {
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--silver);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--white);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-bar {
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .menu-toggle {
    display: flex;
    align-self: center;
    order: 2;
  }

  .social-icons {
    order: 1;
    gap: 0.25rem;
    padding-right: 0;
  }

  .social-link {
    width: 24px;
    height: 24px;
  }

  .social-link svg {
    width: 16px;
    height: 16px;
  }

  .site-brand {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .site-logo-img {
    height: 36px;
  }

  .site-logo-text {
    font-size: 1rem;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--black);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .main-nav.open {
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav a {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .submenu {
    position: static;
    box-shadow: none;
    background: var(--black);
    border-top: none;
    display: none;
  }

  .has-submenu.open .submenu {
    display: block;
  }

  .has-submenu > .submenu-toggle::after {
    margin-left: auto;
  }
}