/* assets/style.css - SSL憑證小教室樣式表 */

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

:root {
    --primary-blue: #1e40af;
    --light-blue: #3b82f6;
    --lighter-blue: #93c5fd;
    --pale-blue: #dbeafe;
    --dark-blue: #1e3a8a;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
}

body {
    font-family: "Microsoft JhengHei", "微軟正黑體", "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
}

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

/* Header樣式 */
.main-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.8;
}

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

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-section .lead {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.company-info {
    font-size: 1.1rem;
    margin-top: 2rem;
}

.company-info a {
    color: var(--white);
    text-decoration: underline;
}

/* 搜尋區塊 */
.search-section {
    background: var(--white);
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-form {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--pale-blue);
    border-radius: 50px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: var(--light-blue);
}

.search-button {
    padding: 1rem 2rem;
    background: var(--light-blue);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.search-button:hover {
    background: var(--primary-blue);
}

.search-result-info {
    text-align: center;
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--gray);
}

.clear-search {
    color: var(--light-blue);
    margin-left: 1rem;
    text-decoration: none;
}

.clear-search:hover {
    text-decoration: underline;
}

/* 分類導覽 */
.category-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.category-link {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--pale-blue);
}

.category-link:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

/* 主題區塊 */
.topic-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--lighter-blue);
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.topic-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-left: 4px solid var(--light-blue);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.15);
}

.topic-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue));
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.topic-title {
    font-size: 1.4rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.topic-description {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.topic-link {
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: gap 0.3s;
}

.topic-link:hover {
    gap: 0.5rem;
}

/* 內容頁面樣式 */
.content-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.breadcrumb {
    padding: 1rem 0;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--light-blue);
    text-decoration: none;
}

.content-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--lighter-blue);
}

.content-body h3 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
}

.content-body h4 {
    color: var(--dark-gray);
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
}

.content-body p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-body ul, .content-body ol {
    margin: 1rem 0 1rem 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.content-body strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.content-body pre {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    border-left: 4px solid var(--light-blue);
}

.content-body code {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.9rem;
}

/* Footer樣式 */
.main-footer {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
}

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

.footer-section h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-link {
    color: var(--white);
    text-decoration: underline;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

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

/* 響應式設計 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
    
    .category-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .category-link {
        text-align: center;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
}
