/* ==============================
   ROOT VARIABLES
   ============================== */
:root {
  --brand: #b91c1c;   /* Primary brand color (deep red) */
  --accent: #ef4444;  /* Accent red shade */
  --bg: #fff;         /* Background color */
  --muted: #666;      /* Muted text color */
}

/* ==============================
   GLOBAL RESET & BASE
   ============================== */
* {
  box-sizing: border-box; /* Ensures padding & border are included in element width/height */
}

body {
  margin: 0; /* Remove default browser margin */
  font-family: Inter, Arial, Helvetica, sans-serif; /* Font stack */
  background: var(--bg); /* White background */
  color: #222; /* Dark text for readability */
  overflow-x: hidden;
}



/* ==============================
   CONTAINER & LAYOUT
   ============================== */
.container {
  max-width: 1100px; /* Limit content width */
  margin: 0 auto;    /* Center horizontally */
  padding: 1rem;
}


/* ==============================
   HERO SECTION
   ============================== */
.hero {
  display: flex;
  align-items: center;         /* Vertically center children */
  justify-content: space-between; /* Spread children apart */
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); /* Soft shadow */
  margin-top: 1rem;
}

.hero .cta {
  display: flex;
  gap: 1rem; /* Space between call-to-action buttons */
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--brand); 
  color: white;
  text-decoration: none;
}

.btn.secondary {
  background: white;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn.danger {
  background: #dc2626; /* Red */
  color: white;
}

.btn.danger:hover {
  background: #b91c1c; /* Darker red on hover */
}




/* ==============================
   CARD
   ============================== */
.card {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  margin-top: 1rem;
}

/* ==============================
   FORMS
   ============================== */
.form-row {
  margin-bottom: 0.75rem; /* Space between form rows */
}

.input,
select {
  width: 100%; /* Full width fields */
  padding: 0.6rem;
  border: 1px solid #eee;
  border-radius: 8px;
}

/* ==============================
   GRID LAYOUT
   ============================== */
.grid {
  display: grid;
  grid-template-columns: 1fr 320px; /* Main + Sidebar layout */
  gap: 1rem;
}

.sidebar {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
}


/* ==============================
   SMALL TEXT
   ============================== */
.small {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ==============================
   FOOTER
   ============================== */
.footer {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

/* ==============================
   NAVIGATION LIST
   ============================== */
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li {
  margin: 0.5rem 0;
}

/* ==============================
   NAVBAR
   ============================== */
.navbar {
  max-width: 1100px;
  background: var(--brand);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  margin-top: 0px;
  /* position: fixed; */
  z-index: 0;
}

.navbar .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center; /* Vertically center items */
}

.navbar .nav-list li {
  margin-right: 1rem;
}

.navbar .nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.navbar .nav-list a:hover {
  opacity: 0.8; /* Fade effect on hover */
}

/* ==============================
   ADMIN NAVBAR
   ============================== */
.adminNavbar {
  max-width: 100vw;
  background: var(--brand);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  margin-top: 0px;
  /* position: fixed; */
  z-index: 0;
}

.adminNavbar .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center; /* Vertically center items */
}

.adminNavbar .nav-list li {
  margin-right: 1rem;
}

.adminNavbar .nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.adminNavbar .nav-list a:hover {
  opacity: 0.8; /* Fade effect on hover */
}

/* ==============================
  Student NAVBAR
   ============================== */
.studentNavbar {
  max-width: 100vw;
  background: var(--brand);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  margin-top: 0px;
  /* position: fixed; */
  z-index: 0;
}

.studentNavbar .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center; /* Vertically center items */
}

.studentNavbar .nav-list li {
  margin-right: 1rem;
}

.studentNavbar .nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.studentNavbar .nav-list a:hover {
  opacity: 0.8; /* Fade effect on hover */
}

.logoutButton {
  color:white; 
  margin-left: 25vw; 
  padding: 2px 5px 2px 5px; 
  border: solid 2px white;
  border-radius: 5px;
}

/* ==============================
   EVENT GRID & CARDS
   ============================== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); /* Responsive grid */
  gap: 1.5rem;
  margin-top: 1rem;
}

.event-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s;
}

.event-card:hover {
  transform: translateY(-4px); /* Lift on hover */
}

.event-poster {
  width: 100%;
  height: 200px;
  object-fit: cover; /* Maintain aspect ratio */
  border-bottom: 1px solid #eee;
}

.event-body {
  padding: 1rem;
  flex: 1; /* Fill available space */
}

.event-body h3 {
  margin-top: 0;
  color: var(--brand);
}

.event-body h4 {
  margin: 0 0 0.5rem 0;
  color: var(--brand);
}

.event-actions {
  padding: 0.75rem 1rem 1rem;
}

/* ==============================
   MODAL
   ============================== */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Scroll if content exceeds window */
  background-color: rgba(0, 0, 0, 0.6); /* Dark overlay */
}

.modal-content {
  background: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.close {
  float: right;
  font-size: 22px;
  cursor: pointer;
}

/* ==============================
   TOAST NOTIFICATIONS
   ============================== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 2000;
}

.toast.success {
  background-color: #16a34a; /* Green success */
}

.toast.error {
  background-color: #dc2626; /* Red error */
}

