/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #c9a55d;
    --accent-color: #8b7355;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.15);
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

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

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

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary-color);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--accent-color);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.category-image {
    width: 100%;
    height: 250px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #999;
    text-align: center;
    padding: 20px;
    border-bottom: 3px solid var(--secondary-color);
}

.category-content {
    padding: 2rem;
}

.category-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.category-content p {
    color: #666;
    line-height: 1.6;
}

.learn-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.learn-more:hover {
    gap: 10px;
}

.learn-more::after {
    content: " →";
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-image {
    width: 100%;
    height: 220px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #999;
    text-align: center;
    padding: 20px;
}

.blog-content {
    padding: 2rem;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.blog-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more::after {
    content: " →";
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #555;
}

.about-features {
    list-style: none;
    margin-top: 2rem;
}

.about-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-features li::before {
    content: "✓";
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.about-image {
    height: 500px;
    background-color: var(--light-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    padding: 20px;
}

/* SEO Content Section */
.seo-content {
    background-color: var(--light-bg);
    padding: 4rem 0;
}

.seo-text {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.9;
}

.seo-text h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.seo-text p {
    margin-bottom: 1.5rem;
    color: #555;
    text-align: justify;
}

/* Contact Section */
.contact-info {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-details {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.contact-item {
    margin: 2rem 0;
}

.contact-item h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.contact-item p {
    font-size: 1.1rem;
    color: var(--text-color);
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* Article Styles */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    background: var(--light-bg);
}

.article-header h1 {
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.article-meta {
    color: #666;
    font-size: 0.95rem;
}

.article-content {
    max-width: 800px;
    margin: 3rem auto;
    font-size: 1.05rem;
    line-height: 1.9;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.8rem;
}

.article-image {
    width: 100%;
    height: 400px;
    background-color: var(--light-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    padding: 20px;
    margin: 2rem 0;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    background-color: var(--light-bg);
}

.breadcrumb nav {
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: #999;
}

/* Responsive Design */
@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .category-grid,
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    nav ul.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    section {
        padding: 3rem 0;
    }

    .category-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.bg-light {
    background-color: var(--light-bg);
}

/* Portfolio Styles */
.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.portfolio-tag {
    display: inline-block;
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.portfolio-tag:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* FAQ Styles */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.faq-question {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    position: relative;
    padding-left: 2rem;
}

.faq-question::before {
    content: "Q";
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--secondary-color);
    color: var(--white);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.faq-item p {
    color: #555;
    line-height: 1.8;
    padding-left: 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced hover effects */
.category-card,
.blog-card,
.portfolio-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover,
.blog-card:hover,
.portfolio-item:hover {
    transform: translateY(-12px);
}

/* Interactive button effects */
.cta-button,
.learn-more,
.read-more {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading animation for images */
.category-image,
.blog-image,
.article-image {
    position: relative;
    transition: all 0.3s ease;
}

.category-image:hover,
.blog-image:hover {
    transform: scale(1.02);
}

/* Enhanced footer links */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Scroll to top button (optional enhancement) */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--secondary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Enhanced responsive tables */
@media (max-width: 768px) {
    .faq-item {
        padding: 1.5rem;
    }

    .faq-question {
        font-size: 1.05rem;
    }

    .portfolio-meta {
        gap: 0.3rem;
    }

    .portfolio-tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .mobile-menu-toggle,
    .cta-button,
    .scroll-to-top {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .category-card,
    .blog-card {
        page-break-inside: avoid;
    }
}
