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

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--bs-body-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  background:
    linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
    url("/images/philippines2.jpg") repeat-y center top;
  background-size: cover;
  opacity: 0;
  animation: fadeInFlag 1.2s ease forwards;
}

html[data-bs-theme="dark"] body {
  background:
    linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
    url("/images/philippines2.jpg") repeat-y center top;
  background-size: cover;
}

/* Fade-in animation */
@keyframes fadeInFlag { from { opacity: 0; } to { opacity: 1; } }

.container { max-width: 960px; margin: 2rem auto; padding: 0 1rem; }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bs-body-bg);
  padding: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  z-index: 1050; /* ensures navbar floats above content */
  position: relative; /* ✅ UPDATED: ensure navbar sits below banner */
}

.navbar .container { max-width: 1140px; margin: 0 auto; }

.navbar a {
  margin-right: 1rem;
  text-decoration: none;
  color: var(--bs-body-color);
  padding: 0.5rem;
  transition: color 0.2s;
}
.navbar a:hover { color: var(--bs-link-hover-color, #0d6efd); }
.navbar .nav-link.active { font-weight: 700; color: #ffc107; }

/* Theme-specific navbar fixes */
html[data-bs-theme="light"] .navbar .nav-link,
html[data-bs-theme="light"] .navbar .navbar-brand {
  color: #212529 !important;
}
html[data-bs-theme="dark"] .navbar .nav-link,
html[data-bs-theme="dark"] .navbar .navbar-brand {
  color: #f8f9fa !important;
}

.welcome { margin-right: 1rem; font-weight: 500; }
.avatar, .nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 1rem;
}

/* ===========================
   BUTTONS
=========================== */
.btn { font-family: inherit; font-weight: 500; border-radius: 4px; transition: background-color 0.2s, color 0.2s; }

.btn-custom { background-color: #0077ff; color: #fff; border: none; }
.btn-custom:hover { background-color: #005fcc; color: #fff; }

.btn-secondary-custom { background-color: var(--bs-secondary-bg, #eee); color: var(--bs-body-color); border: none; }
.btn-secondary-custom:hover { background-color: var(--bs-tertiary-bg, #ddd); color: var(--bs-body-color); }

.btn-small { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

/* ===========================
   HERO / BANNER
=========================== */
.hero-banner { position: relative; text-align: center; margin-bottom: 2rem; }
.hero-banner img { width: 100%; height: auto; object-fit: cover; }
.hero-banner h1 {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; font-size: 2.5rem; background: rgba(0,0,0,0.5); padding: 1rem 2rem; border-radius: 6px;
}

.banner { position: relative; width: 100%; height: 220px; overflow: hidden; border-bottom: 3px solid #0d6efd; z-index: 1; }
.banner-link { display: block; position: relative; text-decoration: none; color: inherit; }
.banner img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85); transition: transform 6s ease; }
.banner:hover img { transform: scale(1.05); }

.banner-title {
  position: absolute; bottom: 15px; left: 20px; color: #fff; font-size: 2rem; font-weight: 600;
  background: rgba(0,0,0,0.55); padding: 0.6rem 1.2rem; border-radius: 6px; letter-spacing: 0.5px; animation: fadeInUp 1s ease forwards;
}


#rotatingTagline {
  font-weight: 700;
  margin-left: 0.5rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  color: #ffc107; /* ✅ yellow text */
  transition: opacity 0.3s ease;
}

/* Responsive tweaks for rotating text */
@media (max-width: 992px) {
  #rotatingTagline { font-size: 1.2rem; }
}
@media (max-width: 576px) {
  #rotatingTagline { font-size: 1rem; }
}

/* Force rotating tagline text to yellow */
.banner-tagline #rotatingTagline {
  color: #ffc107 !important;   /* ✅ Bootstrap yellow */
}

/* Light theme: dark text */
html[data-bs-theme="light"] #rotatingTagline {
  color: #0d6efd; /* Bootstrap primary blue */
}

/* Dark theme: bright accent */
html[data-bs-theme="dark"] #rotatingTagline {
  color: #ffc107; /* Bootstrap yellow */
}

#rotatingTagline {
  transition: opacity 0.3s ease;
}

/* Theme-aware main container */
main.container {
  background-color: var(--bs-body-bg); color: var(--bs-body-color);
  border-radius: 0.5rem; padding: 2rem; transition: background-color 0.3s ease, color 0.3s ease;
}

/* Simple fade-in for banner title */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
/* Lightbox overlay */
.lightbox {
  position: fixed;
  z-index: 2000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.hidden { display: none; }

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.lightbox-caption {
  margin-top: 12px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.9rem;
  border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.lightbox-close { top: 20px; right: 30px; }
.lightbox-prev { top: 50%; left: 30px; transform: translateY(-50%); }
.lightbox-next { top: 50%; right: 30px; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: #f1c40f; }.gallery-thumb {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.gallery-thumb:hover { opacity: 0.85; }

#lightboxOverlay {
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  background: rgba(0,0,0,0.8);
  position: fixed;
  inset: 0;
  z-index: 2000; /* bumped above everything */
}
#lightboxOverlay img,
.carousel .carousel-item img {
  max-height: 80vh;
  object-fit: contain;
  background-color: #000;
}

/* Prevent translucent wrappers from covering overlay */
.container,
.main,
.card {
  position: relative;
  z-index: 1;
}

/* ===========================
   BOOTSTRAP MODAL CAROUSEL — FULLSCREEN
=========================== */
.modal.show .modal-dialog {
  max-width: 100vw;
  width: 100vw;
  margin: 0;
  height: 100vh;
}
.modal-content {
  height: 100vh;
  border: 0;
  border-radius: 0;
  background-color: #000;
}
.modal-body {
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel,
.carousel-inner,
.carousel-item {
  width: 100%;
  height: 100%;
}
.carousel-item img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.modal-backdrop { z-index: 1040; }
.modal { z-index: 1060; }

/* ===========================
   CUSTOM LIGHTBOX OVERLAY — FULLSCREEN
=========================== */
#lightboxOverlay {
  position: fixed;
  inset: 0;
  z-index: 2000; /* above cards/containers */
  background: rgba(0,0,0,0.9);
  display: none; /* set to flex when active via JS */
  justify-content: center;
  align-items: center;
}
#lightboxOverlay.active { display: flex; }
#lightboxOverlay img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
html.lightbox-open,
body.lightbox-open { overflow: hidden; }

/* ===========================
   STACKING CONTEXT SAFETY
=========================== */
.container,
.main,
.card {
  position: relative;
  z-index: 1;
}
html.lightbox-open .container,
html.lightbox-open .main,
html.lightbox-open .card {
  backdrop-filter: none;
  transform: none !important; /* scoped reset */
}
body { will-change: scroll-position; }

/* ===========================
   GALLERY THUMBS & HOVER
=========================== */
.gallery-thumb {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gallery-thumb:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.image-wrapper { position: relative; display: inline-block; }
.image-banner {
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.9rem;
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  text-align: left;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}
.image-banner.show { opacity: 1; }
#galleryModal .modal-content {
  background: #000;
  border: none;
}
#galleryModal img {
  max-height: 90vh;
  object-fit: contain;
}

/* ===========================
   NAVBAR THEME FIX
=========================== */
html[data-bs-theme="light"] .navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid #dee2e6;
}
html[data-bs-theme="light"] .navbar .nav-link,
html[data-bs-theme="light"] .navbar .navbar-brand {
  color: #212529 !important;
}
html[data-bs-theme="light"] .navbar .nav-link:hover {
  color: #0d6efd !important;
}
html[data-bs-theme="dark"] .navbar {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
html[data-bs-theme="dark"] .navbar .nav-link,
html[data-bs-theme="dark"] .navbar .navbar-brand {
  color: #f8f9fa !important;
}
html[data-bs-theme="dark"] .navbar .nav-link:hover {
  color: #ffc107 !important;
}

/* ===========================
   NAVBAR OFFSET
=========================== */

/* Ensure navbar dropdowns float above main content */
.navbar {
  position: relative;   /* ✅ UPDATED: stays in normal flow, below banner */
  z-index: 3000;        /* higher than .container/.card */
}

.navbar .dropdown-menu {
  z-index: 3050; /* ensure dropdown itself is above everything */
}

.navbar .dropdown-menu {
  background-color: rgba(255,255,255,0.95); /* light mode */
  backdrop-filter: blur(6px);
}
html[data-bs-theme="dark"] .navbar .dropdown-menu {
  background-color: rgba(30,30,30,0.95); /* dark mode */
}

/* ❌ REMOVED: body padding-top (only needed for fixed navbars) */
/* body { padding-top: 70px; } */

/* Keep margin-top rules for fixed/sticky navs if used */
.navbar.fixed-top + .container,
.navbar.sticky-top + .container,
.navbar.fixed-top + main,
.navbar.sticky-top + main {
  margin-top: 80px;
}

.preview-img-wrapper {
  position: relative;
}
.preview-img-wrapper .btn-danger {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  z-index: 1;
}

/* --- Modal Fix Overrides --- */
.modal-content {
  background-color: #fff !important;
  color: #212529 !important;
  backdrop-filter: none !important;
}

html[data-bs-theme="dark"] .modal-content {
  background-color: #1e1e1e !important;
  color: #f8f9fa !important;
}

.modal-header,
.modal-footer {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer {
  background-color: #2a2a2a !important;
  color: #f8f9fa !important;
}

.modal .form-control,
.modal .form-select,
.modal textarea {
  background-color: #fff !important;
  color: #212529 !important;
}

html[data-bs-theme="dark"] .modal .form-control,
html[data-bs-theme="dark"] .modal .form-select,
html[data-bs-theme="dark"] .modal textarea {
  background-color: #2a2a2a !important;
  color: #f8f9fa !important;
}

/* ===========================
   BANNER CONTAINER & OVERLAY
=========================== */
.banner-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 1; /* ✅ ensures banner sits below navbar */
}

.banner-img {
  width: 100%;
  display: block;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* vertically center */
  align-items: flex-end;     /* ✅ push content to the right */
  padding-right: 2rem;       /* add some breathing room from edge */
  color: white;
  text-align: right;         /* ✅ align text to the right */
  z-index: 2;
}

.banner-title {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}


.banner-tagline {
  margin-top: 0.5rem;
  background: rgba(13,110,253,0.8);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  /* remove fixed font-size here */
}

/* Fade animation for rotating text */
.fade-in {
  animation: fadeIn 0.8s ease-in;
}

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

/* Responsive tweaks */
@media (max-width: 992px) {
  .banner-title { font-size: 2rem; }
  .banner-tagline { font-size: 1.2rem; }
}
@media (max-width: 576px) {
  .banner-title { font-size: 1.5rem; }
  .banner-tagline { font-size: 1rem; }
}

.fade-in {
  animation: fadeIn 0.4s ease-in;
}

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

/* Status dot */
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; border: 2px solid #fff;
}
.status-available { background: #28a745; } /* green */
.status-away { background: #ffc107; }      /* amber */
.status-busy { background: #dc3545; }      /* red */
.status-offline { background: #6c757d; }   /* gray */

/* Role chips */
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; padding: 2px 8px; border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
}
.role-host { background: rgba(40,167,69,0.1); color: #28a745; }
.role-admin { background: rgba(13,110,253,0.1); color: #0d6efd; }

.summary-card h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.summary-card.bg-primary h3,
.summary-card.bg-primary p,
.summary-card.bg-success h3,
.summary-card.bg-success p,
.summary-card.bg-danger h3,
.summary-card.bg-danger p,
.summary-card.bg-info h3,
.summary-card.bg-info p {
  color: #fff !important;
}

/* Team cards */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.team-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.team-card img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.team-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(13,110,253,0.6);
}
.team-card .bi {
  font-size: 1.2rem;
  transition: color 0.3s ease, transform 0.3s ease;
}
.team-card .bi:hover {
  color: #0d6efd;
  transform: scale(1.2);
}

/* Accordion */
.accordion-button::after {
  transition: transform 0.3s ease;
}
.accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}

/* Testimonials */
#testimonialCarousel .card {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 12px;
}
#testimonialCarousel p {
  color: #495057;
}
#testimonialCarousel .carousel-item {
  transition: opacity 0.8s ease-in-out;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #6f42c1, #0d6efd);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.cta-banner .btn {
  transition: all 0.3s ease;
}
.cta-banner .btn:hover {
  background-color: #fff;
  color: #0d6efd;
  transform: translateY(-3px);
}

/* Guest → White */
nav.navbar.guest-theme {
  background-color: #ffffff !important;
  color: #000 !important;
}

/* User → Dark (near black) */
nav.navbar.user-theme {
  background-color: #212529 !important; /* Bootstrap dark */
  color: #fff !important;
}

/* Host → Blue */
nav.navbar.host-theme {
  background-color: #0d6efd !important; /* Bootstrap primary */
  color: #fff !important;
}

/* Guaranteed role-based themes */
nav.navbar.guest-theme {
  background-color: #ffffff !important;
  color: #000 !important;
}

nav.navbar.user-theme {
  background-color: #212529 !important; /* Dark */
  color: #fff !important;
}

nav.navbar.host-theme {
  background-color: #0d6efd !important; /* Blue */
  color: #fff !important;
}

nav.navbar.admin-theme {
  background-color: #dc3545 !important; /* Red */
  color: #fff !important;
}

/* Ensure text is white for dark/red navbars */
nav.navbar.user-theme .nav-link,
nav.navbar.user-theme .navbar-brand,
nav.navbar.admin-theme .nav-link,
nav.navbar.admin-theme .navbar-brand {
  color: #fff !important;
}

nav.navbar.user-theme .nav-link:hover,
nav.navbar.admin-theme .nav-link:hover {
  color: #ffc107 !important; /* gold hover */
}

/* Base list item styling */
.list-group-item {
  transition: all 0.3s ease;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Animate new notifications */
.list-group-item.new {
  animation: fadeSlideIn 0.4s ease forwards;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bold unread notifications */
.list-group-item.fw-bold {
  background-color: rgba(25, 135, 84, 0.05); /* subtle green tint */
}

/* Group headers */
.notification-group h6 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #6c757d;
}

/* Badge counter bounce */
#notificationBadge {
  background-color: #dc3545;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.35em 0.6em;
  border-radius: 50%;
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
  animation: none;
}

#notificationBadge.bump {
  animation: badgeBump 0.4s linear;
}

@keyframes badgeBump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Toast styling for undo/alerts */
.toast {
  background-color: #212529;
  color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

#rotatingTagline {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

#rotatingTagline.show {
  opacity: 1;
}

/* Hide empty rotating tagline span to prevent blue box */
#rotatingTagline:empty {
  display: none !important;
}

.banner-tagline {
  text-align: right;
}

main.container h2.banner-tagline {
  text-align: right;
}

/* Validation feedback */
.is-valid {
  border-color: #198754 !important; /* Bootstrap green */
}
.is-invalid {
  border-color: #dc3545 !important; /* Bootstrap red */
}
.validation-feedback {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}


/* Confirmation page polish */
#confirmationDetails .card {
  border: none;
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.05);
}

#nextSteps .card {
  border-left: 4px solid #0d6efd;
}

.confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}