/* Reserve space for the vertical scrollbar so layout doesn't shift when it appears */
html { scrollbar-gutter: stable; }

/* Fallback for older browsers */
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }  /* Always show a gutter for the scrollbar */
}

/* Flash message styles */
.flash-container {
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%); /* static centering */
width: 90%;
max-width: 400px;
z-index: 99999;
display: flex;
flex-direction: column;
align-items: center;
padding: 1rem;
pointer-events: none;
}

.flash-message {
pointer-events: auto;
width: 100%;
margin-bottom: 0.5rem;
border-radius: 0.5rem;
font-weight: 500;
text-align: center;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
animation: slideDown 0.4s ease-out, fadeOut 0.4s ease-in 4s forwards;
}

/* Only animate Y-axis for smooth slide */
@keyframes slideDown {
from { transform: translateY(-100%); opacity: 0; }
to   { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
to   { opacity: 0; transform: translateY(-100%); }
}

/* Category-specific styling */
.alert-success {
background-color: #d1e7dd;
color: #0f5132;
}
.alert-danger {
background-color: #f8d7da;
color: #842029;
}
.alert-warning {
background-color: #fff3cd;
color: #664d03;
}
.alert-info {
background-color: #cff4fc;
color: #055160;
}

            /* Body wallpaper */
body.landing {
  background-image: url('images/vertical_cloth.png'); /* adjust path */
  background-repeat: repeat;
  background-attachment: fixed;   /* optional */
  background-size: auto;          /* keep the tile’s native size */
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.shadow2 {
     box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
}

/* Page layout for sticky footer */
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

/* Footer styling */
.site-footer {

  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
}

/* Inner container matches content width */
.footer-inner {
  max-width: 1200px;          /* match your content container width */
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* optional glow for footer links on dark bg */
.footer-links a {
  color: #000000;
  text-decoration: none;
  text-shadow: 0 0 6px rgba(255,255,255,.5), 0 0 12px rgba(13,110,253,.6);
}
.footer-links a:not(:last-child) {
  margin-right: 20px;
}

.footer-links a:hover {
  color: #0d6efd;
  text-shadow: 0 0 8px rgba(13,110,253,.9), 0 0 16px rgba(13,110,253,.7);
}

body.error-page {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.error-card {
  text-align: center;
  max-width: 400px;
  width: 90%;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
}

.error-image {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin-bottom: 16px;
}

.error-card h1 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: #333;
}

.error-card p {
  font-size: 1rem;
  color: #555;
}

.error-card a {
  color: #0073e6;
  text-decoration: none;
}

.error-card a:hover {
  text-decoration: underline;
}

/* Base navbar styling */
.navbar {
  background-color: #f5f5f5; /* light grey */
  padding: 0.5rem 1rem;
  
}

/* Flex layout for horizontal menu */
.navbar ul {
  display: flex;
  flex-wrap: wrap;   /* allows wrapping on small screens */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Menu items */
.navbar li {
  margin-right: 1.2rem;
}

.navbar li:last-child {
  margin-right: 0; /* no extra gap at end */
}

/* Links */
.navbar a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.navbar a:hover {
  color: #0077cc; /* highlight on hover */
}

/* Mobile friendliness */
@media (max-width: 600px) {
  .navbar ul {
    flex-direction: column;  /* stack vertically */
  }
  .navbar li {
    margin: 0.5rem 0;
  }
}

.dropdown-menu { z-index: 9999; }
nav, .navbar, .navbar * { overflow: visible; }