/* Art Gallery - Custom Styling */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: "Fira Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #fafbfc;
  color: #000;
}

body {
  display: flex;
  flex-direction: column;
}

/* Header Styling */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.2rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: none;
  margin: 0;
}

header h1 {
  font-size: 1.1em;
  font-weight: 300;
  letter-spacing: 0.12em;
  margin: 0;
}

header h1 a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

header h1 a:hover {
  opacity: 0.7;
}

header nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.back-link {
  color: #000;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 300;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.back-link:hover {
  opacity: 0.6;
}

/* Main Content */
main {
  flex: 1;
  padding: 0;
  max-width: 100%;
  margin: 0;
  width: 100%;
}

.gallery {
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid #d0d0d0;
  border-left: 1px solid #d0d0d0;
}

.item {
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease;
  border-right: 1px solid #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
  padding: 1.8rem;
}

.item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.item a {
  text-decoration: none;
  color: inherit;
}

figure {
  width: 100%;
  margin: 0 0 0.8rem 0;
  padding: 0;
  background-color: #f5f5f5;
  aspect-ratio: var(--aspect-ratio, 1);
  overflow: hidden;
  border-radius: 4px;
  position: relative;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.item:hover .gallery-image {
  opacity: 0.98;
}

figure::after {
  content: '© Adriane Fresh';
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 8px;
  font-size: 0.7em;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.item:hover figure::after {
  opacity: 1;
}

.item h2 {
  font-size: 0.95em;
  font-weight: 300;
  margin-top: 1.3rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.item h2 a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.item h2 a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.item p {
  font-size: 0.8em;
  color: #888;
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}

/* Footer Styling */
footer {
  background-color: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  padding: 2rem;
  text-align: center;
  margin-top: auto;
}

footer p {
  font-size: 0.85em;
  color: #666;
  margin: 0;
}

footer a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .header-nav {
    flex-direction: column;
    gap: 1rem;
  }

  header h1 {
    font-size: 1.5em;
  }

  header nav {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .back-link {
    width: 100%;
    justify-content: center;
  }

  main {
    padding: 2rem 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .item h2 {
    font-size: 1em;
  }

  .item p {
    font-size: 0.85em;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1.5rem 1rem;
  }

  header h1 {
    font-size: 1.3em;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .grid {
    gap: 1rem;
  }
}

/* Transition Effects */
.transition-fade {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
