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

:root {
--text: #0b0a08;
--background: #f7f3f2;
--primary: #b18c5b;
--secondary: #ddc3a1;
--accent: #E59D58;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--background);
  font-family: Georgia, "Times New Roman", Times, serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100vh;;
}

main {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#top-bg-color{
  background-color: #E59D58;
  border-radius: 8px;
}

header {
  display: flex;
  top: 0;
  padding: 30px ;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  left: 0;
  top: 0;
}

h1 {
  padding-left: 3.6rem;
  
}

.header-container {
  width: 100%;
  max-width: 1400px; 
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

nav {
  font-weight: 700;
  z-index: 1;
  flex-wrap: wrap;
  max-width: 100%;
}

section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


#single-work {
  scroll-padding-top: 2rem;
}

#collection {
  background-color: var(--background);
}

#collection h2 {
  padding: 10px 10px 10px 0;
}

#collection-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

#collection-list li {
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
}

#collection-list li:hover {
  background-color: var(--background);
  border: 2px solid var(--accent);
  padding: 15px;
  box-shadow: 4px 6px 1px 4px var(--accent);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

#collection-list img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

#collection-list h3 {
  font-size: 0.9rem;
}

ul {
  list-style: none;
}

#card {
  background-color: var(--background);
  border: 1px solid var(--background);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#card img {
  margin-left: 1.5rem;
  max-width: 300px;
  border-radius: 4px;
  padding: 1rem;
  display: flex;
}

#card h3,
#card h4,
#card p {
  margin-left: 1.5rem;
  padding: 0.2rem;
}

#error {
  color: red;
  min-height: 1.25rem;
}

form {
  background-color: var(--secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: start;
  border-radius: 8px;
  padding: 3rem;
}

fieldset {
  display: flex;
  justify-content: space-between;
  border-style: none;
  padding: 5px 5px 5px 0;
}

button {
  background-color: var(--secondary);
  border: 1px solid var(--primary);
  padding: 5px;
  font-family: Georgia, "Times New Roman", Times, serif;
  border-radius: 8px;
}

button:hover {
  border: 1px solid var(--accent);
  box-shadow: 4px 4px 1px 2px var(--accent);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.hidden {
  display: none !important;
}

@media screen and (max-width: 399px) {
  #collection-list {
    grid-template-columns: repeat(2, 1fr);
  }
  header h1 {
    font-size: 1.5rem;
  }

  nav ul li a {
    font-size: 0.9rem;
  }

  #collection-list li {
    padding: 0.5rem;
  }

  #collection-list h3 {
    font-size: 0.8rem;
  }

  fieldset div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
  }
}


@media screen and (min-width: 900px) {
  body {
    padding: 2rem;
  }

  #collection-list {
    grid-template-columns: repeat(3, 1fr);
  }


@media screen and (min-width: 1200px) {
  #collection-list {
    grid-template-columns: repeat(4, 1fr); /* 4 columns on large screens */
  }

  #collection-list li {
    padding: 1rem;
  }

  #collection-list h3 {
    font-size: 1rem;
  }

  #card {
    padding: 2rem;
  }

  #card img {
    max-width: 400px;
  }
}

}