/* ========== TOKENS ========== */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --du-ink-light: #fff; /* text on images */
  --du-ink-light-dim: rgba(255, 255, 255, 0.85);
  --du-rule: rgba(255, 255, 255, 0.25); /* outlines on thumbs */
}

/* ========== CARDS – image + overlay + white text ========== */
.du-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.du-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.du-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.55) 100%
  );
}
.du-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem;
  color: var(--du-ink-light);
}
.du-card__meta {
  color: var(--du-ink-light-dim);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.du-card__title {
  margin: 0;
  line-height: 1.15;
}
.du-card__title a {
  color: var(--du-ink-light);
  text-decoration: none;
}
.du-card__title a:hover {
  text-decoration: underline;
}

/* ========== RIGHT RAIL (tiny thumbs, white text) ========== */
.du-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.du-rail--reverse {
  flex-direction: column-reverse;
}
.du-rail-item a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
}
.du-rail-thumb {
  width: 64px;
  height: 48px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  outline: 1px solid var(--du-rule);
}
.du-rail-cat {
  font: 700 10px/1 var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--du-ink-light-dim);
}
.du-rail-title {
  color: var(--du-ink-light);
  line-height: 1.15;
}
.du-rail-item a:hover .du-rail-title {
  text-decoration: underline;
}

/* ========== HEADER / NAV (scoped to header only) ========== */
#siteHeader {
  padding-left: 0;
  padding-right: 0;
}
#siteHeader .navbar {
  padding-left: 0;
  padding-right: 0;
}
#siteHeader .container-fluid {
  padding-left: 0;
  padding-right: 0;
} /* do NOT target .container-fluid globally */

#siteHeader .navbar-toggler {
  display: block !important;
  z-index: 10;
  border: none;
  background: transparent;
  margin-right: auto;
}
#siteHeader .navbar-toggler:focus {
  box-shadow: none;
}
#siteHeader .navbar-toggler-icon {
  width: 1.5rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(0,0,0,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* ========== MISC ========== */
@media (hover: hover) {
  .du-rail-item a:hover .du-rail-title,
  .du-card a:hover {
    text-decoration: underline;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}

/* ========== SIDE NAVIGATION ========== */
.side-nav {
  position: fixed;
  top: 51px; /* Start below header (approximate header height) */
  left: -300px; /* Hidden by default */
  width: 300px;
  height: calc(100vh - 60px); /* Adjust height to account for header */
  background-color: #ffffff;
  border-right: 1px solid #ccc;
  z-index: 1000;
  transition: left 0.3s ease;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.side-nav.open {
  left: 0; /* Slide in when open */
}

.side-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.side-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-nav-header {
  padding: 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
}

.side-nav-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  transition: color 0.2s ease;
}

.side-nav-close:hover {
  color: #000;
}

.side-nav-content {
  padding: 1rem;
}

.side-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-nav-menu li {
  margin-bottom: 0;
  border-bottom: 1px solid #f0f0f0; /* Light horizontal separator */
}

.side-nav-menu li:last-child {
  border-bottom: none; /* Remove border from last item */
}

/* Subcategory indentation */
.side-nav-menu .sub-menu {
  list-style: none;
  padding-left: 1.5rem; /* Indent subcategories */
  margin: 0;
  background-color: #fafafa; /* Slightly different background for sub-items */
}

.side-nav-menu .sub-menu li {
  border-bottom: 1px solid #f5f5f5; /* Even lighter separator for sub-items */
}

.side-nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  font-family: "Bebas Neue", Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: none; /* Remove any default borders */
}

/* Sub-menu link styling */
.side-nav-menu .sub-menu a {
  padding: 0.5rem 1rem; /* Slightly less padding for sub-items */
  font-size: 0.9rem; /* Slightly smaller font for sub-items */
  text-transform: none; /* Normal case for sub-items */
}

.side-nav-menu a:hover,
.side-nav-menu a:focus {
  background-color: #f3f3f3;
  color: #000;
}

.side-nav-menu .current-menu-item a {
  background-color: #e9ecef;
  color: #000;
  font-weight: bold;
}

/* Prevent body scroll when side nav is open */
body.side-nav-open {
  overflow: hidden;
}

.side-nav-fallback {
  padding: 1rem;
  text-align: center;
  color: #666;
}

.side-nav-fallback a {
  color: #007cba;
  text-decoration: none;
}

.side-nav-fallback a:hover {
  text-decoration: underline;
}

.du-related .du-rel-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  background: #ededed;
  border: 1px solid #e2e6ec;
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
}
.du-related .du-rel-item:hover {
  background: #e9eef6;
}
.du-related .du-rel-thumb {
  width: 112px;
  height: 72px;
  border-radius: 6px;
  background: #d7d7d7 center/cover no-repeat;
  outline: 1px solid rgba(0, 0, 0, 0.06);
}
.du-related .du-rel-title {
  color: #0b1220;
  line-height: 1.15;
  font-weight: 700;
}
.du-related .du-rel-date {
  font-size: 0.9rem;
  color: #5b6575;
  margin-top: 2px;
}

.du-pill {
  display: inline-block;
  font: 700 10px/1 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
  color: #fff;
  background: #686918; /* default */
}

/* map by slug; tweak colors to taste */
/* Category pill colors – site-wide */
.du-pill--breaking {
  background: #9e6106; /* Dark amber - urgent */
}
.du-pill--global {
  background: #2563eb; /* Bold blue */
}
.du-pill--technology {
  background: #0ea5e9; /* Cyan tech */
}
.du-pill--science {
  background: #22c55e; /* Green discovery */
}
.du-pill--government {
  background: #6366f1; /* Indigo authority */
}
.du-pill--corporate {
  background: #334155; /* Slate gray - business tone */
}
.du-pill--classified {
  background: #6b21a8; /* Deep purple - secrecy */
}
.du-pill--space-exploration {
  background: #7c3aed; /* Purple - cosmic */
}
.du-pill--ufos-uaps {
  background: #a855f7; /* Violet - mystery */
}
.du-pill--physics {
  background: #f97316; /* Orange - energy */
}
.du-pill--ai-robotics {
  background: #14b8a6; /* Teal - tech futurism */
}
.du-pill--cybersecurity {
  background: #dc2626; /* Strong red - danger */
}
.du-pill--surveillance {
  background: #4b5563; /* Charcoal - covert */
}
.du-pill--climate-earth {
  background: #15803d; /* Deep green - environment */
}
.du-pill--geopolitics {
  background: #b91c1c; /* Crimson - conflict */
}
.du-pill--behavior {
  background: #f59e0b; /* Amber - human interest */
}
.du-pill--culture-society {
  background: #eab308; /* Gold - civilization */
}
.du-pill--future-risks {
  background: #be123c; /* Dark rose - looming threats */
}

/* Related cards (light) */

/* Category pill colors (fallback gray -> per‑slug colors) */
.du-pill {
  display: inline-block;
  font: 700 10px/1 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
  color: #fff;
  background: #6b7280;
}

/* ===== Sidebar takeover ===== */
.du-related .card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.du-related .card + .card {
  margin-top: 1.5rem; /* space between sections */
}

/* Section headers: transparent, crisp, with a clean divider */
.du-related .card-header {
  background: transparent;
  border: 0;
  padding: 0.5rem 0 0.75rem 0;
  font-weight: 700;
  text-transform: none; /* keep it editorial, not shouty */
  color: #111;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* List group container: keep it flush/clean */
.du-related .list-group {
  border-radius: 0;
}

/* Items: transparent, thin separators */
.du-related .list-group-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-left: 0;
  padding-right: 0;
}

.du-related .list-group-item:last-child {
  border-bottom: 0;
}

/* Links: readable, wrap properly, no heavy colors */
.du-related .list-group-item a,
.du-related .list-group a {
  color: #111;
  text-decoration: none;
  display: block;
  line-height: 1.35;
  white-space: normal; /* allow wrapping */
  overflow-wrap: anywhere; /* break long words */
  word-break: break-word;
}

.du-related .list-group-item a:hover,
.du-related .list-group a:hover {
  text-decoration: underline;
}

/* Kill Bootstrap's list-group-item-action hover bg */
.du-related .list-group-item-action:hover,
.du-related .list-group-item-action:focus {
  background-color: transparent;
  color: #0d6efd; /* subtle accent on hover */
}

/* Meta line (date) */
.du-related .du-meta {
  margin-top: 2px;
  font-size: 0.8rem;
  color: #6c757d;
}

/* Sticky offset tweak (optional) */
.du-related.sticky-top {
  top: 2rem !important;
}

/* Make hero/featured post title links white and remove underline */
a.featured-title,
.du-hero-title a,
.featured-title a {
  color: #fff; /* White text */
  text-decoration: none; /* Remove underline */
}

/* Keep visited links white too */
a.featured-title:visited,
.du-hero-title a:visited,
.featured-title a:visited {
  color: #fff;
}

/* Hover state – change color or add underline if you want feedback */
a.featured-title:hover,
.du-hero-title a:hover,
.featured-title a:hover {
  color: #ccc; /* Example: gold on hover */
  text-decoration: none;
}

/* Make wp_login_form fields align and look like your register form */

.du-auth #du-loginform {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Each field block */
.du-auth #du-loginform .login-username,
.du-auth #du-loginform .login-password {
  margin: 0;
  position: relative;
}

/* Labels above inputs */
.du-auth #du-loginform label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* Inputs: full width, same height, rounded */
.du-auth #du-loginform input[type="text"],
.du-auth #du-loginform input[type="password"] {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0 44px 0 14px; /* extra right room for eye toggle */
}
.du-auth #du-loginform input[type="text"]::placeholder,
.du-auth #du-loginform input[type="password"]::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.du-auth #du-loginform input[type="text"]:focus,
.du-auth #du-loginform input[type="password"]:focus {
  border-color: #7dd3fc;
  box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.25);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  outline: none;
}

/* Remember row */
.du-auth #du-loginform .login-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2px;
}
.du-auth #du-loginform .login-remember label {
  margin: 0;
  font-weight: 500;
}

/* Submit button: full width, same radius */
.du-auth #du-loginform .login-submit input[type="submit"] {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Password show/hide toggle */
.du-auth .du-eye {
  position: absolute;
  right: 12px;
  top: 36px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: none;
  color: #6b7280; /* gray-500 */
  font-size: 1rem;
}
.du-auth .du-eye:hover {
  color: #111;
}

/* Mobile spacing */
@media (max-width: 576px) {
  .du-auth #du-loginform {
    gap: 12px;
  }
}
/* DU login: light input fields so they show on white card */
.du-auth #du-loginform input[type="text"],
.du-auth #du-loginform input[type="password"] {
  width: 100%;
  height: 48px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #fff; /* <- was translucent, now solid white */
  border: 1px solid #e5e7eb; /* light gray border */
  color: #111; /* dark text */
  padding: 0 44px 0 14px;
}

.du-auth #du-loginform label {
  color: #111;
} /* readable labels on light card */

.du-auth #du-loginform input[type="text"]::placeholder,
.du-auth #du-loginform input[type="password"]::placeholder {
  color: #9ca3af; /* subtle placeholder */
}

.du-auth #du-loginform input[type="text"]:focus,
.du-auth #du-loginform input[type="password"]:focus {
  border-color: #3b82f6; /* blue accent */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

/* Autofill fix (Chrome) so the yellow fill doesn't kill contrast */
.du-auth #du-loginform input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #111 !important;
  caret-color: #111;
}

/* Keep the remember row tidy */
.du-auth #du-loginform .login-remember label {
  color: #111;
}

/* Mini overlay cards */
.post-mini-overlay .du-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* number of lines to show */
  line-clamp: 3; /* standard property for compatibility */
  overflow: hidden;
  text-overflow: ellipsis;

  /* handle ALL-CAPS, long words, etc. */
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;

  line-height: 1.05;
  font-weight: 800;
  font-size: clamp(1rem, 3.6vw, 1.4rem);
}

/* Optionally tighten on wider screens */
@media (min-width: 576px) {
  .post-mini-overlay .du-card-title {
    -webkit-line-clamp: 2;
    line-clamp: 2; /* standard property for compatibility */
  }
}
