@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;800&display=swap");


body, html {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}

:root {
    --bg-outer: #beae9a;
    --bg-container: #2e251c;
    --header-left-bg: #937558;
    --header-right-bg: #937558;
    --header-left-text: #ffffff;
    --header-right-text: #90765a;

    --card-bg: #ffffff;
    --card-border: #caa97f;
    --card-text-title: #42372c;
    --card-text-body: #424242;
    --img-placeholder: #c4c4c4;

    --text-highlight: #d4aa82;
    --font-main: "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ease-accordion: cubic-bezier(0.25, 1, 0.3, 1);
}

img,
picture,
svg {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

body {
    background-color: #26170d;
    font-family: var(--font-main);
    overflow-x: hidden;
}

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


.image-container {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.bg {
    position: fixed;
    width: 100vw;
    max-width: 2560px;
    height: 100vh;
    top: 0;
    background-color: #00000070;
    z-index: -2;
    background-image: url("../img/bg.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
}


.main-canvas {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 2560px;
    margin: 0 auto;
    height: auto;
    background: #19120c47;
    container-type: inline-size;
}

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

.kv {
    position: absolute;
    width: 100cqw;
    height: auto;
    z-index: 1;
    bottom: 0;
    left: 0;
    pointer-events: none;


    animation: kvPulse 6s ease-in-out infinite;
    

    will-change: transform, opacity, filter;
    transform: translateZ(0);
}


@keyframes kvPulse {
    0%, 100% {
        opacity: 0.7;
        filter: brightness(0.8);
    }
    50% {
        opacity: 1;
        filter: brightness(1) contrast(1.02);
    }
}

.kv-bg {
    position: relative;
    width: 100cqw;
    height: auto;
    bottom: 0;
    left: 0;
    pointer-events: none;
}



.page-box {
    position: absolute;
    display: flex;
    z-index: 1;
    bottom: 5cqw;
    gap: 1cqw;
}

.page-btn {
    background-color: #2e251cd6;
    color: #fff;
    width: 15cqw;
    height: 5cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    border-bottom: 4px solid #7c6148;
    cursor: pointer;
    transition: 0.2s ease;
}

.page-btn:hover {
    color: #e9c8a8;
    border-bottom: 4px solid #e2c1a0;
    transform: scale(1.025);
}

.page-btn.active {
    cursor: auto;
    pointer-events: none;
    color: #e9c8a8;
    border-bottom: 4px solid #e2c1a0;
    transform: scale(1.025);
}

#rozlogo {
    position: absolute;
    width: 10.447cqw;
    height: auto;
    left: 1.5cqw;
    top: 1cqw;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s ease-in-out;
}

#rozlogo:hover {
    transform: scale(0.95);
}




.slogan-wrapper {
    position: absolute;
    bottom: 23%;
        left: 0;
    right: 0;
    margin: 0 auto; 
    
    width: 41.838cqw;
    pointer-events: none;
    

}


.slogan-img {
    position: relative;
    z-index: 1; 
    width: 100%;
    height: auto;
    display: block;
}


.slogan-lightning {
    position: absolute;
    inset: 0;
    z-index: 2; 
    background: url('../img/slogan-ae.png') center / contain no-repeat;
    
    mix-blend-mode: screen; 
    pointer-events: none;
    

    animation: lightningPulse 1.8s ease-in-out infinite alternate;
}


@keyframes lightningPulse {
    0% { 
        opacity: 0.5; 
        filter: brightness(1); 
    }
    100% { 
        opacity: 1; 
        filter: brightness(1.75); 
    }
}


.slogan {
    display: flex;
    position: absolute;
    width: 41.838cqw;
    height: auto;
    bottom: 23%;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
    justify-content: space-between;
    pointer-events: none;
    animation: sloganSlideDown 3s forwards;
    will-change: transform, filter, opacity;
}




@keyframes sloganSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-12px);
        filter: brightness(0); 
    }
    

    5% {
        opacity: 1;
        filter: brightness(0); 
        }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: brightness(1); 
    }
}

.connect {
    width: 100%;
}


.event-container {
    width: 63%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1cqw;
    margin: 1cqw 0;
}

.title-banner {
    width: 56.851%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-display {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 0.2cqw;
}

.text-panel {
    grid-area: 1 / 1;
    width: 100%;
    text-align: center;
    line-height: 1.6;
    font-size: clamp(0.88rem, 1.3vw, 1.02rem);
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.5px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.text-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.highlight {
    color: var(--text-highlight);
    font-weight: 700;
}

.directory-card {
    width: 63%;
    overflow: hidden;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    margin: 0;
}

.directory-header {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 2.9cqw;
}

.header-tag {
    background-color: var(--header-left-bg);
    color: var(--header-left-text);
    padding: 0 2cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    letter-spacing: 2px;
    flex-shrink: 0;
    font-weight: 600;
}

.header-title {
    background-color: #be966f40;
    color: var(--header-right-text);
    padding: 0 0 0 1.2cqw;
    display: flex;
    align-items: center;
    font-size: 1.75rem;
    letter-spacing: 0.3px;
    flex: 1;
    font-weight: 700;
}

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

#section-footer {
    position: relative;
    width: 100%;
    height: auto;
    padding: 0;
}

#gotop {
    position: absolute;
    width: 2.187cqw;
    height: auto;
    background: #000000bf;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    padding: 0.625cqw;
    right: 2.666cqw;
    bottom: 1.666cqw;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    border-radius: 0.625cqw;
}

#gotop:hover {
    transform: scale(0.95);
}

#footbox {
    width: 100%;
}

footer {
    background-color: #000;
}


@media (min-width: 2560px) {
    html {
        font-size: clamp(16px, 0.833vw, 21.33px);
    }
}

@media screen and (max-width: 768px) {
    .bg {
        position: fixed;
        width: 100vw;
        height: 100vh;
        top: 0;
        background-color: #00000070;
        z-index: -2;
        background-image: url("../img/bg-m.jpg");
        background-size: cover;
        background-repeat: repeat-y;
        background-position: center;
        pointer-events: none;
    }

    .main-canvas {
        overflow-x: hidden;
    }

    #rozlogo {
        width: 27vw;
        left: 2vw;
        top: 2vw;
    }


.slogan-wrapper { 
        width: 88vw;
        bottom: 28%;  
}



    .slogan {
        width: 88vw;
        bottom: 28%;
    }

    .page-box {
        width: 90vw;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        bottom: 5%;
    }

    .page-btn {
        width: 100%;
        height: 14vw;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }

    .page-btn.active {
        transform: none;
    }

    .event-container {
        width: 90%;
        gap: 1cqw;
        margin: 1cqw 0;
    }

    .title-banner {
        width: 90%;
        height: auto;
        margin: 12vw 0 2vw;
    }

    .directory-card {
        width: 90%;
        margin: 4vw 0;
    }

    .directory-header {
        height: 9vw;
    }

    .header-tag {
        font-size: 1.1rem;
        padding: 0 4vw;
    }

    .header-title {
        font-size: 0.95rem;
        padding-left: 10px;
    }

    .directory-body {
        padding: 5vw;
    }

    #gotop {
        position: relative;
        width: 6vw;
        height: 6vw;
        right: 0;
        z-index: 99;
        padding: 3vw;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.75);
        border-radius: 8px;
        margin-top: 8vw;
        bottom: auto;
    }
}


@media (hover: hover) {
    a:hover {
        text-decoration: underline;
    }
}

@media (pointer: coarse) {
    * {
        -webkit-tap-highlight-color: transparent !important;
    }
}

@supports (-webkit-touch-callout: none) {
    #gotop,
    #rozlogo,
    .page-btn {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }

    @media screen and (min-width: 769px) {
        #gotop {
            bottom: calc(20px + env(safe-area-inset-bottom)) !important;
            -webkit-transform: translateZ(0);
        }
    }
}