/* ===== Base Styles ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  color: white;
}

header, nav, main, footer {
  text-align: center;
  padding: 1em;
  background: rgba(0, 0, 50, 0.6);
}

nav ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  justify-content: center;
}

nav ul li {
  margin: 0 15px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

/* Dropdown menu */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1a1a1a;
  min-width: 180px;
  z-index: 1000;
  padding: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.dropdown-content li {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: white;
  background-color: #2a2a2a;
  transition: background-color 0.2s ease-in-out;
}

.dropdown-content a:hover {
  background-color: #444;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Whoami Page Background */
.whoami-page {
  background-image: url('images/whoamibackground.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #f1f1f1;
  margin: 0;
  padding: 0;
}

.overlay {
  background-color: rgba(0, 0, 0, 0.75);
  padding: 2rem;
  min-height: 100vh;
}

header h1 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: #00c6ff;
  text-shadow: 1px 1px 3px #000;
}

main {
  max-width: 800px;
  margin: auto;
  padding: 1rem;
  background-color: rgba(20, 20, 20, 0.7);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

h2 {
  margin-top: 2rem;
  color: #00e0ff;
}

ul {
  padding-left: 1.5rem;
}

footer {
  text-align: center;
  margin-top: 3rem;
  color: #999;
  font-size: 0.9rem;
}

ul {
  list-style: none;
  padding-left: 0;
}

ul li {
  margin-bottom: 0.5rem;
}

/* ===== Threat Intel Page Foundation ===== */
body.threat-intel-page {
  background: linear-gradient(180deg, #0f172a, #0b1220);
  color: #e5e7eb;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji", "Segoe UI Symbol";
}

.feed-page {
  padding: 20px;
}

/* Section headings */
.feed-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.feed-section h2 {
  font-size: 1.6rem;
  color: #60a5fa;
  border-bottom: 2px solid #1e293b;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Grid of cards */
.feed-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* Card style */
.feed-card {
  background: #111827;
  color: #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.45);
}

.feed-card h4 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.feed-card h4 a {
  color: #93c5fd;
  text-decoration: none;
}

.feed-card h4 a:hover {
  text-decoration: underline;
}

.feed-card time {
  display: block;
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 8px;
}

.feed-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #111827;
  padding: 1rem;
  border-right: 2px solid #1f2937;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 1rem;
}

.sidebar a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: bold;
}

.sidebar a:hover {
  text-decoration: underline;
}

.content {
  flex: 1;
  padding: 1rem 2rem;
  overflow-y: auto;
}

.advisory-card {
  background: #1f2937;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.advisory-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.advisory-table th {
  text-align: left;
  padding: 0.5rem;
  background: #374151;
  color: #e5e7eb;
  width: 200px;
}

.advisory-table td {
  padding: 0.5rem;
  background: #111827;
  color: #d1d5db;
}

.advisory-table tr:nth-child(even) td {
  background: #1e293b;
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 40px; /* Adjust for desired size */
  width: auto;
  margin-right: 10px;
}

/* Mobile-first responsive nav */
nav {
  background-color: rgba(0, 0, 50, 0.6);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 50, 0.95);
    position: absolute;
    top: 60px; /* height of header */
    right: 0;
    width: 200px;
    padding: 0;
  }

  nav ul.showing {
    display: flex;
  }

  nav ul li {
    margin: 10px 0;
    text-align: center;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    top: 15px;
    right: 20px;
  }
}
img {
  max-width: 100%;
  height: auto;
}

/* --- Mobile enhancements (non-destructive) --- */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  font-size: 1.3rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 768px) {
  /* Turn the horizontal menu into a slide-down panel */
  .nav-inner { position: relative; }
  .menu-toggle { display: block; }

  /* Your .menu is currently a flex row of <a>’s and a .dropdown
     We'll stack it and pin it to the header on mobile */
  .nav .menu {
    display: none;                 /* hide by default */
    position: absolute;
    top: 100%;
    right: 12px;
    left: 12px;
    background: rgba(0, 0, 50, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
  }
  .nav .menu.open { display: flex; }

  .nav .menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
  }
  .nav .menu a:hover {
    background: rgba(255,255,255,0.08);
  }

  /* Dropdown in mobile: make its panel static and toggleable */
  .nav .menu .dropdown { position: static; }
  .nav .menu .dropdown .dropdown-list {
    position: static;
    display: none;                 /* hidden until opened */
    background: rgba(0, 0, 50, 0.85);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 6px;
    margin: 4px 0 0 0;
  }
  .nav .menu .dropdown.open .dropdown-list { display: block; }

  .nav .menu .dropdown .dropdown-list a {
    padding: 8px 10px;
    border-radius: 4px;
  }
  .nav .menu .dropdown .dropdown-list a:hover {
    background: rgba(255,255,255,0.08);
  }
}
