:root {
    --page-bg: #fff9f2;
    --nav-bg: #2c2c2c00;
    --nav-text: #3a3a3a;
    --nav-text-hover: #c9a36a;
    --nav-height: 56px;
    --nav-gap: 2rem;
    --nav-font-size: 1.2rem;
    --box-bg: #ffffff;
    --box-border: #e0ddd4;
    --box-radius: 0px;
    --box-padding: 1.5rem;
    --box-gap: 1.5rem;
    --box-font-size: 1.15rem;
    --box-text-color: #2c2c2c;
    --box-title-size: 1.25rem;
}

#page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    align-items: center;
    background-color: var(--page-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.site-nav {
    background-color: var(--nav-bg);
    width: 100%;
    border-bottom: 1px solid #ccc;
    border-top: 1px solid #ccc;
}

.site-nav__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--nav-gap);
    height: var(--nav-height);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    color: var(--nav-text);
    text-decoration: none;
    font-size: var(--nav-font-size);
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
    color: var(--nav-text-hover);
}

/* Wrapper that holds boxes side by side */
.display-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two equal-width columns */
    gap: var(--box-gap);
    margin: 2rem 0;
}

/* Individual box */
.display-box {
    background-color: var(--page-bg);
    border: none;
    border-radius: var(--box-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: var(--box-padding);
    color: var(--box-text-color);
    font-size: var(--box-font-size);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.no-box-shadow {
    box-shadow: none;
}

.background-title {
    font-size: 3rem;
    color: var(--nav-text-hover);
    margin-bottom: 1rem;
}

.background-display {
    gap: 1rem;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.background-text {
    font-size: 1.2rem;
    color: var(--box-text-color);
    line-height: 1.5;
}

.display-box__img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--box-radius) - 2px);
    object-fit: cover;
}

.display-box__title {
    font-size: var(--box-title-size);
    margin: 0;
}

.display-box__text {
    margin: 0;
    line-height: 1.1;
}
.display-box__caption {
    font-size: 1.1rem;
    margin: 0;
}

.artist-name {
    font-size: 1.1rem;
    margin: 0;
    font-weight: bold;
}

.display-row--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--box-gap);
}

.display-box--large {
    grid-row: 1 / 3; /* spans both rows on the left */
}

.centered {
    text-align: center;
}

.red-text {
    color: rgb(228, 0, 0);
}

/* ---- Contact Page ---- */
.contact-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.contact-form-wrapper {
    width: 600px;
    margin: 0 auto; /* centers the invisible box inside display-box--large */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

.contact-form label {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--box-text-color);
    margin-bottom: -0.25rem;
    text-align: left; /* keeps labels left-aligned */
}

.contact-form input,
.contact-form textarea {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--box-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--box-text-color);
    background-color: var(--page-bg);
    transition: border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--nav-text-hover);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form__submit {
    background-color: var(--nav-text-hover);
    color: var(--nav-text);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    align-self: flex-start;
    transition: color 0.2s ease;
}

.contact-form__submit:hover {
    color: #fff9f2;

}

#preferredContactMethod {
    width: 100%;
}

.form-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.form-message--success {
    background-color: #e3f5e1;
    color: #2c662d;
}

.form-message--error {
    background-color: #fde2e2;
    color: #a83232;
}

.contact-form-padding {
    height: 20px; /* Adjust the height as needed */
}

.gallery-artist {
    margin: 2rem 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--box-border);
}

.gallery-artist__name {
    font-size: 1.5rem;
    margin: 0;
    color: var(--box-text-color);
}

.display-box__artist {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.6;
}

.display-box--empty {
    background: transparent;
    box-shadow: none;
    border: none;
}

/* ---- Gallery painting rows ---- */
.display-row--gallery {
    align-items: end;
}

.display-row--gallery .display-box {
    height: fit-content;
    text-align: right;
}

.display-row--gallery .display-box__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.site-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    border-top: 1px solid var(--box-border);
    text-align: center;
}

.site-footer__content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.site-footer__legal {
    font-size: 0.8rem;
    opacity: 0.6;
    margin: 0;
}

.gallery-artist__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gallery-artist__icon {
    height: 1.5rem; /* matches the gallery-artist__name font-size of 1.5rem */
    width: auto;
    display: block;
}

.gallery-artist__instagram-link {
    display: flex;
    align-items: center;
}

.gallery-artist__instagram-link:hover {
    opacity: 0.7;
}

.gallery-artist__email {
    font-size: 1rem;
    color: #888;
    text-decoration: none;
}

.gallery-artist__email:hover {
    color: var(--nav-text-hover);
}

@media (max-width: 768px) {

    /* ---- Page container ---- */
    #page-container {
        padding: 10px;
    }

    /* ---- Header: stack title and subtitle vertically and center ---- */
    .headers {
        text-align: center;
        padding: 1rem 0.5rem;
    }

    .page-title {
        font-size: 1.75rem;
        margin: 0 0 0.25rem 0;
    }

    .page-subtitle {
        font-size: 1rem;
        margin: 0;
    }

    /* ---- Nav: wrap links vertically ---- */
    .site-nav__list {
        flex-direction: column;
        height: auto;
        padding: 0.75rem 0;
        gap: 0.5rem;
    }

    .site-nav__link {
        font-size: 1rem;
        padding: 0.25rem 0;
        display: block;
        text-align: center;
    }

    /* ---- All display rows become single column ---- */
    .display-row,
    .display-row--split {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        margin: 1rem 0;
        gap: 1rem;
    }

    /* ---- Cancel all grid spanning on mobile ---- */
    .display-box--large {
        grid-row: auto;
        grid-column: auto;
    }

    /* ---- Reduce box padding ---- */
    .display-box {
        padding: 1rem;
    }

    /* ---- Contact form ---- */
    .contact-form-wrapper {
        width: 100%;
    }

    .contact-form {
        max-width: 100%;
    }

    .contact-form__submit {
        align-self: stretch;
        text-align: center;
    }

    /* ---- Gallery ---- */
    .gallery-artist {
        margin: 1rem 0 0.5rem 0;
    }

    /* ---- Background sections ---- */
    .background-display {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    .background-title {
        font-size: 2rem;
    }

    /* ---- Hide empty filler boxes on mobile ---- */
    .display-box--empty {
        display: none;
    }
    .display-row--gallery {
    align-items: start; /* back to normal stacking on mobile */
    text-align: right;
    }
    .display-row--gallery .display-box {
    text-align: right;
    }
}