:root {
    --sand: #f6ead7;
    --sea: #168aad;
    --deep-sea: #0b4f6c;
    --sun: #f6c453;
    --white: #ffffff;
    --text: #24323f;
    --muted: #6b7c8f;
    --line: rgba(36, 50, 63, .1);
    --shadow: 0 22px 70px rgba(15, 63, 84, .14);
}

* {
    box-sizing: border-box;
}

body.travel-album {
    margin: 0;
    background: linear-gradient(180deg, #fffaf2 0%, var(--sand) 52%, #fffdf8 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.travel-album.has-album-background {
    background: #f7efe2;
    position: relative;
}

body.travel-album.has-album-background::before,
body.travel-album.has-album-background::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.travel-album.has-album-background::before {
    z-index: 0;
    background-image: var(--album-bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.travel-album.has-album-background::after {
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(255, 250, 242, .08), rgba(246, 234, 215, .16)),
        rgba(255, 255, 255, var(--album-bg-opacity, .18));
}

.has-album-background .album-hero,
.has-album-background main,
.has-album-background .album-footer,
.has-album-background .album-lightbox {
    position: relative;
    z-index: 1;
}

.has-album-background .album-lightbox {
    position: fixed;
    z-index: 9999;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.album-hero {
    min-height: 70vh;
    width: 100%;
    position: relative;
    display: grid;
    align-items: center;
    overflow: hidden;
    background: var(--deep-sea);
}

.album-hero__backdrop,
.album-hero__image,
.album-hero__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.album-hero__backdrop {
    object-fit: cover;
    filter: blur(18px);
    opacity: .62;
    transform: scale(1.08);
}

.album-hero__image {
    object-fit: contain;
    object-position: center;
    padding: 28px;
}

.album-hero__overlay {
    background:
        linear-gradient(90deg, rgba(8, 34, 46, .78) 0%, rgba(8, 34, 46, .48) 48%, rgba(8, 34, 46, .18) 100%),
        linear-gradient(180deg, rgba(8, 34, 46, .1) 0%, rgba(8, 34, 46, .38) 100%);
}

.album-hero__content {
    position: relative;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0;
    color: var(--white);
}

.album-kicker,
.section-label {
    margin: 0 0 14px;
    color: var(--sun);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.album-hero h1 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(44px, 8vw, 92px);
    line-height: .95;
    letter-spacing: 0;
}

.album-hero__dates {
    margin: 20px 0 0;
    font-size: clamp(19px, 3vw, 28px);
    color: #fff6df;
    font-weight: 700;
}

.album-hero__description {
    max-width: 680px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .9);
    font-size: 19px;
    line-height: 1.65;
}

.album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.album-meta--hero {
    margin-top: 26px;
}

.album-meta span,
.album-action {
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: var(--white);
    padding: 10px 14px;
    backdrop-filter: blur(12px);
    font-weight: 700;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.album-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 28px;
    margin: -54px auto 42px;
    position: relative;
    z-index: 2;
}

.album-intro > div,
.intro-panel,
.story-card {
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: 28px;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.has-album-background .album-intro > div,
.has-album-background .intro-panel,
.has-album-background .story-card {
    background: rgba(255, 255, 255, .84);
    border-color: rgba(255, 255, 255, .7);
}

.album-intro > div {
    padding: clamp(24px, 4vw, 42px);
}

.album-intro h2,
.story-card h2 {
    margin: 0;
    color: var(--deep-sea);
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: 0;
}

.album-intro p,
.story-card p {
    color: var(--muted);
    line-height: 1.75;
    font-size: 17px;
}

.intro-panel {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.intro-panel div {
    border-radius: 20px;
    background: #fff8ea;
    padding: 18px;
    border: 1px solid var(--line);
}

.has-album-background .intro-panel div {
    background: rgba(255, 248, 234, .78);
}

.intro-panel span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.intro-panel strong {
    color: var(--text);
    font-size: 18px;
}

.album-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 42px;
}

.album-action {
    border-color: rgba(11, 79, 108, .14);
    background: var(--white);
    color: var(--deep-sea);
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    box-shadow: 0 10px 28px rgba(15, 63, 84, .08);
}

.album-action--primary {
    background: var(--sea);
    color: var(--white);
}

.share-status {
    color: var(--muted);
    font-size: 14px;
}

.album-story {
    display: grid;
    gap: 36px;
    padding-bottom: 70px;
}

.story-card {
    padding: clamp(20px, 4vw, 36px);
}

.story-card__header {
    margin-bottom: 24px;
}

.story-card__header p {
    max-width: 780px;
}

.travel-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.layout-grid_4 .travel-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.layout-grid_4 .gallery-item img {
    aspect-ratio: 4 / 3;
}

.layout-collage .travel-gallery {
    grid-template-columns: 1.3fr .7fr .7fr;
    grid-auto-rows: 160px;
    gap: 18px;
}

.layout-collage .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.layout-collage .gallery-item:nth-child(4) {
    grid-column: span 2;
}

.layout-collage .gallery-item img {
    height: 100%;
    aspect-ratio: auto;
}

.gallery-item {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 22px;
    padding: 0;
    overflow: hidden;
    background: #e9dcc8;
    cursor: zoom-in;
    box-shadow: 0 16px 42px rgba(15, 63, 84, .13);
    color: inherit;
    text-decoration: none;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .45s ease;
}

.gallery-item:hover img {
    transform: scale(1.045);
}

.qr-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    color: var(--deep-sea);
    font-weight: 800;
    text-decoration: none;
}

.qr-link img {
    width: 86px;
    height: 86px;
    border-radius: 16px;
    background: var(--white);
    padding: 8px;
    box-shadow: 0 12px 28px rgba(15, 63, 84, .12);
}

.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: rgba(5, 22, 31, .92);
    padding: 28px;
}

.album-lightbox[hidden] {
    display: none;
}

.album-lightbox img {
    max-width: min(1120px, 86vw);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 24px 90px rgba(0, 0, 0, .44);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
    color: var(--white);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.lightbox-close {
    top: 22px;
    right: 22px;
    border-radius: 999px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 800;
}

.lightbox-nav {
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 38px;
    line-height: 1;
    transform: translateY(-50%);
}

.lightbox-nav--prev {
    left: 22px;
}

.lightbox-nav--next {
    right: 22px;
}

.album-footer {
    padding: 34px 18px 44px;
    text-align: center;
    color: var(--muted);
    background: #fff8ea;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .album-intro {
        grid-template-columns: 1fr;
        margin-top: -34px;
    }

    .travel-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .layout-collage .travel-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .layout-collage .gallery-item:first-child,
    .layout-collage .gallery-item:nth-child(4) {
        grid-column: span 2;
        grid-row: auto;
    }

    .layout-collage .gallery-item img {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 620px) {
    .album-hero {
        min-height: 58vh;
    }

    .album-hero__content {
        width: min(100% - 28px, 1120px);
        padding: 54px 0;
    }

    .album-hero h1 {
        font-size: clamp(36px, 13vw, 54px);
    }

    .album-hero__description,
    .album-intro p,
    .story-card p {
        font-size: 16px;
    }

    main {
        width: min(100% - 24px, 1180px);
    }

    .album-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .album-action {
        justify-content: center;
        text-align: center;
    }

    .travel-gallery {
        grid-template-columns: 1fr;
    }

    .layout-grid_4 .travel-gallery,
    .layout-collage .travel-gallery {
        grid-template-columns: 1fr;
    }

    .layout-collage .gallery-item:first-child,
    .layout-collage .gallery-item:nth-child(4) {
        grid-column: auto;
    }

    .layout-collage .gallery-item img {
        aspect-ratio: 4 / 3;
    }

    .story-card,
    .album-intro > div,
    .intro-panel {
        border-radius: 22px;
    }

    .album-lightbox {
        padding: 16px;
    }

    .lightbox-nav {
        bottom: 24px;
        top: auto;
        transform: none;
    }

    .lightbox-nav--prev {
        left: calc(50% - 64px);
    }

    .lightbox-nav--next {
        right: calc(50% - 64px);
    }
}
