html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: url("images/nz_flag_faded.jpg") no-repeat center center fixed;
  background-size: cover;
  background-blend-mode: soft-light;
  font-family: 'Comic Sans MS', Impact, monospace;
  color: #222;
  display: flex;
  flex-direction: column;
}

header {
  background: linear-gradient(to right, #00247D, #CC0000);
  color: white;
  text-align: center;
  padding: 20px;
  border-bottom: 4px dashed white;
}

h1 {
  font-size: 3.5em;
  margin: 0;
  text-shadow: 2px 2px black;
}

h2 {
  font-size: 1.5em;
  margin-top: 5px;
}

.nz-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 120px;
  border: 4px solid #CC0000;
  box-shadow: 0 0 10px white;
}

.ticker {
  width: 100%;
  background: #fff900;
  border-top: 2px solid #cc0000;
  border-bottom: 2px solid #cc0000;
  font-family: 'Comic Sans MS', Impact, monospace;
  font-size: 1rem;
  font-weight: bold;
  color: #cc0000;
  overflow: hidden;
  box-shadow: inset 0 -2px 2px rgba(0, 0, 0, 0.2);
  line-height: 1.8;
  padding: 0 10px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.ticker span {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-ticker 15s linear infinite;
  padding-left: 100%;
}

@keyframes scroll-ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Navigation Bar Styles */
.top-nav {
  background: linear-gradient(to right, #CC0000, #00247D);
  border-top: 4px dashed white;
  border-bottom: 4px dashed white;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 15px 25px;
  color: white;
  text-decoration: none;
  font-family: 'Comic Sans MS', Impact, monospace;
  font-weight: bold;
  font-size: 1.1em;
  text-shadow: 2px 2px black;
  text-transform: uppercase;
  border-right: 2px dashed rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.nav-list li:last-child .nav-link {
  border-right: none;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff900;
  text-shadow: 2px 2px black, 0 0 8px #fff900;
  transform: scale(1.05);
}

.nav-link.active {
  background: #fff900;
  color: #CC0000;
  text-shadow: 1px 1px white;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-list {
    flex-direction: column;
  }
  
  .nav-link {
    border-right: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 12px 20px;
  }
  
  .nav-list li:last-child .nav-link {
    border-bottom: none;
  }
}

main {
  flex: 1;
  padding: 20px;
}

.content-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 15px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  gap: 20px;
}

.left-img {
  flex-direction: row;
}

.right-img {
  flex-direction: row-reverse;
}

.block-img {
  flex: 0 0 25%;
  max-width: 25%;
  height: auto;
  object-fit: contain;
  border: 3px solid #00247D;
  transform: rotate(-1.5deg);
  filter: contrast(120%) saturate(130%);
  box-shadow: 4px 4px 0 red;
}

.block-text {
  flex: 1;
  font-family: "Courier New", monospace;
  background: #fff9dc;
  border: 2px dashed #cc0000;
  padding: 10px;
  box-shadow: inset 0 0 5px #000;
  text-shadow: 1px 1px #fff;
}

/* Inline figure within block-text */
.block-text img.figure-small {
  width: 100%;
  max-width: 200px;
  display: block;
  margin: 15px auto;
  border: 2px solid #cc0000;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Override for specific larger figure */
.block-text img.figure-small.figure-large {
  max-width: 400px; /* or whatever size you need */
}

.badges {
  text-align: center;
  padding: 10px;
  background: #eeeeee;
  border-top: 2px dotted #ccc;
}

.badges img {
  margin: 5px;
  image-rendering: pixelated;
  height: 48px;
}

footer {
  background: #000;
  color: #999;
  font-size: 10px;
  text-align: right;
  padding: 2px 10px;
  line-height: 1;
  border-top: 1px solid #444;
  font-family: monospace;
}

.action-button {
  /* animation: blink 1s steps(1) infinite; */
  color: red;
  background: yellow;
  font-weight: bold;
  padding: 2px 6px;
  border: 2px solid black;
}

/* @keyframes blink { */
  /* 50% { opacity: 0; } */
/* } */

/* Software Page Styles */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

.software-item {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.software-button {
  background: linear-gradient(135deg, #fff9dc 0%, #f0f0f0 100%);
  border: 3px solid #CC0000;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 4px 4px 0 #00247D, 8px 8px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.software-button:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 #00247D, 12px 12px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #ffffff 0%, #fff9dc 100%);
}

.software-button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(135deg, #e0e0e0 0%, #cccccc 100%);
}

.software-button.disabled:hover {
  transform: none;
  box-shadow: 4px 4px 0 #00247D, 8px 8px 15px rgba(0, 0, 0, 0.2);
}

.software-icon {
  font-size: 3em;
  margin-bottom: 10px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
  flex-shrink: 0;
}

.software-title {
  font-family: 'Comic Sans MS', Impact, monospace;
  font-size: 1.4em;
  font-weight: bold;
  color: #CC0000;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  margin-bottom: 5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.software-subtitle {
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: #00247D;
  font-weight: bold;
  margin-bottom: 15px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.software-description {
  font-family: "Courier New", monospace;
  font-size: 0.85em;
  line-height: 1.4;
  color: #333;
  margin-bottom: 20px;
  text-align: left;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.software-action {
  margin-top: 15px;
  flex-shrink: 0;
}

.software-action span {
  display: inline-block;
  padding: 8px 16px;
  background: #CC0000;
  color: white;
  font-family: 'Comic Sans MS', Impact, monospace;
  font-weight: bold;
  text-shadow: 1px 1px black;
  border-radius: 5px;
  text-transform: uppercase;
  font-size: 0.9em;
}

.software-button.disabled .software-action span {
  background: #666;
  animation: none;
}

/* ✅ Mobile override */
@media (max-width: 768px) {
  .content-block {
    flex-direction: column !important;
    align-items: center;
    text-align: left;
  }

  .block-img {
    max-width: 90%;
    width: 100%;
    margin-bottom: 15px;
  }

  .block-text {
    width: 100%;
  }
}
