/* ==========================================================================
   通用樣式表 - Information is Delicious
   適用於所有文章頁面的基礎樣式
   ========================================================================== */

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo a {
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #2563eb;
}

/* ==========================================================================
   響應式導覽列 - Mobile Navigation
   ========================================================================== */

/* 漢堡選單按鈕樣式 (預設隱藏) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 漢堡選單動畫效果 */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background-color: #f8f9fa;
    padding: 10px 0 10px 10px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #6c757d;
    font-weight: normal;
}

.breadcrumb span[aria-current="page"] {
    color: #343a40;
    font-weight: 500;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    color: white;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hero .date {
    font-size: 1rem;
    opacity: 0.8;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

main {
    background: white;
    padding: 3rem 0;
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   Author Section
   ========================================================================== */

.author-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
    border-radius: 50%;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
}

.author-title {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.author-bio {
    color: #374151;
    line-height: 1.6;
}

/* ==========================================================================
   Publish Info
   ========================================================================== */

.publish-info {
    background: #f9fafb;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #2563eb;
    font-size: 0.95rem;
    color: #6b7280;
}

.publish-date {
    font-weight: 600;
    color: #2563eb;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h2, h3, h4, h5, h6 {
    margin-top: 0;
    color: #111827;
}

h1 {
    color: #ffffff;
}

h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2.5rem 0 1.5rem 0;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
    color: #000000;
    line-height: 1.6;
}

/* ==========================================================================
   Quote Box
   ========================================================================== */

.quote-box {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.1rem;
    color: #1e40af;
}

.quote-box blockquote {
    margin: 0;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */

.data-table {
    margin: 3rem 0;
    background: white;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table caption {
    padding: 1rem;
    font-weight: 600;
    color: #111827;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #1f2937;
    color: white;
    padding: 1rem 0.8rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.data-table td {
    padding: 0.8rem;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.95rem;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr:first-child td {
    font-weight: 600;
}

/* ==========================================================================
   Industry Sections
   ========================================================================== */

.industry-section {
    margin: 2.5rem 0;
    padding: 0;
}

.industry-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.industry-quote {
    background: #f8fafc;
    padding: 1.2rem;
    margin: 1rem 0;
    font-style: italic;
    color: #475569;
    border-left: 3px solid #64748b;
    border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   References
   ========================================================================== */

.references-section {
    background: #f9fafb;
    padding: 2.5rem;
    margin: 3rem 0;
    border-left: 4px solid #6b7280;
    border-radius: 0 8px 8px 0;
}

.references-section h3 {
    color: #111827;
    margin-bottom: 1.5rem;
}

.references-list {
    list-style: none;
    padding: 0;
}

.references-list li {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.6;
    color: #374151;
}

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

.references-list li::before {
    content: "📋";
    margin-right: 0.8rem;
}

/* ==========================================================================
   Conclusion Section
   ========================================================================== */

.conclusion {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 2px solid #e5e7eb;
}

/* ==========================================================================
   Ad Spaces
   ========================================================================== */

.ad-space {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    color: #6b7280;
    border-radius: 8px;
}

.ad-space.banner {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: #667eea;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-content > * {
    animation: fadeInUp 0.6s ease forwards;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* 顯示漢堡選單按鈕 */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* 導覽列樣式調整 */
    nav {
        position: relative;
    }
    
    /* 導覽連結在手機版的樣式 */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        border-radius: 0 0 15px 15px;
        
        /* 預設隱藏 */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        
        /* 覆蓋原本的 display: none */
        display: flex !important;
    }
    
    /* 當選單開啟時 */
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* 手機版連結樣式 */
    .nav-links li {
        margin: 0;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .nav-links li:last-child a {
        border-bottom: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 0 1rem;
    }
    
    .data-table {
        font-size: 0.85rem;
        overflow-x: auto;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.4rem;
        min-width: 80px;
    }

    .author-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .author-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .breadcrumb {
        font-size: 12px;
    }
    
    .breadcrumb-separator {
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2.5rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    main {
        padding: 2rem 0;
    }
}