/* ===== 2007 Retro Theme ===== */
body {
  font-family: "Verdana", "Tahoma", sans-serif;
  background: linear-gradient(to bottom, #d9e4f7 0%, #f6f8fc 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #000;
  margin: 0;
  padding: 0;
}


.container {
  width: 900px;
  margin: 0 auto;
  background: linear-gradient(to bottom, #ffffff 0%, #f4f7fb 100%);
  border: 1px solid #9ab1d1;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1), inset 0 1px 0 #ffffff;
  padding: 20px 30px;
}


/* ===== Header ===== */
header {
  background: linear-gradient(to bottom, #3b5998, #2a4887);
  color: white;
  padding: 20px;
  text-align: center;
  border-bottom: 3px solid #1d3557;
}
header h1 {
  font-size: 26px;
  margin: 0;
}
header p {
  font-size: 13px;
  color: #dfe6f2;
}

/* ===== Improved Header Look ===== */
header {
  background: linear-gradient(to bottom, #4a6cb3 0%, #2a4887 100%);
  border-bottom: 3px solid #1c2f5a;
  box-shadow: inset 0 2px 0 #5d82c1, 0 2px 8px rgba(0, 0, 0, 0.2);
}

header h1 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 36px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px #1b2b4a;
}

header .tagline {
  font-size: 14px;
  color: #cfd8ef;
  font-style: italic;
}

/* ===== Header Layout (Logo Left) ===== */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 15px 25px;
}

.header-inner .left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 120px;
  height: auto;
}

.title-group h1 {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 28px;
  margin: 0;
  color: #ffffff;
  text-shadow: 1px 1px 2px #1b2b4a;
}

.title-group .tagline {
  font-size: 13px;
  color: #dfe6f2;
  margin: 3px 0 0 0;
  font-style: italic;
}


/* ===== Links ===== */
a {
  color: #0033cc;
  text-decoration: underline;
}
a:hover {
  color: #1d4fab;
}

/* ===== Sections ===== */
section {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  background: #f9f9ff;
}

/* ===== Buttons ===== */
.btn {
  background: linear-gradient(to bottom, #4f8ef7, #2b6edb);
  color: white;
  border: 1px solid #1d4fab;
  padding: 6px 10px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
}
.btn:hover {
  background: linear-gradient(to bottom, #2b6edb, #4f8ef7);
}

/* ===== Footer ===== */
footer {
  background: linear-gradient(to bottom, #c7d6ef 0%, #a7bfe8 100%);
  border-top: 2px solid #7f96b3;
  color: #1d2f5a;
  text-align: center;
  font-size: 12px;
  padding: 12px 0;
  text-shadow: 0 1px 0 #e3ebf8;
}


/* ===== NAVBAR ===== */
nav {
  margin-top: 10px;
}

.navbar {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  background: linear-gradient(to bottom, #c9d8ef, #a7bfe8);
  border: 1px solid #7a8ea8;
  border-radius: 4px;
}

.navbar li {
  margin: 0;
}

.navbar a {
  display: block;
  padding: 8px 16px;
  color: #002b80;
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  border-right: 1px solid #7a8ea8;
}

.navbar a:hover {
  background-color: #b3c5e3;
  color: #000;
}

/* Remove last divider line */
.navbar li:last-child a {
  border-right: none;
}

/* ===== DIVIDERS ===== */
.divider {
  border: none;
  border-top: 1px dotted #99b3cc;
  margin: 2rem 0;
}

/* ===== Logo Image ===== */
.logo {
  display: block;
  margin: 0 auto 10px auto;
  width: 280px;   /* adjust here */
  height: auto;
  image-rendering: crisp-edges;
}


/* Retro Glow */
.card:hover {
  box-shadow: 0 0 10px #a7bfe8;
}

.btn:hover {
  filter: brightness(1.15);
}

/* Subtle Link Glow */
a:hover {
  text-shadow: 0 0 3px #b3c5e3;
}


.cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background: linear-gradient(to bottom, #fefefe 0%, #f1f5fc 100%);
  border: 1px solid #b2c1e0;
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
  width: 380px;
  padding: 15px;
  transition: all 0.2s ease-in-out;
}

.card h3 {
  color: #2a4887;
  border-bottom: 1px dotted #99b3cc;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px #a7bfe8;
}

body {
  background: #dce3f2 url('https://www.transparenttextures.com/patterns/grid-noise.png');
  background-attachment: fixed;
}


/* ===== Page Layout Balancing ===== */
header, footer {
  max-width: 100%;
  margin: 0 auto;
}

main {
  padding-top: 20px;
  padding-bottom: 20px;
}


/* ===== Back Home Button Styling ===== */
.back-home {
  text-align: center;
  margin: 2rem 0;
}

.back-btn {
  background: linear-gradient(to bottom, #4f8ef7, #2b6edb);
  color: white;
  border: 1px solid #1d4fab;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.back-btn:hover {
  background: linear-gradient(to bottom, #5a9bf9, #356de5);
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ===== YouTube Video Embeds ===== */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin-top: 10px;
}

.video-container iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
}

/* ============================================
   FINAL FIX — NAVBAR ALWAYS FITS ON MOBILE
   ============================================ */
@media (max-width: 768px) {

  /* Make the whole content a bit narrower on phones */
  .container {
    width: 95%;
    padding: 16px;
    box-sizing: border-box;
  }

  /* Stack logo + menu nicely */
  .header-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 0;
  }

  .logo {
    width: 190px;
  }

  /* Navbar wrapper */
  nav {
    width: 100%;
    max-width: 360px;       /* keeps it away from screen edges */
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  /* Navbar itself */
  .navbar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;      /* keep in one line */
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
  }

  .navbar li {
    flex: 1;
    text-align: center;
  }

  .navbar a {
    display: block;
    font-size: 13px;
    padding: 6px 6px;
    white-space: nowrap;     /* no wrapping, keeps GitHub on one line */
    border-right: 1px solid #7a8ea8;
  }

  .navbar li:last-child a {
    border-right: none;
  }

  /* Cards full-width on mobile */
  .cards {
    flex-direction: column;
    gap: 18px;
  }

  .card {
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
  }

  /* Tap “animation” for cards on mobile */
  .card:active {
    transform: scale(0.97);
    box-shadow: 0 0 8px rgba(0,0,0,0.15);
  }

  /* Buttons */
  .btn,
  .back-btn {
    padding: 12px 14px;
    font-size: 14px;
  }

  /* Video */
  .video-container {
    padding-bottom: 60%;
  }

  /* Fix ISO button breaking */
  .btn {
    white-space: nowrap;     /* Prevents text wrapping */
    width: 100%;             /* Ensures the button expands properly */
    text-align: center;
  }

}

/* Extra-small phones */
@media (max-width: 480px) {
  .navbar a {
    font-size: 12.5px;   /* tiny bit smaller text */
    padding: 6px 6px;    /* a little tighter padding */
  }

  .logo {
    width: 170px;        /* slightly smaller logo so everything breathes */
  }
}