@font-face {
    font-family: 'SongFont'; 
    src: url('../fonts/font.ttf') format('truetype'); 
    font-weight: normal;
    font-style: normal;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'SongFont', Arial, sans-serif; 
}

.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.welcome-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg); 
    padding: 2.5em;
    border-radius: 12px;
    min-width: 400px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1em;
    font-size: 1.6rem;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.modal-content p {
    color: var(--text-color);
    margin-bottom: 2em;
    font-size: 1rem;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.modal-close {
    padding: 0.8em 2em;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: var(--secondary-color);
}

.footer-qrcode {
    position: relative;
    cursor: pointer;
}

.qrcode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9997;
}

.qrcode-overlay.active {
    display: flex;
}

.qrcode-large {
    width: 300px;
    height: 300px;
    border: 4px solid white;
    border-radius: 8px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.header-banner {
    width: 100%;
    height: 50vh;
    background-image: url('../imgs/header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 2em solid var(--secondary-color);
    position: relative;
}

.main-title {
    text-align: center;
    margin: 2em auto 1.5em; 
    font-size: 2.4rem;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    font-weight: 600;
}

.divider {
    width: 90%;
    height: 1px;
    background-color: var(--tertiary-color);
    margin: 0 auto 3em; 
}

.intro-section {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 4em;
    display: flex;
    flex-wrap: wrap; 
    gap: 3em;
    align-items: center;
}

.intro-text {
    flex: 1 1 500px; 
}

.intro-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1em;
    border-left: 4px solid var(--secondary-color);
    padding-left: 0.8em;
}

.intro-text p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1em;
    text-indent: 2em; 
}

.about-link {
    display: inline-block;
    margin-top: 1em;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.05em;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.about-link:hover {
    color: var(--link-hover);
    border-bottom: 1px solid var(--link-hover);
}

.intro-image {
    flex: 1 1 400px; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.intro-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.intro-image img:hover {
    transform: scale(1.02); 
}

.activity-title {
    text-align: center;
    font-size: 1.9rem;
    color: var(--primary-color);
    margin-bottom: 2.5em;
    letter-spacing: 0.05em;
}

.works-section {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto 4em;
    display: flex;
    flex-wrap: wrap;
    gap: 2.5em;
    justify-content: center;
    align-items: stretch; 
}

.work-card {
    flex: 1 1 300px; 
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 16px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.work-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 12px 24px var(--shadow-color);
}

.work-img {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0; 
}

.work-content {
    padding: 2em;
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.work-content h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1em;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-content p {
    font-size: 1rem;
    color: var(--text-color);
    text-align: center;
    line-height: 1.7;
    margin-bottom: 1.5em;
    height: 80px; 
    display: flex;
    align-items: center;
    justify-content: center; 
    overflow-y: auto; 
    scrollbar-width: none; 
}

.work-content p::-webkit-scrollbar {
    display: none;
}

.activity-detail-link {
    display: inline-block;
    margin: 0 auto; 
    color: var(--secondary-color);
    font-size: 0.95rem;
    padding: 0.5em 1.2em;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-top: auto; 
}

.activity-detail-link:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.more-activities {
    text-align: center;
    margin: 0 auto 6em;
}

.more-btn {
    display: inline-block;
    padding: 0.8em 2.2em;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1.1rem;
    border-radius: 30px;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 10px rgba(74, 60, 46, 0.15);
    transition: all 0.3s ease;
}

.more-btn:hover {
    background-color: #3a2f23;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(74, 60, 46, 0.2);
}

@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
        margin: 1.5em auto 1em;
    }

    .intro-section {
        gap: 2em;
    }

    .intro-text h3 {
        font-size: 1.5rem;
    }

    .intro-text p {
        font-size: 1rem;
    }

    .activity-title {
        font-size: 1.6rem;
        margin-bottom: 2em;
    }

    .works-section {
        gap: 2em;
    }

    .work-card {
        flex: 1 1 100%; 
    }

    .more-btn {
        padding: 0.7em 1.8em;
        font-size: 1rem;
    }

    .qrcode-large {
        width: 250px;
        height: 250px;
    }

    .modal-content {
        min-width: 320px;
        max-width: 90%;
        padding: 2em 1.5em;
    }

    .modal-content h2 {
        font-size: 1.4rem;
    }

    .modal-content p {
        font-size: 0.9rem;
    }
}

.footer {
    width: 100%;
    margin-top: 6em;
    padding: 3em 0;
    background-color: var(--footer-bg);
    transition: background-color 0.3s ease;
}

.footer-top {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2em 0;
    position: relative;
}

.footer-vertical-divider {
    width: 1px;
    height: 120px;
    background-color: var(--tertiary-color);
    margin: 0 5em; 
}

.footer-domains {
    text-align: left;
}

.footer-domains h5 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1em;
    letter-spacing: 0.05em;
}

.footer-domains ul {
    list-style: none;
}

.footer-domains li {
    margin-bottom: 0.8em;
    font-size: 1rem;
    color: var(--text-color);
}

.footer-domains a:hover {
    color: var(--secondary-color);
}

.footer-qrcode {
    text-align: center;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    border: 2px solid var(--card-bg);
    box-shadow: 0 4px 8px var(--shadow-color);
    margin-bottom: 1em;
}

.footer-qrcode p {
    font-size: 0.9rem;
    color: var(--text-color);
    letter-spacing: 0.03em;
}

.footer-horizontal-divider {
    width: 80%;
    height: 1px;
    background-color: var(--tertiary-color);
    margin: 0 auto 2em;
}

.footer-bottom {
    text-align: center;
    padding-bottom: 1em;
}

.footer-bottom p {
    font-size: 1rem;
    color: var(--text-color);
    letter-spacing: 0.05em;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .footer-top {
        flex-direction: column; 
    }

    .footer-vertical-divider {
        display: none; 
    }

    .footer-domains {
        margin-bottom: 2em;
        text-align: center;
    }

    .footer-domains h5 {
        font-size: 1rem;
    }

    .footer-domains li {
        font-size: 0.9rem;
    }

    .footer-qrcode img {
        width: 100px;
        height: 100px;
    }

    .footer-qrcode p {
        font-size: 0.8rem;
    }

    .footer-bottom p {
        font-size: 0.9rem;
    }
}
.official-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 1rem;
            text-decoration: none;
            border-bottom: 1px solid;
            padding-bottom: 2px;
            margin-top: 8px;
            transition: all 0.2s ease;
        }

        .official-link:hover {
            color: #0066cc;
            border-bottom-color: #0066cc;
        }
        .dark-theme .official-link:hover {
            color: #40a9ff;
            border-bottom-color: #40a9ff;
        }
        .official-link .link-icon {
            font-size: 1rem;
            color: inherit;
            flex-shrink: 0;
        }