/* Global reset & box sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base page styles */
body {
  font-family: 'Inter', 'Source Sans Pro', Helvetica, Arial, sans-serif;
  background-color: #f1f1f1;
  padding: 20px;
}

/* Centered container */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  background-color: #0b3d91; /* NASA Blue */
  border-radius: 8px;
}

h1 {
  font-family: 'Inter', 'Source Sans Pro', Helvetica, Arial, sans-serif;
  font-weight: bold;
  color: #ffffff; /* NASA White */
  margin-left: 10px;
}

/* Logo */
.logo {
  width: 140px;
  margin-right: 15px;
}

/* Date‐picker & button row */
/* Stack filters vertically by default (mobile first) */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 0 20px;
}

/* Intro box added below header */
.intro-box {
  background-color: #e9f1ff; /* light blue */
  border-radius: 8px;
  padding: 16px 20px;
  margin: 18px 0;
  border-left: 6px solid #0b3d91; /* accent */
  color: #0b3d91;
  box-shadow: 0 2px 6px rgba(11,61,145,0.08);
}
.intro-box h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}
.intro-box p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

/* Inputs and buttons */
input[type="date"] {
  font-family: 'Inter', 'Source Sans Pro', Helvetica, Arial, sans-serif;
  font-weight: normal;
  color: #212121;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.4;
  width: 100%;
  background-color: #e5e5e5; /* NASA Gray */
}

/* Button specific */
button {
  font-family: 'Inter', 'Source Sans Pro', Helvetica, Arial, sans-serif;
  font-weight: bold;
  background-color: #fc3d21; /* NASA Red */
  color: #fff; /* NASA White */
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover {
  background-color: #0b3d91; /* NASA Blue */
  color: #fff;
}

/* Stack horizontally on wider screens */
@media (min-width: 600px) {
  .filters {
    flex-direction: row;
    padding: 0;
  }
  input[type="date"],
  button {
    width: auto;
  }
}

/* Gallery flex container */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
}

/* Gallery items */
/* Gallery items: full width by default (mobile) */
.gallery-item {
  flex: 1 1 100%;
  min-width: 220px;
  max-width: 500px;
  background: white;
  padding: 18px; /* added more padding including below the card */
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Three columns on wider screens */
@media (min-width: 1000px) {
  .gallery-item {
    flex: 0 1 31%;
  }
}

/* Make gallery items smaller and stack better on very small screens */
@media (max-width: 500px) {
  .gallery {
    padding: 10px;
    gap: 10px;
  }
  .gallery-item {
    min-width: 140px;
    max-width: 100%;
    padding: 6px;
  }
  .gallery-item img {
    height: 120px;
  }
  .space-fact {
    font-size: 1em;
    padding: 10px 8px;
  }
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s ease; /* Smooth transition for zoom */
}

/* Hover zoom effect: reduce the scale increase by 50% (smaller zoom) */
.gallery-item:hover img {
  transform: scale(1.03);
}

/* Slight elevation on hover for the card */
.gallery-item:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.gallery-item p {
  margin-top: 10px;
  padding: 5px;
  font-size: 14px;
}

/* Placeholder content */
.placeholder {
  flex: 1 1 100%;
  text-align: center;
  padding: 40px;
  color: #666;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

/* Modal styles */
.modal {
  display: flex; /* Hidden by default, shown with JS */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  max-width: 500px;
  width: 90vw;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: relative;
  text-align: center;
}

.modal-content img {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 15px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 32px;
  color: #333;
  cursor: pointer;
  font-weight: bold;
}

.modal-content h3 {
  margin-top: 10px;
  margin-bottom: 5px;
}

.modal-content p {
  margin-bottom: 10px;
}

/* Video link style */
.video-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  background-color: #0b3d91; /* NASA Blue */
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
}
.video-link:hover {
  background-color: #fc3d21; /* NASA Red */
  color: #fff;
}

/* Space fact container */
.space-fact {
  background-color: #e5e5e5; /* NASA Gray */
  color: #0b3d91; /* NASA Blue */
  border-left: 6px solid #fc3d21; /* NASA Red */
  border-radius: 6px;
  padding: 16px 20px;
  margin: 0 0 20px 0;
  font-size: 1.1em;
  font-family: 'Inter', 'Source Sans Pro', Helvetica, Arial, sans-serif;
  line-height: 1.5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Footer styles */
.site-footer {
  background-color: #0b3d91; /* NASA Blue */
  color: #fff;
  padding: 30px 22px;
  font-size: 1em;
  font-family: 'Inter', 'Source Sans Pro', Helvetica, Arial, sans-serif;
  letter-spacing: 0.3px;
  margin-top: 30px;
  border-radius: 8px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-column {
  flex: 1 1 50%;
}
.footer-column p {
  margin: 6px 0;
  line-height: 1.5;
}
.footer-links h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
}
.footer-links li {
  margin: 6px 0;
}
.footer-links a {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .footer-container {
    flex-direction: column;
    gap: 12px;
  }
}