/* IT 3203 Project Milestone #3 */
/* Responsive Cybersecurity Website */

:root {
  --primary: #0f172a;
  --secondary: #1d4ed8;
  --accent: #e2e8f0;
  --light: #f8fafc;
  --text: #1e293b;
  --card: #ffffff;
  --border: #cbd5e1;
}

* {
  box-sizing: border-box;
}

/* =========================
   BODY & GENERAL
========================= */

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  line-height: 1.6;
}

.container {
  width: min(1100px, 92%);
  margin: 24px auto;
  padding: 20px;
}

/* =========================
   HEADER
========================= */

header {
  background: var(--primary);
  color: white;
  padding: 20px;
  border-bottom: 4px solid var(--secondary);
}

#site-title {
  margin: 0;
  font-size: 2rem;
}

/* =========================
   NAVIGATION
========================= */

nav {
  background-color: #222;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
  gap: 10px;
}

nav a {
  display: inline-block;
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 8px;
  transition: 0.3s;
}

nav a:hover {
  background-color: #555;
}

nav a.active {
  background-color: #008CBA;
  font-weight: bold;
}

/* =========================
   GRID LAYOUT
========================= */

.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* =========================
   CARDS
========================= */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

/* =========================
   IMAGES
========================= */

img,
.hero-image,
.topic-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
}

.hero-image,
.topic-image {
  border: 2px solid var(--border);
  padding: 8px;
  background: white;
}

/* =========================
   TABLES
========================= */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

table,
th,
td {
  border: 1px solid var(--border);
}

th,
td {
  padding: 12px;
  text-align: left;
}

th {
  background: #dbeafe;
}

/* =========================
   QUIZ FORM
========================= */

form {
  background-color: #f4f4f4;
  padding: 20px;
  border-radius: 10px;
}

input,
button {
  margin-top: 10px;
}

button {
  padding: 10px 15px;
  border: none;
  background: var(--secondary);
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #2563eb;
}

/* =========================
   QUIZ RESULTS
========================= */

#results {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
}

.correct {
  color: green;
  font-weight: bold;
}

.incorrect {
  color: red;
  font-weight: bold;
}

/* =========================
   FOOTER
========================= */

footer {
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 18px;
  margin-top: 30px;
}

footer a {
  color: #93c5fd;
}

/* =========================
   LINKS & EXTRA STYLES
========================= */

.resource-list a,
.content-link {
  color: var(--secondary);
}

.resource-list a:hover,
.content-link:hover {
  color: #0f172a;
}

.profile-box {
  background: #eff6ff;
  border-left: 6px solid var(--secondary);
}

.key-term-list li {
  margin-bottom: 8px;
}

.highlight {
  color: var(--secondary);
  font-weight: bold;
}

/* =========================
   RESPONSIVE DESIGN
========================= */

/* Tablets */
@media screen and (max-width: 768px) {

  .grid-layout {
    grid-template-columns: 1fr;
  }

  nav {
    flex-direction: column;
    align-items: center;
  }

  body {
    font-size: 16px;
  }

  .container {
    padding: 15px;
  }
}

/* Phones */
@media screen and (max-width: 480px) {

  nav a {
    width: 100%;
    text-align: center;
  }

  h1 {
    font-size: 24px;
  }

  body {
    font-size: 14px;
  }

  form {
    padding: 10px;
  }

  button {
    width: 100%;
  }
}
nav a.active {
  background-color: #008CBA;
  color: white;
  font-weight: bold;
  border-radius: 8px;
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
