/* ─────────────────────────────────────────────
   주소8282 — Warm Editorial Design System v2
   ───────────────────────────────────────────── */

/* ── Google Fonts ─────────────────────────────── */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
    /* Warm neutral palette */
    --bg: #fafaf9;
    --bg-alt: #f5f4f2;
    --surface: #ffffff;
    --text: #1c1917;
    --text-muted: #78716c;
    --text-light: #a8a29e;

    /* Rust orange accent */
    --accent: #c2410c;
    --accent-hover: #9a3412;
    --accent-light: #fff7ed;
    --accent-glow: rgba(194,65,12,0.08);

    /* Borders */
    --border: #e7e5e4;
    --border-strong: #d6d3d1;

    /* Richer shadows */
    --shadow-xs: 0 1px 2px rgba(28,25,23,0.04);
    --shadow-sm: 0 1px 3px rgba(28,25,23,0.06), 0 1px 2px rgba(28,25,23,0.04);
    --shadow-md: 0 4px 12px rgba(28,25,23,0.06), 0 2px 4px rgba(28,25,23,0.04);
    --shadow-lg: 0 12px 40px rgba(28,25,23,0.08), 0 4px 12px rgba(28,25,23,0.04);
    --shadow-xl: 0 20px 60px rgba(28,25,23,0.1), 0 8px 20px rgba(28,25,23,0.05);

    /* Radii — slightly rounder for modern feel */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Backward-compat aliases */
    --primary: #c2410c;
    --primary-hover: #9a3412;
    --primary-light: #fff7ed;
    --bg-color: #fafaf9;
    --container-bg: #ffffff;
    --card-bg: #ffffff;
    --nav-bg: rgba(250,250,249,0.92);
    --text-main: #1c1917;
    --border-color: #e7e5e4;
}

[data-theme='dark'] {
    --bg: #1a1714;
    --bg-alt: #242019;
    --surface: #2a2520;
    --text: #f5f4f2;
    --text-muted: #a8a29e;
    --text-light: #57534e;
    --accent: #fb923c;
    --accent-hover: #f97316;
    --accent-light: rgba(251,146,60,0.1);
    --accent-glow: rgba(251,146,60,0.06);
    --border: #3c3836;
    --border-strong: #57534e;

    --bg-color: #1a1714;
    --container-bg: #2a2520;
    --card-bg: #2a2520;
    --nav-bg: rgba(26,23,20,0.92);
    --text-main: #f5f4f2;
    --primary: #fb923c;
    --primary-hover: #f97316;
    --primary-light: rgba(251,146,60,0.1);
    --border-color: #3c3836;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body { min-height: 100%; }

body {
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth page entrance */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

main { flex: 1; display: flex; flex-direction: column; animation: fadeInUp 0.4s ease-out; }

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
header {
    background: var(--nav-bg);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 64px;
    width: 100%;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.15rem;
    color: var(--accent);
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(194,65,12,0.2));
}

.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
}
.logo-tag {
    font-size: 0.58rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

nav ul { display: flex; list-style: none; gap: 2px; }
nav a {
    font-size: 1.09rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: block;
    position: relative;
}
nav a:hover {
    color: var(--text);
    background: var(--accent-light);
}

/* ── Navigation Dropdown ─────────────────────── */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-trigger {
    cursor: pointer;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1.25rem;
    min-width: 520px;
    z-index: 1001;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
    animation: fadeInUp 0.15s ease-out;
}
.nav-dropdown:hover .nav-dropdown-menu {
    display: grid;
}
.dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.dropdown-section h4 {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.4rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}
.dropdown-section a {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-xs);
    transition: all 0.15s ease;
    background: none;
}
.dropdown-section a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

@media (max-width: 768px) {
    .nav-dropdown-menu {
        position: static;
        min-width: auto;
        grid-template-columns: 1fr;
        box-shadow: none;
        border: none;
        padding: 0.5rem 0 0.5rem 1rem;
        animation: none;
    }
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }
    nav.mobile-open .nav-dropdown .nav-dropdown-menu {
        display: grid;
    }
}

/* ── Study Abroad Section ────────────────────── */
.study-abroad-section {
    padding: 5rem 2rem;
    background: var(--accent-light);
}
.study-abroad-section .section-container {
    max-width: 1200px;
    margin: 0 auto;
}
.study-abroad-section .tip-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.study-abroad-section .tip-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.2s ease;
    white-space: nowrap;
}
#theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* ── Mobile menu toggle ──────────────────────── */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; align-items: center; }
    nav { display: none; }
    nav.mobile-open {
        display: flex;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        animation: fadeInUp 0.2s ease-out;
    }
    nav.mobile-open ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    nav.mobile-open a {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: var(--radius-md);
    }
}

/* ══════════════════════════════════════════════
   HOMEPAGE — Hero
══════════════════════════════════════════════ */
.hero {
    padding: 6.5rem 2rem 5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
    padding: 0.4rem 1rem 0.4rem 0;
    background: linear-gradient(90deg, var(--accent-light), transparent);
    border-radius: var(--radius-xl);
}

.hero-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 1.75rem;
    max-width: 700px;
}

.highlight {
    color: var(--accent);
    position: relative;
}
.highlight::after {
    content: '';
    position: absolute;
    bottom: 0.08em;
    left: -2px;
    right: -2px;
    height: 0.18em;
    background: var(--accent);
    opacity: 0.2;
    border-radius: 2px;
}

.hero > p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.8;
    margin-bottom: 2.75rem;
}

/* ── Search bar ──────────────────────────────── */
.main-search-container {
    width: 100%;
    max-width: 580px;
    margin: 0;
    margin-bottom: 2.5rem;
}

.search-box-wrapper {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.search-box-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-md);
}

#main-address-input, #address-input, #name-input, #phone-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    outline: none;
    color: var(--text);
    font-family: inherit;
    min-width: 0;
}

#main-address-input::placeholder,
#address-input::placeholder,
#name-input::placeholder,
#phone-input::placeholder { color: var(--text-light); }

#main-search-btn, #address-search-btn, #name-convert-btn, #phone-convert-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
    letter-spacing: -0.01em;
}

#main-search-btn:hover,
#address-search-btn:hover,
#name-convert-btn:hover,
#phone-convert-btn:hover {
    background: var(--accent-hover);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

/* Hero quick-links */
.hero-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-links a {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    background: var(--bg-alt);
    border: 1px solid transparent;
}
.hero-links a:hover {
    color: var(--accent);
    background: var(--accent-light);
    border-color: var(--accent);
}

/* ══════════════════════════════════════════════
   HOMEPAGE — Services (numbered list style)
══════════════════════════════════════════════ */
.services-section {
    border-top: 1px solid var(--border);
    width: 100%;
    background: var(--surface);
}

[data-theme='dark'] .services-section { background: var(--bg); }

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.service-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 0;
    margin: 0 -1rem;
}

.service-item:last-child { border-bottom: none; }

.service-item:hover {
    background: var(--accent-light);
    border-radius: var(--radius-lg);
}
.service-item:hover .service-num { color: var(--accent); }
.service-item:hover .service-arrow { transform: translateX(6px); color: var(--accent); }
.service-item:hover .service-title { color: var(--accent); }

.service-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 0.06em;
    transition: color 0.2s ease;
    font-variant-numeric: tabular-nums;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.service-item:hover .service-num {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.service-body { min-width: 0; }

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 0.35rem;
    transition: color 0.2s ease;
}

.service-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.service-arrow {
    font-size: 1.15rem;
    color: var(--text-light);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   HOMEPAGE — Country Tips
══════════════════════════════════════════════ */
.travel-tips-section {
    padding: 5.5rem 2rem;
    background: var(--bg-alt);
    width: 100%;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

[data-theme='dark'] .travel-tips-section { background: var(--bg); }

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

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.section-header .section-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 260px;
    text-align: right;
    line-height: 1.55;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.tip-card {
    background: var(--surface);
    padding: 2rem 1.75rem;
    transition: all 0.25s ease;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

[data-theme='dark'] .tip-card { background: var(--bg-alt); }

.tip-card:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    display: block;
}

.tip-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.tip-card ul { list-style: none; }
.tip-card li {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
    line-height: 1.6;
    padding-left: 1rem;
    position: relative;
}
.tip-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.5;
}

/* ══════════════════════════════════════════════
   HOMEPAGE — Bible Verse
══════════════════════════════════════════════ */
.bible-verse-container {
    padding: 5rem 2rem;
    width: 100%;
}

.bible-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3.5rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    position: relative;
    box-shadow: var(--shadow-sm);
}
.bible-card::before {
    content: '\201C';
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.12;
    line-height: 1;
    font-family: Georgia, serif;
}

[data-theme='dark'] .bible-card { background: var(--bg-alt); }

.bible-header {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}

.bible-text {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.9;
    font-style: italic;
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

/* ══════════════════════════════════════════════
   INNER PAGES — Layout
══════════════════════════════════════════════ */
.main-content {
    padding: 3.5rem 2rem;
    width: 100%;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    background: var(--container-bg);
    padding: 3rem 3.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Page title/subtitle for inner pages */
.page-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}
.page-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 3rem;
}

/* Kept for backward compat */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.feature-card {
    background: var(--container-bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.feature-card:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
[data-theme='dark'] .feature-card:hover { background: var(--bg-alt); }

.feature-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: -0.01em;
    transition: gap 0.2s ease;
}
.card-link:hover { text-decoration: underline; gap: 0.5rem; }

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
footer {
    background: #130f0d;
    color: #e7e5e4;
    padding: 5rem 2rem 2.5rem;
    width: 100%;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
}

.footer-brand { flex: 1.5; }
.footer-brand h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.footer-brand p {
    color: #78716c;
    line-height: 1.7;
    max-width: 280px;
    font-size: 0.84rem;
}

.footer-links-group {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.footer-column h4 {
    color: #78716c;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer-column ul { list-style: none; padding: 0; }
.footer-column li { margin-bottom: 0.65rem; }
.footer-column a {
    color: #a8a29e;
    text-decoration: none;
    font-size: 0.84rem;
    transition: color 0.2s ease;
}
.footer-column a:hover { color: white; }

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 1.75rem;
    border-top: 1px solid #2a2520;
    text-align: center;
    color: #57534e;
    font-size: 0.78rem;
    line-height: 1.8;
}
.footer-bottom a { transition: color 0.2s ease; }
.footer-bottom a:hover { color: #a8a29e; }

/* ══════════════════════════════════════════════
   ADSENSE
══════════════════════════════════════════════ */
.ad-container {
    width: 100%;
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 2rem;
    text-align: center;
    overflow: hidden;
    min-height: 90px;
}

.ad-container .adsbygoogle {
    display: block;
    width: 100%;
}

.container .ad-container {
    padding: 0;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .ad-container {
        padding: 0 1rem;
        margin: 1.5rem auto;
        min-height: 50px;
    }
}

/* ══════════════════════════════════════════════
   COOKIE CONSENT
══════════════════════════════════════════════ */
#cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
    padding: 1.25rem 2rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

[data-theme='dark'] #cookie-consent {
    background: #2a2520;
    border-top-color: #3c3836;
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-consent-inner p {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    min-width: 200px;
}

.cookie-consent-inner a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-consent-buttons button {
    padding: 0.55rem 1.35rem;
    border-radius: var(--radius-xl);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

#cookie-accept {
    background: var(--accent);
    color: white;
    border: none;
}
#cookie-accept:hover { background: var(--accent-hover); }

#cookie-decline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
#cookie-decline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.cookie-consent-hide {
    transform: translateY(100%);
    opacity: 0;
}

@media (max-width: 520px) {
    .cookie-consent-inner { flex-direction: column; text-align: center; }
    .cookie-consent-buttons { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════
   UTILITIES & COMPONENTS
══════════════════════════════════════════════ */
.hidden { display: none; }

/* Primary copy button */
.copy-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 1.25rem;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(194,65,12,0.2);
}
.copy-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(194,65,12,0.25);
    transform: translateY(-1px);
}

/* Small copy button */
.copy-btn-sm {
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    background: var(--bg-alt);
    color: var(--text-muted);
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-family: inherit;
    margin-top: 0.6rem;
    transition: all 0.2s ease;
}
.copy-btn-sm:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Guide card */
.guide-card {
    background: var(--bg-alt);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    text-align: left;
    transition: box-shadow 0.2s ease;
}
[data-theme='dark'] .guide-card { background: var(--bg-alt); }
.guide-card:hover { box-shadow: var(--shadow-sm); }
.guide-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.guide-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ══════════════════════════════════════════════
   HISTORY SECTION
══════════════════════════════════════════════ */
.history-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.history-header h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.history-header button {
    font-size: 0.75rem;
    color: var(--text-light);
    background: none;
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.history-header button:hover {
    color: #dc2626;
    border-color: #dc2626;
    background: rgba(220,38,38,0.05);
}

.history-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    transition: all 0.15s ease;
}
.history-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xs);
}

[data-theme='dark'] .history-item { background: var(--bg-alt); }

.history-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-xl);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.history-body {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.history-input {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.history-result {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.history-copy {
    font-size: 0.68rem;
    padding: 3px 10px;
    border: 1px solid var(--border);
    background: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.history-copy:hover { border-color: var(--accent); color: var(--accent); }

.history-time {
    font-size: 0.68rem;
    color: var(--text-light);
    flex-shrink: 0;
}

@media (max-width: 520px) {
    .history-item { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .history-body { flex-direction: column; gap: 0.2rem; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .tips-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem 3rem; }
    .hero h1 { font-size: 2.75rem; }
    .hero > p { font-size: 1rem; }
    .container { padding: 2rem 1.5rem; border-radius: var(--radius-lg); }
    .bible-card { padding: 2.5rem 1.75rem; }
    .footer-content { flex-direction: column; gap: 2.5rem; }
    .footer-links-group { gap: 2rem; }
    .service-item { grid-template-columns: 40px 1fr auto; gap: 1rem; padding: 1.5rem 0.5rem; }
    .service-num { width: 32px; height: 32px; font-size: 0.7rem; }
    .section-header .section-sub { text-align: left; }
    .tips-grid { grid-template-columns: 1fr 1fr; }
    .hero-links { gap: 0.5rem; }
    .hero-links a { font-size: 0.78rem; padding: 0.4rem 0.75rem; }
}

@media (max-width: 520px) {
    .hero h1 { font-size: 2.2rem; }
    .tips-grid { grid-template-columns: 1fr; }
    .service-arrow { display: none; }
    .container { padding: 1.5rem 1.25rem; }
}

/* ── Blog Content (Markdown rendered) ────────── */
.blog-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--primary);
}
.blog-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
}
.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.9;
}
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.blog-content ul, .blog-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 2;
}
.blog-content blockquote {
    background: var(--bg-color, #f5f5f4);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin: 1.5rem 0;
    line-height: 1.9;
}
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.blog-content th, .blog-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #e7e5e4);
    text-align: left;
}
.blog-content th {
    background: var(--bg-color, #f5f5f4);
    font-weight: 700;
}
.blog-content code {
    background: var(--bg-color, #f5f5f4);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85em;
}
.blog-content pre {
    background: var(--bg-color, #f5f5f4);
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.blog-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
