/* 1) Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 2) Base and background */
html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #0b1a24;
  background-image: url("../images/homepage.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* readability overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      1200px 800px at 70% 40%,
      transparent 0,
      rgba(11, 26, 36, 0.35) 60%
    ),
    linear-gradient(to left, rgba(11, 26, 36, 0.65), rgba(11, 26, 36, 0.2));
  pointer-events: none;
  z-index: 0;
}

/* 3) Grid shell */
.site-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  grid-template-rows: 1fr auto;
  z-index: 1;
}

/* 4) Sidebar */
.sidebar-nav {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  background: rgba(23, 42, 58, 0.75);
  backdrop-filter: saturate(120%) blur(2px);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 1rem;
  position: relative;
}

/* Home link (top-left corner) */
.sidebar-nav .top-link {
  position: absolute;
  top: 1rem;
  left: 0;
  width: 100%;
  list-style: none;
}

.sidebar-nav .top-link a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: #fff;
  border-left: 4px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.sidebar-nav .top-link a:hover,
.sidebar-nav .top-link a:focus {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #4fb3ff;
}

.sidebar-nav .top-link a.active {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #00d1ff;
}

/* Remaining links (moved further down) */
.sidebar-nav .main-links {
  margin-top: 10rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Push CTA (last link) to bottom */
.sidebar-nav .main-links li:last-child {
  margin-top: auto;
}

.sidebar-nav .main-links a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: #fff;
  border-left: 4px solid transparent;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.sidebar-nav .main-links a:hover,
.sidebar-nav .main-links a:focus {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #4fb3ff;
}

.sidebar-nav .main-links a.active {
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #00d1ff;
}

/* Call-to-action button (Submit a Resource) */
.sidebar-nav .cta {
  background: #c0392b;
  text-align: center;
  border-radius: 4px;
  margin: 1rem 1rem 0;
  padding: 0;
}

.sidebar-nav .cta a {
  display: block;
  padding: 0.8rem 1.25rem;
  text-decoration: none;
  color: #fff;
}

.sidebar-nav .cta:hover,
.sidebar-nav .cta:focus {
  background: #a83225;
}

/* 5) Content column */
.content-area {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Header */
header {
  background: rgba(23, 42, 58, 0.7);
  color: #fff;
  padding: 1rem 1.5rem;
  text-align: center;
}

/* Main */
main {
  flex-grow: 1;
  margin: 1.25rem 0;
}

/* Mission card */
.mission {
  max-width: 980px;
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.4);
  transition: background-color 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.mission:hover {
  background-color: rgba(255, 255, 255, 1);
}

.mission h3 {
  color: #004d99;
  margin-bottom: 0.5rem;
}

.mission-hover-box {
  display: inline-block;
  background: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #004d99;
  vertical-align: middle;
  transition: opacity 0.2s ease;
  white-space: nowrap;
  opacity: 1;
  border: 1px solid rgba(0, 77, 153, 0.2);
}

.mission:hover .mission-hover-box {
  opacity: 0;
}

.origins:hover .mission-hover-box {
  opacity: 0;
}

/* Footer */
footer {
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  background: #d7d7d7;
  color: #333;
  text-align: center;
  padding: 1rem 0;
  height: 30px;
  line-height: 5px;
}

/* 6) Responsive */
@media (max-width: 900px) {
  .site-wrapper {
    grid-template-columns: 200px 1fr;
  }
}

@media (max-width: 768px) {
  .site-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .sidebar-nav {
    flex-direction: row;
    justify-content: center;
    padding: 0.5rem;
    position: static;
  }

  .sidebar-nav .top-link,
  .sidebar-nav .main-links {
    position: static;
    margin-top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
  }

  .sidebar-nav .main-links li:last-child {
    margin-top: 0;
  }

  .sidebar-nav a {
    padding: 0.65rem 0.8rem;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .sidebar-nav a:hover,
  .sidebar-nav a:focus {
    border-bottom-color: #4fb3ff;
  }

  .sidebar-nav a.active {
    border-bottom-color: #00d1ff;
  }

  .sidebar-nav .cta {
    margin: 0.4rem 0 0.4rem 0.25rem;
  }

  .content-area {
    grid-column: 1 / 2;
  }

  footer {
    grid-column: 1 / 2;
  }
}

/* 7) Focus visibility */
:focus-visible {
  outline: 2px solid #00d1ff;
  outline-offset: 2px;
}

/* Origins block (unchanged, will remove next when you say so) */

/* --- CRITICAL FORM STYLING FOR READABILITY AND FUNCTIONALITY --- */

.form-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  background-color: #f8f8f8 !important;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
  color: #333 !important;
}

.submission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-container label,
.form-container h2,
.form-container p,
.form-container h3 {
  color: #1a202c !important;
  font-family: Arial, sans-serif !important;
}

.section-title {
  grid-column: 1 / -1;
  margin-top: 15px;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.full-width-group {
  grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea,
.full-width-group input,
.full-width-group select,
.full-width-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #004d99;
  border-radius: 4px;
  background-color: white !important;
  color: #1a202c !important;
  box-sizing: border-box;
  margin-top: 5px;
  margin-bottom: 10px;
}

.form-actions button {
  background-color: #c0392b;
  color: white;
  padding: 12px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  width: 100%;
  margin-top: 15px;
}

.form-actions button:hover {
  background-color: #a83225;
}

@media (max-width: 600px) {
  .submission-grid {
    grid-template-columns: 1fr;
  }
}
``