/*
Theme Name: Goldbar Theme
Theme URI: https://goldbar.velagold.kr
Author: VELAGOLD
Description: 한국 공식 금 거래소 - 금거래소 가맹점 문의 전용 테마
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: goldbar-theme
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold-primary: #D4A843;
    --gold-light: #E8D5A3;
    --gold-dark: #B8960C;
    --gold-accent: #C9952A;
    --bg-deep: #1a1a2e;
    --bg-card: #fefcf7;
    --bg-warm: #fff9ee;
    --bg-section: #f5f0e6;
    --text-dark: #2c2c2c;
    --text-body: #444444;
    --text-muted: #777777;
    --text-light: #ffffff;
    --border-gold: #e0c97f;
    --shadow-gold: 0 4px 20px rgba(212,168,67,0.15);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
    --radius: 8px;
    --max-width: 1100px;
    --font-main: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    --font-serif: 'Noto Serif KR', 'Batang', serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    color: var(--text-body);
    background: var(--bg-warm);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-primary); }

img { max-width: 100%; height: auto; display: block; }

/* ===== HEADER ===== */
.site-header {
    background: var(--bg-deep);
    border-bottom: 3px solid var(--gold-primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.site-header .logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header .logo-area img {
    height: 44px;
    width: auto;
}

.site-header .logo-text {
    color: var(--gold-primary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-header .logo-text small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
}

.site-header nav a {
    color: var(--gold-light);
    font-size: 0.9rem;
    margin-left: 24px;
    font-weight: 500;
    transition: color 0.2s;
}

.site-header nav a:hover {
    color: var(--gold-primary);
}

.header-cta {
    display: inline-block;
    background: var(--gold-primary);
    color: var(--bg-deep) !important;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 24px;
}

.header-cta:hover {
    background: var(--gold-dark);
    color: #fff !important;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, var(--bg-deep) 0%, #16213e 60%, #0f3460 100%);
    padding: 80px 20px 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(212,168,67,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section h1 {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    color: var(--gold-primary);
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
}

.hero-section .hero-sub {
    font-size: 1.15rem;
    color: var(--gold-light);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-section .hero-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-section .badge {
    background: rgba(212,168,67,0.12);
    border: 1px solid rgba(212,168,67,0.3);
    color: var(--gold-light);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== SECTIONS ===== */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px;
}

.section-alt {
    background: var(--bg-section);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gold-primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid #f0ece3;
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-body h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== INFO BLOCKS ===== */
.info-block {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    border-left: 4px solid var(--gold-primary);
}

.info-block .icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.info-block h3 {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-block p {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.7;
}

/* ===== FAQ SECTION ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid #f0ece3;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-item summary:hover {
    background: var(--bg-warm);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--gold-primary);
    font-weight: 300;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item .faq-answer {
    padding: 0 24px 20px;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.8;
    border-top: 1px solid #f0ece3;
    padding-top: 16px;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--bg-deep), #16213e);
    padding: 60px 20px;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--font-serif);
    color: var(--gold-primary);
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.cta-section p {
    color: var(--gold-light);
    margin-bottom: 28px;
    font-size: 1rem;
}

.btn-gold {
    display: inline-block;
    background: var(--gold-primary);
    color: var(--bg-deep);
    padding: 14px 40px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.btn-gold:hover {
    background: var(--gold-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 12px 36px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-left: 12px;
}

.btn-outline:hover {
    background: var(--gold-primary);
    color: var(--bg-deep);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--bg-deep);
    border-top: 3px solid var(--gold-primary);
    padding: 40px 20px 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.site-footer .inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.site-footer .footer-info {
    margin-bottom: 16px;
    line-height: 1.8;
}

.site-footer .footer-info strong {
    color: var(--gold-primary);
}

.site-footer .copyright {
    color: #555;
    font-size: 0.75rem;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.gallery-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

/* ===== POSTS LIST (BLOG) ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid #f0ece3;
    transition: transform 0.25s, box-shadow 0.25s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.post-card .thumb {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.post-card .post-body {
    padding: 20px 24px;
}

.post-card .post-body h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.post-card .post-body h3 a {
    color: var(--text-dark);
}

.post-card .post-body h3 a:hover {
    color: var(--gold-dark);
}

.post-card .excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card .read-more {
    font-size: 0.8rem;
    color: var(--gold-dark);
    font-weight: 600;
}

/* ===== SINGLE POST ===== */
.single-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.single-content .entry-header {
    margin-bottom: 32px;
    text-align: center;
}

.single-content .entry-header h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.single-content .entry-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.single-content .entry-body {
    font-size: 1rem;
    line-height: 1.85;
}

.single-content .entry-body h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-gold);
}

.single-content .entry-body h3 {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin: 28px 0 12px;
}

.single-content .entry-body p {
    margin-bottom: 18px;
}

.single-content .entry-body ul, .single-content .entry-body ol {
    margin: 12px 0 18px 24px;
}

.single-content .entry-body li {
    margin-bottom: 6px;
}

.single-content .entry-body blockquote {
    border-left: 4px solid var(--gold-primary);
    background: var(--bg-warm);
    padding: 16px 24px;
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-body);
}

.single-content .entry-body img {
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow-card);
}

.single-content .entry-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.single-content .entry-body th {
    background: var(--bg-deep);
    color: var(--gold-primary);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9rem;
}

.single-content .entry-body td {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.single-content .entry-body tr:nth-child(even) td {
    background: var(--bg-warm);
}

/* ===== CUSTOM HTML BLOCKS ===== */
.gold-highlight-box {
    background: linear-gradient(135deg, var(--bg-warm), #fff5d6);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
}

.gold-highlight-box h4 {
    color: var(--gold-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.gold-step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.gold-step-list li {
    counter-increment: step;
    padding: 16px 16px 16px 56px;
    position: relative;
    margin-bottom: 12px;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #f0ece3;
}

.gold-step-list li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 14px;
    width: 28px;
    height: 28px;
    background: var(--gold-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.gold-checklist {
    list-style: none;
    padding: 0;
}

.gold-checklist li {
    padding: 8px 0 8px 28px;
    position: relative;
}

.gold-checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold-primary);
    font-weight: 700;
}

.gold-notice {
    background: #fff9ee;
    border-left: 4px solid var(--gold-primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 20px 0;
    font-size: 0.9rem;
}

.gold-notice strong {
    color: var(--gold-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section { padding: 50px 16px 40px; }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section .hero-sub { font-size: 1rem; }
    .section { padding: 40px 16px; }
    .section-title { font-size: 1.4rem; }
    .info-block { flex-direction: column; padding: 20px; }
    .cards-grid { grid-template-columns: 1fr; }
    .site-header .inner { flex-direction: column; gap: 8px; }
    .site-header nav { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
    .site-header nav a { margin-left: 0; }
    .cta-section h2 { font-size: 1.4rem; }
    .btn-outline { margin-left: 0; margin-top: 12px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid { grid-template-columns: 1fr; }
    .single-content .entry-header h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 1.5rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .hero-section .hero-badges { flex-direction: column; align-items: center; }
}
