/* ============================================================
   Nova Nexus — Sidebar Layout
   Updated: 2026-05-24
   ============================================================ */

/* --- 3-column page wrapper --- */
.page-layout-wrapper {
  display: flex;
  align-items: stretch;       /* both sidebars stretch to full content height */
  width: 100%;
  /* NO max-width — sidebars reach the page edges */
}

.page-layout-wrapper > main {
  flex: 1;
  min-width: 0;               /* prevents flex blowout on narrow screens */
}

/* --- Sidebar base --- */
.sidebar {
  width: clamp(200px, 18%, 300px);   /* scales proportionally with page width */
  background: #ffffff;
  position: relative;          /* background fills full column height */
  color: #222;
  border-top: none;
}

/* Inner sticky wrapper — content scrolls with the user,
   but the white background column extends full height */
.sidebar-sticky-content {
  position: sticky;
  top: 80px;                   /* matches --header-height */
  padding: 18px 14px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #ccc #fff;
}

.sidebar-sticky-content::-webkit-scrollbar { width: 4px; }
.sidebar-sticky-content::-webkit-scrollbar-track { background: #fff; }
.sidebar-sticky-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.sidebar-left {
  border-right: 1px solid #e0e4ec;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-right {
  border-left: 1px solid #e0e4ec;
  box-shadow: -2px 0 10px rgba(0,0,0,0.05);
}

/* --- Individual sidebar boxes --- */
.sidebar-box {
  background: #fff;
  border-radius: 8px;
  padding: 14px 13px;
  margin-bottom: 14px;
  border: 1px solid #eaecf0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sidebar-box:last-child {
  margin-bottom: 0;
}

.sidebar-box h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #0b3d91;
  margin: 0 0 10px 0;
  padding-bottom: 7px;
  border-bottom: 2px solid #0b3d91;
}

/* --- Quick links box --- */
.sidebar-box-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-box-nav ul li {
  border-bottom: 1px solid #f2f4f8;
}

.sidebar-box-nav ul li:last-child {
  border-bottom: none;
}

.sidebar-box-nav ul li a {
  color: #333;
  font-size: 0.83rem;
  text-decoration: none;
  display: block;
  padding: 6px 2px;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-box-nav ul li a:hover {
  color: #0b3d91;
  padding-left: 6px;
}

/* --- Shop box (featured, colored) --- */
.sidebar-box-shop {
  background: linear-gradient(135deg, #0b3d91 0%, #1a5fcc 100%);
  color: #fff;
  border: none;
  text-align: center;
}

.sidebar-box-shop h4 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.35);
}

.sidebar-box-shop p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.sidebar-shop-btn {
  display: block;
  background: #fc3d21;
  color: #fff !important;
  text-align: center;
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.02em;
}

.sidebar-shop-btn:hover {
  background: #d42e10;
  transform: translateY(-1px);
}

/* --- Social links box --- */
.sidebar-social-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 4px 0;
  flex-wrap: wrap;
}

.sidebar-social-links a {
  color: #0b3d91;
  font-size: 1.3rem;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.sidebar-social-links a:hover {
  color: #fc3d21;
  transform: scale(1.2);
}

/* --- Newsletter box --- */
.sidebar-box-newsletter p {
  font-size: 0.8rem;
  color: #555;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.sidebar-email-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #d4d8e2;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 8px;
  box-sizing: border-box;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
}

.sidebar-email-input:focus {
  border-color: #0b3d91;
}

.sidebar-subscribe-btn {
  width: 100%;
  background: #0b3d91;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.sidebar-subscribe-btn:hover {
  background: #1a5fcc;
}

/* --- Placeholder boxes (dashed, for future content) --- */
.sidebar-placeholder-xl {
  height: 200px;
  background: repeating-linear-gradient(
    -45deg, #f8f9fb, #f8f9fb 8px, #edf0f5 8px, #edf0f5 16px
  );
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #c8cdd8;
  color: #9aa3b4;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-placeholder-tall {
  height: 140px;
  background: repeating-linear-gradient(
    -45deg, #f8f9fb, #f8f9fb 8px, #edf0f5 8px, #edf0f5 16px
  );
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #c8cdd8;
  color: #9aa3b4;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-placeholder-medium {
  height: 95px;
  background: repeating-linear-gradient(
    -45deg, #f8f9fb, #f8f9fb 8px, #edf0f5 8px, #edf0f5 16px
  );
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #c8cdd8;
  color: #9aa3b4;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-placeholder-small {
  height: 60px;
  background: repeating-linear-gradient(
    -45deg, #f8f9fb, #f8f9fb 8px, #edf0f5 8px, #edf0f5 16px
  );
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #c8cdd8;
  color: #9aa3b4;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Responsive breakpoints
   ============================================================ */

/* Below 1300px: hide left sidebar only */
@media (max-width: 1300px) {
  .sidebar-left {
    display: none;
  }
}

/* Below 1000px: right sidebar drops below content as a row */
@media (max-width: 1000px) {
  .page-layout-wrapper {
    flex-direction: column;
  }
  .sidebar-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e0e4ec;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  }
  .sidebar-right .sidebar-sticky-content {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }
  .sidebar-right .sidebar-box {
    flex: 1 1 200px;
    margin-bottom: 0;
  }
}

/* Mobile: hide sidebars entirely */
@media (max-width: 640px) {
  .sidebar-right,
  .sidebar-left {
    display: none;
  }
}
