:root {
    --bg: #fbf8ff;
    --surface: rgba(255, 255, 255, .88);
    --text: #302d40;
    --muted: #6c687b;
    --purple: #8969d8;
    --purple-dark: #6245ae;
    --pink: #ec8fc4;
    --border: rgba(137, 105, 216, .20);
    --shadow: 0 14px 36px rgba(73, 48, 73, .11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 8% 4%,
            rgba(206, 185, 250, .30),
            transparent 28rem
        ),
        radial-gradient(
            circle at 94% 20%,
            rgba(142, 222, 228, .28),
            transparent 26rem
        ),
        var(--bg);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    padding: 20px clamp(18px, 4vw, 72px);
}

.nav-shell {
    width: min(1320px, 100%);
    min-height: 54px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .69);
    box-shadow: var(--shadow);
}

.brand {
    color: var(--purple-dark);
    font-family: Georgia, serif;
    font-weight: 700;
    letter-spacing: .06em;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.nav-link:hover {
    color: var(--purple-dark);
    background: rgba(236, 143, 196, .18);
}

.page-wrap {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 32px 0 70px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--purple-dark);
    font-size: .94rem;
    font-weight: 700;
    transition: color .2s ease;
}

.back-link:hover {
    color: var(--pink);
}

/*
 * Banner principal.
 * No usar class="hero" ni un div interno.
 * La imagen se muestra directamente en este section.
 *
 * Keep the banner as a single visual surface. Cover fills the
 * section cleanly instead of exposing the page background around it.
 */
.hero-image-only {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 34px;
    border-radius: 22px;
    overflow: hidden;
    background-image: url("/guide/assets/images/custom-dungeons/custom-dungeons-banner.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
/*
 * Prevents overlays from older versions of the page.
 */
.section-title {
    margin: 0 0 7px;
    color: #4a357c;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.15;
}

.section-intro {
    max-width: 760px;
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.65;
}

.accordion {
    display: grid;
    gap: 14px;
}

.dungeon-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(73, 48, 73, .06);
}

.dungeon-card summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 15px;
    padding: 19px 22px;
    cursor: pointer;
    list-style: none;
    transition: background .2s ease;
}

.dungeon-card summary:hover {
    background: rgba(244, 239, 255, .75);
}

.dungeon-card summary::-webkit-details-marker {
    display: none;
}

.dungeon-card summary::after {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    transition: transform .2s ease;
}

.dungeon-card[open] summary::after {
    transform: rotate(45deg);
}

.dungeon-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #8d70db, #e89bc9);
    box-shadow: 0 6px 14px rgba(124, 88, 199, .22);
    font-size: 1.2rem;
    font-weight: 700;
    overflow: hidden;
}

.dungeon-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.dungeon-heading {
    min-width: 0;
}

.dungeon-name {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 1.06rem;
    font-weight: 800;
}

.dungeon-short {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.level-tag {
    justify-self: end;
    padding: 6px 10px;
    border: 1px solid rgba(137, 105, 216, .18);
    border-radius: 999px;
    color: var(--purple-dark);
    background: rgba(226, 216, 250, .52);
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}

.dungeon-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
    gap: 24px;
    padding: 4px 22px 24px;
    border-top: 1px solid var(--border);
}

.dungeon-info {
    padding-top: 20px;
}

.dungeon-info h3 {
    margin: 0 0 9px;
    color: #543b91;
    font-size: .98rem;
}

.dungeon-info p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.65;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 17px;
}

.info-box {
    padding: 12px;
    border: 1px solid rgba(137, 105, 216, .13);
    border-radius: 12px;
    background: rgba(252, 250, 255, .82);
}

.info-box span {
    display: block;
    margin-bottom: 3px;
    color: var(--purple-dark);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.info-box strong {
    color: var(--text);
    font-size: .86rem;
    line-height: 1.35;
}

.dungeon-info ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.5;
}

.dungeon-image {
    display: grid;
    min-height: 235px;
    place-items: center;
    align-self: stretch;
    overflow: hidden;
    margin-top: 20px;
    padding: 24px;
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    background:
        linear-gradient(
            135deg,
            rgba(139, 105, 216, .14),
            rgba(236, 143, 196, .20)
        ),
        #f8f5fc;
}

.dungeon-image-note {
    align-content: center;
    gap: 10px;
}

.dungeon-image-note strong {
    color: var(--purple-dark);
    font-family: Georgia, serif;
    font-size: 1.2rem;
}

.dungeon-image-note span {
    max-width: 280px;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.6;
}

/* Real image panels do not need the decorative padding or background. */
.dungeon-image.has-image {
    padding: 0;
    background: none;
}

.dungeon-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Loot-list screenshots use contain so text and icons remain visible. */
.dungeon-image.dual-image {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2px;
    min-height: 0;
    background: #0c0c12;
}

.dungeon-image.dual-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #0c0c12;
}

/* Image zoom and lightbox controls. */
.zoomable {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.zoomable img {
    transition: filter .2s ease;
}

.zoomable:hover img {
    filter: brightness(.85);
}

.zoom-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(20, 16, 30, .62);
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}

.zoomable:hover .zoom-icon {
    opacity: 1;
}

.zoom-icon svg {
    width: 16px;
    height: 16px;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(24, 18, 34, .82);
    backdrop-filter: blur(2px);
}

.lightbox-overlay.is-open {
    display: flex;
}

.lightbox-overlay img {
    max-width: min(94vw, 1400px);
    max-height: 90vh;
    display: block;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: none;
    border-radius: 50%;
    color: #302d40;
    background: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 760px) {
    .site-header {
        padding: 12px 14px;
    }

    .nav-shell {
        padding: 12px 15px;
        border-radius: 18px;
    }

    .navbar-links {
        display: none;
    }

    .page-wrap {
        width: min(100% - 24px, 1120px);
        padding-top: 20px;
    }

    .hero-image-only {
        aspect-ratio: 16 / 10;
        margin-bottom: 28px;
        border-radius: 22px;
        background-position: center;
    }

    .dungeon-card summary {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 11px;
        padding: 16px;
    }

    .dungeon-short {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .level-tag {
        display: none;
    }

    .dungeon-content {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 16px 18px;
    }

    .dungeon-image {
        min-height: 175px;
        order: -1;
        margin-top: 4px;
    }

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