/* ===== Fonts & Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@400;600;700;800;900&family=Barlow:wght@400;500;600;700&display=swap');

:root {
  --heading-font: 'Barlow Semi Condensed', sans-serif;
  --body-font: 'Barlow', sans-serif;
  --teal: #00A7AA;
  --teal-dark: #006D71;
  --blue: #1A65B6;
  --blue-dark: #003558;
  --sand: #CCD3CE;
}

/* ===== Base ===== */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  background-color: #d7f3ed;
  font-family: var(--body-font);
  color: var(--blue-dark);
  margin: 0;
}

a { color: #1150B6; }
a:hover { color: #006eff; }

/* Accessible skip link */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  background: #fff;
  padding: .5rem 1rem;
}

/* Headings */
h1, h2, h3 { font-family: var(--heading-font); font-weight: 700; }
h1, h2, h3, h4, h5, h6 { color: var(--blue-dark); }

h1 { font-size: clamp(2.2rem, 4.8vw, 3rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.6rem, 3.2vw, 2rem); }

p {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.6;
}

hr {
  border: 0;
  height: 1px;
  background: #999;
}

/* ===== Hero (home) ===== */
#jumbotron {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(10px, 4vh, 20px);
  padding-bottom: clamp(10px, 4vh, 20px);
  background: url('documents/bannerimage.png') center/cover no-repeat;
  color: #fff;
  position: relative;
  margin-bottom: 0;
  min-height: clamp(260px, 30vh, 400px);
  z-index: 1;
}

/* Logo in hero and secondary hero */
#jumbotron-secondary .logo-image {
  width: 100%;
  max-width: clamp(240px, 28vw, 360px);
  height: auto;
  margin: 0 auto;
}

#jumbotron .logo-image {
  width: clamp(180px, 35vw, 400px);
  height: auto;
  margin-bottom: 0;
}

/* ===== Second-level hero (resources/about/accessibility) ===== */
#jumbotron-secondary {
  background: url('documents/2ndllevelbanner.png') center/cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(160px, 18vh, 260px);
  padding: clamp(10px, 2vh, 16px) 0;
  margin-bottom: 0;
  text-align: center;
  border-bottom: 6px solid #fe7f04;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ===== Hamburger & Sidebar ===== */
.menu-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 80px;
  height: 70px;
  background: #3278ec;
  border: 2px solid #fff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}
.menu-btn span {
  background: #fff;
  height: 4px;
  width: 30px;
  margin: 4px 0;
  border-radius: 2px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #1152BB;
  color: #fff;
  padding: 20px 16px 16px;
  overflow: hidden;
  transition: left .25s ease-in-out;
  z-index: 1100;
}
.sidebar.active { left: 0; }

/* Hide hamburger when menu open (button must come AFTER sidebar in DOM) */
.sidebar.active ~ .menu-btn { display: none; }

/* Close button */
.close-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 9999px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: background-color .2s ease, box-shadow .2s ease;
  margin: 0 0 12px;
}
.close-btn:hover,
.close-btn:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Sidebar links */
#sidebar a,
#sidebar button {
  display: block;
  box-sizing: border-box;
  padding: 12px 16px;
  min-height: 44px;
  line-height: 1.2;
  font-size: 20px;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
}

/* ===== Secondary content area (inner pages) ===== */
#secondary-content,
#secondary-content h1,
#secondary-content h2,
#secondary-content h3,
#secondary-content h4,
#secondary-content h5,
#secondary-content h6 {
  color: #002a67;
}

#secondary-content {
  background: #fffae6;
  padding: 50px;
}

/* ===== Resources page: make links accessible & bold ===== */
body[data-page="resources"] #secondary-content a {
  display: inline-block;
  padding: 8px 10px;
  min-height: 44px;         /* enhanced target size */
  line-height: 1.3;
  font-weight: 700;
}

body[data-page="resources"] #secondary-content li {
  margin-bottom: 4px;
}

/* ===== Home page sections (index.html) ===== */

/* Shared section spacing */
#main-content,
#about-content {
  position: relative;
  padding: 60px 50px;
}

/* Top (video + text) */
#main-content {
  background: #fffae6 url('documents/about-background.png') center/cover no-repeat;
  color: #002a67;
}

/* Green "About the Game" section */
#about-content {
  background: url('documents/project-background.png') center/cover no-repeat;
  color: #ffffff;
}

/* Overlays so text is readable */
#main-content::before,
#about-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

#main-content::before {
  background: rgba(255, 255, 255, 0.85);
}

#about-content::before {
  background: rgba(0, 0, 0, 0.55);
}

/* Actual content sits above overlays */
#main-content > .row,
#about-content > .row {
  position: relative;
  z-index: 1;
}

/* Extra breathing room under the main title on home */
#main-content .section-title {
  margin-top: 0;
  margin-bottom: 24px;
}

/* Home page only: About the Game heading white */
body[data-page="home"] #about-content h2 {
  color: #ffffff !important;
}

/* ===== Utilities ===== */
.content-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.video-wrapper {
  max-width: 700px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

/* ===== Orange "PLAY THE GAME" Button in hero ===== */
.floating-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background: linear-gradient(180deg, #ff7a00 0%, #b6541b 100%);
  color: #ffffff;
  font-family: var(--heading-font);
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;

  padding: 16px 40px;
  border-radius: 50px;
  border: 3px solid #ffffff;
  margin-top: 10px;
  margin-bottom: 8px;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);

  min-height: 44px;     /* accessibility requirement */
  min-width: 44px;      /* accessibility requirement */

  transition: transform .15s ease,
              box-shadow .15s ease,
              background .2s ease,
              color .2s ease;
}

/* Keep it snug under the logo */
#jumbotron .floating-btn {
  margin-top: 6px;
}

/* Hover / Focus */
.floating-btn:hover,
.floating-btn:focus {
  background: linear-gradient(180deg, #ff8a1a 0%, #cc5c00 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  outline: none;
  color: #ffffff;
}

/* Shrink button on smaller screens */
@media (max-width: 768px) {
  .floating-btn {
    padding: 14px 32px;
    font-size: 1.1rem;
  }
}
@media (max-width: 480px) {
  .floating-btn {
    padding: 12px 28px;
    font-size: 1rem;
    border-width: 2px;
  }
}

/* ===== Inline blue "Try the game" button ===== */
.cta-game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 44px;
  min-height: 44px;

  padding: 0.4rem 1.2rem;
  border-radius: 9999px;
  border: none;

  background-color: #1150B6;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;

  transition:
    background-color 0.15s ease-out,
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.cta-game-btn strong {
  color: #ffffff;
}

.cta-game-btn:hover,
.cta-game-btn:focus {
  background-color: #1150B6;
  color: #ffffff;
  transform: scale(1.04);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
  outline: none;
}

@media (max-width: 576px) {
  .cta-game-btn {
    padding: 0.35rem 1rem;
    font-size: 0.95rem;
  }
}

/* ===== Footer ===== */
.jumbotron-footer {
  padding: 20px 35px;
  background: #fff;
  text-align: left;
}
.jumbotron-footer p {
  margin-bottom: 10px;
  font-size: 1.125rem;
  color: #000;
}

/* Footer links */
footer a {
  color: #0044cc;
  text-decoration: underline;
  font-weight: 600;
  background: transparent;
}
footer a:hover,
footer a:focus {
  color: #00328c;
  background: transparent;
  text-decoration: none;
  outline: 2px solid #00328c;
  outline-offset: 2px;
}
footer a:visited {
  color: #5a3fa3;
}

.footer-logo-col {
  text-align: center;
}

/* ===== Footer Logos – Grid & Sizing ===== */
footer .footer-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* 4 logos on desktop */
  gap: 24px;
  align-items: center;
  justify-items: center;
  margin-top: 40px;
  margin-bottom: 20px;
  padding: 10px 0;
}

footer .footer-logo {
  width: auto;
  height: auto;
  max-height: 90px;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

/* NIFA wider (desktop) */
footer .footer-logo.nifa {
  max-width: 320px;
}

/* Tablet: 2 logos per row */
@media (max-width: 992px) {
  footer .footer-logos {
    grid-template-columns: repeat(2, 1fr);
  }

  footer .footer-logo {
    max-height: 75px;
    max-width: 220px;
  }

  footer .footer-logo.nifa {
    max-height: 90px;
    max-width: 260px;
  }
}

/* Large phones */
@media (max-width: 768px) {
  footer .footer-logo {
    max-height: 65px;
    max-width: 200px;
  }

  footer .footer-logo.nifa {
    max-height: 85px;
    max-width: 240px;
  }
}

/* Small phones: 1 logo per row */
@media (max-width: 576px) {
  footer .footer-logos {
    grid-template-columns: 1fr;
  }

  footer .footer-logo {
    max-height: 58px;
    max-width: 180px;
    margin: 12px auto;
  }

  footer .footer-logo.nifa {
    max-height: 80px;
    max-width: 230px;
  }
}

/* ===== Responsive – global tweaks ===== */
@media (max-width: 770px) {
  .menu-btn { width: 60px; height: 60px; }
  .menu-btn span { height: 3px; width: 24px; }
  #jumbotron { padding-top: 60px; padding-bottom: 60px; }
  #jumbotron-secondary {
    min-height: clamp(150px, 22vh, 220px);
    padding-top: clamp(12px, 3vh, 20px);
    padding-bottom: clamp(6px, 2vh, 10px);
  }
  #jumbotron-secondary .logo-image {
    max-width: clamp(180px, 55vw, 260px);
  }
}
