:root {
  --body-bg-color: #f5f5f5;
  --body-text-color: #222222;
  --heading-color: #a77f1b;
  --hero-gradient1: #667eea;
  --hero-gradient2: #764ba2;
  --footer-bg-color: #424242;
  --link-color: #ebc024;
  --header-bg-color: #ffffff;
  --font-family: Times New Roman;
}

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;
}

.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/guide-to-winchester.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;
}

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

a {
  color: var(--link-color) !important;
}

a:hover {
  color: var(--link-color);
  opacity: 0.8;
}

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

.footer a {
  text-decoration: none;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
  }

  .hero-section h1 {
    font-size: 2rem;
  }
}

/* Mobile nav */
@media (max-width: 1200px) {
  .navbar-collapse {
    position: fixed;
    top: 61px;
    left: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.97);
    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;
  }
}

.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;
}

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

.error_page {
  min-height: 70vh;
}

.wrap_word {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.box {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.img_el {
  padding: 60px 0;
  position: relative;
}

.img_el:before {
  content: "";
  background: color-mix(in srgb, #00000091, transparent 30%);
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 17px;
}

.img_el .img_el-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("/images/the-crypt.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  border-radius: 17px;
}

.img_el .container {
  position: relative;
  z-index: 3;
}

.img_el .container h2,
.img_el .container p {
  color: white !important;
}

.img_el .container h3 {
  color: #EF8A54;
}