body {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

div {
  font-family: "Mulish", sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-style: normal;
}

h1 {
  color: #000;
}

footer {
  width: 100%;
  background-color: #f8f5f2;
  padding: 2rem 0;
}

.piece-title {
    text-align: center;
}

.piece-title .gallery-item {
    padding: 0;
    border: none;
}

.piece-title .gallery-item img {
    padding: 10px;
}

.artwork-info-header {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 2em;
}

.artwork-info-content {
    font-size: 1em;
    line-height: 1.5;
    margin-top: 1em;
    text-align: left;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.social-icons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.social-icons a,
.payment-icons a {
  color: #000;
  font-size: 24px;
  margin-right: 15px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 200;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.copyright {
  margin-top: 10px;
  font-size: 14px;
}

/* container */
.wrapper {
  min-height: 100%;
  display: block;
  flex-grow: 1;
}

/* columns */
.wrapper > * {
  padding: 1rem;
}

.nav {
    width: 200px;
}

.nav ul li {
  margin-top: 10px;
  padding: 12px;
  font-size: 24px;
  position: relative; /* Needed for positioning the line */
}

.nav ul li a, .nav ul li a:hover, nav ul li a:focus, .nav ul li a:active, .nav ul li.a:visited {
    text-decoration: none;
    color: #000;
}

.nav ul li.active {
  font-weight: bold;
}

.nav ul li.active::before {
  content: '';
  position: absolute;
  left: -10px; /* Adjust as needed */
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px; /* Match font-size */
  background-color: #000;
}

.logo {
    margin: 0 auto;
    padding-top: 20px;
    height: 120px;
    width: 400px;
    font-size: 40px;
    font-weight: 200;
    text-align: center;
}
.main {
    margin-top: 20px;
    border-radius: 1em;
    padding: 1rem;
    margin: 1rem;
    width: auto;
    border-radius: 1em;
    border: 1px solid #ccc;
    overflow: auto;
}
.main h1 {
    font-size: 1.5em;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-grid a {
    color: black !important;
    text-decoration: none !important;
}

.gallery-grid a:hover {
    text-decoration: underline !important;
}

.gallery-item {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

.artwork-detail {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.artwork-detail img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.artwork-detail h1 {
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: left;
}

.artwork-detail h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: left;
}

.artwork-detail p {
    margin-bottom: 10px;
    line-height: 1.5;
    text-align: left;
}

.artwork-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}

.artwork-header h1 {
    margin: 0;
    text-align: center;
    flex-grow: 1;
}

.back-link {
    position: absolute;
    left: 0;
    color: black !important;
    text-decoration: none !important;
    font-size: 1em; /* Keep original size */
}

.back-link:hover {
    color: black !important;
    text-decoration: underline !important;
}

.main-artwork-media img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    padding: 5px;
}

.artwork-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.artwork-thumbnails img {
    width: 100px; /* Thumbnail size */
    height: 100px; /* Thumbnail size */
    object-fit: cover; /* Crop images to fit */
    padding: 3px;
    cursor: pointer;
}

.artwork-videos video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    padding: 5px;
}

.media-description {
    font-style: italic;
    color: #555;
    margin-top: 5px;
}

/* Mobile styles (default, up to 767px) */
@media (max-width: 767px) {
    .wrapper {
        display: block; /* Stack elements vertically */
    }

    .wrapper > * {
        padding: 0.5rem; /* Reduce padding */
    }

    .nav {
        width: 100%; /* Full width */
        text-align: center;
    }

    .nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .nav ul li {
        margin: 5px 0;
        font-size: 18px;
        padding: 8px;
    }

    .nav ul li.active::before {
        left: -5px;
        height: 18px;
    }

    .logo {
        width: 100%;
        font-size: 30px;
        height: auto;
        padding-top: 10px;
    }

    .main {
        margin: 0.5rem;
        padding: 0.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        padding: 10px;
        gap: 10px;
    }

    .artwork-detail {
        padding: 10px;
    }

    .artwork-detail h1,
    .artwork-detail h2,
    .artwork-detail p {
        font-size: 1em;
        text-align: center; /* Center text for mobile */
    }

    .artwork-header {
        flex-direction: column;
        align-items: center;
    }

    .artwork-header h1 {
        font-size: 1.5em;
        margin-top: 10px;
    }

    .back-link {
        position: static;
        margin-bottom: 10px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .social-icons,
    .footer-logo,
    .footer-right {
        margin-bottom: 10px;
    }

    .social-icons-grid {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        justify-content: center;
    }

    .payment-icons {
        display: flex;
        justify-content: center;
    }
}

/* Tablet styles (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .wrapper {
        display: grid;
        grid-template-columns: 1fr 2fr; /* Two columns for tablet */
        grid-auto-rows: max-content;
    }

    .nav {
        width: auto;
        text-align: left;
    }

    .nav ul {
        align-items: flex-start;
    }

    .logo {
        width: auto;
        font-size: 35px;
    }

    .main {
        margin: 1rem;
        padding: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 2 or 3 columns */
        padding: 15px;
        gap: 15px;
    }

    .artwork-detail {
        padding: 15px;
        max-width: 700px;
    }

    .artwork-detail h1,
    .artwork-detail h2,
    .artwork-detail p {
        text-align: left;
    }

    .artwork-header {
        flex-direction: row;
        justify-content: space-between;
    }

    .artwork-header h1 {
        font-size: 2em;
        margin-top: 0;
    }

    .back-link {
        position: static;
        margin-right: 20px;
    }

    .footer-content {
        flex-direction: row;
        text-align: left;
    }
}

/* Desktop styles (1024px and above) */
@media (min-width: 1024px) {
    .wrapper {
        display: grid;
        grid-auto-rows: max-content;
        grid-template-columns: 1fr 3fr 1fr;
    }

    .nav {
        width: 200px;
    }

    .logo {
        width: 400px;
        font-size: 40px;
    }

    .main {
        margin: 1rem;
        padding: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .artwork-detail h2 {
        margin-top: 1em;
        text-align: left;
    }

    .artwork-detail ul,
    .artwork-detail p {
        text-align: left;
    }

    .artwork-header {
        flex-direction: row;
        justify-content: center;
    }

    .back-link {
        position: absolute;
        left: 0;
    }

    .footer-content {
        flex-direction: row;
    }
}
