/*====================================
:root variables
====================================*/
:root {
  --bg: #f7f3e9;
  --panel: #fdfbf7;
  --accent: #4a9a9d;
  --turquoise: #5eb8bb;
  --muted: #b09b8e;
  --text: #2d231e;
  --border: #e1d7d1;
  --header-font: "Fraunces", Georgia, serif;
  --serif: "Fraunces", Georgia, serif;
  --sans: "PT Sans", Arial, sans-serif;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
}

/*====================================
GLOBAL RESET & BASE
====================================*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding: 1.5em;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

main {
  flex: 1;
}

/*====================================
GLOBAL FORMS & BUTTONS
====================================*/

input,
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--sans);
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}


/*====================================
SERVER WAKE UP SPINNER
====================================*/
#serverWakeup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #5eb8bb 0%, #4a9a9d 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  color: white;
  font-family: 'Poppins', sans-serif;
}

#serverWakeup > div {
  text-align: center;
}

#serverWakeup .spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

#serverWakeup h2 {
  margin: 0;
  font-size: 1.5rem;
}

#serverWakeup p {
  margin: 10px 0 0;
  opacity: 0.9;
}


/*====================================
HEADER / NAVBAR
====================================*/

/* Navbar container */
.navbar {
  /* background: var(--panel); */
  padding: 14px 28px;
  display: flex;
  /* flex-direction: column; */
  align-items: center;
  justify-content: space-between;
  /* border-bottom: 2px solid var(--border); */
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* Logo + page title container */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 50px;
  height: 50px;
}

.logo-link {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--serif);
  transition: 0.2s;
  font-weight: 600;
  font-size: 1.5em;
}

.logo-link:hover {
  color: var(--text);
}

.page-title {
  font-size: 1rem;
  font-weight: normal;
  color: var(--muted);
  white-space: nowrap;
}

/* Header right (buttons) */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Unified button style - BORDERED ONLY */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

.header-right .btn,
.header-right .btn-link,
#logoutBtn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  border: none !important;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 120px;
}

#logoutBtn {
  padding: 12px 24px;
}

/* Hover effect */
.header-right .btn:hover,
.header-right .btn-link:hover,
#logoutBtn:hover {
  background: var(--accent);
  color: var(--panel);
}

/* Active page highlight */
.header-right .btn.active,
.header-right .btn-link.active {
  background: var(--turquoise);
  border-color: var(--turquoise);
  color: var(--panel);
  font-weight: bold;
  pointer-events: none;
}

#adminNav,
#mainNav {
  display:flex;
  padding: 1rem;
  gap: 5px;
}





/*====================================
CAROUSEL
====================================*/
/* Carousel Styles */
.hero-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.carousel-container {
  position: relative;
  width: 100%;
  min-height: 300px; /* Changed from fixed height */
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  position: relative; /* Changed to relative for active slide */
}

.carousel-slide img {
  width: 100%;
  height: auto; /* Changed from 100% to auto */
  object-fit: contain; /* Changed from cover to contain */
  border-radius: var(--radius-md);
  display: block;
}

/* Navigation dots */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot.active {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.2);
}



/*====================================
LANDING PAGE HERO
====================================*/
.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  gap: 40px;
}

.hero .hero-text {
  width: 100%;
  padding: 5px 5px;
}

h1 {
  font-family: var(--serif);
  font-size: 36px;
  margin: 0 0 16px;
  color: var(--text);
}

.hero .hero-text p {
  color: var(--muted);
  margin-top: 16px;
  font-size: 18px;
}

.hero form {
  margin-top: 24px;
}

.hero form input,
.hero form button {
  margin-top: 8px;
}

.hero-image {
  width: 100%;
  object-fit: fill;
}

.hero-image img {
  width: 100%;
  border-radius: var(--radius-md);
  /* padding-bottom: 1rem; */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#hero-textBlock {
  text-align: center;
  margin-top: 3.5em;
}

.accessForm {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

#accessForm {
  width: 85%;
  align-items: center;
}


/*====================================
ADMIN LOGIN
====================================*/

.adminLoginForm {
  display: flex;
  justify-content: center;
  align-items: center;
}

#adminLoginForm {
  width: 85%;
}

#adminLoginForm button {
  margin-top: 2rem;
  margin-bottom: 2rem;
}


/*====================================
ADMIN DASHBOARD
====================================*/
#admin-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#organizersSection,
#eventsSection,
#uploadsSection,
#photoCountBox,
.confirm-modal {
  width: 85%;
}

#authorizedEmailsSection {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  margin-top: 5rem;          
  box-sizing: border-box;
  border-top: solid 5px #4a9a9d;
}

#authorizedEmailsSection h3 {
  text-align: left;
  margin-bottom: 12px;
}

.newEmailInput {
  display: flex;
  gap: 10px;
}

#newEmailInput {
  height: 3rem;
  margin-bottom: 2rem;
}

#addEmailBtn {
  width: 15%;
  height: 3rem;
  margin-bottom: 2rem;
}

#addEmailBtn:hover {
  background-color: #4a9a9d;
  color:#fff;
}



/*====================================
ORGANIZER LOGIN
====================================*/
.loginForm {
  display: flex;
  justify-content: center;
  align-items: center;
}

#loginForm {
  width: 85%;
}

/*====================================
SIGNUP
====================================*/
#userInfo {
  width: 85%;
}

#signup-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#signupForm {
  width: 85%;
}


.note {
  width: 85%;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/*====================================
LANDING PAGE HOW IT WORKS
====================================*/
.how-it-works {
  padding: 80px 24px 120px;
  background-color: var(--panel);
  text-align: center;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-top: 3.5em;
}

.how-it-works h2 {
  font-family: var(--serif);
  font-size: 32px;
  margin: 0 0 16px;
  color: var(--text);
}

.how-it-works h3 {
  font-family: var(--sans);
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--accent);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 40px auto 0;
}

.feature h4 {
  font-family: var(--serif);
  margin: 14px 0 8px;
  color: var(--text);
}

.feature p {
  font-size: 16px;
  color: var(--muted);
}


/*====================================
CREATE-EVENT
====================================*/
/* .create-event-container {
  width: 85%;
} */

.create-event-container {
    width: 90%;      
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: auto;
  }

  #eventForm {
    width: 100%;
    margin: 0 auto;
  }

#userInfo {
  font-weight:bold;
  margin-bottom:10px;
}

#eventForm .btn{
  margin-top: 2rem;
  margin-bottom: 2rem;
}


/*====================================
GUEST UPLOAD FORM - guest-upload.html
====================================*/

#eventDetails {
  background: var(--panel);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  text-align: center;
  border: 2px solid var(--border);
}

#eventDetails div {
  color: var(--muted);
}

#uploadForm {
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  background-color: var(--panel);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 2px solid var(--border);
}

#uploadForm h3 {
  font-family: var(--sans);
  font-size: 24px;
  color: var(--text);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

#uploadForm input[type="file"] {
  flex: 1 1 250px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

#uploadForm input[type="file"]:hover {
  border-color: var(--accent);
}

#photoCount {
  font-weight: bold; 
  margin: 20px 0 10px 0; 
  font-size: 1.1em;
  color: var(--text);
}

/*===============================
Organizer Controls section 
=================================*/

#organizerControls {
  display: none;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  padding: 15px;
  background: none;
  border-radius: var(--radius-md);
  border: none;
  justify-content: center;
  align-items: center;
  height: auto;
}

.organizer-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
  justify-content: center; 
}

#organizerControls h3 {
  font-family: var(--sans);
  font-size: 24px;
  color: var(--text);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#eventCopylink {
  display: flex;
  gap: 10px;
  align-items: center;
}

#shareLink:read-only {
  flex: 1;
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

#copyLinkBtn {
  white-space: nowrap;
}

#copyStatus {
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.9em;
  text-align: center;
}

#copylinkReminder {
  font-size: 0.9em;
  color: var(--muted);
  margin-top: 10px 0;
}

/* Download All Photos button */
/* .download-all-btn {
  margin-top: 10px;
  padding: 8px 14px;
  background: transparent;
  color: var(--turquoise);
  border: 2px solid var(--turquoise);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  transition: all 0.2s;
} */

.download-all-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.download-all-btn:hover:not(:disabled) {
  background: var(--turquoise);
  color: var(--panel);
}

#photoPreview {
  display: none; 
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
  gap: 15px; 
  margin-top: 15px; 
  padding: 15px; 
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
}

#photoSortSection {
  display: flex;
  justify-content:space-between;
  align-items: center;
  margin: 20px 0;
}

#photoSort {
  display: flex;
  align-items: center;
  gap: 10px;
}

#sortSelectLabel {
  font-size: 0.9em;
  color: var(--text);
}

#sortSelect {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--border);
  cursor: pointer;
}

#paginationControls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 15px 0;
}

#prevPage {
  padding: 8px 16px;
  min-width: auto;
}

#pageInfo {
  font-size: 0.95em;
  color: var(--muted);
}

#nextPage {
  padding: 8px 16px;
  min-width: auto;
}

#uploadForm button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--turquoise);
  border: 2px solid var(--turquoise);
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

#uploadForm button:hover {
  background: var(--turquoise);
  color: var(--panel);
}

/* Status message */
#status {
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
  color: var(--text);
}

/* Photo gallery */
#photoGallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

#photoGallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

#photoGallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#uploadForm input[type="file"],
#uploadForm button {
  width: 100%;
}

/* Gallery Grid / Thumbnails */
#galleryGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

#galleryGrid .thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 2px solid var(--border);
}

#galleryGrid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
}

#galleryGrid img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Caption under thumbnail */
.thumb .caption {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

/*====================================
LIGHTBOX -Gallery
====================================*/
/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
  flex-direction: column;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 50px;
  color: white;
  cursor: pointer;
  z-index: 10001;
  user-select: none;
}

.close-lightbox:hover {
  color: #ccc;
}

#lightboxCaption {
  color: white;
  text-align: center;
  margin-top: 15px;
  font-size: 1.1em;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 50px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

/*====================================
TOAST NOTIFICATIONS (CUSTOM ALERTS)
====================================*/
.toast {
  background: var(--panel);
  color: var(--text);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-left: 4px solid var(--accent);
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-left-color: #4caf50;
}

.toast.error {
  border-left-color: #f44336;
}

.toast.warning {
  border-left-color: #ff9800;
}

.toast.info {
  border-left-color: var(--accent);
}

.toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95em;
}

.toast-message {
  font-size: 0.9em;
  color: var(--muted);
  line-height: 1.4;
}

#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
}

/*====================================
ADMIN DASHBOARD
====================================*/
#photoCountBox{
  margin-top: 10px;
  font-weight: bold;
  color: var(--text);
}

/*====================================
CREATE EVENT - create-event.html
====================================*/
#themeCustom {
  margin-top: 30px;
  padding: 20px;
  background: var(--panel);
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
}

#themePreset {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 15px;
}

#qrSection {
  margin-top: 20px;
}

#qrSection p {
  font-size: 0.9em;
  color: var(--muted);
  margin-bottom: 10px;
}

#qrColors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

#qrDark {
  width: 100%;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#qrLight {
  width: 100%;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

#themePreview {
  margin-top: 20px;
  padding: 15px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
  border: 2px solid var(--border);
}

#themePreview p {
  margin: 0;
  font-size: 0.9em;
  color: var(--text);
}

/*====================================
CUSTOM CONFIRM MODAL
====================================*/
.confirm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10002;
  justify-content: center;
  align-items: center;
}

.confirm-modal.show {
  display: flex;
}

.confirm-modal-content {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
  border: 2px solid var(--border);
}

.confirm-modal-content h3 {
  font-family: var(--serif);
  font-size: 1.5em;
  margin-bottom: 16px;
  color: var(--text);
}

.confirm-modal-content p {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-buttons button {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95em;
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--muted);
}

.btn-secondary:hover {
  background: var(--muted);
  color: var(--panel);
}

.btn-danger {
  background: transparent;
  color: #f44336;
  border: 2px solid #f44336;
}

.btn-danger:hover {
  background: #f44336;
  color: white;
}

#editEventModal {
  z-index: 10000; 
}


/*====================================
GALLERY
====================================*/
#galleryTitle {
  font-family: var(--header-font);
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 2em;
  margin-bottom: 2em;
}

#galleryControls {
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 5em;
}


/*====================================
FOOTER
====================================*/
footer {
  padding: 22px 28px;
  /* border-top: 2px solid var(--border); */
  color: var(--muted);
  text-align: center;
  margin-top: auto;
}
#guestUploadFooter {
  margin-top: 5rem;
}

/*====================================
ADMIN DASHBOARD (FULLY SCOPED)
====================================*/
.admin-dashboard #eventsContainer li {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background-color: var(--panel);
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
  border: 2px solid var(--border);
}

.admin-dashboard #eventsContainer li.upcoming {
  border-left-color: var(--accent);
  background-color: var(--bg);
}

.admin-dashboard .viewMode strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.admin-dashboard .editMode {
  display: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.admin-dashboard li .editMode.show {
  display: block;
  opacity: 1;
  max-height: 500px;
  transition: all 0.3s ease;
}

/* Admin buttons & inputs */
.admin-dashboard .viewMode button,
.admin-dashboard .editMode button {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  padding: 8px 16px;
}

.admin-dashboard .viewMode button:hover,
.admin-dashboard .editMode button:hover {
  background: var(--accent);
  color: var(--panel);
}

.admin-dashboard .editMode input,
.admin-dashboard .editMode textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.admin-dashboard #eventsContainer.gridView {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.admin-dashboard #eventsContainer.gridView li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-dashboard #eventsContainer.gridView li:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-dashboard #eventsContainer.gridView .viewMode button {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  margin-right: 0.25rem;
}

/*====================================
TOAST NOTIFICATIONS
====================================*/
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--panel);
  color: var(--text);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  border: 2px solid var(--accent);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/*====================================
RESPONSIVE
====================================*/
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    gap: 24px;
  }
  .features {
    grid-template-columns: 1fr;
  }
}

/*====================================
RESPONSIVE
====================================*/

@media (max-width: 768px) {
  .hero .hero-text h2 {
    font-size: 36px;
  }


  .feature p {
    font-size: 15px;
  }
  input, textarea, select, button { font-size: 0.95rem; }
}
  .carousel-container {
    min-height: 250px;
  }

  #galleryGrid img {
    height: 120px; 
  }

  .upload-row {
    flex-direction: column;
    align-items: stretch;
  }


/*====================================
RESPONSIVE
====================================*/

@media (max-width: 480px) {
  body, .hero {
    margin: 0;
    padding: 0;
    width: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .navbar {
    margin-top: 1em;
    align-items: stretch;  
  }

  .logo-link {
    font-size: 1.2em;
  }

  .carousel-container {
    min-height: 200px;
  }

  .hero-text {
    width: 100%;
    margin: 0;
    padding: 0; 
  }


  .hero-image {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .hero-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  #hero-textBlock {
    width: 100%;
    margin-top: 1.5em;
    padding: 2em; 
  }

  .btn {
    padding: 12px;
  }

  .admin-dashboard #eventsContainer.gridView {         
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  #authorizedEmailsSection {
    display: flex;
    width: 100%;
    flex-direction: column;
    padding: 1rem;
  }

  #authorizedEmailsSection h3 {
    margin-left: 1rem;
  }

  .newEmailInput,
  #emailslist {
    display: flex;
    width: 100%;
    flex-direction: column;
    margin-bottom: 20px;
    margin-left: auto;
  }

  #newEmailInput {
    padding: 10px;
    width: 100%;
    height: auto;
    margin-right: 10px;
  }

  #addEmailBtn {
    margin-top: 10px;
  }

  .admin-dashboard #eventsContainer.gridView li {
    padding: 0.5rem;
  }

  #galleryGrid img {
    height: 100px;
  }

  .organizer-buttons {
    flex-direction: column; /* Stack vertically */
    align-items: stretch; /* Make buttons full width */
  }

  .organizer-buttons .btn {
    width: 100%; /* Fill the width */
    min-width: auto; /* Remove any min-width restrictions */
  }


/* ====================================
  HAMBURGER MENU STYLES
   ==================================== */

/* Hamburger button - hidden on desktop, shows on mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  }

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  transition: all 0.3s ease;
  }

/* Hamburger animation when clicked (X shape) */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
  }

.hamburger.active span:nth-child(2) {
  opacity: 0;
  }

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
  }

/* Background overlay when menu is open */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  }

.menu-overlay.active {
  display: block;
  }

#photoSortSection,
#photoGallery {
  margin-left: 15px;
  margin-right: 15px;
  }

.container {
  flex: 1;
  }

#galleryTitle {
    font-size: 1.5rem !important; 
  }

footer {
  margin-top: auto;
  padding: 1rem;
  }

#guestUploadFooter {
  margin-top: 10rem;
  }

}
/* ====================================
  MOBILE ONLY (768px and below)
   ==================================== */
@media (max-width: 768px) {
  /* Show hamburger button */
  .hamburger {
    display: flex;
  }

  /* Transform nav into slide-in menu */
  .header-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--panel);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 20px 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    gap: 0;
  }

  /* Slide menu in when active */
  .header-right.active {
    right: 0;
  }

  /* Style nav buttons as vertical list */
  .header-right .btn,
  .header-right .btn-link,
  .header-right #logoutBtn {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    min-width: auto;
    justify-content: flex-start;
  }

  /* Add top border to first button */
  .header-right .btn:first-child,
  .header-right .btn-link:first-child {
    border-top: 1px solid var(--border);
  }

  /* Adjust navbar spacing */
  .navbar {
    padding: 14px 20px;
  }

  /* Admin nav in mobile */
  #adminNav {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  #photoSortSection,
  #photoGallery {
    margin-left: 15px;
    margin-right: 15px;
  }

  /* Make gallery responsive - 2 columns on mobile */
  #photoGallery {
    grid-template-columns: repeat(3, 1fr); /* 2 photos per row */
    gap: 10px; /* Slightly smaller gap */
  }

  /* Add spacing around the entire upload form */
  #uploadForm {
    width: 100%;
    margin-left: 0;
  }

  /* Adjust photo sort section for mobile */
  #photoSortSection {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  #photoSort {
    width: 100%;
  }

  #sortSelect {
    width: 100%;
  }

  #guestUploadFooter {
    margin-top: 5rem;
  }

  #authorizedEmailsSection input[type="email"] {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  #authorizedEmailsSection button {
    width: 100%;
  }
  
  #emailsList li {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }
  
  #emailsList li span {
    width: 100%;
    word-break: break-all;
    font-size: 14px;
  }
  
  #emailsList li button {
    width: 100%;
    margin-top: 5px;
  }

  #galleryTitle {
    font-size: 1.8rem !important; /* Smaller on tablets */
  }
}