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

/* Base page styles */
body {
  font-family: 'Source Sans Pro', 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: black;
  color: white;
  padding: 20px;
  text-align: center;
}

h1 {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 700;
  color: #white;
}

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

/* Date‐picker & button row */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 0 20px;
}

/* Inputs and buttons */
input[type="date"],
button {
  font-family: Arial, sans-serif;
  font-weight: normal;
  color: #666;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.4;
  width: 100%;
}

/* Button specific */
button {
  background-color: #0b3d91;
  color: white;
  font-weight: 600;
  border: none;
  transition: background-color 0.3s ease-in-out;
  cursor: pointer;
}
button:hover {
  background-color: #062e6f;
}

/* 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-item {
  flex: 1 1 100%;
  min-width: 280px;
  max-width: 500px;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-left: 4px solid #0b3d91; /* NASA Blue accent */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  cursor: pointer;
  will-change: transform;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item:active {
  transform: scale(0.99);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


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

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s ease-in-out;
}


.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;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  overflow-y: auto;
  max-height: 90%;
  position: relative;
}

#modal-title {
  font-size: 20px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 6px;
   color: #0b3d91;
}

.modal-date {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.modal-explanation {
  font-size: 15px;
  line-height: 1.6;
}


.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: 35px;
  font-weight: bold;
  z-index: 1001;
}

.close-btn:hover {
  background-color: black;
}

.hidden {
  display: none;
}

#modal-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}

.site-footer {
  text-align: center;
  font-size: 14px;
  color: #888;
  padding: 20px;
  margin-top: 40px;
}

.site-footer a {
  color: #888;
  text-decoration: none;
}

.site-footer a:hover {
  color: #333;
  text-decoration: underline;
}

#modal-media {
  margin-bottom: 15px;
}

#modal-media iframe {
  max-width: 100%;
  height: auto;
}

.loading-placeholder {
  text-align: center;
  padding: 40px;
  color: #666;
  animation: fadeIn 0.5s ease-in-out;
}

.loading-logo {
  width: 100px;
  height: auto;
  margin-bottom: 15px;
  animation: spin 2s linear infinite;
}

/* Optional animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
