.project-header {
	background-image: url(/images/projects/pond-poster/pond-poster-hero.jpg);
}

/* Reset global button styles for pond poster controls */

.pond-pip,
.pond-info-nav,
.pond-info-close-button {
    all: unset;
    box-sizing: border-box;
}

.pond-poster-column {
    display: flex;
    flex-direction: column;
    gap: var(--gap-2x);
}

.pond-poster-wrapper {
    position: relative;
    width: 100%;
    border-radius: 2rem;
    overflow: hidden;
    background-color: var(--pond-cream);
}

.pond-poster-image {
    display: block;
    width: 100%;
    height: auto;
}

.pond-poster-pips {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pond-pip {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    border: none;
    background-color: var(--pond-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pond-dark-orange);
    font-size: 1rem;
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
}

.pond-pip span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pond-dark-orange);
    opacity: 0;
    transform: translateY(1px); /* optical centering for numbers without descenders */
}

.pond-pip.is-active {
    width: 2rem;
    height: 2rem;
    background-color: var(--pond-dark-orange);
    border: none;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 0 0.25rem rgba(0, 0, 0, 0.18);
}

.pond-pip.is-active span {
    opacity: 1;
    color: var(--pond-cream);
}

.pond-pip.is-active::after {
    content: "";
    position: absolute;
    inset: -0.2rem;
    border-radius: inherit;
    background-color: var(--pond-orange);
    opacity: 0;
    animation: pond-pip-pulse 1.8s ease-out infinite;
    z-index: -1;
}

@keyframes pond-pip-pulse {
    0% {
        opacity: 0.85;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* --- INFO PANEL --- */

.pond-info-panel {
    display: flex;
    flex-direction: column;
    gap: var(--gap-2x);
    padding: 1.75rem 2.25rem 1.5rem;
    border-radius: 2rem;
    background-color: var(--pond-cream);
    box-sizing: border-box;
    color: var(--pond-pine-green);
}

.pond-info-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pond-info-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--pond-dark-orange);
}

.pond-info-label-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pond-info-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    aspect-ratio: 1 / 1;
    flex: 0 0 2.5rem;
    background-color: var(--pond-dark-orange);
    color: var(--pond-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* needed so inner span's absolute positioning is relative to the circle */
}

.pond-info-number span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    transform: translateY(1px); /* optical centering for numbers without descenders */
}

.pond-info-label {
    text-transform: lowercase;
    color: var(--pond-dark-orange);
}

.pond-info-latin {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--pond-pine-green);
}

.pond-info-nominator {
    font-size: 1.25rem;
    color: var(--pond-pine-green);
}

.pond-info-link {
    font-size: 1rem;
    text-decoration: underline;
    color: var(--pond-dark-orange);
}

.pond-info-body {
    overflow-y: auto;
    padding: 1rem 1.25rem 0.75rem 1.25rem;
    padding-right: 2.25rem; /* extra space for scrollbar */
    height: 15rem;
    border-radius: 1.5rem;
    border: 2px solid var(--pond-dark-orange);
    background-color: var(--pond-cream);
    position: relative;
    box-sizing: border-box;
}

/* --- POSTER CALLOUT --- */

#poster-callout {
    background-color: var(--gray90-transparent-10);
    text-align: center;
}

#poster-callout img {
    width: 100%;
    max-width: 400px;
    border-radius: 1rem;
}

/* --- POSTER ITERATION --- */
.poster-iteration img {
    border-radius: 1rem;
}


/* --- FIELD GUIDE LIST (below poster) --- */

.pond-species-list {
    display: flex;
    flex-direction: column;
    gap: var(--gap-1x);
    margin: 0 auto;
}

.pond-species-item {
    border-top: 1px solid var(--pond-dark-orange);
}

.pond-species-item:last-child {
    border-bottom: 1px solid var(--pond-dark-orange);
}

.pond-species-item-header {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    gap: 0.75rem;
    cursor: pointer;
}

.pond-species-item-header::after {
    content: "";
    margin-left: auto;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--pond-cream);
    border-bottom: 2px solid var(--pond-cream);
    transform: rotate(45deg);
    transition: transform .5s ease;
}

.pond-species-item-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pond-species-item-name {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.1;
}

.pond-species-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .75s ease;
}

.pond-species-item-content {
    padding: 0 0 2rem 0;
}

.pond-species-item-latin {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.pond-species-item-nominator {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
}

.pond-species-item-link {
    display: inline-block;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    text-decoration: underline;
    color: var(--pond-dark-orange);
}

.pond-species-item-text {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.pond-species-item.is-open .pond-species-item-header::after {
    transform: rotate(225deg);
}

.pond-info-nav {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 2px solid var(--pond-dark-orange);
    background-color: var(--pond-cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 1rem 1rem;
    background-repeat: no-repeat;
    background-position: center;
}

.pond-info-nav-prev {
    background-image: url('/images/projects/pond-poster/dark-orange-arrow-left.svg');
}

.pond-info-nav-next {
    background-image: url('/images/projects/pond-poster/dark-orange-arrow-right.svg');
}

.pond-info-counter {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pond-info-open-button.button {
    display: none; /* hidden by default */
}

/* Show open button only when info panel is in modal mode */
@media screen and (max-width: 899px) {
    .pond-info-open-button.button {
        display: block;
        align-self: center;
    }
}

.pond-info-close-button {
    align-self: flex-end;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    background: transparent;
    color: transparent; /* hide the text X visually */
    cursor: pointer;
    font-size: 1.25rem;
    display: none; /* hidden on desktop/tablet */
    background-image: url('/images/projects/pond-poster/close-dark-gray.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.25rem 1.25rem;
}

.pond-info-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
    z-index: 40;
}

/* Sticky behavior on larger screens */

@media screen and (min-width: 900px) {
    .pond-info-panel {
        position: sticky;
        top: var(--gap-7x);
        max-height: calc(100vh - var(--gap-9x));
    }
}

/* Mobile modal behavior */

@media screen and (max-width: 899px) {
    .pond-info-panel {
        position: fixed;
        left: 50%;
        bottom: 1.5rem;
        transform: translateX(-50%) translateY(calc(100% + 5.5rem));
        width: calc(min(100vw, var(--page)) - 2rem);
        max-height: 80vh;
        z-index: 50;
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.25);
        transition: transform .5s ease;
        padding-top: 1.25rem;
        /* Extra space so bottom nav can sit clear of content */
        padding-bottom: 4.25rem;
    }

    .pond-info-panel.is-open {
        transform: translateX(-50%) translateY(0);
    }

    .pond-info-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    /* Hide the long text body on smaller devices */
    .pond-info-body {
        display: none;
    }

    /* Anchor the prev/next controls to the bottom of the
       fixed info panel so they stay in a consistent
       position as content height changes. */
    .pond-info-nav-container {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 1.25rem;
        padding: 0 2.25rem;
        margin-bottom: 0;
        border-bottom: none;
    }

    .pond-info-close-button {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -3.5rem;
        right: 0;
        width: 3rem;
        height: 3rem;
        padding: 0;
        border-radius: 999px;
        background-color: var(--pond-cream);
        background-image: url('/images/projects/pond-poster/close-dark-gray.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: 1.5rem 1.5rem;
        z-index: 60;
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.25);
    }
}
