/* =========================================================
   EXPLORE DETAIL PAGES
   Used by:
   - views/world/explore/location.ejs
   - views/world/explore/creature.ejs
   ========================================================= */


/* =========================================================
   GLOBAL PAGE
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background:
        linear-gradient(
            rgba(5, 7, 7, 0.78),
            rgba(5, 7, 7, 0.90)
        ),
        url("/images/elements/map_background.png")
        center center / cover fixed no-repeat;

    color: #c2baac;

    font-family:
        "Lora",
        Georgia,
        serif;
}


/* =========================================================
   MAIN PAGE CONTAINER
   ========================================================= */

.explore-detail-page {
    width: min(1450px, 92vw);
    margin: 0 auto;

    padding:
        125px
        0
        70px;

    min-height: 100vh;
}


/* =========================================================
   HEADER
   ========================================================= */

.explore-detail-header {
    text-align: center;

    margin-bottom: 45px;
}

.explore-detail-type {
    margin:
        0
        0
        8px;

    color: #8f887b;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 0.82rem;

    font-weight: 600;

    letter-spacing: 0.28em;

    text-transform: uppercase;
}

.explore-detail-title {
    margin: 0;

    color: #ddd3c1;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: clamp(
        2.2rem,
        5vw,
        4.6rem
    );

    font-weight: 500;

    letter-spacing: 0.06em;

    line-height: 1.05;

    text-shadow:
        0
        3px
        8px
        rgba(0, 0, 0, 0.75);
}

.explore-detail-subtitle {
    max-width: 800px;

    margin:
        14px
        auto
        0;

    color: #9e9688;

    font-size: 1rem;

    font-style: italic;

    line-height: 1.6;
}


/* =========================================================
   HEADER DIVIDER
   ========================================================= */

.explore-detail-header::after {
    content: "";

    display: block;

    width: min(420px, 60%);

    height: 1px;

    margin:
        28px
        auto
        0;

    background:
        linear-gradient(
            to right,
            transparent,
            rgba(194, 186, 172, 0.65),
            transparent
        );
}


/* =========================================================
   MAIN CONTENT
   IMAGE + DESCRIPTION
   ========================================================= */

.explore-detail-content {
    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);

    gap: 40px;

    align-items: stretch;

    width: 100%;

    padding:
        32px
        36px;

    background:
        rgba(10, 12, 12, 0.88);

    border:
        1px
        solid
        rgba(194, 186, 172, 0.18);

    box-shadow:
        0
        12px
        36px
        rgba(0, 0, 0, 0.45);
}


/* =========================================================
   MAIN IMAGE
   ========================================================= */

.explore-detail-image-panel {
    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    min-height: 390px;

    overflow: hidden;

    background:
        rgba(0, 0, 0, 0.32);

    border:
        1px
        solid
        rgba(194, 186, 172, 0.22);

    padding: 10px;
}

.explore-detail-image-panel::before {
    content: "";

    position: absolute;

    inset: 8px;

    pointer-events: none;

    border:
        1px
        solid
        rgba(194, 186, 172, 0.08);
}

.explore-detail-image {
    display: block;

    width: 100%;
    height: 100%;
    min-height: 480px;

    object-fit: contain;
    object-position: center;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.explore-detail-description {
    padding:
        10px
        8px;
}

.explore-detail-description h2,
.explore-detail-info h2,
.explore-detail-related h2 {
    margin:
        0
        0
        22px;

    color: #d5ccbc;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 1.35rem;

    font-weight: 500;

    letter-spacing: 0.12em;

    text-transform: uppercase;
}

.explore-detail-description h2::after,
.explore-detail-info h2::after,
.explore-detail-related h2::after {
    content: "";

    display: block;

    width: 75px;

    height: 1px;

    margin-top: 10px;

    background:
        rgba(194, 186, 172, 0.45);
}

.explore-detail-description p {
    margin: 0;

    color: #c2baac;

    font-size: 1.05rem;

    line-height: 1.9;
}


/* =========================================================
   DETAILS SECTION
   ========================================================= */

.explore-detail-info {
    margin-top: 35px;

    padding:
        36px
        46px;

    background:
        rgba(8, 10, 10, 0.82);

    border:
        1px
        solid
        rgba(194, 186, 172, 0.16);
}

.explore-detail-info-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );

    gap:
        18px
        28px;
}

.explore-detail-info-item {
    display: flex;

    flex-direction: column;

    gap: 6px;

    padding:
        14px
        0;

    border-bottom:
        1px
        solid
        rgba(194, 186, 172, 0.12);
}

.explore-detail-info-label {
    color: #837c70;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 0.72rem;

    font-weight: 600;

    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.explore-detail-info-value {
    color: #d2c8b7;

    font-size: 1rem;

    line-height: 1.5;
}


/* =========================================================
   RELATED ITEMS
   ========================================================= */

.explore-detail-related {
    margin-top: 35px;

    padding:
        36px
        46px;

    background:
        rgba(8, 10, 10, 0.82);

    border:
        1px
        solid
        rgba(194, 186, 172, 0.16);
}

.explore-detail-related-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(240px, 320px)
        );

    gap: 24px;
}


/* =========================================================
   RELATED CARD
   ========================================================= */

.explore-related-card {
    display: block;

    overflow: hidden;

    color: inherit;

    text-decoration: none;

    background:
        rgba(17, 19, 18, 0.94);

    border:
        1px
        solid
        rgba(194, 186, 172, 0.18);

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.explore-related-card:hover,
.explore-related-card:focus-visible {
    transform:
        translateY(-3px);

    border-color:
        rgba(225, 217, 201, 0.7);

    background:
        rgba(25, 27, 25, 0.98);
}

.explore-related-card img {
    display: block;

    width: 100%;

    height: 190px;

    object-fit: cover;
}

.explore-related-card-content {
    padding:
        18px
        20px
        20px;
}

.explore-related-card-content h3 {
    margin:
        0
        0
        7px;

    color: #d6cebf;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 1.05rem;

    font-weight: 500;

    letter-spacing: 0.04em;
}

.explore-related-card-content p {
    margin: 0;

    color: #958d80;

    font-size: 0.88rem;

    line-height: 1.55;
}


/* =========================================================
   RETURN TO MAP
   ========================================================= */


/* =========================================================
   DETAIL PAGE NAVIGATION
   ========================================================= */

.explore-detail-navigation {
    position: fixed;
    top: 105px;
    right: 32px;

    z-index: 30;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.explore-detail-return,
.explore-detail-back {
    display: inline-block;

    padding: 9px 14px;

    font-family: "Cinzel", serif;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    color: rgba(236, 228, 213, 0.85);
    text-decoration: none;

    border: 1px solid rgba(236, 228, 213, 0.35);
    background: rgba(0, 0, 0, 0.40);

    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.explore-detail-return:hover,
.explore-detail-return:focus-visible,
.explore-detail-back:hover,
.explore-detail-back:focus-visible {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.65);
}

/* Keep hidden navigation buttons hidden */
.explore-detail-back[hidden] {
    display: none;
}

/* Smaller screens */
@media (max-width: 650px) {
    .explore-detail-navigation {
        top: 85px;
        right: 12px;
        gap: 8px;
    }

    .explore-detail-return,
    .explore-detail-back {
        padding: 8px 10px;
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }
}



/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .explore-detail-page {
        width: min(94vw, 900px);

        padding-top: 115px;
    }

    .explore-detail-content {
        grid-template-columns: 1fr;

        gap: 34px;

        padding:
            34px;
    }

    .explore-detail-image-panel {
        min-height: 320px;
    }

    .explore-detail-image {
        max-height: 500px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .explore-detail-page {
        width: 94vw;

        padding:
            105px
            0
            45px;
    }

    .explore-detail-header {
        margin-bottom: 30px;
    }

    .explore-detail-type {
        font-size: 0.7rem;

        letter-spacing: 0.2em;
    }

    .explore-detail-title {
        font-size: 2.25rem;
    }

    .explore-detail-subtitle {
        font-size: 0.9rem;
    }

    .explore-detail-content,
    .explore-detail-info,
    .explore-detail-related {
        padding:
            24px
            20px;
    }

    .explore-detail-content {
        gap: 25px;
    }

    .explore-detail-image-panel {
        min-height: 230px;
    }

    .explore-detail-description p {
        font-size: 0.95rem;

        line-height: 1.75;
    }

    .explore-detail-info-grid {
        grid-template-columns: 1fr;
    }

    .explore-detail-related-grid {
        grid-template-columns: 1fr;
    }

    .explore-related-card {
        width: 100%;
    }

}