/* =========================================
   NeplyTheme — Custom Styles
   Compiled alongside Tailwind via PostCSS
   ========================================= */

/* --- Base --- */
html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: 'Times New Roman', serif;
  background-color: #FAFAEB;
}

/* --- Header --- */
.heading {
  background-color: #f5e6d3;
}

/* --- Navigation — Desktop --- */
.desktop-nav .nav-bar {
  text-decoration: none;
  color: #37426F;
  margin-left: 24px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.desktop-nav .nav-bar:hover {
  color: #1E2D56;
  cursor: pointer;
}

.desktop-nav .dropdown-icon {
  margin-left: 4px;
  width: 16px;
  height: 16px;
}

.desktop-nav .menu-item-has-children {
  position: relative;
  display: flex;
  align-items: center;
}

.desktop-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: #f5e6d3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.desktop-nav .menu-item-has-children:hover > .sub-menu {
  display: block;
}

.desktop-nav .sub-menu li {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-nav .sub-menu li:last-child {
  border-bottom: none;
}

.desktop-nav .sub-menu li:hover {
  background-color: #37426F;
}

.desktop-nav .sub-menu li:hover a {
  color: white;
}

/* --- Navigation — Mobile Sidebar --- */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1000;
}

.mobile-menu-button span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #37426F;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 250px;
  height: 100vh;
  background-color: #f5e6d3;
  padding: 20px;
  transition: right 0.3s ease-in-out;
  z-index: 999;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  display: none;
}

.mobile-sidebar.active {
  right: 0;
}

.mobile-sidebar a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid rgba(55, 66, 111, 0.1);
  color: #37426F;
  text-decoration: none;
}

.mobile-sidebar a:hover {
  color: rgb(131, 160, 193);
}

.mobile-sidebar .mobilesubmenu {
  display: none;
  padding-left: 20px;
}

.mobile-sidebar .mobilesubmenu:not(.hidden) {
  display: block;
}

.mobile-sidebar .mobilesubmenu a {
  padding: 10px 0;
  border-bottom: none;
  font-size: 0.9rem;
}

.close-sidebar {
  font-size: 2rem;
  color: #37426F;
  background: none;
  border: none;
  cursor: pointer;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}

.overlay.active {
  display: block;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
  }

  .desktop-nav {
    display: none !important;
  }

  .mobile-sidebar {
    display: block;
  }
}

@media (min-width: 769px) {
  .mobile-menu-button {
    display: none;
  }

  .desktop-nav {
    display: flex !important;
  }

  .mobile-sidebar {
    display: none !important;
  }
}

/* --- Pagination --- */
.pagination-container {
  margin: 2rem 0;
}

.pagination-container ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.pagination-container li {
  margin: 0;
}

.pagination-container a,
.pagination-container span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  color: white;
  background-color: #37426F;
  transition: all 0.3s ease;
  min-width: 2.5rem;
  text-align: center;
  border: 2px solid transparent;
}

.pagination-container a:hover {
  background-color: transparent;
  color: #37426F;
  border-color: #37426F;
}

.pagination-container .current {
  background-color: #1E2D56;
  font-weight: bold;
}

.pagination-container .prev,
.pagination-container .next {
  padding: 0.5rem 1.5rem;
}

/* --- Nav Menu (style.css legacy) --- */
.nav-menu {
  position: relative;
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  display: block;
  text-decoration: none;
  padding: 0.5rem 1rem;
  color: #1e2d56;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #e53e3e;
}

.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-radius: 4px;
  padding: 0.5rem 0;
}

.nav-menu li:hover > .sub-menu {
  display: block;
}

.nav-menu .sub-menu a {
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
  background-color: #f8f9fa;
}

@media (max-width: 768px) {
  .nav-menu .sub-menu {
    position: static;
    box-shadow: none;
    padding-left: 1rem;
  }
}
