/* 
 * Theme: Ink & Paper
 * Colors: 
 * - Background: #f7f4ed (Rice Paper)
 * - Text: #2b2b2b (Ink Black)
 * - Accent: #b22222 (Seal Red)
 * - Secondary: #5c5c5c (Diluted Ink)
 */

:root {
    --bg-color: #fcf8f2;
    /* Warmer parchment */
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #5c5c5c;
    --accent-color: #8B4513;
    /* Brown from poster text */
    --accent-gold: #E8AF2E;
    /* Gold background for headers */
    --accent-red: #D22B2B;
    /* Seal red */
    --border-color: #e0dcd3;
    --font-serif: 'Noto Serif TC', serif;
    --font-art: 'Ma Shan Zheng', cursive;
}

/* Split Layout Styles */
.split-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
    align-items: start;
}

.precautions-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-serif);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background-image: url('background_v2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Ink wash overlay effect */
.ink-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(0, 0, 0, 0.03), transparent 60%);
    z-index: 0;
}

.company-logo {
    display: block;
    max-width: 250px;
    height: auto;
    margin: 0 5rem 10px auto;
    /* Shift left to align with '茶' */
    /* Right align inside wrapper */
}

.title-wrapper {
    display: inline-block;
    text-align: right;
    margin-bottom: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ... existing code ... */

/* Awards Card Layout */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .awards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .awards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .awards-grid {
        grid-template-columns: 1fr;
    }
}

.award-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.award-header {
    background-color: var(--accent-gold);
    color: #333;
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    justify-content: center;
}

.award-header svg {
    width: 20px;
    height: 20px;
    fill: #333;
    flex-shrink: 0;
}

.award-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.award-list li {
    padding: 8px 5px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.8rem;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
}

.award-list li:last-child {
    border-bottom: none;
}

.award-rank {
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: -0.5px;
    font-size: 0.75rem;
}

.award-prize {
    color: #666;
    white-space: nowrap;
    font-size: 0.75rem;
}



/* Keyframes */
@keyframes fadeInData {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes inkSpread {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Hero Section */
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;

}

.seal-mark {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background-color: var(--accent-color);
    color: white;
    font-family: var(--font-art);
    font-size: 24px;
    border-radius: 4px;
    /* Slightly rounded for stamp look */
    margin-bottom: 20px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #8e1b1b;
}

.main-title {
    font-size: 5rem;
    font-weight: 400;
    margin-bottom: 0;
    color: #000;
    font-family: var(--font-art);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    text-align: right;
}

.highlight {
    color: #5d4037;
    /* Coffee color */
    font-family: var(--font-art);
}

.edition-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 2.2rem;
    margin-right: 20px;
    vertical-align: text-bottom;
    letter-spacing: 2px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.sub-title {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.subtitle-text {
    font-size: 1rem;
    letter-spacing: 0.3em;
    color: #888;
    margin-bottom: 40px;
    font-weight: 600;
}

.cta-button {
    display: inline-block;
    padding: 12px 36px;
    background-color: var(--text-primary);
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(178, 34, 34, 0.3);
}

/* Info Cards */
.info-card {
    background: var(--card-bg);
    padding: 30px;
    margin-top: -30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    padding-right: 130px;
    /* Make space for QR code */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s;
    position: relative;
    /* Context for absolute positioning */
}

.info-item:hover {
    border-color: var(--accent-color);
}

.info-item .icon {
    font-size: 2rem;
    margin-right: 15px;
    width: 60px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.info-item h4 {
    font-size: 1rem;
    color: #333;
    /* Darker text for readability on gold */
    background-color: var(--accent-gold);
    display: inline-block;
    padding: 5px 15px;
    margin-bottom: 5px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.info-item p {
    font-weight: 600;
    font-size: 1.1rem;
}

.info-note {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--accent-color);
    opacity: 0.8;
}

/* Form Section */
.form-section {

    background: var(--card-bg);
    padding: 25px;
    /* Reduced from 40px */
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid var(--border-color);
    height: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
    /* Reduced from 40px */
}

.form-header h3 {
    font-size: 1.8rem;
    /* Slightly smaller */
    margin-bottom: 5px;
}

.form-group-section {
    margin-bottom: 15px;
    /* Reduced from 40px */
    animation: fadeInData 0.6s ease-out;
}

.group-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    margin-bottom: 10px;
    /* Reduced from 25px */
    background: linear-gradient(90deg, rgba(178, 34, 34, 0.05), transparent);
    padding-top: 3px;
    padding-bottom: 3px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    /* Reduced from 20px */
}

.input-group {
    margin-bottom: 10px;
    /* Reduced from 20px */
    width: 100%;
}

label {
    display: block;
    margin-bottom: 4px;
    /* Reduced from 8px */
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.required {
    color: var(--accent-color);
}

input,
select {
    width: 100%;
    padding: 8px 12px;
    /* Reduced from 12px 15px */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    background-color: #fafafa;
    transition: all 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.1);
}

/* Checkbox Style */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    margin-bottom: 15px;
    /* Reduced from 30px */
    justify-content: center;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #eee;
    margin-right: 10px;
    position: relative;
    border-radius: 3px;
}

.checkbox-container:hover input~.checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.checkbox-container a {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    /* Optional: keep it bold if it was, or inherit */
}



/* Submit Button */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.submit-btn {
    position: relative;
    padding: 15px 60px;
    background-color: var(--text-primary);
    color: white;
    border: none;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: all 0.4s;
    letter-spacing: 2px;
}

.submit-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background-color: #2c2c2c;
    color: #999;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: fadeInData 0.4s;
    border-top: 5px solid var(--accent-color);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.modal h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.highlight-text {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.close-btn {
    margin-top: 25px;
    padding: 10px 30px;
    background-color: #eee;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.close-btn:hover {
    background-color: #ddd;
}

/* Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.2rem;
    }

    .sub-title {
        font-size: 1.3rem;
    }

    .hero-section {
        padding: 50px 0 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-section {
        padding: 30px 20px;
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .precautions-card {
        margin-top: 30px;
        position: static;
    }

    .info-item {
        padding-right: 15px;
        /* Reduce padding on mobile */
    }
}

/* Custom Title Styling for RWD additions */
.title-primary {
    white-space: nowrap;
    display: inline-block;
}

@media (max-width: 768px) {
    .main-title {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 10px;
    }

    .edition-badge {
        display: block;
        width: fit-content;
        text-align: left;
        margin-right: 0;
        margin-bottom: 15px;
        align-self: flex-start;
    }

    .title-primary {
        font-size: 3rem;
        text-align: center;
        width: 100%;
        line-height: 1.2;
        font-family: 'BiauKai', 'DFKai-SB', 'KaiTi', serif;
        /* BiauKai font */
    }

    .highlight {
        font-size: 3rem;
        text-align: center;
        width: 100%;
        line-height: 1.2;
        margin-top: 5px;
        font-family: 'BiauKai', 'DFKai-SB', 'KaiTi', serif;
        /* BiauKai font */
    }

    .main-title br {
        display: none;
    }
}

/* Improved visibility for RWD mode */
.sub-title {
    color: #8B4513 !important;
    /* SaddleBrown to match accent, override previous grey */
    font-weight: 600 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.organization-info {
    color: #2F1B12 !important;
    /* Very dark brown/black for high contrast */
    font-weight: 700 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Ensure readability on smaller screens specifically if needed */
@media (max-width: 768px) {
    .sub-title {
        color: #A0522D !important;
        /* Slightly lighter/brighter Sienna for mobile if needed, or keep same */
    }
}