/* Base Styles */
body {
  margin: 0;
  font-family: 'Courier New', Courier, monospace;
  background-color: #1a1a1a;
  color: #cccccc;
}

.ammoh {
  text-align: center;
  font-size: 36px;
  color: #ff4d4d;
  background-color: #2b2b2b;
  padding: 15px;
  margin-bottom: 20px;
  font-weight: bold;
  border-bottom: 2px solid #d51c1c;
}

/* Navigation */
.topnav {
  background-color: #2b2b2b;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  border-bottom: 2px solid #d51c1c;
  position: relative;
  z-index: 1000;
  flex-wrap: wrap;
}

.menu-icon {
  display: none;
  font-size: 30px;
  cursor: pointer;
  color: #d51c1c;
  position: absolute;
  left: 20px;
  top: 15px;
}

.nav-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a, .dropbtn {
  background-color: #2b2b2b;
  border: 1px solid #d51c1c;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: bold;
  color: #d51c1c;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.nav-links a:hover, .dropbtn:hover {
  background-color: #ff4d4d;
  color: #000000;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #2b2b2b;
  border: 1px solid #d51c1c;
  z-index: 2000;
  min-width: 150px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  padding: 10px;
  text-decoration: none;
  color: #d51c1c;
  display: block;
  transition: background-color 0.3s;
}

.dropdown-content a:hover {
  background-color: #ff4d4d;
  color: #000000;
}

/* Fullscreen Image */
.oneFive {
  background-image: url('https://armyrecognition.com/images/stories/north_america/united_states/artillery_vehicle/m777/M777_155mm_ultralight_lightweight_towed_howitzer_United_States_925_001.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff4d4d;
  font-size: 70px;  /* Increased size */
  font-weight: 900;  /* Maximum boldness */
  font-family: 'Courier New', Courier, monospace;
  text-transform: uppercase;
  text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.9);  /* Enhanced shadow */
  border-bottom: 3px solid #ff4d4d;  /* Thicker border */
}

.oneFive p {
  font-size: 36px;
  color: #ff4d4d;
  text-shadow: 2px 2px #000;
}

/* Grid Container */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
  background-color: #2b2b2b;
}

.grid-item {
  background-color: #1a1a1a;
  padding: 10px;
  width: 200px;
  height: 250px;
  overflow: hidden;  /* Ensures overflow is hidden */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  position: relative;
  box-sizing: border-box;  /* Includes padding in width/height calculation */
}

.grid-item img {
  width: 180px;   /* Fixed width for uniform sizing */
  height: 220px;  /* Fixed height to maintain aspect ratio */
  object-fit: contain;  /* Prevents excessive cropping */
  display: block;
  transition: transform 0.3s;
  border: 1px solid #2b2b2b;  /* Visual border to maintain uniformity */
}

.grid-item:hover {
  transform: scale(1.05);
}

.grid-item:hover img {
  transform: scale(1.05);
}

.label {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #ff4d4d;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  z-index: 2500;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
}

.grid-item:hover .label {
  background-color: #ff4d4d;
  color: #000000;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;   
  height: 100vh;  
  background-color: rgba(0, 0, 0, 0.9);  
  z-index: 5000;
  justify-content: center;  /* Center horizontally */
  align-items: center;      /* Center vertically */
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 80%;
  max-width: 800px;
  height: 70vh;
  background-color: #2b2b2b;
  padding: 20px;
  position: relative;  /* Allows absolute positioning of the close button */
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.close-button {
  position: absolute;
  top: 15px;    /* Positioning at the top-right corner */
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #ff4d4d;
  z-index: 10;  /* Ensure it appears above all content */
}


/* Mobile Styles */
@media (max-width: 768px) {

  .menu-icon {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #2b2b2b;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 10px;
  }

  .nav-links.show {
    display: flex;
  }

  .dropdown-content {
    position: relative;
  }

  .dropdown-content a {
    padding: 12px;
    border-bottom: 1px solid #d51c1c;
  }

  .oneFive {
    height: 200px;
  }

  .oneFive p {
    font-size: 24px;
  }

  .modal-content {
    width: 90%;
    max-width: 300px;
  }

  .label {
    font-size: 12px;
    padding: 3px 7px;
  }
}
