#section-1 {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 100%;
    height: auto;
    align-items: center;
}

#section-2, #section-3, #section-4 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 5cqw 0;
}


.image-gallery {
    display: flex;
    width: 100%;
    aspect-ratio: 20 / 9; 
    margin: 0 auto;
    gap: 0.8%; 
}

.tab-item {
    position: relative;
    flex: 2 1 0%;
    height: 100%;
    border: 0px solid transparent;
    outline: none;
    cursor: pointer;
    overflow: hidden;
    background-color: #000;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.3, 1), box-shadow 0.4s ease;
}

.tab-item.is-active {
    flex: 16 1 0%;
    border: 2px solid #cca370;
    cursor: default;
}

.image-container-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.image-container-area picture,
.image-container-area img {
    display: block;
    width: 100%;
    height: 100%;
}

.image-container-area img {
    object-fit: cover;
    object-position: center center;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.tab-item:not(.is-active) .image-container-area img {
    filter: brightness(0.65) grayscale(0.4);
}

.tab-item:hover:not(.is-active) .image-container-area img {
    filter: brightness(0.8) grayscale(0.1);
}

.tab-item.is-active .image-container-area img {
    filter: brightness(1) grayscale(0);
}


.npc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2cqw;
    list-style: none;
}

.npc-card {
    background-color: var(--card-bg);
    border: 2px solid var(--card-border);
    padding: 1.5cqw;
    display: flex;
    gap: 1cqw;
    align-items: flex-start;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    transform: translateZ(0);
}

.npc-card:hover {
    transform: translateY(-4px);
    border-color: #e2be8f;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 12px rgba(202, 169, 127, 0.4);
}

.npc-avatar {
    width: 5.775cqw;
    background-color: var(--img-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.npc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.npc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.npc-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--card-text-title);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

.npc-desc {
    font-size: 0.9rem;
    color: var(--card-text-body);
    line-height: 1.55;
    text-align: justify;
    word-break: break-word;
}

.monster-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1cqw;
    list-style: none;
    justify-items: center;
}

.monster-item {
    position: relative;
    width: 97.26%;
    height: auto;
    background-color: var(--img-placeholder);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s ease, background-color 0.25s ease;
    transform: translateZ(0);
}

.monster-item:hover {
    transform: translateY(-4px);
    border-color: #e2be8f;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 12px rgba(202, 169, 127, 0.4);
}

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




.directory-body-wpn {
    background-color: var(--bg-container);
    padding: 1cqw;
    color: antiquewhite;
}


.wpn-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7cqw;
    list-style: none;
    justify-items: center;
}

.wpn-item {
    position: relative;
    width: 99.105%;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s ease, background-color 0.25s ease;
    transform: translateZ(0);
}

/* .wpn-item:hover {
    transform: translateY(-4px);
    border-color: #e2be8f;
} */

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


@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media screen and (max-width: 768px) {
    #section-1 {
        padding: 0 0 5vw 0;
    }

    #section-2 {
        padding-top: 8vw;
    }

    #section-3 {
        padding: 8vw 0;
    }

    .event-container {
        width: 92%;
        margin: 4vw 0;
    }

    .title-banner {
        width: 85%;
    }


    .image-gallery {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        gap: 8px;
        margin-bottom: 5vw;
    }

    .tab-item {
        display: block;
        position: relative;
        width: 100%;
        flex: none;
        overflow: hidden;
        background-color: #000;
        box-sizing: border-box;
        transition: border-color 0.35s ease;
    }

    .tab-item:not(.is-active) {
        height: 20vw;
    }

    .tab-item:not(.is-active) .image-container-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .tab-item:not(.is-active) .image-container-area picture,
    .tab-item:not(.is-active) .image-container-area img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .tab-item.is-active {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        border: 2px solid #cca370;
    }

    .tab-item.is-active .image-container-area {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .tab-item.is-active .image-container-area picture,
    .tab-item.is-active .image-container-area img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .content-display {
        display: block;
        width: 100%;
        padding: 0 1vw;
        margin-top: 0;
    }

    .text-panel {
        display: none;
        width: 100%;
        text-align: center;
        line-height: 1.6;
        font-size: 0.92rem;
        color: #ffffff;
    }

    .text-panel.is-active {
        display: block;
        animation: textFadeIn 0.3s ease forwards;
    }

    .npc-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .npc-card {
        padding: 3.5vw;
        gap: 3vw;
    }

    .npc-avatar {
        width: 16vw;
        height: auto;
    }

    .npc-name { font-size: 1.05rem; }
    .npc-desc { font-size: 0.82rem; line-height: 1.55; }

    .monster-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

.wpn-grid {
        grid-template-columns: 1fr;
        gap: 12px;
}


    .directory-body-wpn {
        padding: 8vw;
    }




}

@media (max-width: 480px) {
    .monster-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }


.wpn-grid {
        grid-template-columns: 1fr;
        gap: 12px;
}

}