.wm-collection-template,
.wm-collection-single {
    width: 100%;
    box-sizing: border-box;
}

.wm-collection-template *,
.wm-collection-template *::before,
.wm-collection-template *::after,
.wm-collection-single *,
.wm-collection-single *::before,
.wm-collection-single *::after {
    box-sizing: border-box;
}

/* Archive / shortcode */
.wm-collection-template {
    padding: 40px 0;
}

.wm-collection-template .wm-collection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 42px;
}

.wm-collection-template .wm-collection-heading h2 {
    margin: 0 0 8px;
    color: #111;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1;
    font-weight: 800;
}

.wm-collection-template .wm-collection-heading p {
    max-width: 460px;
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.wm-collection-template .wm-collection-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.wm-collection-template .wm-collection-filter {
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    background: #f1e2ff;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.wm-collection-template .wm-collection-filter.active,
.wm-collection-template .wm-collection-filter:hover {
    background: #a61600;
    color: #fff;
}

.wm-collection-template .wm-collection-grid {
    display: grid;
    width: 100%;
    transition: opacity 0.2s ease;
}

.wm-collection-template .wm-collection-grid.loading {
    opacity: 0.45;
    pointer-events: none;
}

.wm-collection-template .wm-collection-card {
    min-width: 0;
}

.wm-collection-template .wm-collection-card a {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.wm-collection-template .wm-collection-card img {
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.wm-collection-template .wm-collection-card:hover img {
    transform: scale(1.04);
}

.wm-collection-template .wm-collection-empty {
    grid-column: 1 / -1;
}

/* Single page */
.wm-collection-single {
    overflow-x: hidden;
    padding: 30px;
    background: #f2faf9;
}

.wm-collection-single > .ast-container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
}

.wm-collection-single-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Title section */
.wm-collection-title-section {
    width: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 36px;
    text-align: center;
}

.wm-collection-main-title {
    margin: 0;
    color: #000;
    font-size: clamp(42px, 7vw, 54px);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.wm-collection-main-title span {
    color: #b32000;
    font-style: italic;
}

/* Hero */
.wm-collection-single-hero {
    position: relative;
    width: 100%;
    height: clamp(260px, 56vw, 760px);
    overflow: hidden;
    border-radius: 25px;
    background: #000;
    margin-bottom: 50px;
}

.wm-collection-hero-native-video,
.wm-collection-hero-iframe,
.wm-collection-single-hero > img {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.wm-collection-hero-native-video,
.wm-collection-single-hero > img {
    object-fit: cover;
    object-position: center;
}

/* Gallery trigger */
.wm-gallery-trigger {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Lightbox */
.wm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0,0,0,0.94);
}

.wm-lightbox.is-active {
    display: flex;
}

.wm-lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wm-lightbox-media {
    width: 95vw;
    height: 90vh;
    object-fit: contain;
    display: block;
}

.wm-lightbox-close,
.wm-lightbox-prev,
.wm-lightbox-next {
    position: fixed;
    z-index: 1000000;
    border: 0;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.wm-lightbox-close {
    top: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 34px;
}

.wm-lightbox-prev,
.wm-lightbox-next {
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    transform: translateY(-50%);
    font-size: 34px;
}

.wm-lightbox-prev {
    left: 24px;
}

.wm-lightbox-next {
    right: 24px;
}

/* Intro cards */
.wm-collection-single-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 25px;
    margin-bottom: 34px;
}

.wm-collection-overview-card,
.wm-collection-deliverables-card,
.wm-collection-impact-card {
    min-width: 0;
    border-radius: 25px;
}

.wm-collection-overview-card {
    padding: 50px 30px;
    background: #d09ffd;
}

.wm-collection-overview-card span {
    display: inline-block;
    margin-bottom: 16px;
    border-radius: 999px;
    padding: 6px 10px;
    background: #592b84;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.wm-collection-overview-card h1,
.wm-collection-overview-card h2 {
    margin: 0 0 12px;
    color: #592b84;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 0.95;
    font-weight: 900;
}

.wm-collection-overview-card p,
.wm-collection-single-description {
    max-width: 620px;
    margin: 0;
    color: #592b84;
    font-size: 14px;
    line-height: 1.55;
}

.wm-collection-info-stack {
    display: grid;
    gap: 25px;
    min-width: 0;
}

.wm-collection-deliverables-card,
.wm-collection-impact-card {
    border-left: 5px solid;
    padding: 30px;
}

.wm-collection-deliverables-card {
    background: #e6f1e8;
    border-color: #507d5a;
}

.wm-collection-deliverables-card h3 {
    margin: 0 0 10px;
    color: #507d5a;
    font-size: 16px;
    font-weight: 900;
}

.wm-collection-deliverables-card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wm-collection-deliverables-card li {
    position: relative;
    padding-left: 30px;
    color: #333;
    font-size: 13px;
    line-height: 1.45;
    list-style: none;
}

.wm-collection-deliverables-card li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #477b52;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.wm-collection-impact-card {
    background: #f6e9e6;
    border-color: #a61600;
}

.wm-collection-impact-card h3 {
    margin: 0 0 10px;
    color: #a61600;
    font-size: 16px;
    font-weight: 900;
}

.wm-collection-impact-card strong {
    display: block;
    color: #b83320;
    font-size: clamp(34px, 5vw, 42px);
    line-height: 1;
    font-weight: 900;
}

.wm-collection-impact-card p {
    margin: 6px 0 0;
    color: #555;
    font-size: 12px;
}

/* Production archive */
.wm-collection-production {
    margin-top: 50px;
}

.wm-collection-production-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 30px;
}

.wm-collection-production-header h2 {
    margin: 0 0 5px;
    color: #111;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.wm-collection-production-header p {
    margin: 0;
    color: #555;
    font-size: 12px;
}

/* Gallery row flip */
.wm-collection-gallery-rows {
    display: grid;
    gap: 20px;
}

.wm-collection-gallery-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 600px;
    gap: 20px;
}

.wm-collection-gallery-item {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    /*border-radius: 25px;*/
    margin: 0;
    background: #ddd;
}

.wm-collection-gallery-item img,
.wm-collection-gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* CTA */
.wm-collection-cta {
    margin-top: 54px;
    padding: clamp(32px, 5vw, 54px) 24px;
    border-radius: 25px;
    background: #a61600;
    text-align: center;
}

.wm-collection-cta h2 {
    max-width: 767px;
    margin: 0 auto 22px;
    color: #fff;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.2;
    font-weight: 900;
}

.wm-collection-cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.wm-collection-cta-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 999px;
    padding: 12px 24px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.wm-collection-cta-actions a:first-child {
    background: #fff;
    color: #a61600;
}

/* Admin gallery preview */
#wm_collection_gallery_preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wm-gallery-admin-item {
    position: relative;
    width: 110px;
    height: 82px;
    overflow: hidden;
    border-radius: 10px;
    background: #111;
}

.wm-gallery-admin-item img,
.wm-gallery-admin-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wm-gallery-admin-video {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.wm-remove-gallery-item {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 2;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: #e60000;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}


/* Tablet */
@media (max-width: 991px) {
    .wm-collection-single {
        padding-left: 30px;
        padding-right: 30px;
    }

    .wm-collection-title-section {
        min-height: 140px;
    }

    .wm-collection-gallery-row {
        grid-template-rows: 260px 260px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .wm-collection-template {
        padding: 34px 0;
    }

    .wm-collection-template .wm-collection-header {
        flex-direction: column;
        gap: 20px;
    }

    .wm-collection-template .wm-collection-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .wm-collection-template .wm-collection-filters::-webkit-scrollbar {
        display: none;
    }

    .wm-collection-template .wm-collection-filter {
        flex: 0 0 auto;
    }

    .wm-collection-single {
        padding: 30px 20px;
    }
    
    /* Hero */
    .wm-work-single-hero {
        height: clamp(220px, 62vw, 420px);
        border-radius: 20px;
    }
    
    .wm-collection-title-section {
        min-height: auto;
        margin-bottom: 28px;
        padding-bottom: 0;
    }

    .wm-collection-main-title {
        font-size: clamp(36px, 7vw, 48px);
        line-height: 0.95;
    }

    .wm-collection-single-intro {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .wm-collection-gallery-row,
    .wm-collection-gallery-row.wm-gallery-row-rtl {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .wm-collection-production-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wm-lightbox {
        padding: 16px;
    }

    .wm-lightbox-prev,
    .wm-lightbox-next {
        width: 48px;
        height: 48px;
        font-size: 28px;
    }

    .wm-lightbox-prev {
        left: 10px;
    }

    .wm-lightbox-next {
        right: 10px;
    }

    .wm-lightbox-close {
        top: 12px;
        right: 12px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .wm-collection-template {
        padding: 30px 0;
    }

    .wm-collection-template .wm-collection-filter {
        padding: 7px 13px;
        font-size: 11px;
    }

    .wm-collection-single {
        padding: 30px 20px;
    }

    .wm-collection-main-title {
        font-size: clamp(28px, 6vw, 36px);
    }
    
    .wm-work-single-hero {
        height: clamp(200px, 70vw, 340px);
        border-radius: 15px;
    }

    .wm-collection-overview-card,
    .wm-collection-deliverables-card,
    .wm-collection-impact-card {
        padding: 20px;
        border-radius: 15px;
    }

    .wm-collection-gallery-row,
    .wm-collection-gallery-row.wm-gallery-row-rtl {
        grid-template-columns: 1fr;
    }

    .wm-collection-cta {
        margin-top: 36px;
        border-radius: 15px;
    }

    .wm-collection-cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .wm-collection-cta-actions a {
        width: 100%;
        max-width: 220px;
    }
}