/* --- General Body & Typography --- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.6;
}
a {
  color: #003366;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* --- Header --- */
header {
  background-color: #003366;
  color: #ffffff;
  padding: 1rem 2rem;
  border-bottom: 4px solid #f9c60b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-title a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}
.main-nav {
  display: flex;
}
.main-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 15px;
  border-radius: 4px;
  transition: background-color 0.3s;
}
.main-nav a:hover {
  background-color: #0055a4;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.username {
  font-weight: bold;
  white-space: nowrap;
}
.logout-button {
  background-color: #f9c60b;
  color: #003366;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.logout-button:hover {
  background-color: #e0b000;
  text-decoration: none;
}

/* --- Main Content Area --- */
main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 2rem;
}
main > .content,
main > .executive-container,
main > .news-section,
main > .resources-container,
main > .admin-container {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
  background-color: #333;
  color: #ffffff;
}

/* --- Login & Register Page --- */
.login-container {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}
/* ... Other styles ... */
.login-container h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}
.login-container input {
  width: 100%;
  padding: 10px;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.login-container button {
  width: 100%;
  padding: 12px;
  background-color: #003366;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}
.register-link {
  margin-top: 1.5rem;
}
.username-info {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 10px;
  background-color: #f8f9fa;
  border-left: 4px solid #f9c60b;
}
.news-article,
.member-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease-in-out;
}
.news-article:hover,
.member-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.news-article h3 {
  font-size: 1.5rem;
  margin-top: 0;
}
.member-card h3 {
  margin-top: 0;
  color: #003366;
  font-size: 1.25rem;
}
.read-more-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: bold;
}
.executive-container {
  text-align: center;
}
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: left;
}
.edit-form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
  color: #555;
}
.edit-form input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
.save-button {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-top: 2rem;
  background-color: #003366;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.save-button:hover {
  background-color: #0055a4;
}
.admin-divider {
  margin: 2rem 0;
  border-top: 1px solid #eee;
}
.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.user-table th,
.user-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
  vertical-align: middle;
}
.user-table th {
  background-color: #f8f8f8;
}
.actions-cell {
  min-width: 350px;
}
.delete-button {
  background-color: #d9534f;
  color: white;
  border: 1px solid #d43f3a;
}
.delete-button:hover {
  background-color: #c9302c;
}
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #f0ad4e;
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.status-text {
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: capitalize;
}
.upload-form-container {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #eee;
  margin-bottom: 2rem;
}
.resource-section h3 {
  border-bottom: 2px solid #003366;
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}
.resource-section ul {
  list-style: none;
  padding-left: 0;
}
.resource-section li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}
.delete-button-small {
  background-color: #d9534f;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.equality-statement {
  background-color: #ffffff;
  padding: 2.5rem 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
  border-left: 8px solid #f9c60b;
}
.equality-statement h3 {
  margin-top: 0;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.8rem;
  color: #003366;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
}
.equality-statement h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #003366;
  margin: 10px auto 0;
}
.equality-statement p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
  color: #444;
}
.equality-statement p:last-of-type {
  margin-bottom: 0;
}

/*
=========================================
--- Responsive Styles (MUST BE AT THE END) ---
=========================================
*/

/* Hamburger button is hidden on desktop by default */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  margin-left: 1rem;
}
.hamburger-bar {
  width: 2rem;
  height: 0.25rem;
  background-color: white;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* --- Mobile Styles (screens smaller than 768px) --- */
@media (max-width: 768px) {
  header {
    justify-content: space-between;
    position: relative; /* THIS IS THE CRITICAL FIX */
  }
  .main-nav,
  .user-info {
    display: none;
  }
  .hamburger-menu {
    display: flex;
  }
  .main-nav.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #004488;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }
  .main-nav.active a {
    text-align: center;
    padding: 1rem;
    width: 100%;
  }

  /* Hamburger to "X" Animation */
  .hamburger-menu.active .hamburger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger-menu.active .hamburger-bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .hamburger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .main-nav.active .user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  .main-nav.active .logout-button {
    width: 80%;
    text-align: center;
  }
}
