/* =========================================================
   DIGITAL HERITAGE GUYANA
   HOMEPAGE INTRODUCTION
   ========================================================= */

.dhg-introduction {
    position: relative;
    overflow: hidden;
    padding: 140px 0 150px;
    color: #173b2d;
    background:
        radial-gradient(
            circle at 88% 22%,
            rgba(196, 153, 75, 0.13),
            transparent 31%
        ),
        linear-gradient(
            180deg,
            #f6f1e7 0%,
            #fbfaf6 100%
        );
}

.dhg-introduction::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(1220px, calc(100% - 48px));
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(141, 107, 45, 0.45),
        transparent
    );
}

.dhg-introduction-inner {
    position: relative;
    z-index: 2;
    width: min(980px, calc(100% - 48px));
    margin: 0 auto;
    text-align: center;
}

.dhg-introduction-label {
    margin: 0 0 20px;
    color: #7a5d27;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.dhg-introduction h2 {
    margin: 0;
    color: #173b2d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.dhg-introduction-statement {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
    margin: 38px auto 0;
    color: #7a5d27;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    line-height: 1.5;
}

.dhg-introduction-statement span {
    position: relative;
}

.dhg-introduction-statement span:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -18px;
    color: rgba(141, 107, 45, 0.55);
}

.dhg-introduction-copy {
    max-width: 780px;
    margin: 34px auto 0;
    color: #4d5e55;
    font-size: clamp(1rem, 1.35vw, 1.14rem);
    line-height: 1.85;
}

.dhg-introduction-copy + .dhg-introduction-copy {
    margin-top: 20px;
}

.dhg-introduction-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 42px;
    padding: 15px 24px;
    border: 1px solid #173b2d;
    color: #173b2d;
    text-decoration: none;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.dhg-introduction-button span {
    transition: transform 0.25s ease;
}

.dhg-introduction-button:hover,
.dhg-introduction-button:focus-visible {
    color: #fff;
    background: #173b2d;
    transform: translateY(-3px);
}

.dhg-introduction-button:hover span,
.dhg-introduction-button:focus-visible span {
    transform: translateX(5px);
}

.dhg-introduction-mark {
    position: absolute;
    right: -0.04em;
    bottom: -0.22em;
    z-index: 1;
    color: rgba(23, 59, 45, 0.035);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(10rem, 27vw, 27rem);
    font-weight: 700;
    line-height: 0.8;
    letter-spacing: -0.08em;
    pointer-events: none;
    user-select: none;
}

/* Entrance animation */

.dhg-introduction-label,
.dhg-introduction h2,
.dhg-introduction-statement,
.dhg-introduction-copy,
.dhg-introduction-button {
    opacity: 0;
    transform: translateY(28px);
    animation: dhg-introduction-reveal 0.9s ease forwards;
}

.dhg-introduction-label {
    animation-delay: 0.1s;
}

.dhg-introduction h2 {
    animation-delay: 0.2s;
}

.dhg-introduction-statement {
    animation-delay: 0.35s;
}

.dhg-introduction-copy:nth-of-type(2) {
    animation-delay: 0.5s;
}

.dhg-introduction-copy:nth-of-type(3) {
    animation-delay: 0.62s;
}

.dhg-introduction-button {
    animation-delay: 0.75s;
}

@keyframes dhg-introduction-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet */

@media screen and (max-width: 900px) {
    .dhg-introduction {
        padding: 105px 0 115px;
    }

    .dhg-introduction-statement {
        flex-direction: column;
        gap: 4px;
    }

    .dhg-introduction-statement span:not(:last-child)::after {
        display: none;
    }
}

/* Mobile */

@media screen and (max-width: 600px) {
    .dhg-introduction {
        padding: 82px 0 92px;
    }

    .dhg-introduction-inner {
        width: calc(100% - 30px);
    }

    .dhg-introduction h2 {
        font-size: clamp(2.8rem, 15vw, 4.6rem);
    }

    .dhg-introduction-statement {
        margin-top: 28px;
        font-size: 1rem;
    }

    .dhg-introduction-copy {
        margin-top: 27px;
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .dhg-introduction-button {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .dhg-introduction-label,
    .dhg-introduction h2,
    .dhg-introduction-statement,
    .dhg-introduction-copy,
    .dhg-introduction-button {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* Introduction reveal after hero exit */

/* Introduction is visible by default */
#digital-heritage-introduction {
    opacity: 1;
    transform: none;
    transition:
        opacity 1s ease,
        transform 1s ease;
}

/* Hide it only when JavaScript confirms the transition is available */
html.dhg-js #digital-heritage-introduction.dhg-awaiting-reveal {
    opacity: 0;
    transform: translateY(35px);
}

html.dhg-js #digital-heritage-introduction.dhg-section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Featured Collections reveals as the page continues */

#featured-collections {
    animation: dhg-featured-arrival 1s ease both;
    animation-delay: 0.35s;
}

@keyframes dhg-featured-arrival {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove empty Omeka blocks from the Introduction section */
.dhg-introduction .block-html:not(:has(*)),
.dhg-introduction .block-html:has(p:only-child:empty) {
    display: none !important;
}

/* Remove Omeka block-container card styling */
.dhg-introduction .blocks,
.dhg-introduction .blocks-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.dhg-introduction .block-html {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Remove empty Omeka blocks from the Introduction section */
.dhg-introduction .block-html:not(:has(*)),
.dhg-introduction .block-html:has(p:only-child:empty) {
    display: none !important;
}

.dhg-introduction .blocks,
.dhg-introduction .blocks-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.dhg-introduction .block-html {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Tighten the Introduction section after the hero transition */
.dhg-introduction {
    min-height: 0 !important;
    padding-top: 70px !important;
    padding-bottom: 100px !important;
}

.dhg-introduction-inner {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.dhg-introduction .blocks,
.dhg-introduction .blocks-inner,
.dhg-introduction .block-html {
    min-height: 0 !important;
}


/* Tighten the Introduction section after the hero transition */
.dhg-introduction {
    min-height: 0 !important;
    padding-top: 70px !important;
    padding-bottom: 100px !important;
}

.dhg-introduction-inner {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.dhg-introduction .blocks,
.dhg-introduction .blocks-inner,
.dhg-introduction .block-html {
    min-height: 0 !important;
}

/* Temporary layout debugger */
#digital-heritage-introduction {
    outline: 4px solid red !important;
}

#digital-heritage-introduction .blocks {
    outline: 4px solid blue !important;
}

#digital-heritage-introduction .blocks-inner {
    outline: 4px solid yellow !important;
}

#digital-heritage-introduction .block-html {
    outline: 4px solid lime !important;
}

#digital-heritage-introduction .dhg-introduction-inner {
    outline: 4px solid purple !important;
}

/* =========================================================
   FEATURED COLLECTIONS — FINAL DISPLAY
   ========================================================= */

#featured-collections,
.dhg-featured-collections {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 600px !important;
    margin: 0 !important;
    padding: 110px 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;

    background:
        linear-gradient(
            180deg,
            #1f4739 0%,
            #2c5a49 55%,
            #3a6a56 100%
        ) !important;
}

#featured-collections .dhg-featured-inner,
#featured-collections .dhg-featured-heading,
#featured-collections .dhg-featured-grid,
#featured-collections .dhg-collection-card,
#featured-collections .dhg-card-content {
    visibility: visible !important;
    opacity: 1 !important;
}

#featured-collections .dhg-featured-heading h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

#featured-collections .dhg-featured-label {
    color: #f1d391 !important;
}

#featured-collections .dhg-featured-intro {
    color: rgba(255, 255, 255, 0.9) !important;
}

#featured-collections .dhg-featured-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
}

#featured-collections .dhg-collection-card {
    display: flex !important;
    min-height: 500px !important;
    align-items: flex-end !important;
}

#featured-collections {
    scroll-margin-top: 20px;
}

@media screen and (max-width: 900px) {
    #featured-collections .dhg-featured-grid {
        grid-template-columns: 1fr !important;
    }

}
    
/* ===== FINAL FEATURED COLLECTIONS TEXT FIX ===== */

#featured-collections h2,
#featured-collections h3,
#featured-collections p,
#featured-collections a {
    color: #ffffff !important;
}

#featured-collections .dhg-featured-label {
    color: #f1d391 !important;
}

#featured-collections .dhg-card-category,
#featured-collections .dhg-card-link {
    color: #f1d391 !important;

}

/* =========================================================
   FEATURED COLLECTIONS LAYOUT RESET
   ========================================================= */

#featured-collections .dhg-featured-inner {
    width: min(1220px, calc(100% - 48px)) !important;
    max-width: 1220px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

#featured-collections .dhg-featured-heading {
    max-width: 760px !important;
    margin: 0 0 58px 0 !important;
    padding: 0 !important;
}

#featured-collections .dhg-featured-label {
    margin: 0 0 17px !important;
    color: #f1d391 !important;
}

#featured-collections .dhg-featured-heading h2 {
    margin: 0 !important;
    color: #ffffff !important;
}

#featured-collections .dhg-featured-intro {
    max-width: 690px !important;
    margin: 26px 0 0 !important;
    color: rgba(255,255,255,.9) !important;
}

@media screen and (max-width: 600px) {
    #featured-collections .dhg-featured-inner {
        width: calc(100% - 30px) !important;
    }
}

/* =========================================================
   FEATURED COLLECTIONS — POLISHED FINAL VERSION
   ========================================================= */

#featured-collections {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 120px 0 130px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(225, 185, 100, 0.11),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #264d40 0%,
            #1f4036 48%,
            #18352d 100%
        );
    scroll-margin-top: 20px;
}

#featured-collections::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(1180px, calc(100% - 48px));
    height: 1px;
    transform: translateX(-50%);
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(241, 211, 145, 0.42),
            transparent
        );
}

#featured-collections .dhg-featured-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

#featured-collections .dhg-featured-heading {
    max-width: 780px;
    margin: 0 0 62px;
}

#featured-collections .dhg-featured-label {
    margin: 0 0 17px;
    color: #f1d391;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

#featured-collections .dhg-featured-heading h2 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

#featured-collections .dhg-featured-intro {
    max-width: 700px;
    margin: 27px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.35vw, 1.12rem);
    line-height: 1.8;
}

#featured-collections .dhg-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

#featured-collections .dhg-collection-card {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(241, 211, 145, 0.18);
    color: #ffffff;
    text-decoration: none;
    background-color: #1a3328;
    background-position: center;
    background-size: cover;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

#featured-collections .dhg-collection-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: inherit;
    background-position: center;
    background-size: cover;
    transition: transform 0.8s ease;
}

#featured-collections .dhg-card-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            180deg,
            rgba(5, 13, 10, 0.06) 0%,
            rgba(5, 13, 10, 0.22) 44%,
            rgba(5, 13, 10, 0.94) 100%
        );
}

#featured-collections .dhg-card-content {
    width: 100%;
    padding: 36px;
}

#featured-collections .dhg-card-number {
    position: absolute;
    top: 27px;
    right: 29px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

#featured-collections .dhg-card-category {
    margin: 0 0 11px;
    color: #f1d391;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

#featured-collections .dhg-card-content h3 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

#featured-collections .dhg-card-description {
    max-width: 520px;
    margin: 17px 0 25px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.96rem;
    line-height: 1.68;
}

#featured-collections .dhg-card-link {
    display: inline-flex;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(241, 211, 145, 0.68);
    color: #f1d391;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

#featured-collections .dhg-collection-card:hover,
#featured-collections .dhg-collection-card:focus-visible {
    transform: translateY(-8px);
    border-color: rgba(241, 211, 145, 0.55);
    box-shadow: 0 28px 55px rgba(0, 0, 0, 0.25);
}

#featured-collections .dhg-collection-card:hover::before,
#featured-collections .dhg-collection-card:focus-visible::before {
    transform: scale(1.045);
}

#featured-collections .dhg-collection-card:focus-visible {
    outline: 3px solid #f1d391;
    outline-offset: 4px;
}

/* Collection identities */

#featured-collections .dhg-card-barima {
    background-image:
        linear-gradient(
            rgba(10, 25, 18, 0.04),
            rgba(10, 25, 18, 0.04)
        ),
        url("/s/themes/DigitalHeritageGY/asset/img/mv-barima.webp");
}

#featured-collections .dhg-card-communities {
    background:
        linear-gradient(135deg, #75523a, #26483b);
}

#featured-collections .dhg-card-music {
    background:
        linear-gradient(135deg, #896435, #1d463d);
}

#featured-collections .dhg-card-oral-history {
    background:
        linear-gradient(135deg, #6b4a38, #263b34);
}

#featured-collections .dhg-card-digital-humanities {
    background:
        linear-gradient(135deg, #354d49, #1b3632);
}

#featured-collections .dhg-card-ethnomusicology {
    background:
        linear-gradient(135deg, #243455, #174144);
}

#featured-collections .dhg-card-education {
    background:
        linear-gradient(135deg, #887048, #345443);
}

/* Tablet */

@media screen and (max-width: 900px) {
    #featured-collections {
        padding: 92px 0 105px;
    }

    #featured-collections .dhg-featured-grid {
        grid-template-columns: 1fr;
    }

    #featured-collections .dhg-collection-card {
        min-height: 430px;
    }
}

/* Mobile */

@media screen and (max-width: 600px) {
    #featured-collections {
        padding: 72px 0 82px;
    }

    #featured-collections .dhg-featured-inner {
        width: calc(100% - 30px);
    }

    #featured-collections .dhg-featured-heading {
        margin-bottom: 38px;
    }

    #featured-collections .dhg-collection-card {
        min-height: 370px;
    }

    #featured-collections .dhg-card-content {
        padding: 27px 23px;
    }

    #featured-collections .dhg-card-number {
        top: 21px;
        right: 21px;
    }
}

/* =========================================================
   FEATURED COLLECTIONS — CLICKABLE CARD LAYER
   ========================================================= */

#featured-collections::before {
    pointer-events: none !important;
}

#featured-collections .dhg-featured-inner,
#featured-collections .dhg-featured-grid {
    position: relative !important;
    z-index: 3 !important;
}

#featured-collections .dhg-collection-card {
    position: relative !important;
    z-index: 4 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

#featured-collections .dhg-card-overlay {
    pointer-events: none !important;
}

#featured-collections .dhg-card-content {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* =========================================================
   FEATURED COLLECTIONS — CAROUSEL
   ========================================================= */

#featured-collections .dhg-collection-carousel {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 18px;
    align-items: center;
}

#featured-collections .dhg-carousel-window {
    overflow: hidden;
    width: 100%;
}

#featured-collections .dhg-featured-grid {
    display: flex !important;
    gap: 22px !important;
    width: 100%;
    transition: transform 0.45s ease;
    will-change: transform;
}

#featured-collections .dhg-collection-card {
    flex: 0 0 calc((100% - 22px) / 2);
    min-width: 0;
}

#featured-collections .dhg-carousel-arrow {
    width: 52px;
    height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(241, 211, 145, 0.45);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);
    color: #f1d391;

    font-size: 1.35rem;
    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

#featured-collections .dhg-carousel-arrow:hover,
#featured-collections .dhg-carousel-arrow:focus-visible {
    color: #173b2d;
    background: #f1d391;
    border-color: #f1d391;
    transform: scale(1.04);
}

#featured-collections .dhg-carousel-arrow:disabled {
    opacity: 0.32;
    cursor: default;
    transform: none;
}

#featured-collections .dhg-carousel-status {
    margin-top: 26px;
    text-align: center;

    color: rgba(255, 255, 255, 0.72);

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

#featured-collections .dhg-carousel-current {
    color: #f1d391;
}

/* Tablet/mobile: one card per view */

@media screen and (max-width: 800px) {

    #featured-collections .dhg-collection-carousel {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 10px;
    }

    #featured-collections .dhg-carousel-arrow {
        width: 42px;
        height: 42px;
    }

    #featured-collections .dhg-collection-card {
        flex-basis: 100%;
    }
}

@media screen and (max-width: 520px) {

    #featured-collections .dhg-collection-carousel {
        grid-template-columns: 1fr;
    }

    #featured-collections .dhg-carousel-window {
        grid-column: 1;
    }

    #featured-collections .dhg-carousel-prev,
    #featured-collections .dhg-carousel-next {
        position: absolute;
        bottom: -62px;
        z-index: 3;
    }

    #featured-collections .dhg-carousel-prev {
        left: calc(50% - 58px);
    }

    #featured-collections .dhg-carousel-next {
        right: calc(50% - 58px);
    }

    #featured-collections .dhg-carousel-status {
        margin-top: 76px;
    }
}

/* =========================================================
   FEATURED COLLECTIONS CAROUSEL — WIDTH CORRECTION
   ========================================================= */

#featured-collections .dhg-carousel-window {
    min-width: 0 !important;
}

#featured-collections .dhg-featured-grid {
    width: 100% !important;
    max-width: none !important;

    display: flex !important;
    flex-wrap: nowrap !important;

    grid-template-columns: none !important;
}

#featured-collections .dhg-collection-card {
    width: auto !important;
    max-width: none !important;

    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: calc((100% - 22px) / 2) !important;
}

@media screen and (max-width: 800px) {
    #featured-collections .dhg-collection-card {
        flex-basis: 100% !important;
    }
}

/* =========================================================
   FINAL CAROUSEL CARD WIDTH LOCK
   ========================================================= */

#featured-collections
.dhg-carousel-window
.dhg-featured-grid
.dhg-collection-card {
    box-sizing: border-box !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: calc((100% - 22px) / 2) !important;
}

@media screen and (max-width: 800px) {
    #featured-collections
    .dhg-carousel-window
    .dhg-featured-grid
    .dhg-collection-card {
        flex-basis: 100% !important;
    }
}