/* ──────────────────────────────────────────
   사주 가이드 페이지 스타일
   墨金 디자인 시스템 기반
   ────────────────────────────────────────── */

/* Hub Page */
.guide-hub-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.guide-grid-section {
    margin: 2rem 0;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.guide-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary, #f0f0f0);
    transition: transform 0.2s, border-color 0.2s;
}

.guide-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold, #D4AF37);
}

.guide-card-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.guide-card-title {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: var(--text-lg, 1.125rem);
    font-weight: 700;
    color: var(--gold, #D4AF37);
    margin: 0 0 0.5rem;
}

.guide-card-desc {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #a0a0a0);
    margin: 0;
    line-height: 1.5;
}

/* Individual Guide Page */
.guide-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.back-link {
    display: inline-block;
    color: var(--gold, #D4AF37);
    text-decoration: none;
    font-size: var(--text-sm, 0.875rem);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 1;
}

/* Hero */
.guide-hero {
    text-align: center;
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    margin-bottom: 2rem;
}

.hero-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.hero-subtitle {
    color: var(--text-secondary, #a0a0a0);
    font-size: var(--text-base, 1rem);
    margin: 0;
}

/* Sections */
.guide-section {
    margin-bottom: 2.5rem;
}

.guide-section h2 {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: var(--text-xl, 1.25rem);
    font-weight: 700;
    color: var(--gold, #D4AF37);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.guide-section p {
    line-height: 1.8;
    margin: 0 0 1rem;
    color: var(--text-primary, #f0f0f0);
}

.guide-section ul, .guide-section ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.guide-section li {
    line-height: 1.7;
    margin-bottom: 0.4rem;
    color: var(--text-primary, #f0f0f0);
}

.guide-section a {
    color: var(--gold, #D4AF37);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guide-section a:hover {
    opacity: 0.8;
}

/* Info Box */
.info-box {
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1rem 0;
}

.info-box h4 {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: var(--text-base, 1rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text-primary, #f0f0f0);
}

.info-box p {
    margin: 0 0 0.5rem;
    font-size: var(--text-sm, 0.875rem);
}

.info-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

.info-box li {
    font-size: var(--text-sm, 0.875rem);
}

/* Guide Table */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: var(--text-sm, 0.875rem);
}

.guide-table thead {
    background: rgba(212, 175, 55, 0.1);
}

.guide-table th {
    padding: 0.6rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--gold, #D4AF37);
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.12));
}

.guide-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
    color: var(--text-primary, #f0f0f0);
}

.guide-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Saju Example (4 pillars visual) */
.saju-example {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stem {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold, #D4AF37);
}

.branch {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #f0f0f0);
}

.label {
    font-size: var(--text-xs, 0.75rem);
    color: var(--text-tertiary, #888);
    margin-top: 0.25rem;
}

/* Five Elements Grid */
.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.element-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
}

.element-card.wood { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3); }
.element-card.fire { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); }
.element-card.earth { background: rgba(212, 175, 55, 0.08); border-color: rgba(212, 175, 55, 0.3); }
.element-card.metal { background: rgba(226, 232, 240, 0.08); border-color: rgba(226, 232, 240, 0.3); }
.element-card.water { background: rgba(96, 165, 250, 0.08); border-color: rgba(96, 165, 250, 0.3); }

.el-emoji { font-size: 1.75rem; margin-bottom: 0.25rem; }
.el-name { font-weight: 700; font-size: var(--text-base, 1rem); }
.el-nature { font-size: var(--text-xs, 0.75rem); color: var(--text-secondary, #a0a0a0); }
.el-season { font-size: var(--text-xs, 0.75rem); color: var(--text-tertiary, #888); }

/* Cycle Diagram */
.cycle-diagram {
    text-align: center;
    padding: 1rem;
    margin: 1rem 0;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border-radius: 8px;
}

.cycle-text {
    font-size: var(--text-lg, 1.125rem);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Yin Yang Grid */
.yin-yang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.yang-side, .yin-side {
    padding: 1.25rem;
    border-radius: 10px;
}

.yang-side {
    background: rgba(248, 113, 113, 0.06);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.yin-side {
    background: rgba(96, 165, 250, 0.06);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.yang-side h4, .yin-side h4 {
    margin: 0 0 0.75rem;
    font-size: var(--text-base, 1rem);
}

.yang-side ul, .yin-side ul {
    margin: 0;
    padding-left: 1rem;
    font-size: var(--text-sm, 0.875rem);
}

/* Step Box */
.step-box {
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.step-box p {
    margin: 0 0 0.25rem;
    font-size: var(--text-sm, 0.875rem);
}

/* FAQ */
.faq-section {
    margin-top: 3rem;
}

.faq-item {
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary, #f0f0f0);
    list-style: none;
    display: flex;
    align-items: center;
}

.faq-item summary::before {
    content: "▸";
    margin-right: 0.75rem;
    color: var(--gold, #D4AF37);
    transition: transform 0.2s;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.7;
}

/* CTA */
.guide-cta {
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.02));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 16px;
}

.guide-cta h2 {
    font-family: var(--font-heading, 'Noto Serif KR', serif);
    font-size: var(--text-xl, 1.25rem);
    color: var(--gold, #D4AF37);
    margin: 0 0 0.5rem;
}

.guide-cta p {
    color: var(--text-secondary, #a0a0a0);
    margin: 0 0 1.25rem;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--gold, #D4AF37);
    color: #000;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.cta-button:hover {
    opacity: 0.85;
}

/* Related Guides */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary, #f0f0f0);
    transition: border-color 0.2s;
}

.related-card:hover {
    border-color: var(--gold, #D4AF37);
}

.related-emoji {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.related-title {
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .guide-hub-page, .guide-page {
        padding: 1rem 1rem 3rem;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .elements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .yin-yang-grid {
        grid-template-columns: 1fr;
    }

    .saju-example {
        gap: 0.75rem;
    }

    .stem, .branch {
        font-size: 1.5rem;
    }

    .guide-table {
        font-size: 0.75rem;
    }

    .guide-table th, .guide-table td {
        padding: 0.4rem 0.5rem;
    }
}
