body {
  font-family: 'Montserrat', Arial, sans-serif;
  background: #f8f9fa;
  color: #22223b;
  margin: 0;
  padding: 0;
}  

header {
  background: #4a4e69;
  color: #fff;
  padding: 2rem 0 1rem 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(34,34,59,0.08);
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 2px;
}

nav {
  margin-top: 1rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

nav ul li {
  margin: 0 0.5rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 1.2rem;
  font-weight: 700;
  transition: color 0.2s;
}

nav a:hover {
  color: #9a8c98;
}

nav a.active {
  color: #4a4e69;
  background: #fff;
  border-radius: 6px;
  padding: 0.2em 0.8em;
  box-shadow: 0 2px 8px rgba(34,34,59,0.08);
}


main {
  max-width: 1100px;
  margin: 2rem auto;
}

.favorite-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0 1rem;
  
}

.favorite-grid img, .gallery-grid img {
  width: 100%;
  max-height: 320px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(34,34,59,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  gap: 1.5rem;
  margin-bottom: 2rem;
  aspect-ratio: 4 / 3 ;
  display: block;
  
}

.favorite-grid img:hover, .gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(34,34,59,0.15);
}

.favorite-grid, .gallery-grid h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: #4a4e69;
}


footer {
  background: #22223b;
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
  font-size: 1rem;
  letter-spacing: 1px;
}

footer a {
  color: #9a8c98;
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

.page-flex {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure main content grows to fill space */
.page-flex main {
  flex: 1;
}

@media screen and (max-width: 768px) {
  .favorite-grid, .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
}