/* === PixelBloom Theme | Risij.uk Blog === */
/* Language: Korean */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Noto+Sans+KR:wght@400;500;700&display=swap');

/* --- CSS Variables --- */
:root {
    --background-color: #f8f9fa; /* Very light grey */
    --text-color: #343a40; /* Dark grey */
    --primary-accent-color: #d63384; /* Vibrant Magenta */
    --secondary-accent-color: #495057; /* Mid Grey */
    --header-footer-bg: #ffffff;
    --card-border-color: #e9ecef;
    --link-hover-color: #6f42c1; /* Deep Purple */
    --font-primary: 'Noto Sans KR', sans-serif;
    --font-display: 'Montserrat', sans-serif;
    --container-width: 1100px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 17px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--primary-accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

ul {
    list-style: none;
}

ul li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 25px;
}

ul li::before {
    content: '⭐';
    position: absolute;
    left: 0;
    top: 2px;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* --- Header --- */
.site-header {
    background-color: var(--header-footer-bg);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-accent-color);
}
.site-title a {
    text-decoration: none;
    color: inherit;
}
.site-title a:hover {
    color: var(--link-hover-color);
}

.nav-menu {
    display: flex;
    gap: 1.75rem;
}

.nav-menu li::before {
    content: ''; /* Remove bullets from nav */
}
.nav-menu li {
    padding-left: 0;
}

.nav-menu a {
    font-weight: 500;
    font-size: 1rem;
    padding-bottom: 5px;
    color: var(--text-color);
    position: relative;
    text-decoration: none;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-accent-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}
.nav-menu a:hover {
    text-decoration: none;
    color: var(--primary-accent-color);
}


/* --- Main Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 3fr 1fr;
    }
}

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    padding: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fce4ec, #e3f2fd);
    border-radius: var(--border-radius);
}

.hero h1 {
    color: #333;
    margin-bottom: 0.5rem;
}

/* --- Articles Grid (Homepage) --- */
.articles-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card {
    background-color: #fff;
    border: 1px solid var(--card-border-color);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.card-content h3 a:hover {
    text-decoration: none;
}

.card-content p {
    flex-grow: 1;
    font-size: 0.95rem;
    color: #6c757d;
}

.read-more-btn {
    display: inline-block;
    background-color: var(--primary-accent-color);
    color: #fff;
    padding: 0.6rem 1.2rem;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
    font-weight: 500;
}

.read-more-btn:hover {
    background-color: var(--link-hover-color);
    color: #fff;
    transform: scale(1.05);
    text-decoration: none;
}

/* --- Sidebar --- */
.sidebar .widget {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.3rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-accent-color);
    margin-bottom: 1.5rem;
}

.widget.widget-promo {
    background-color: var(--link-hover-color);
    color: #fff;
}
.widget.widget-promo .widget-title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.5);
}
.widget.widget-promo a {
    color: #fce4ec;
    font-weight: 700;
}
.widget.widget-promo a:hover {
    color: #fff;
}


/* --- Single Article & Sub-Pages --- */
.article-content, .subpage-content {
    background-color: #fff;
    padding: 2.5rem;
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius);
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--card-border-color);
    padding-bottom: 1.5rem;
}

.article-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.cta-section {
    background-color: #f8f9fa;
    text-align: center;
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius);
}
.cta-section h2 {
    margin-top: 0;
}

/* --- Contact Form --- */
.contact-form {
    margin-top: 2rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: .5rem;
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--card-border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent-color);
    box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.15);
}

.contact-form button {
    display: inline-block;
    background-color: var(--primary-accent-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.contact-form button:hover {
    background-color: var(--link-hover-color);
    transform: translateY(-2px);
}


/* --- Footer --- */
.site-footer {
    background-color: var(--header-footer-bg);
    padding: 2.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--card-border-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links li::before, .footer-links li {
    content: '';
    padding-left: 0;
}
.footer-links a {
    color: var(--secondary-accent-color);
}
.footer-links a:hover {
    color: var(--primary-accent-color);
}


.copyright {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* --- Mobile Menu (Simple for no-JS) --- */
@media (max-width: 767px) {
    body {
        font-size: 16px;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
        border-top: 1px solid var(--card-border-color);
        width: 100%;
        padding-top: 1rem;
    }
    .main-layout {
        padding: 1.5rem 0;
    }
    .article-content, .subpage-content {
        padding: 1.5rem;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
}
