:root {
    --primary-color: #8B0000;
    /* Deep Red */
    --accent-color: #D4AF37;
    /* Gold */
    --text-color: #333333;
    --bg-color: #FAFAFA;
    --light-text: #FFFFFF;
    --section-bg: #F5F5DC;
    /* Beige */
}

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

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

/* Enforce fixed layout */
body {
    min-width: 1200px;
    overflow-x: auto;
    /* Allow scrolling if window is too narrow */
}

.container {
    /* background-color: #000; */
    /* height: 100px; */
    width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Removed responsive media query to prevent resizing/wrapping */

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 5px 0;
    font-size: 0.9rem;
    text-align: center;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-family: 'Ma Shan Zheng', cursive;
    border: 2px solid #ddd;
}

.logo-text h1 {
    color: #000;
    font-size: 1.5rem;
    margin-bottom: 0;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    display: block;
    line-height: 1.2;
    color: #333;
}

.nav-menu a span {
    font-size: 0.6rem;
    color: #999;
    font-weight: normal;
    display: block;
    margin-top: 2px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    border-bottom: none;
}

/* Announcement Bar */
.announcement-bar {
    /* background-color: #f5f5f5; */
    background-color: #ffffff;
    /* border-bottom: 1px solid #eee; */
    padding: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.announcement-bar .container {
    display: flex;
    align-items: center;
}

.announcement-label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    margin-right: 10px;
}

.announcement-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 20px;
    /* Adjust based on font size */
}

.scrolling-text {
    position: absolute;
    white-space: nowrap;
    animation: scroll-left 20s linear infinite;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    /* background: url('../images/hero-bg-paper.png'); */
    background-color: #ffffff;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    height: 600px;
    position: relative;
    overflow: hidden;
    min-width: 1200px;
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
    width: 1200px;
    margin: 0 auto;
    padding: 0;
    gap: 20px;
    /* Add gap between carousel and news */
}

/* Hero Left: Carousel */
.hero-left-carousel {
    flex: 2;
    /* Takes up more space */
    height: 500px;
    /* Adjust height as needed */
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: #000;
    /* Fallback */
}

.carousel-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: flex-end;
    /* Content at bottom */
}

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

.slide-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    width: 100%;
    padding: 40px 30px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-content h2 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.slide-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 1rem;
    color: #ddd;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

.dot.active,
.dot:hover {
    background-color: var(--accent-color);
}

/* Hero Right: News */
.hero-right-news {
    flex: 1;
    height: 500px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.news-header h3 {
    margin-bottom: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.more-link {
    font-size: 0.9rem;
    color: #666;
}

.more-link:hover {
    color: var(--primary-color);
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    /* Allow scrolling if many items */
}

.news-list li {
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    padding-bottom: 8px;
}

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

.news-list a {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.news-title {
    font-size: 0.95rem;
    color: #333;
    font-weight: bold;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.8rem;
    color: #999;
    align-self: flex-end;
}

.news-list a:hover .news-title {
    color: var(--primary-color);
}

/* My Services Section (New) */
.services-container {
    height: 500px;
    display: flex;
    gap: 20px;
}

.service-feature-card {
    height: 400px;
    width: 300px;
    background: linear-gradient(to bottom, #FDFBF7, #F5E6D3);
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.feature-text {
    position: absolute;
    left: 20px;
    top: 50px;
    writing-mode: vertical-rl;
    letter-spacing: 3px;
    color: #333;
    font-size: 0.9rem;
    height: 200px;
}

.v-text-name {
    background-color: #A8383B;
    color: #fff;
    padding: 5px 2px;
    border-radius: 3px;
    margin-top: 10px;
}

.feature-title {
    position: absolute;
    right: 20px;
    top: 30px;
    writing-mode: vertical-rl;
    font-size: 1.5rem;
    color: #A8383B;
    font-family: 'Noto Serif SC', serif;
    font-weight: bold;
    letter-spacing: 5px;
}

.f-title-sub {
    font-size: 1rem;
    color: #666;
    margin-right: 10px;
}

.feature-image {
    margin-top: 50px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
}

.feature-image img {
    height: 100%;
    object-fit: cover;
    /* Attempt to crop/mask if background exists */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.feature-desc {
    background-color: #fff;
    padding: 15px;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin-top: 10px;
    border-top: 2px solid #A8383B;
}

.services-grid-new {
    height: 400px;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.service-item {
    height: 200px;
    background: #fff;
    padding: 15px;
    border: 1px solid #eee;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.service-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.s-img {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.s-img img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.s-content h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
    border-left: 3px solid #A8383B;
    padding-left: 10px;
}

.s-content p {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sections General */
.section {
    background-color: #ffffff;
    padding: 10px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

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

/* Master's Advantage Section */
.section-header-left {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.bar-icon {
    width: 8px;
    height: 25px;
    background-color: #8c300e;
    margin-right: 15px;
    /* transform: skewX(-20deg); */
}

.section-header-left h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0;
    font-weight: bold;
}

.sub-title {
    font-size: 0.9rem;
    color: #999;
    font-weight: normal;
    margin-left: 10px;
}

.sub-title a {
    color: #666;
    margin-left: 20px;
    font-size: 0.8rem;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    height: 180px;
}

.adv-card {
    height: 140px;
    background-color: #FDFBF7;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 5px;
    border: 1px solid #eee;
    transition: all 0.3s;
}

.adv-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.adv-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.adv-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.adv-text h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 5px;
    font-weight: bold;
}

.adv-text p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
}

/* About Section */
.about {
    background-color: #fff;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-image {
    flex: 1;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.5rem;
}

.about-text {
    flex: 1;
}

.btn-secondary {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
}

/* Refined About Section */
.about-content-box {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.about-text-left {
    flex: 2;
    font-size: 0.95rem;
    color: #555;
    line-height: 2;
    text-align: justify;
}

.about-text-left p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.about-card-right {
    height: 300px;
    flex: 1;
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    padding-top: 30px;
}

.card-header {
    padding: 0 30px;
}

.card-header h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.card-header span {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card-header p {
    font-size: 0.9rem;
    color: #666;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-body {
    padding: 0 30px;
    /* margin-bottom: 200px; */
    /* Space for image */
}

.card-body ul li {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.card-body ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #D4AF37;
}

.card-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 250px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.card-image img {
    max-height: 100%;
    object-fit: contain;
}

/* Services Section styles removed */

/* Footer */
footer {
    background-color: #222;
    color: #aaa;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-logo h2 {
    color: var(--light-text);
}

.footer-links a {
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* =========================================
   Mobile Adaptation (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {

    /* 1. General Layout Resets */
    body {
        min-width: 100%;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
        width: 100%;
    }

    .container {
        width: 100%;
        padding: 0 15px;
        /* Add side padding */
    }

    /* 2. Header & Navigation */
    .header {
        height: auto;
    }

    .nav-menu {
        display: none;
        /* Hidden by default, JS toggles this */
        z-index: 1001;
        /* Ensure it's above other things */
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #333;
        border-radius: 3px;
    }

    .nav-menu a {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        /* Ensure full width clickable/border */
    }

    /* Ensure active link keeps the border on mobile */
    .nav-menu a.active {
        border-bottom: 1px solid #eee;
        /* No highlight border */
        color: var(--primary-color);
        background-color: transparent;
        /* No highlight background */
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .logo-text p {
        font-size: 0.6rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    /* 3. Hero Section (Stacking & Ratio Fix) */
    .hero {
        height: auto;
        /* Dynamic height */
        padding-bottom: 30px;
        min-width: 100%;
    }

    .hero-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
    }

    .hero-left-carousel {
        width: 100%;
        /* Maintain desktop aspect ratio (~1.6:1), so on mobile width (100vw - padding), height is roughly 60vw */
        height: 60vw;
        flex: none;
        /* Reset flex */
    }

    .slide {
        background-size: cover;
        /* or contain, but cover fills the box */
    }

    .slide-content h1 {
        font-size: 1.5rem;
    }

    .slide-content h2 {
        font-size: 1rem;
    }

    .hero-right-news {
        width: 100%;
        flex: none;
        height: auto;
        min-height: 300px;
        /* Ensure space for news */
    }

    /* 4. Advantage Section (2 Columns) */
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Columns on mobile */
        height: auto;
        /* Allow auto height */
        gap: 15px;
    }

    .adv-card {
        height: auto;
        /* Auto height for content */
        padding: 15px;
        flex-direction: column;
        /* Stack icon and text inside card if needed, or keep row. keeping row is safer for small cards */
        align-items: flex-start;
    }

    .adv-icon {
        margin-bottom: 10px;
    }

    /* 5. About Section (Hide Right Card) */
    .about-content-box {
        flex-direction: column;
        gap: 20px;
    }

    .about-text-left {
        text-align: left;
    }

    /* Hide About Right Card on Mobile */
    .about-card-right {
        display: none !important;
    }

    /* 6. Services Section (Hide Feature Card) */
    .services-container {
        flex-direction: column;
        height: auto;
    }

    /* Hide Service Feature Card on Mobile */
    .service-feature-card {
        display: none !important;
    }

    .services-grid-new {
        grid-template-columns: 1fr;
        /* 1 column for service list, or 2? User didn't specify, but 1 is safer for card content. Sticking to 1. */
        height: auto;
    }

    .service-item {
        height: auto;
        /* Auto height */
        flex-direction: row;
        /* Horizontal card on mobile */
        align-items: center;
    }

    .s-img {
        width: 80px;
        margin-bottom: 0;
        margin-right: 15px;
    }

    /* 7. Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links,
    .footer-contact {
        width: 100%;
    }

    /* Scrolling text adjustment */
    .announcement-bar .container {
        padding: 0 10px;
    }

    .announcement-label {
        font-size: 0.8rem;
    }

    .announcement-content {
        font-size: 0.8rem;
    }
}