/* ===============================
   GLOBAL STYLES
================================= */
body {
  background-color: #0a0a0a;
  color: #e0e0e0;
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

img {
  filter: contrast(1.3) grayscale(0.3) blur(0.4px);
}
section {
  /* border-left: 2px solid #b22222; */
  padding-left: 1rem;
  margin-left: 1rem;
}

.montserrat {
  font-family: "Montserrat", sans-serif;
}

.custom-container {
  max-width: 65%;
  margin: 0 auto;
}
@media (max-width: 992px) { /* Bootstrap 'lg' breakpoint */
  .custom-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 1399.98px) {
  .custom-container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}


/* Links */
a {
  color: #00ffa6;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===============================
   NAVBAR
================================= */
/* NAVBAR TEXTURE & ACCENT */
/* ===============================
   GLITCH / SCHIZO NAVBAR
================================= */

/* Dark noisy background with red static line */
/* ===============================
   GLITCH / SCHIZO NAVBAR
================================= */
.navbar {
  position: relative;
  min-height: 90px;
  background: radial-gradient(circle at center, #000 0%, #0a0a0a 40%, #050505 100%);
  overflow: hidden;
  border-bottom: 2px solid #b22222;
  animation: pulseBg 12s ease-in-out infinite alternate;
}

@keyframes pulseBg {
  from { background-position: 0% 0%; }
  to { background-position: 100% 100%; }
}

/* Add noisy static overlay */
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/noise.png');
  opacity: 0.12;
  animation: noiseMove 0.8s steps(3) infinite;
  pointer-events: none;
}

/* Animated red scanline underneath */
.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #b22222, transparent, #b22222);
  animation: pulse 2s infinite linear;
}

/* Brand flicker + glitch */
.navbar-brand {
  font-size: 2rem;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  text-shadow:
    1px 0 red,
    -1px 0 cyan,
    0 0 12px rgba(255, 255, 255, 0.3);
  /* animation: flickerExtreme 3s infinite; */
  z-index: 2;
}

@keyframes flickerExtreme {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.4; }
}

/* Nav links */



.navbar-nav .nav-link {
  color: #dcdcdc !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  transition: 0.3s;
}

.navbar-nav .nav-link:hover {
  color: #ff003c !important;
  text-shadow: 0 0 8px #ff003c;
  transform: skewX(-3deg);
}

/* Add cyan ghost layer for glitchy hover */
.navbar-nav .nav-link::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  color: cyan;
  opacity: 0;
  transform: translate(-2px, 0);
  transition: opacity 0.15s;
}
.navbar-nav .nav-link:hover::before {
  opacity: 0.6;
  animation: glitch 0.2s infinite;
}

@keyframes glitch {
  0% { transform: translate(-1px, 0); }
  50% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

/* Custom white hamburger icon */
.navbar-toggler {
  border: none;
  z-index: 3;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}
.navbar-toggler:hover .navbar-toggler-icon {
  transform: rotate(5deg) scale(1.1);
}




/* Search Button */
.btn-outline-success {
  color: #00ffa6;
  border-color: #00ffa6;
}

.btn-outline-success:hover {
  background-color: #00ffa6;
  color: #000;
}

/* ===============================
   POSTS & CONTENT
================================= */
.post-title {
  font-size: 3.5rem;
  font-weight: bold;
  color: #fff;
}

.post-paragraph p {
  font-size: 1.2rem;
  color: #ccc;
}

.post-length p {
  font-size: 1rem;
  color: #777;
}

.topstories-font {
  font-size: 1.1rem;
}

/* ===============================
   FEATURED CARDS
================================= */
.card,
.card img {
  border-radius: 0 !important;
}

.featured-card {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: rgba(20, 20, 20, 0.9);
  transition: transform 0.3s ease, box-shadow 0.3s;
}

.featured-card img {
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.featured-card:hover img {
  opacity: 0.6;
}

.featured-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

/* Gradient overlay on featured image */
.featured-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  pointer-events: none;
  z-index: 1;
}

.featured-card .card-img-overlay {
  z-index: 2;
}

/* ===============================
   TYPOGRAPHY EFFECTS
================================= */
h3.card-title {
  color: #fff;
  position: relative;
  /* animation: flicker 3s infinite; */
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}

/* ===============================
   FOOTER
================================= */
footer {
  background-color: rgba(10, 10, 10, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
}

footer h5 {
  color: #fff;
}

footer .nav-link {
  color: #aaaaaa !important;
  font-size: 0.9rem;
  transition: color 0.3s;
}

footer .nav-link:hover {
  color: #fff !important;
}

.text-body-secondary {
  color: #777 !important;
}


/* HERO SECTION */
.hero-section {
  position: relative;
  height: 35vh;
  background: url('https://static.scientificamerican.com/sciam/cache/file/A87A3CF6-4065-400D-A813F3A12EC10B6A_source.jpg') center center / cover no-repeat;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65); /* dark overlay */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 15px;
}

.hero-content h1 {
  font-size: 3.5rem;
  letter-spacing: 1px;
}

.hero-content p {
  font-size: 1.3rem;
  color: #ccc;
  font-style: italic;
}


/* ===============================
   TOP PICK SECTION
================================= */
.top-pick-section {
  background-color: #0d0d0d;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-pick-card {
  background-color: rgba(20, 20, 20, 0.85);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-pick-card:hover {
  transform: scale(1.01);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.top-pick-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.top-pick-card:hover img {
  opacity: 0.75;
}

.top-pick-card .card-body {
  padding: 2rem;
}

.top-pick-card .card-title {
  color: #fff;
}

.top-pick-card .card-text {
  color: #ccc;
  font-size: 1.1rem;
  line-height: 1.7;
}

.top-pick-card .btn-outline-light {
  border-color: #b22222;
  color: #b22222;
  font-weight: bold;
}

.top-pick-card .btn-outline-light:hover {
  background-color: #b22222;
  color: #fff;
}

a.custom-link {
  color: inherit !important;         /* Use surrounding text color */
  text-decoration: none;
}

a.custom-link:hover {
  color: inherit !important;
  text-decoration: none;
}



/* POST */

.post-content {
  max-width: 100%;
  padding: 0 15px; /* prevent touching screen edges */
  box-sizing: border-box;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.tox-editor-container,
.tox-editor,
.tox-editor iframe,
.tox-edit-area iframe,
.tox-edit-area,
.tox-content {
    max-width: 100% !important;
    width: 100% !important;
}
/* Barbed Wire Background Behind Navbar */
.barbed-border {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.barbed-border::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/barbed-wire.png') repeat-x center;
  background-size: cover; /* or 'cover' if you want it stretched */
  opacity: 0.50; /* lower value = subtler look */
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen; /* try 'overlay', 'soft-light', 'lighten' depending on vibe */
}
