/*
* Google Fonts (Optional, enhances visual appeal)
* Using a more elegant font like Noto Serif SC
*/
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@300;400;700&display=swap');

/* --- Global Styles & Variables --- */
:root {
    --primary-color: #8E1818; /* 朱红 Deep Chinese Red */
    --secondary-color: #1A1A1A; /* 水墨黑 Ink Black */
    --accent-color: #C5A059; /* 鎏金 Imperial Gold */
    --bg-color: #F9F7F2; /* 宣纸白 Rice Paper White */
    --light-gray: #EFECE5;
    --text-color: #2C2C2C;
    --navbar-height: 80px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', serif; /* 使用宋体/衬线体增加文化感 */
    line-height: 1.8;
    background-color: var(--bg-color);
    color: var(--text-color);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); /* 极淡的云纹背景 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, .logo {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
}

/* 特殊书法标题 */
.calligraphy {
    font-family: 'Ma Shan Zheng', cursive;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Header & Navbar --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px); /* 磨砂玻璃效果 */
    -webkit-backdrop-filter: blur(10px);
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: background-color 0.3s;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2); /* 金色细边框 */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar .logo {
    font-family: 'Ma Shan Zheng', cursive; /* 书法字体Logo */
    font-size: 2.2rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

.navbar .nav-links {
    display: flex;
    gap: 25px;
}

.navbar .nav-links a {
    color: var(--secondary-color);
    font-size: 1.05rem;
    font-weight: 500;
    padding: 10px;
    position: relative;
    transition: color 0.3s;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: var(--primary-color);
}

.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after {
    width: 100%;
}

/* --- Dropdown Menu Styles --- */
.nav-links li {
    position: relative;
}

.dropdown {
    position: relative;
}

/* Style the dropdown link */
.dropdown > a {
    cursor: pointer;
}
.dropdown > a::after {
    content: ' ▼';
    font-size: 0.7em;
    display: inline-block;
    margin-left: 4px;
}


.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 16px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-top: 3px solid var(--primary-color);
}

.dropdown-content a {
    color: var(--secondary-color);
    padding: 12px 20px;
    display: block;
    text-align: center;
    font-size: 0.95rem;
}

/* Remove the underline effect from parent 'a' */
.dropdown-content a::after {
    display: none;
}

.dropdown-content a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}


/* --- Main Content --- */
main {
    /* padding-top: var(--navbar-height);  Removed to allow hero to go under navbar */
}

/* --- Hero Slider (Homepage) --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--navbar-height));
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slider .slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6)); /* 更细腻的渐变 */
}

.hero-slider .slide .container {
    position: relative;
    z-index: 3;
}

.hero-slider h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 5rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    letter-spacing: 5px;
}

.hero-slider p {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.slider-navigation {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.slider-navigation .nav-btn {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-navigation .nav-btn.active {
    background: white;
}

/* --- Intro & Features Section (Homepage) --- */
.intro {
    padding: 80px 40px;
    text-align: center;
    background-color: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    margin: 60px auto;
}

.intro h2 {
    font-size: 3rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-family: 'Ma Shan Zheng', cursive;
}

.intro p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: #555;
}

.features {
    padding: 40px 20px 80px;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 60px;
    color: var(--primary-color);
    font-family: 'Ma Shan Zheng', cursive;
    position: relative;
    display: inline-block;
}

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

.feature-cards {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    width: 30%;
    min-width: 300px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    font-size: 1.6rem;
    margin: 20px 0 10px;
    color: var(--secondary-color);
}

.card p {
    padding: 0 20px;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 10px 30px;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    margin-bottom: 30px;
    transition: all 0.3s;
    font-weight: bold;
}

.btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Footer --- */
footer {
    background: #111;
    color: #888;
    text-align: center;
    padding: 50px 20px;
    border-top: 4px solid var(--primary-color);
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* --- Page Header (Common for subpages) --- */
.page-header {
    /* Default styles, can be overridden inline */
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 160px 20px 100px; /* Increased top padding for fixed navbar */
    position: relative;
    margin-bottom: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

.page-header h1, .page-header p {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 4rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.page-header p {
    font-size: 1.2rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }

    .navbar .container {
        flex-direction: column;
        justify-content: center;
        height: auto;
        padding: 10px 0;
    }
    
    .navbar {
        height: auto;
        position: static; /* or absolute */
    }
    
    main {
        padding-top: 0;
    }

    .navbar .nav-links {
        margin-top: 10px;
        gap: 15px;
    }
    
    .navbar .nav-links a {
        font-size: 0.9rem;
        padding: 5px;
    }

    .hero-slider {
        height: 60vh;
    }

    .hero-slider h1 {
        font-size: 2.5rem;
    }

    .hero-slider p {
        font-size: 1.2rem;
    }

    .intro, .features {
        padding: 40px 20px;
    }

    h2.section-title, .intro h2 {
        font-size: 2rem;
    }
    
    .feature-cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
        max-width: 400px;
    }
}
