:root {
    --background-color: #C3EA59;
    --text-color: #172DC1;
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4%;
    background: #172DC1;
    border-bottom: 1px solid #C3EA59;
    position: relative;
    z-index: 1000;
}

.nav-logo a {
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    color: #C3EA59;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #C3EA59;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #E34A99;
}

/* Desktop Dropdown Behavior */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #172DC1;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid #E34A99;
    border-radius: 4px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
    }

    .menu-toggle .bar {
        width: 100%;
        height: 2px;
        background-color: #C3EA59;
        transition: 0.3s;
    }

    /* Transform Hamburger into an 'X' when open */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #E34A99;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0;
        border-bottom: 1px solid #E34A99;
        display: none;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 1rem 4%;
        width: 100%;
    }

    /* Dynamic Mobile Dropdown Adjustment */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #E34A99;
        padding-left: 1.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .dropdown.open .dropdown-menu {
        max-height: 300px;
    }
}

html,
body {
    box-sizing: border-box;
    background-color: var(--background-color);
    color: var(--text-color);
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
}

a {
    color: var(--text-color);
}

.artwork-link {
    text-decoration-color: var(--text-color);
}

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

.site-page .artwork-directory {
    flex: 1;
    padding-bottom: 24px;
}

.exhibition-header,
.exhibition-footer,
.artwork-directory,
.about-content {
    width: min(100% - 32px, 1200px);
    margin-left: auto;
    margin-right: auto;
}

.exhibition-header,
.about-content {
    padding: 24px 0 40px;
}

.exhibition-header h1,
.exhibition-header h2,
.exhibition-header p,
.artwork-directory h3,
.artwork-directory p,
.about-content h1,
.about-content p {
    margin-top: 0;
}

.artwork-directory {
    padding: 12px 0 24px;
}

.about-content {
    flex: 1;
    width: min(100% - 32px, 760px);
}

.about-content h1 {
    margin: 0 0 24px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.1;
}

.about-content h1:not(:first-child) {
    margin-top: 48px;
}

.about-content p {
    max-width: 68ch;
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.7;
}

.minimal-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.artwork-item {
    min-width: 0;
}

.artwork-link {
    display: block;
    padding: 12px;
    border: 1px solid currentColor;
    border-radius: 6px;
    text-decoration: none;
}

.artwork-link strong,
.artwork-desc {
    display: block;
}

.site-footer {
    color: #172DC1;
    padding: 20px 0;
    font-family: sans-serif;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: var(--background-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-info p {
    margin: 0;
    font-size: 14px;
    text-align: center;
}

.footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    order: -1;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-color);
}

.footer-socials svg {
    width: 24px;
    height: 24px;
    display: block;
    transition: transform 0.2s ease;
}

.footer-socials a:hover svg,
.footer-socials a:focus-visible svg {
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .exhibition-header {
        padding: 16px 0 8px;
    }

    .about-content {
        width: min(100% - 32px, 760px);
        padding: 24px 0 32px;
    }

    .about-content h1 {
        margin-bottom: 18px;
        font-size: clamp(1.65rem, 8vw, 2.2rem);
    }

    .about-content h1:not(:first-child) {
        margin-top: 36px;
    }

    .about-content p {
        margin-bottom: 16px;
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .exhibition-header h1,
    .about-content h1 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
    }

    .exhibition-header h2,
    .about-content h2 {
        font-size: 1.2rem;
    }

    .artwork-directory,
    .about-content {
        padding: 8px 0 16px;
    }

    .minimal-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .artwork-link {
        padding: 9px;
        font-size: 0.9rem;
    }

    .site-footer {
        padding: 16px 0 24px;
    }

    .footer-container {
        text-align: center;
        gap: 16px;
    }

    .footer-info p {
        font-size: 13px;
    }

    .footer-socials {
        gap: 16px;
    }

    .footer-socials a {
        width: 44px;
        height: 44px;
    }
}