/* Basic Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  padding-top: 60px; /* Adjust if header height changes */
}

.wrapper {
  max-width: 1500px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: fixed; /* Make header fixed */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px; /* Set a fixed height */
  display: flex;
  align-items: center; /* Vertically center content */
}

.site-header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.site-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

/* Footer */
.site-footer {
  border-top: 1px solid #eee;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
  margin-top: 2rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  gap: 0.125rem; /* Reduced Small gap between items */
  grid-template-columns: 1fr; /* 1 column for mobile */
  padding-top: 0; /* Removed top padding for the grid itself */
}

.gallery-item {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: white;
  display: block; /* Needed for aspect ratio trick */
  background-color: #eee; /* Placeholder color */
}

.gallery-image-container {
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  position: relative;
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cover the area, cropping if necessary */
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  color: #fff;
  font-size: 0.9rem;
}

.gallery-date {
  font-size: 0.8rem;
  margin-bottom: 0.05rem;
  opacity: 0.9;
}

.gallery-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
}

.gallery-location {
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Photo Post Page */
.photo-post {
  padding-top: 1rem; /* Space below fixed header */
}

.photo-post h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.photo-post .post-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1.5rem;
}

.photo-full img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 1.5rem auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content {
  line-height: 1.7;
}

/* Responsive Grid */
@media (min-width: 600px) { /* Tablet and up */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem; /* Reduced Larger gap for larger screens */
  }
  .gallery-caption {
    padding: 1rem;
  }
  .gallery-title {
    font-size: 1.2rem;
  }
}

/* Ensure content below fixed header is visible */
body {
    padding-top: 60px; /* Height of the header */
}

.page-content .wrapper {
    padding-top: 1rem; /* Add some padding to the top of the main content area */
    padding-bottom: 1rem; /* Added to match top padding for consistent spacing */
}

/* If you have a very tall header, you might need more padding */

/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1000; /* Sit on top */
  padding-top: 50px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain; /* Scale down to fit, preserving aspect ratio */
} 