/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", Courier, monospace;
  background-color: #121212;
  color: #f4e3b2;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Menu Button ===== */
#menu-toggle {
  position: fixed;
  top: 15px;
  left: 45px;
  z-index: 1001;
  background-color: #f4e3b2;
  color: #121212;
  border: none;
  padding: 10px 15px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

#menu-toggle:hover {
  transform: scale(1.05);
}

/* ===== Sidebar Navigation ===== */
#sidebar {
  width: 180px;
  background-color: #1f1f1f;
  padding: 5px 15px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: -200px;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

#sidebar.active {
  left: 0;
}

#sidebar ul {
  list-style-type: none;
  width: 100%;
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

#sidebar li {
  width: 100%;
  position: relative;
}

#sidebar a {
  text-decoration: none;
  color: #f4e3b2;
  font-size: 16px;
  display: block;
  padding: 16px 12px;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.3s ease;
}

#sidebar a:hover {
  background-color: #333;
  color: #ffffff;
}

/* ===== Dropdown Menus ===== */
.dropdown {
  position: relative;
}

.dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: #2a2a2a;
}

.dropdown.active .dropdown-menu {
  max-height: 500px; /* Adjust based on content */
  transition: max-height 0.5s ease-in;
}

.dropdown-btn::after {
  content: " ▾";
  display: inline-block;
  transition: transform 0.3s ease;
}

.dropdown.active .dropdown-btn::after {
  transform: rotate(180deg);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  padding: 12px 20px !important;
  font-size: 14px !important;
  border-top: 1px solid #333;
  text-align: left;
}

.dropdown-menu a:hover {
  background-color: #3a3a3a !important;
}

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

/* ===== Content Area ===== */
.background-container {
  margin-left: 0;
  padding: 60px 0;
  flex-grow: 1;
  width: 100%;
  min-height: 100vh;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #121212;
  background-image: url("http://bugar-dinasty.news/Recourses/images/bg-large.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#sidebar.active ~ .background-container {
  transform: translateX(180px);
}

.content-block {
  width: 90%;
  max-width: 1200px;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  margin: 40px auto;
}

/* ===== Article Styles ===== */
.article-headline {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: #f4e3b2;
  text-align: center;
  line-height: 1.3;
}

.featured-image {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  margin: 20px 0;
  border-radius: 4px;
}

.article-text {
  color: #f4e3b2;
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-text p {
  margin-bottom: 20px;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    left: -100%;
  }

  #sidebar ul {
    padding: 60px 0 20px;
  }

  #menu-toggle {
    left: auto;
    right: 15px;
  }

  #sidebar.active ~ .background-container {
    transform: none;
  }

  .dropdown-menu {
    position: relative;
    width: 90%;
    margin: 0 auto;
  }

  .content-block {
    width: 95%;
    padding: 25px;
  }

  .article-headline {
    font-size: 1.8rem;
  }
}