/* ===== UNITARY Blog — Shared Stylesheet ===== */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
body {
    font-family: -apple-system, 'Inter', 'PingFang TC', 'Noto Sans TC', sans-serif;
    color: #222;
    background: #fff;
    line-height: 1.7;
}
a { color: #FF6B35; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav { background: #1a1a1a; padding: 24px 32px; }
.nav-inner { max-width: 1080px; margin: 0 auto; }
.nav img { height: 34px; display: block; filter: brightness(0) invert(1); }

/* Layout */
.layout {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 24px 60px;
    display: flex;
    gap: 48px;
}

/* ===== Homepage ===== */
.main { flex: 1; min-width: 0; }
.intro { margin-bottom: 40px; }
.intro .sub { color: #FF6B35; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.intro h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.intro p { color: #555; font-size: 0.95rem; }

article { margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid #eee; }
article:last-of-type { border: none; }
.date { font-size: 0.78rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
article h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
article h2 a { color: inherit; }
article h2 a:hover { color: #FF6B35; text-decoration: none; }
article p { color: #555; font-size: 0.92rem; }
.tag { color: #FF6B35; font-size: 0.78rem; font-weight: 600; margin-top: 4px; }

/* ===== Article Page ===== */
.main-content { flex: 1; min-width: 0; max-width: 700px; }
.back { font-size: 0.85rem; margin-bottom: 24px; display: block; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.3; margin-bottom: 20px; }
.main-content p { margin-bottom: 16px; color: #444; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 32px 0 12px; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 10px; }
ul, ol { margin: 0 0 16px 20px; color: #444; }
ul li, ol li { margin-bottom: 6px; }

/* Info & Highlight boxes */
.info-box {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 24px 0;
}
.info-box p { margin-bottom: 4px; font-size: 0.9rem; }

.highlight-box {
    background: #FFF8F3;
    border-left: 4px solid #FF6B35;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.step-box {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}
.step-box strong { color: #FF6B35; font-size: 1.1rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.9rem; }
th { background: #f5f5f5; padding: 10px 12px; text-align: left; font-weight: 600; border-bottom: 2px solid #ddd; }
td { padding: 10px 12px; border-bottom: 1px solid #eee; }
tr:hover td { background: #fafafa; }

/* CTA Button */
.btn-cta {
    display: inline-block;
    background: #FF6B35;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none !important;
}
.btn-cta:hover { background: #e85a2a; }

/* ===== Sidebar ===== */
.side { width: 260px; flex-shrink: 0; }
.side-menu { width: 260px; flex-shrink: 0; }
.side-box {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.side-box h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 12px;
}
.about-text { font-size: 0.85rem; color: #555; line-height: 1.7; }
.side-box input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}
.side-box input:focus { border-color: #FF6B35; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-list a {
    display: block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #555;
    text-decoration: none;
}
.tag-list a:hover { background: #FF6B35; color: #fff; }
.side-rec a {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.side-rec a:last-child { border: none; }

/* ===== Footer ===== */
.blog-footer {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 40px;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
}
.blog-footer a { color: #999; }
.blog-footer a:hover { color: #FF6B35; }

/* ===== Post Navigation ===== */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}
.post-nav a { font-weight: 600; }
.post-nav .prev, .post-nav .next { max-width: 45%; }
.post-nav .next { text-align: right; margin-left: auto; }

/* ===== Responsive ===== */
@media (max-width: 800px) {
    .layout { flex-direction: column; }
    .side, .side-menu { width: 100%; }
    .main-content { max-width: 100%; }
}
@media (max-width: 480px) {
    .nav { padding: 16px 20px; }
    .layout { padding: 24px 16px 40px; }
    h1 { font-size: 1.5rem; }
}
