:root {
  --blue: #0047ab;
  --dark-blue: #062b5c;
  --light-blue: #eef5ff;
  --text: #222;
  --muted: #666;
  --white: #fff;
  --border: #d8d8d8;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #f7f7f7;
  line-height: 1.5;
}

/* HEADER */
.brand-header { background: var(--blue); color: white; }
.brand-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.brand-link { display: block; flex: 0 0 auto; }
.brand-mascot { display: block; width: 105px; height: auto; }
.brand-text h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
}
.tagline { margin: 7px 0 0; font-size: 1.1rem; }

/* NAVIGATION */
.main-nav {
  background: var(--dark-blue);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
}
.main-nav a {
  color: white;
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 6px;
  font-weight: 700;
}
.main-nav a:hover,
.main-nav a:focus { background: rgba(255, 255, 255, 0.15); }
.main-nav a.current {
  background: white;
  color: var(--dark-blue);
}

/* MAIN PAGE */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 22px 60px;
}
.page-intro {
  text-align: center;
  max-width: 850px;
  margin: 0 auto 42px;
}
.page-intro > h1 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
}
.intro-text { margin: 0 auto 26px; font-size: 1.2rem; }

/* SUBMISSION BOX */
.submission-box {
  background: var(--light-blue);
  border: 2px solid var(--blue);
  border-radius: 14px;
  padding: 22px 26px;
  text-align: left;
  box-shadow: var(--shadow);
}
.submission-box h2 { margin: 0 0 10px; color: var(--dark-blue); }
.submission-box p { margin: 8px 0; }
.submission-box a { color: var(--blue); font-weight: 700; }
.submission-note { font-size: 0.9rem; color: var(--muted); }

/* GALLERY */
.gallery-section > h2 {
  text-align: center;
  color: var(--dark-blue);
  margin: 0 0 26px;
  font-size: 2rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.gallery-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.gallery-image-button {
  display: block;
  width: 100%;
  height: 280px;
  padding: 0;
  border: 0;
  background: #eee;
  cursor: pointer;
  overflow: hidden;
}
.gallery-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery-image-button:hover img,
.gallery-image-button:focus img { transform: scale(1.035); }
.gallery-image-button:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: -4px;
}
.gallery-caption { padding: 16px 18px 18px; flex: 1; }
.gallery-caption h3 {
  margin: 0 0 6px;
  color: var(--dark-blue);
  font-size: 1.15rem;
  line-height: 1.3;
}
.gallery-caption p { margin: 0; color: var(--muted); font-weight: 700; }

/* LIGHTBOX */
body.lightbox-open { overflow: hidden; }
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox-content {
  max-width: 950px;
  max-height: 92vh;
  background: white;
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}
.lightbox-caption { padding: 15px 20px 18px; text-align: center; }
.lightbox-caption h2 { margin: 0 0 5px; color: var(--dark-blue); }
.lightbox-caption p { margin: 0; color: var(--muted); font-weight: 700; }
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 22px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1001;
}

/* FOOTER — flat layout */
.site-footer {
  background: var(--dark-blue);
  color: white;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 22px 26px;
  text-align: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.footer-logo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
}
.footer-brand-text {
  font-size: 1.15rem;
  font-weight: 700;
}
.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 auto 20px;
}
.footer-nav a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}
.footer-nav a:hover,
.footer-nav a:focus { text-decoration: underline; }
.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  font-size: 2rem;
}
.footer-social a { color: white; text-decoration: none; }
.footer-social a:hover,
.footer-social a:focus { opacity: .82; }
.footer-bottom {
  text-align: center;
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
}

/* TABLET */
@media (max-width: 850px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-inner {
    padding: 30px 18px 24px;
  }
}

/* PHONE */
@media (max-width: 560px) {
  .brand-header-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 12px 16px 16px;
  }
  .brand-mascot { width: 90px; }
  .tagline { font-size: 1rem; }
  .main-nav { padding: 6px; }
  .main-nav a { padding: 7px 8px; font-size: 0.88rem; }
  .wrapper { padding: 26px 14px 45px; }
  .submission-box { padding: 18px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 18px; }
  .gallery-image-button { height: 300px; }
  .lightbox { padding: 55px 10px 20px; }
  .lightbox-content img { max-height: 68vh; }

  .footer-logo {
    width: 110px;
    height: 110px;
  }
  .footer-nav {
    gap: 7px 12px;
  }
  .footer-nav a {
    font-size: .95rem;
  }
  .footer-social {
    gap: 18px;
    font-size: 1.8rem;
  }
}
