/* Reset & Common */
:root {
    --primary-color: #2e1a47; /* 玄紫色 Deep Mystic Purple */
    --secondary-color: #4b2c68; /* Lighter Purple */
    --accent-color: #d4af37; /* Gold - Daoist Element */
    --text-color: #333;
    --light-text: #f4f4f4;
    --bg-color: #fdfbf7; /* Slight warm white */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    font-family: "Kaiti", "STKaiti", "Microsoft YaHei", serif; /* Using Kaiti for a more traditional feel */
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    background: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent-color);
}

.header-inner {
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    font-family: "LiSu", "SimSun", serif;
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-menu li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--light-text);
    padding-bottom: 5px;
}

.nav-menu li a:hover, .nav-menu li a.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    background: #f0ebf5;
    margin-top: 90px;
}

.breadcrumb-list {
    display: flex;
    font-size: 14px;
    color: #666;
}

.breadcrumb-list li::after {
    content: '/';
    margin: 0 10px;
    color: #999;
}

.breadcrumb-list li:last-child::after {
    content: '';
}

.breadcrumb-list a {
    color: var(--primary-color);
}

.breadcrumb-list a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 600px;
    background: #2e1a47db url(../images/hero_bg.jpg) no-repeat center center / cover;
    background-blend-mode: multiply; /* Darken the image */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    margin-top: 90px;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 20px;
    letter-spacing: 5px;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 24px;
    opacity: 0.9;
    font-weight: 300;
}

/* Section Common */
.section {
    padding: 80px 0;
}

.section:nth-child(even) {
    background-color: #f0ebf5;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.section-title p {
    color: #666;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 20px auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Forms */
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(46, 26, 71, 0.2);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: #ccc;
    padding: 60px 0 20px;
    border-top: 5px solid var(--accent-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-info h3 {
    margin-bottom: 20px;
    font-size: 22px;
    color: var(--accent-color);
}

.footer-info p {
    margin-bottom: 12px;
}

.footer-links a {
    display: block;
    margin-bottom: 12px;
    color: #ccc;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
    font-size: 14px;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    height: 200px;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    width: 100%;
    object-fit: cover;
}

img.card-img {
    display: block;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Custom Components for Responsiveness */
.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
}

.card-horizontal {
    display: flex;
    flex-direction: row;
}

.card-horizontal .card-img-side {
    width: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.qr-code-container {
    margin-top: 40px;
    display: flex;
    gap: 40px;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.process-line {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.process-step {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 20%;
}

.process-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    border: 4px solid #fff;
}

.process-icon.active {
    background: var(--accent-color);
}

.form-radio-group {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

/* Responsive Styles - Moved to bottom to ensure override */
@media (max-width: 1200px) {
    .container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 70px;
        padding: 0 20px; /* Ensure padding on mobile */
    }
    
    .logo {
        font-size: 20px; /* Slightly smaller for better fit */
        z-index: 1003; /* Ensure logo is above menu if needed, or let menu cover it? */
    }

    .hamburger {
        display: flex;
        order: -1; /* Move to left */
        position: relative; /* Ensure z-index works */
        z-index: 2000; /* Ensure it is above everything, including logo */
    }

    /* Off-canvas Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%; /* Hidden by default (left) */
        width: 250px;
        height: 100vh; /* Fallback */
        height: 100dvh; /* Dynamic viewport height */
        background: var(--primary-color);
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 20px;
        transition: left 0.3s ease-in-out;
        z-index: 1001;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }

    .nav-menu.active {
        left: 0; /* Slide in from left */
        /* Improved Backdrop using box-shadow with large spread */
        box-shadow: 2px 0 10px rgba(0,0,0,0.2), 0 0 0 100vmax rgba(0,0,0,0.5); 
    }

    .nav-menu li a {
        font-size: 18px;
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Page Banner Adjustment */
    .page-banner {
        height: 200px !important;
    }
    
    .page-banner h1 {
        font-size: 24px;
    }
    
    .breadcrumb {
        margin-top: 70px;
    }

    /* Hero Section Adjustment */
    .hero {
        margin-top: 70px;
        height: 400px;
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 18px;
    }

    /* Grid Adjustments */
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    /* New Component Overrides */
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 30px;
    }

    .card-horizontal {
        flex-direction: column;
    }

    .card-horizontal .card-img-side {
        width: 100%;
        height: 200px;
    }

    .qr-code-container {
        flex-direction: column; /* Stack QR codes */
        align-items: center;
        gap: 30px;
    }

    .process-steps {
        flex-direction: column;
        gap: 30px;
    }

    .process-line {
        display: none; /* Hide connecting line on mobile */
    }

    .process-step {
        width: 100%;
    }

    .form-radio-group {
        flex-direction: column;
        gap: 15px;
    }
}
