/* styles.css */
:root {
  --white: #ffffff;
  --light-green: #a8d5ba;
  --light-brown: #cbb69c;
  --gold: #d4af37;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #cc9b56;
  /* background: #dcdbd5; */
  color: #333;
  line-height: 1.6;
}

/* Navbar */
header {
  background: var(--light-green);
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--gold);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links li a,
.nav-links button {
  text-decoration: none;
  color: #333;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin-top: -5px;
}

.nav-links button {
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: var(--white);
  border-radius: 5px;
}

/* Hero */
.hero {
  height: 70vh;
  background: linear-gradient(to right, var(--light-green), var(--light-brown));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-top: -70px;
}

.about {
  height: 20vh;
  background: linear-gradient(to right, var(--light-green), var(--light-brown));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.cta-btn {
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

/* Auth */
#auth-section {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.auth-box {
  background: var(--light-brown);
  padding: 2rem;
  border-radius: 10px;
  width: 300px;
  text-align: center;
  color: var(--white);
}

.auth-box input {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.7rem;
  border: none;
  border-radius: 5px;
}

.auth-box button {
  width: 100%;
  padding: 0.7rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* Footer */
footer {
  background: var(--light-green);
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* General Layout */
/* body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #3e3e3e;
  margin: 0;
  padding: 0;
} */

header {
  background: linear-gradient(to right, #c5e1c5, #d2b48c);
  text-align: center;
  padding: 2rem 1rem;
  color: #fff;
}

.site-title {
  font-size: 2rem;
  margin: 0;
  color: gold;
}

.subtitle {
  font-size: 1rem;
  font-style: italic;
  margin-top: 0.5rem;
  color: #fdfdfd;
}

.form-container {
  max-width: 700px;
  margin: 2rem auto;
  padding: 2rem;
}

.form-box {
  background: #dcdbd5;
  border: 2px solid #d2b48c;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.form-title {
  text-align: center;
  margin-bottom: 1rem;
  color: #2e7d32; /* light green accent */
}

.form-group {
  gap: 1rem;
  margin-bottom: 1rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Primary Button */
.btn-primary {
  background: #2e7d32; /* green */
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #1b5e20;
}

.error-message {
  text-align: center;
  margin-top: 1rem;
  color: red;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #dcdbd5;
  color: #666;
  font-size: 0.9rem;
}

/* Checkbox styling */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  accent-color: #2e7d32; /* green accent */
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
}

/* Textareas */
textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
  font-size: 1rem;
  margin-bottom: 1rem;
}

textarea:focus {
  border-color: #2e7d32;
  outline: none;
  box-shadow: 0 0 5px rgba(46, 125, 50, 0.3);
}

/* =======================
   Announcements & Flyers
   ======================= */
.section {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem 2rem;
  background: #fdfdfd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.section h2 {
  text-align: center;
  color: #2e7d32; /* green accent */
  margin-bottom: 1rem;
}

.announcement-item,
.flyer-item {
  background: #f4f4f4;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border-left: 4px solid #2e7d32; /* accent color */
  transition: transform 0.2s ease;
}

.announcement-item:hover,
.flyer-item:hover {
  transform: scale(1.02);
}

.section.hidden {
  display: none;
}

.public-flyers a {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.3rem 0;
  background: #2e7d32;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.public-flyers a:hover {
  background: #1b5e20;
}

/* ===== Flyers Section Improvements ===== */
#flyersSection .public-flyers {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* space between flyers */
  justify-content: center; /* center items horizontally */
  background: #dcdbd5;
}

.flyer-item {
  display: block; /* remove flex layout to eliminate empty space */
  max-width: 250px; /* optional: constrain flyer size */
  text-align: center; /* center text for PDFs or links */
  padding: 0.5rem;
  margin: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  transition: transform 0.2s ease;
}

.flyer-item img {
  width: 100%; /* make image fill its container */
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.flyer-item img:hover {
  transform: scale(1.05);
}

.flyer-item a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #2e7d32;
  text-decoration: none;
  font-weight: bold;
}

.flyer-item a:hover {
  text-decoration: underline;
}

/* Navbar logo */
.logo-img {
  height: 40px;
  width: 40px;
  display: block;
}

/* Hero large logo */
.hero-logo {
  width: 600px;
  margin-top: -40px;
  display: block;
  margin-bottom: 0px;
}

.admin-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #222;
  padding: 0.75rem 1rem;
  color: white;
}

.admin-navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.admin-navbar .nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.admin-navbar .nav-links li a:hover {
  text-decoration: underline;
}

.btn-logout {
  background-color: #c62828;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-logout:hover {
  background-color: #a71d1d;
}

/* body {
  font-family: Arial, sans-serif;
  padding: 2rem;
  background: #f9f9f9;
} */
h1,
h2 {
  text-align: center;
}
.section {
  max-width: 800px;
  margin: 2rem auto;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
}
.announcement-item,
.flyer-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid #ddd;
}
.announcement-item.disabled {
  opacity: 0.5;
}
.actions button {
  margin-left: 0.5rem;
}
.update-message {
  text-align: center;
  margin-top: 1rem;
  color: green;
}
.preview-img {
  max-width: 200px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.bio-section {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #dcdbd5;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-items: flex-start;
  gap: 2rem;
}

.bio-section img {
  width: 500px;

  height: auto;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.bio-content {
  flex: 1;
}

.bio-content h2 {
  color: #2e7d32;
  margin-bottom: 0.5rem;
}

.bio-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.dashboard-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 0.75rem;
  border: 1px solid #ccc;
  text-align: left;
}
th.sortable {
  cursor: pointer;
}
th.sortable::after {
  content: " ⬍";
  font-size: 0.8rem;
  margin-left: 4px;
  color: #555;
}
.admin-badge {
  background-color: #b8860b;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 6px;
}
button {
  padding: 0.3rem 0.6rem;
  margin: 0.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}
.btn-promote {
  background-color: #2e7d32;
  color: white;
}
.btn-demote {
  background-color: #b8860b;
  color: white;
}
.btn-delete {
  background-color: #c62828;
  color: white;
}
#error-message {
  color: red;
  margin-bottom: 1rem;
  text-align: center;
}

/* Modal */
#userModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#userModalContent {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
}
#closeModal {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 2rem;
  color: #000;
  cursor: pointer;
}

.btn-logout {
  background-color: #c62828;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-logout:hover {
  background-color: #a71d1d;
}
/* Logout message styling */
#logoutMessage {
  background: #f0fdf4; /* light green */
  color: #166534; /* dark green */
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
  text-align: center;
}

/* =======================
   Album Gallery Grid
   ======================= */
#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: linear-gradient(to right, var(--light-green), var(--light-brown));
}

.gallery-hero {
  height: 25vh;
  background: linear-gradient(to right, var(--light-green), var(--light-brown));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 1rem;
}

.gallery-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.gallery-hero p {
  font-size: 1rem;
  max-width: 600px;
}

.gallery-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card .caption {
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
  color: #2e7d32;
  font-size: 0.95rem;
}

.album-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.album-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-bottom: 1px solid #ddd;
}

.album-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.album-card .caption {
  padding: 0.5rem;
  text-align: center;
  font-weight: bold;
  color: #2e7d32;
  font-size: 1rem;
}

/* Album grid inside open album (images) */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 1rem;
}

/* .album-grid .gallery-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
} */

/* .album-grid .gallery-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
} */

/* .album-grid .gallery-card:hover img {
  transform: scale(1.05);
} */

/* .album-grid .gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
} */

/* Sections */
section {
  margin: 1rem auto;
  padding: 1rem;
  max-width: 1000px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* Albums */
#albumsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.album {
  width: 250px;
  background: #fafafa;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.album.dragging-album {
  opacity: 0.5;
  border: 2px dashed #000;
}

.album h3 {
  margin: 0.5rem 0;
}

.album button {
  margin: 0.2rem 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  background-color: #d4af37;
  border: none;
  border-radius: 4px;
}

/* Gallery Images */
.album-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

/* .image-card {
  position: relative;
  width: 70px;
  height: 70px;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
} */

/* .image-card.dragging {
  opacity: 0.5;
  border: 2px dashed #000;
} */

/* .image-card img {
  width: 70px;
  height: 50px;
  object-fit: cover;
} */

/* .image-card input[type="checkbox"] {
  margin: 2px 0;
} */

/* .image-card button {
  font-size: 0.7rem;
  padding: 1px 4px;
  margin: 1px 0;
  cursor: pointer;
  background-color: #d4af37;
  border: none;
  border-radius: 3px;
} */

/* Select All */
.select-all-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* Modal styling (same as before) */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
}

.modal .close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

.modal .arrow {
  position: absolute;
  top: 50%;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  user-select: none;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: var(--white);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-header {
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--gold);
}

.modal-caption {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #333;
  text-align: center;
}

#prevModal, #nextModal {
  top: 50%;
  font-size: 2.5rem;
  transform: translateY(-50%);
}

#prevModal { left: 10px; }
#nextModal { right: 10px; }

#uploadSection {
  text-align: center;
  margin-bottom: 30px;
}

#photoUpload {
  margin-right: 10px;
}

/* .image-card {
  position: relative;
  width: 120px; 
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px;
} */

/* .image-card img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 5px;
} */

/* .image-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-bottom: 4px;
} */

.caption {
  width: 100%;
  min-height: 20px;
  border: 1px dashed #ccc;
  padding: 5px;
  margin-bottom: 10px;
  border-radius: 4px;
  text-align: center;
}

.controls {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.controls button {
  padding: 5px 10px;
  border: none;
  background-color: #007bff;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.controls button:hover {
  background-color: #0056b3;
}

.controls input.caption {
  padding: 4px;
  font-size: 14px;
}

.controls .btn {
  padding: 4px 6px;
  font-size: 13px;
  cursor: pointer;
}

.controls input.select-image {
  align-self: flex-start;
}

/* Dragging visual feedback */
.dragging {
  opacity: 0.5;
}

.btn-logout {
  background-color: #c62828;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-logout:hover {
  background-color: #a71d1d;
}

.update-section {
  margin-top: 1rem;
}
.update-section label {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
}
.update-section input,
.update-section select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.2rem;
}
.btn-update {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 5px;
}

.upload-section,
.videos-list {
  margin: 2rem auto;
  max-width: 800px;
}
.video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid #ccc;
  margin-bottom: 0.5rem;
  background: #fff;
  cursor: grab;
}
.video-item.dragging {
  opacity: 0.5;
}
.video-actions button {
  margin-left: 0.5rem;
}
.update-message {
  text-align: center;
  margin-top: 1rem;
  color: green;
}

.video-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.video-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background: #fafafa;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.5s forwards;
}

video {
  width: 100%;
  border-radius: 6px;
}

.caption {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
}

.no-videos {
  text-align: center;
  font-size: 1.2rem;
  color: #666;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.no-videos svg {
  width: 60px;
  height: 60px;
  fill: #ccc;
}

/* Hamburger button */
.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

/* Backdrop */
.backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Toolbar styling */
#toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f4f4f4;
  border: 1px solid #ccc;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 8px;
}

#toolbar button,
#toolbar select {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 14px;
}

#toolbar button:hover,
#toolbar select:hover {
  background: #e9e9e9;
}

#toolbar button:active {
  background: #ddd;
}

#toolbar select {
  padding: 4px;
}

.color-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.color-label input[type="color"] {
  width: 24px;
  height: 24px;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0; /* hidden but clickable */
  position: absolute;
}

.color-text {
  font-weight: bold;
  font-size: 14px;
  color: #333;
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.color-text.highlight {
  background: yellow;
}

/* Editor box */
#announcementBody {
  border: 1px solid #ccc;
  border-radius: 6px;
  min-height: 120px;
  padding: 8px;
  font-size: 14px;
  background: #fff;
  outline: none;
  overflow-y: hidden; /* prevent scrollbars */
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Save button */
#saveBtn {
  margin-top: 8px;
  padding: 8px 12px;
  background: #0077cc;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

#saveBtn:hover {
  background: #005fa3;
}

#toolbar button {
  min-width: 32px;
  text-align: center;
}

#toolbar button[title="Clear Formatting"] {
  color: #c00;
  font-weight: bold;
}
#toolbar button[title="Clear Formatting"]:hover {
  background: #fdd;
  border-color: #c00;
}

#toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f4f4f4;
  border: 1px solid #ccc;
  padding: 6px;
  border-radius: 6px;
  margin-bottom: 8px;

  /* Sticky positioning */
  position: sticky;
  top: 0;
  z-index: 1000;
}

#toolbar {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.flyer-preview {
  max-width: 200px;
  max-height: 200px;
  display: block;
  margin-bottom: 0.5rem;
  border: 1px solid #ccc;
}
.flyer-item {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ddd;
}

.announcement-title {
  font-weight: bold;
  margin-bottom: 0.5rem; /* space below title */
  font-size: 1.1rem;
  text-align: center;
}

.announcement-body {
  margin: 0; /* remove left margin if present */
  font-size: 1rem;
  line-height: 1.5;
}

.announcement-item {
  display: block; /* stack elements vertically */
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.announcement-item.inactive {
  background-color: #f8d7da; /* light red for inactive */
}

.flyer-preview-container {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.flyer-preview {
  max-width: 150px;
  max-height: 150px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Payment status highlights */
.payment-full {
  background-color: rgba(46, 125, 50, 0.15); /* light green */
}
.payment-partial {
  background-color: rgba(255, 152, 0, 0.15); /* light orange */
}
.payment-none {
  background-color: rgba(244, 67, 54, 0.15); /* light red */
}
.payment-refunded {
  background-color: rgba(33, 150, 243, 0.15); /* light blue */
}

.payment-history-section {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.payment-history-section h3 {
  margin-bottom: 1rem;
}

.payment-entry p {
  margin: 0.2rem 0;
}

.payment-entry hr {
  margin: 0.5rem 0;
  border: none;
  border-top: 1px solid #ddd;
}

/* Social Icons in Navbar */
.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: 120px;
}

.social-icons img {
  width: 40px;
  margin-left: 50px;
  margin-top: 10px;
}

.social-icons a {
  color: #333;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: var(--gold);
}

#logoutMessage {
  background: #f0fdf4; /* light green */
  color: #166534; /* dark green */
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
  text-align: center;
}

/* Flyer modal styling */
#flyerModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

#flyerModal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

#flyerModal .close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

/* Flyer thumbnails */
.flyer-item img {
  cursor: pointer;
  max-width: 200px;
  margin: 0.5rem;
  border-radius: 6px;
  transition: transform 0.2s;
}

.flyer-item img:hover {
  transform: scale(1.05);
}

.message-card {
  background-color: var(--light-green);
  border: 1px solid var(--light-brown);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}
.message-header {
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 8px;
}
.message-card p {
  margin: 5px 0;
  color: #333;
}
textarea {
  width: 100%;
  border: 1px solid var(--light-brown);
  border-radius: 5px;
  padding: 8px;
  margin-top: 5px;
  resize: vertical;
  font-family: inherit;
}
input[type="datetime-local"] {
  margin-top: 8px;
  width: 100%;
  padding: 6px;
  border: 1px solid var(--light-brown);
  border-radius: 5px;
}
button.responded-btn {
  background-color: var(--gold);
  color: var(--white);
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.3s;
}
button.responded-btn:hover {
  background-color: var(--light-brown);
}
.responded-info {
  margin-top: 10px;
  font-weight: bold;
  color: var(--gold);
}

.message-card {
  background-color: var(--light-green);
  border: 1px solid var(--light-brown);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}
.message-header {
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 8px;
}
.responded-section {
  margin-top: 40px;
}
.responded-card {
  border: 1px solid var(--light-brown);
  background-color: var(--light-green);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}
.responded-card span {
  display: block;
  margin: 4px 0;
}
.responded-card a {
  font-weight: bold;
  color: var(--gold);
  cursor: pointer;
  text-decoration: underline;
}

.close-btn {
  float: right;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #555;
}
.close-btn:hover {
  color: var(--gold);
}

    .responded-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
    }
    .responded-table th, .responded-table td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: left;
    }
    .responded-table th {
      background-color: #f2f2f2;
    }
    .user-name-btn {
      background: none;
      border: none;
      color: blue;
      cursor: pointer;
      text-decoration: underline;
      padding: 0;
      font-size: inherit;
    }

.caption {
  width: 90%;
  padding: 4px 6px;
  margin: 4px 0;
  font-size: 0.85rem;
  border: 1px dashed #ccc;
  border-radius: 4px;
  text-align: center;
  display: block;
}

.image-card:hover .caption {
  display: block; /* show caption on hover */
}

.image-card {
  border: 1px solid #ccc;
  padding: 8px;
  margin: 8px;
  display: inline-block;
  vertical-align: top;
  width: 200px;
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
}

#gallery-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#gallery-controls label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
}

/* Modal container */
#userModal,
#userDetailsModal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;            /* Flex centering */
  justify-content: center;  /* Horizontal center */
  align-items: center;      /* Vertical center */
  padding: 1rem;            /* Space around on mobile */
  z-index: 1000;
  overflow: auto;           /* Scroll if content is taller than screen */
}

/* Modal content */
#userModalContent,
#userDetailsModalContent {
  background: #fff;
  border-radius: 12px;
  max-width: 600px;   /* max width */
  width: 100%;        /* responsive width */
  max-height: 90vh;   /* max height relative to viewport */
  overflow-y: auto;   /* scroll if content too tall */
  padding: 1.5rem;
  position: relative;
}

.alert-banner {
  display: none;
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
  z-index: 9999;
  transition: opacity 0.4s ease;
}

.alert-banner.show {
  display: block;
  opacity: 1;
}

.alert-banner.success {
  background-color: #28a745;
}

.alert-banner.error {
  background-color: #dc3545;
}

.file-select-area {
  margin-bottom: 16px;
}

.video-input {
  display: block;
  margin-top: 8px;
}

.hint-text {
  font-size: 0.9rem;
  color: #666;
  margin-top: 4px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =======================
   Responsive Design
   ======================= */

/* Default: Desktop layout (no change to your current design) */

/* Tablet view */
@media (max-width: 992px) {
  nav {
    flex-direction: row;
    justify-content: space-between;
  }

  .nav-links {
    position: fixed; /* keep it above everything */
    top: 0;
    right: 0;
    height: 100vh; /* full height */
    background: var(--light-green); /* solid background so it doesn't blend */
    color: #333;
    width: 70%; /* slide-out menu width */
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1rem;
    gap: 1.5rem;
    display: none;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1001; /* above backdrop */
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
    color: #333;
    font-size: 2rem;
    z-index: 1002; /* above nav-links */
  }

  #backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* below nav-links */
  }

  .hero {
    height: 60vh;
    padding: 1rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .cta-btn {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
  }

  footer {
    font-size: 0.9rem;
  }

  .bio-section {
    flex-direction: column;
    text-align: center;
  }

  .bio-section img {
    width: 90%;
  }

  .bio-content {
    width: 100%;
  }

  .hero-logo {
    width: 400px;
  }
}

@media (max-width: 768px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .album-card img {
    height: 160px;
  }

  /* .album-grid .gallery-card img {
    height: 120px;
  } */

    .gallery-hero h1 {
    font-size: 1.5rem;
  }
  .gallery-hero p {
    font-size: 0.9rem;
  }
  #gallery {
    gap: 10px;
    padding: 0 0.5rem;
  }
  .gallery-card img {
    height: 120px;
  }
  .modal img {
    max-height: 60vh;
  }

  .hamburger {
    display: block;
    color: white;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* hide offscreen initially */
    height: 100%;
    width: 250px;
    background-color: var(--light-green);
    flex-direction: column;
    padding-top: 4rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    z-index: 1001;
  }

  .nav-links.active {
    right: 0; /* slide in */
  }

  .nav-links li a,
  .nav-links button {
    font-size: 1.2rem;
  }

  .backdrop {
    display: none;
  }

  .backdrop.active {
    display: block;
  }
}

/* Mobile view */
@media (max-width: 600px) {
  .logo {
    font-size: 1.2rem;
  }

  .nav-links {
    top: 60px;
  }

  .hero {
    height: auto;
    flex-direction: column;
    padding: 2rem 1rem;
  }

  .hero-content h1 {
    font-size: 1.6rem;
    line-height: 1.4;
    margin-top: 0;
  }

  .cta-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .hero-logo {
    width: 250px;
    margin: 0 auto;
  }

  .bio-section {
    padding: 1rem;
  }

  .bio-section img {
    width: 100%;
  }

  .bio-content h2 {
    font-size: 1.2rem;
  }

  footer {
    font-size: 0.8rem;
  }

  .social-icons img {
    width: 40px;
    margin-left: 0px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

    .gallery-hero h1 {
    font-size: 1.3rem;
  }
  .gallery-hero p {
    font-size: 0.8rem;
  }
  .gallery-card img {
    height: 100px;
  }

  .album-card img {
    height: 140px;
  }

  /* .album-grid .gallery-card img {
    height: 100px;
  } */
}
