/* ========================================================================
   Global Reset & Basic Styles
======================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Define the height for each time slot */
  --time-slot-height: 60px;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ========================================================================
   Header
======================================================================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #000;
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
}

nav ul {
  display: flex;
  gap: 1.5rem;
}

nav ul li{
  font-size: 1rem;
}

nav ul li a {
  color: #ffd700;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #fff;
}

/* ========================================================================
   HERO Section
======================================================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 215, 0, 0.1),
    rgba(0, 0, 0, 1)
  );
}

.hero-simple {
  padding: 4rem 2rem;
  background: linear-gradient(
    to bottom,
    rgba(255, 215, 0, 0.1),
    rgba(0, 0, 0, 1)
  );
}

/* ========================================================================
   Announcements Section
======================================================================== */
.announcements {
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
  margin-bottom: 3rem;
}

.announcements h1 {
  margin-bottom: 1rem;
  color: #ffd700;
  font-size: 2rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

.announcements .post.featured {
  border: 1px solid #333;
  background-color: #111;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.announcements .post.featured .post-header h2 {
  font-size: 1.75rem;
  color: #ffd700;
  margin-bottom: 0.25rem;
}

.announcements .post.featured .post-date {
  font-size: 0.9rem;
  color: #bbb;
}

/* ========================================================================
   Events Section
======================================================================== */
.events {
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
  margin-bottom: 3rem;
}

.events h1 {
  margin-bottom: 1rem;
  color: #ffd700;
  font-size: 2rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

.events .post {
  border: 1px solid #333;
  background-color: #111;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.events .post .post-header h2 {
  font-size: 1.5rem;
  color: #ffd700;
  margin-bottom: 0.25rem;
}

.events .post .post-date {
  font-size: 0.8rem;
  color: #bbb;
  margin-bottom: 0.5rem;
}

/* ========================================================================
   Register/Login Section
======================================================================== */
.form-container {
  width: 100%;
  max-width: 500px;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem auto;
}

.form-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.form-toggle button {
  background: none;
  border: none;
  color: #ffd700;
  font-size: 1rem;
  margin: 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: border-bottom 0.3s ease;
}

.form-toggle button.active,
.form-toggle button:hover {
  border-bottom: 2px solid #ffd700;
}

form {
  flex-direction: column;
  gap: 1rem;
}

form.active {
  display: flex;
}

form.inactive {
  display: none;
}

form label {
  font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid #333;
  background-color: #000;
  color: #fff;
  outline: none;
}

form input[type="submit"] {
  background-color: #ffd700;
  color: #000;
  font-weight: 600;
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form input[type="submit"]:disabled {
  background-color: #ffee8e !important;
}

form input[type="submit"]:hover {
  background-color: #e0c100;
}

/* ========================================================================
   Footer
======================================================================== */
footer {
  background: #000;
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #bbb;
  border-top: 1px solid #333;
  margin-top: 2rem;
}

/* ========================================================================
   Calendar Styles
======================================================================== */
.calendar-container {
  width: 100%;
  max-width: 1200px;
  background-color: #111;
  padding: 1rem;
  margin: 0 auto;
  border: 1px solid #333;
  border-radius: 8px;
}

/* --- Month View Styles --- */
#month-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

#month-navigation button {
  background-color: #ffd700;
  border: none;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 1rem;
}

#month-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
}

#month-calendar {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  table-layout: fixed;
}

#month-calendar th,
#month-calendar td {
  border: 1px solid #333;
  padding: 0.75rem;
  text-align: center;
  vertical-align: top;
  height: 80px;
  cursor: pointer;
  font-size: 1rem;
}

#month-calendar th {
  background-color: #000;
  color: #ffd700;
}

#month-calendar td.past {
  background-color: #222;
  color: #777;
  cursor: default;
}

#month-calendar td.today {
  background-color: #984;
  color: #000;
}

.month-event {
  text-align: left;
  font-size: 0.75rem;
  background-color: #ffd700;
  color: #000;
  margin-top: 0.2rem;
  padding: 0.5rem 0.5rem;
}

/* --- Day (Table) View Styles --- */
#day-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  border: 1px solid #333; /* Adds an outer border around the day table */
}

#day-table thead th {
  background-color: #000;
  color: #ffd700;
  font-weight: 600;
  text-align: center;
  padding: 0.75rem;
  border: 1px solid #444;
}

#day-times {
  width: 80px;
  vertical-align: top;
}

#day-times .time-slot {
  height: var(--time-slot-height);
  padding-right: 10px;
  text-align: right;
  font-size: 0.9rem;
  border-bottom: 1px solid #444;
  color: #aaa;
}

#day-slots {
  position: relative;
  height: calc(9 * var(--time-slot-height));
  border-left: 1px solid #444;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(var(--time-slot-height) - 1px),
    #444 calc(var(--time-slot-height) - 1px),
    #444 var(--time-slot-height)
  );
}

#day-view button {
  background-color: #ffd700;
  border: none;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 1rem;
}

.day-event {
  position: absolute;
  background-color: #ffd700;
  color: #000;
  border: 1px solid #000;
  border-radius: 4px;
  font-size: 0.85rem;
  overflow: hidden;
  box-sizing: border-box;
  text-align: left;
  padding: 0.6rem 0.6rem;
}

/* ========================================================================
   NEW: Outline‑style button & modal styles
======================================================================== */
.btn-outline { /* NEW */
  background-color: transparent;
  color: #ffd700;
  border: 1px solid #ffd700;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { /* NEW */
  background-color: #ffd700;
  color: #000;
}

.modal-overlay { /* NEW */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal { /* NEW */
  background: #111;
  padding: 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.modal-header,
.modal-footer { /* NEW */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close { /* NEW */
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

.modal-body { /* NEW */
  margin: 1rem 0;
}

.modal-body label { /* NEW */
  display: block;
  margin-bottom: 0.25rem;
  color: #ccc;
  font-size: 0.9rem;
}

.modal-body input { /* NEW */
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-size: 0.9rem;
}

.modal-body input[type="checkbox"]{
  width: 20px;
}

.day-view-controls {                   /* NEW */
  position: relative;
  margin-bottom: 1rem;
  height: 5rem;
}

.day-view-controls #back-to-month {   /* NEW */
  position: absolute;
  left: 0;
  top: 0;
}

.day-view-controls #new-event {       /* NEW */
  position: absolute;
  right: 0;
  top: 0;
}

.day-view-controls #day-title {       /* NEW */
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  margin: 0.3rem 0.3rem 0px 0px;
  font-size: 1rem;
}

.profile-dues {
  flex: 0 0 220px;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  max-width: 220px;
}

.profile-dues .dues-title {
  margin-bottom: 0.5rem;
  color: #ffd700;
  font-size: 1.25rem;
}

.profile-dues .dues-balance {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

#physical-dues {
  min-height: 100px;
  max-height: 150px;    /* cap its height */
  padding: 0.5rem;
  border: 1px dashed #555;
  border-radius: 4px;
  background-color: #000;
  color: #ddd;
  overflow-y: auto;     /* scroll when content overflows */
  font-style: italic;
  white-space: pre-wrap; 
}

@media (max-width: 800px) {
  /* 1) Hide the calendar’s header */
  #month-calendar thead,
  #month-calendar th {
    display: none;
  }

  /* 2) Treat table, tbody and tr as blocks so their children (td) can flow vertically */
  #month-calendar,
  #month-calendar tbody,
  #month-calendar tr {
    display: block;
    width: 100%;
  }

  /* 3) Style each day cell as a “card” */
  #month-calendar td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #111;
    text-align: left;
    height: auto;          /* let it grow with content */
    white-space: normal;   /* wrap long text */
  }

  /* 4) Drop any totally empty cells (no date, no events) */
  #month-calendar td:empty {
    display: none;
  }

  /* Tweak the nav bar at the top */
  #month-navigation {
    justify-content: space-between;
  }
  #month-navigation button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  #month-title {
    font-size: 1rem;
  }

  /* Make the little event pills a bit roomier */
  .month-event {
    margin-top: 0.5rem;
    font-size: 0.85rem;
  }

  nav ul li{
    font-size: 0.7rem;
  }
  header .logo {
    font-size: 1rem;
  }

  #month-calendar th,
  #month-calendar td {
    font-size: 0.7rem;
  }
  .day-view-controls { 
    height: 2rem;
  }
  .day-view-controls #day-title { 
    font-size: 0.7rem;
  }
  #day-view button{
    font-size: 0.5rem;
    padding: 0.3rem 0.5rem;
  }

  .day-event {
    padding: 0.3rem 0.3rem;
    font-size: min(0.85rem, 1.3vw);
  }

  #day-times .time-slot {
    font-size: 0.7rem;
  }
}