:root {
  --body-bg-color: #f8fafc;
  --body-text-color: #222222;
  --heading-color: #971717;
  --hero-gradient1: #667eea;
  --hero-gradient2: #764ba2;
  --footer-bg-color: #5a5858;
  --link-color: #e70d0d;
  --header-bg-color: #ffffff;
  --font-family: system-ui;
  --nav-link-color: #141414;
}

body {
  background-color: var(--body-bg-color) !important;
  color: var(--body-text-color) !important;
  font-family: var(--font-family), -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.5rem) !important;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2rem) !important;
}
h3 {
  font-size: clamp(1.4rem, 3vw, 1.7rem) !important;
}
p {
  margin-bottom: 0.5rem !important;
}

section {
  padding: 15px 0;
}

h2,
h3 {
  color: var(--heading-color) !important;
}

.content-area a {
  color: var(--link-color) !important;
  text-decoration: none !important;
}

.content-area a:hover {
  color: var(--link-color) !important;
  opacity: 0.8;
}

.footer {
  background-color: var(--footer-bg-color);
  color: white;
}

.footer a {
  text-decoration: none;
  color: var(--link-color) !important;
}

.sidebar-page-list {
  padding: 0;
  margin: 0;
  margin-bottom: 17px;
  width: 279px;
}

.sidebar-page-list li {
  list-style-type: disc;
  list-style-position: inside;
  color: var(--heading-color);
}

.sidebar-page-list li::marker {
  color: var(--link-color);
  font-size: 1.2em;
}
.sidebar-page-list li:last-child {
  border-bottom: none;
}

.sidebar-page-list li a {
  padding: 12px 0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  color: var(--link-color);
}

.sidebar-page-list li a:hover {
  padding-left: 11px;
}

.error_page {
  min-height: 70vh;
}

.navbar {
  background-color: var(--header-bg-color) !important;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.hero-section {
  padding: 55px 0;
  position: relative;
  overflow: hidden;
}

.hero-section.gradient-bg {
  background: linear-gradient(
    135deg,
    var(--hero-gradient1),
    var(--hero-gradient2)
  );
}

.hero-section.with-bg {
  background-image: url("/images/baa-kaa-raa-keu-a.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section.with-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgb(0, 0, 0));
  opacity: 0.5;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
  }
}
.navbar-light .navbar-nav .nav-link {
  color: var(--nav-link-color, #141414) !important;
}
/* Mobile nav */
@media (max-width: 1199.98px) {
  .navbar-collapse {
    position: fixed;
    top: 61px;
    left: 15px;
    right: 15px;
    background-color: color-mix(
      in srgb,
      var(--header-bg-color) 65%,
      transparent
    );
    backdrop-filter: blur(12px);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 15px;
    margin: 0;
  }

  .navbar-nav {
    width: 100%;
  }

  .navbar-nav .nav-item {
    margin: 7px 0;
  }

  .navbar-nav .nav-item:hover {
    transform: translateY(-1px);
  }

  .navbar-nav .nav-link {
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    display: block;
    padding: 0;
  }

  .navbar-toggler {
    z-index: 10000;
    position: relative;
    border: var(--bs-border-width) solid var(--nav-link-color, #141414) !important;
  }
}

@media screen and (min-width: 1199.98px) {
  .dropdown-menu {
    top: 100%;
    left: 50% !important;
    transform: translateX(-50%);
  }
}

.navbar .dropdown-toggle::after {
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.custom-dropdown {
  border: 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 220px;
  background: color-mix(
    in srgb,
    var(--header-bg-color) 65%,
    transparent
  ) !important;
  backdrop-filter: blur(12px);
}

.custom-dropdown .dropdown-item {
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  color: var(--nav-link-color, #141414) !important;
  font-weight: 500;
  border-radius: 0;
  text-wrap: wrap;
}

.custom-dropdown .dropdown-item:hover {
  color: #fff;
  background: color-mix(
    in srgb,
    var(--header-bg-color) 95%,
    transparent
  ) !important;
}

.custom-dropdown .dropdown-item i {
  width: 16px;
  color: #6c757d;
  transition: color 0.3s ease;
}

.custom-dropdown .dropdown-item:hover i {
  color: #fff;
}

.dropdown-menu {
  opacity: 0;
  transition: all 0.3s ease;
  display: block;
  visibility: hidden;
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

@media (min-width: 1199.98px) {
  .custom-dropdown {
    max-width: 200px;
  }
}

@media (max-width: 1199.98px) {
  .custom-dropdown {
    background: #f8f9fa;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    border-top: 1px solid #dee2e6;
  }

  .custom-dropdown .dropdown-item:hover {
    margin: 0;
    border-radius: 0;
    transform: none;
  }
}

.dropdown-menu:hover,
.dropdown:hover .dropdown-menu {
  display: block !important;
  visibility: visible;
  opacity: 1;
}
.dropdown-item.active,
.dropdown-item:active {
  color: #fff;
  text-decoration: none;
  background-color: #91919131 !important;
}

.cust-bg {
  background: linear-gradient(135deg, #f9d423 0%, #ff4e50 100%),
    url("/images/taiwan-city-skyline.jpg");
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  padding: 19px;
  border-radius: 17px;
}
.error_page {
  position: relative;
  overflow: hidden;
}

.error_page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.error-icon-wrapper {
  animation: float 3s ease-in-out infinite;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 3px solid rgba(255, 193, 7, 0.3);
  border-radius: 50%;
  animation: pulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2) !important;
}

.btn-light:hover {
  background-color: #f8f9fa;
  border-color: #f8f9fa;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .display-1 {
    font-size: 5rem !important;
  }

  .error_page {
    padding: 2rem 1rem;
  }
}
