:root {
  /* Premium Color Palette */
  --primary-color: #0d1b2a;
  /* Deep Navy */
  --primary-light: #1b263b;
  --secondary-color: #e0e1dd;
  /* Soft Offwhite/Gray */
  --accent-color: #d4af37;
  /* Matte Gold */
  --accent-hover: #c5a028;
  --bg-color: #f8f9fa;
  /* App Background */
  --card-bg: #ffffff;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-color: #e9ecef;

  /* Layout */
  --sidebar-width: 250px;
  --header-height: 70px;

  /* Shadows & Radius */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-md: 8px;
  --radius-lg: 12px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--primary-color);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#preloader.loaded {
  opacity: 0;
  pointer-events: none;
}

.logo-blink {
  animation: blink 1.5s infinite;
  max-width: 200px;
}

@keyframes blink {
  0% {
    opacity: 0.2;
    transform: scale(0.95);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    opacity: 0.2;
    transform: scale(0.95);
  }
}

/* ---------------------------------
   Main Site Navbar (Glassmorphism) 
   --------------------------------- */
.navbar-custom {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 1rem;
  transition: padding 0.3s ease;
}

/* Pseudo element for glassmorphism to avoid containing block issues with offcanvas */
.navbar-custom::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #00123e;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  z-index: -1;
}

.navbar-custom.scrolled {
  padding: 0.8rem 1rem;
}

.navbar-custom.scrolled::before {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: none;
}

/* Offcanvas mobile menu styling */
@media (max-width: 991.98px) {
  .offcanvas.offcanvas-end {
    background-color: var(--primary-color) !important;
  }
  .navbar-custom .offcanvas .nav-item {
    width: 100%;
  }
  .navbar-custom .offcanvas .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.25rem;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    width: 100%;
  }
}

.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.navbar-custom.scrolled .nav-link {
  color: var(--primary-color) !important;
}

.navbar-custom .nav-link:hover {
  color: #b4b4b4 !important;
}

.navbar-brand {
  color: #fff !important;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.navbar-custom.scrolled .navbar-brand {
  color: var(--primary-color) !important;
}

.navbar-logo {
  height: 70px;
  object-fit: contain;
  transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
  .navbar-logo {
    height: 56px;
  }
}

/* Hero Section */
.hero-parallax {
  background-image: url('/images/hero-bg.png');
  height: 100vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-parallax::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Reduced the darkness significantly so the image is much brighter, 
     but keeping a slight tint just so the header text remains readable */
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.1) 0%, rgba(27, 38, 59, 0.05) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  padding: 3.5rem 4rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 600px;
}

@media (min-width: 992px) {
  .hero-content {
    margin-top: 30vh;
    /* Pushes the content down only on desktop screens */
  }
}

.hero-subtitle {
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-title {
  color: var(--primary-color);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-text {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Content Pages */
.page-content {
  padding: 8rem 0 5rem 0;
  min-height: 70vh;
  background: #fff;
}

/* Footer */
.footer-custom {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 3rem 0;
  font-size: 0.9rem;
}

.footer-custom a {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ---------------------------------
   Admin Panel (Sidebar Layout)
   --------------------------------- */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-color);
}

.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary-color);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 1040;
}

.admin-sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background-color: rgba(0, 0, 0, 0.1);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.admin-sidebar-header a {
  color: #fff;
  text-decoration: none;
}

.admin-nav {
  padding: 1.5rem 1rem;
  flex-grow: 1;
}

.admin-nav .nav-link {
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  transition: all 0.2s;
  font-weight: 500;
}

.admin-nav .nav-link:hover,
.admin-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-nav .nav-link svg {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
}

.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  height: var(--header-height);
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
}

.admin-content {
  padding: 2rem;
  overflow-y: auto;
}

/* Cards & Tables */
.admin-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.admin-card-header {
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-card-body {
  padding: 1.5rem;
}

.table-custom {
  margin-bottom: 0;
}

.table-custom thead th {
  background-color: #f8f9fc;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 1rem 1.5rem;
}

.table-custom tbody td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
}

.table-custom tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 500;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    height: 100vh;
    transform: translateX(-100%);
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }
}