/* Global Styles */
body {
    font-family: 'Roboto', 'Noto Sans TC', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
    color: #424242;
}

.mdl-layout__header {
    background-color: #998262; /* 更改為大地色系 */
}

.mdl-layout__drawer .mdl-navigation .mdl-navigation__link,
.mdl-layout__header .mdl-navigation__link {
    font-weight: 500;
}

.mdl-layout__drawer .mdl-navigation .mdl-navigation__link:hover,
.mdl-layout__header .mdl-navigation__link:hover {
    background-color: rgba(153, 130, 98, 0.2);
    color: #424242; /* 改為灰色，使其在 hover 時更容易看見 */
}

.mdl-button--accent.mdl-button--accent {
    color: #fff;
    background-color: #998262; /* 更改為大地色系 */
}

.mdl-button--accent.mdl-button--accent:hover {
    background-color: #7a6850; /* 深一點的大地色 */
}

.section-title {
    text-align: center;
    color: #998262;
    margin: 40px 0 20px;
    font-weight: 300;
}

/* Logo */
.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

.drawer-logo-img {
    height: 40px;
    margin: 10px auto;
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero_image_1920x1080.webp');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    margin-bottom: 20px;
    font-weight: 300;
}

.hero-content h2 {
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Features Section */
.features-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.feature-card {
    width: 100%;
    height: 100%;
}

.feature-card .mdl-card__title {
    color: #998262;
    height: 80px;
}

.feature-card .mdl-card__supporting-text {
    height: 100px;
    overflow: hidden;
}

/* Brands Section */
.brands-section {
    background-color: #F6E7CA; /* 更改為暖色系背景 */
    padding: 40px 20px;
    margin-bottom: 40px;
}

.brands-section .mdl-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.brand-card {
    width: 100%;
    height: 100%;
}

.brand-card .mdl-card__title {
    color: #998262;
    height: 80px;
}

.brand-card .mdl-card__supporting-text {
    height: 120px;
    overflow: hidden;
}

/* Cases Section */
.cases-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.case-card {
    width: 100%;
    height: 100%;
}

.case-card .mdl-card__title {
    color: #998262;
    height: 80px;
}

.case-card .mdl-card__supporting-text {
    height: 100px;
    overflow: hidden;
}

/* Page Content */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    color: #998262;
    margin-bottom: 30px;
    font-weight: 300;
}

.page-section {
    margin-bottom: 40px;
}

.page-section h3 {
    color: #998262;
    font-weight: 400;
}

.page-image {
    max-width: 600px;
    max-height: 400px;
    width: auto;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 產品頁面樣式 */
.product-card {
    width: 100%;
    min-height: 500px;
    margin-bottom: 20px;
}

.product-card .mdl-card__title {
    color: #fff;
    height: 120px;
    background-color: #998262;
}

.product-card .mdl-card__title-text {
    font-size: 24px;
    font-weight: 500;
}

.product-features {
    padding-left: 20px;
    margin-top: 10px;
}

.product-features li {
    margin-bottom: 8px;
}

/* 案例頁面樣式 */
.case-intro {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.case-card {
    width: 100%;
}

.case-card .mdl-card__title {
    color: #fff;
    height: 120px;
    background-color: #D7D3B0;
}

.case-card .mdl-card__title-text {
    font-size: 24px;
    font-weight: 500;
}

.case-card .mdl-card__supporting-text {
    width: auto;
    padding: 16px;
}

.case-card ul {
    padding-left: 20px;
    margin-top: 10px;
}

.case-card li {
    margin-bottom: 8px;
}

.case-contact {
    text-align: center;
    margin: 60px auto;
    max-width: 800px;
    padding: 20px;
    background-color: #F6E7CA;
    border-radius: 4px;
}

/* 標籤頁樣式 */
.mdl-tabs__tab-bar {
    justify-content: center;
    margin-bottom: 30px;
}

.mdl-tabs__tab {
    font-weight: 500;
}

.mdl-tabs__panel {
    padding: 10px;
}

/* 響應式調整 */
@media (max-width: 839px) {
    .product-card,
    .case-card {
        min-height: 400px;
    }
    
    .product-card .mdl-card__title,
    .case-card .mdl-card__title {
        height: 100px;
    }
}

@media (max-width: 479px) {
    .product-card .mdl-card__title-text,
    .case-card .mdl-card__title-text {
        font-size: 20px;
    }
    
    .mdl-tabs__tab {
        padding: 0 12px;
    }
}
.product-features li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 24px;
}

.product-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #998262;
}

/* Cases Page */
.case-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.case-item:last-child {
    border-bottom: none;
}

.case-item h3 {
    color: #998262;
    font-weight: 400;
}

.case-list {
    list-style-type: none;
    padding-left: 0;
}

.case-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 24px;
}

.case-list li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #D7D3B0;
    font-size: 18px;
}

/* Footer */
.mdl-mega-footer {
    background-color: #998262;
    color: white;
}

.mdl-mega-footer__heading {
    color: white;
}

/* Responsive Design */
@media (max-width: 839px) {
    .hero-section {
        padding: 60px 20px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .feature-card .mdl-card__supporting-text,
    .brand-card .mdl-card__supporting-text,
    .case-card .mdl-card__supporting-text {
        height: auto;
    }
}

@media (max-width: 479px) {
    .hero-section {
        padding: 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content h2 {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .mdl-mega-footer__drop-down-section {
        width: 100%;
    }
}

/* 公司介紹頁面樣式 */
.company-intro-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.company-intro-text {
    flex: 1;
}

.company-intro-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.company-intro-image .page-image {
    margin: 0;
    max-width: 100%;
}

@media (max-width: 839px) {
    .company-intro-container {
        flex-direction: column;
        gap: 20px;
    }

    .company-intro-image {
        justify-content: center;
    }

    .company-intro-image .page-image {
        margin: 0 auto;
    }
}

/* 合作廠商 Logo 樣式 */
.partner-logo {
    max-width: 300px;
    max-height: 150px;
    width: auto;
    height: auto;
    margin: 0;
    display: block;
    box-shadow: none;
}

@media (max-width: 839px) {
    .partner-logo {
        max-width: 250px;
        max-height: 125px;
        margin: 0 auto;
    }
}

@media (max-width: 479px) {
    .partner-logo {
        max-width: 200px;
        max-height: 100px;
    }
}

/* Knowledge Page Styles */
.article-card {
    margin: 20px 0;
    max-width: 100%;
}

.article-meta {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.article-date {
    margin-right: 20px;
}

.article-category {
    background-color: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
}

.list-item-title {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.list-item-description {
    color: #666;
    margin: 0;
}

.article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Articles Section Styles */
.articles-section {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.article-preview-card {
    width: 100%;
    /* height: 100%; */ /* 移除固定高度，讓內容決定 */
    min-height: 250px; /* 確保最小高度 */
}

.article-preview-card .mdl-card__title {
    color: #998262;
    height: 100px; /* 增加標題高度 */
}

.article-preview-card .mdl-card__title-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.3;
}

.article-preview-card .mdl-card__supporting-text {
    /* height: 100px; */ /* 移除固定高度 */
    min-height: 80px; /* 確保最小高度 */
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
}

.article-preview-card .mdl-card__actions {
    padding: 8px 16px;
}

/* Article Detail Page Styles */
.article-detail-card {
    margin-bottom: 32px;
    width: 100%;
    height: auto;
    min-height: 0 !important;
}

.article-detail-card .mdl-card__title {
    min-height: 0;
    padding: 0;
}

.article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #998262 0%, #7a6850 100%);
    color: white;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.article-header:hover {
    background: linear-gradient(135deg, #7a6850 0%, #998262 100%);
    transform: translateY(-2px);
}

.article-title {
    margin: 0;
    flex-grow: 1;
    font-size: 20px;
    font-weight: 500;
}

.article-meta {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.article-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

.article-content.expanded {
    padding: 20px;
    max-height: 2000px;
    opacity: 1;
    overflow: auto;
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.article-summary {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 16px;
}

.article-tags {
    margin-bottom: 16px;
}

.article-tag {
    display: inline-block;
    background-color: #ff9800;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.article-cta {
    text-align: center;
    margin-top: 24px;
    padding: 16px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.article-body h3 {
    color: #998262;
    font-weight: 500;
    margin-top: 24px;
    margin-bottom: 12px;
}

.article-body h4 {
    color: #666;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 8px;
}

.article-body h5 {
    color: #666;
    font-weight: 500;
    margin-top: 16px;
    margin-bottom: 8px;
}

.article-body p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.page-intro {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #F6E7CA;
    border-radius: 8px;
}

.page-intro h2 {
    color: #998262;
    margin-bottom: 16px;
    font-weight: 400;
}

.page-intro p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive adjustments for articles */
@media screen and (max-width: 839px) {
    .article-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .article-title {
        margin-bottom: 8px;
        font-size: 18px;
    }
    
    .article-content.expanded {
        padding: 16px;
    }
    
    .article-preview-card .mdl-card__title-text {
        font-size: 16px;
    }
    
    .article-preview-card .mdl-card__supporting-text {
        height: auto;
        min-height: 60px; /* 調整平板上的最小高度 */
    }
}

@media screen and (max-width: 479px) {
    .article-preview-card .mdl-card__title-text {
        font-size: 14px;
    }
    
    .article-preview-card .mdl-card__supporting-text {
        font-size: 13px;
        min-height: 60px; /* 調整手機上的最小高度 */
    }
}
