/*
 Theme Name: GeneratePress Child
 Theme URI: https://generatepress.com
 Description: GeneratePress Child Theme for Solvepedia
 Author: Solvepedia
 Template: generatepress
 Version: 2.1.0
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: generatepress-child
*/

/* ===== Global ===== */

body {
font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: #f5f6f8;
color: #1a1a1a;
}

a { color: #1a1a1a; }
a:hover { color: #0066cc; }

/* ===== Site Header ===== */

.site-header {
background: #fff;
border-bottom: 1px solid #e8e8e8;
box-shadow: none;
}

.main-title a,
.site-title a {
font-weight: 700;
font-size: 22px;
color: #1a1a1a !important;
letter-spacing: -0.5px;
}

/* ===== Content Area: 2-column layout (cards + sidebar) ===== */

.site-content {
max-width: 1200px;
margin: 0 auto;
padding: 24px 20px;
}

/* GeneratePress default sidebar 숨김 */
#right-sidebar,
#left-sidebar,
.sidebar:not(.gpc-sidebar) {
display: none !important;
}

#primary {
width: 100% !important;
float: none !important;
}

.separate-containers #primary {
width: 100% !important;
}

/* #primary 내부를 flex로 만들어 카드 영역 + 사이드바 배치 */
#primary {
display: flex;
gap: 28px;
align-items: flex-start;
}

/* ===== Right Sidebar (카테고리) ===== */

.gpc-sidebar {
width: 220px;
flex-shrink: 0;
position: sticky;
top: 20px;
order: 2;
}

.gpc-sidebar-inner {
background: #fff;
border-radius: 10px;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
padding: 20px;
}

.gpc-sidebar-title {
font-size: 15px;
font-weight: 700;
color: #1a1a1a;
margin: 0 0 14px;
padding-bottom: 10px;
border-bottom: 2px solid #f0f0f0;
}

.gpc-sidebar-cats {
list-style: none;
margin: 0;
padding: 0;
}

.gpc-sidebar-cats li {
margin: 0;
}

.gpc-sidebar-cats a {
display: flex;
align-items: center;
justify-content: space-between;
padding: 9px 12px;
border-radius: 6px;
text-decoration: none;
font-size: 13.5px;
font-weight: 500;
color: #555;
transition: all 0.15s ease;
}

.gpc-sidebar-cats a:hover {
background: #f5f6f8;
color: #0066cc;
}

.gpc-sidebar-cats a.active {
background: #e8f0fe;
color: #0066cc;
font-weight: 700;
}

.gpc-cat-count {
font-size: 11px;
font-weight: 400;
background: #f0f0f0;
color: #888;
padding: 2px 7px;
border-radius: 10px;
min-width: 18px;
text-align: center;
}

.gpc-sidebar-cats a.active .gpc-cat-count {
background: #0066cc;
color: #fff;
}

/* ===== Main Content (카드 그리드) ===== */

#main {
flex: 1;
min-width: 0;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
order: 1;
}

/* 보관함 헤더 */
.page-header {
grid-column: 1 / -1;
background: transparent;
padding: 0 0 8px;
margin-bottom: 0;
border: none;
}

.page-header .page-title {
font-size: 20px;
font-weight: 700;
color: #1a1a1a;
}

/* ===== Card ===== */

#main > article {
background: #fff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
transition: transform 0.2s ease, box-shadow 0.2s ease;
display: flex;
flex-direction: column;
}

#main > article:hover {
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.inside-article {
padding: 0;
display: flex;
flex-direction: column;
flex: 1;
}

body:not(.single):not(.page) .separate-containers .inside-article {
padding: 0;
}

/* Card: Thumbnail */

#main > article .post-image {
display: block;
width: 100%;
height: 180px;
overflow: hidden;
flex-shrink: 0;
background: #e9ecef;
}

#main > article .post-image a {
display: block;
width: 100%;
height: 100%;
}

#main > article .post-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}

#main > article:hover .post-image img {
transform: scale(1.05);
}

#main > article:not(.has-post-thumbnail) .post-image {
display: none;
}

/* Card: Header */

#main > article .entry-header {
padding: 18px 20px 0;
}

/* Card: Category Badge */

#main > article .cat-links {
display: inline-block;
margin-bottom: 4px;
}

#main > article .cat-links a {
display: inline-block;
font-size: 11px;
font-weight: 700;
color: #0066cc;
background: #e8f0fe;
padding: 3px 8px;
border-radius: 4px;
text-decoration: none;
letter-spacing: 0.3px;
}

#main > article .cat-links a:hover {
background: #0066cc;
color: #fff;
}

#main > article .cat-links .gp-icon,
#main > article .tags-links .gp-icon,
#main > article .comments-link .gp-icon,
#main > article .cat-links .screen-reader-text,
#main > article .tags-links .screen-reader-text,
#main > article .comments-link .screen-reader-text {
display: none;
}

/* Card: Title */

#main > article .entry-title {
font-size: 17px;
font-weight: 700;
line-height: 1.45;
margin: 8px 0 0;
padding: 0;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

#main > article .entry-title a {
color: #1a1a1a;
text-decoration: none;
}

#main > article .entry-title a:hover {
color: #0066cc;
}

/* Card: Meta */

#main > article .entry-header .entry-meta {
font-size: 12px;
color: #999;
margin-top: 8px;
}

#main > article .entry-header .entry-meta a {
color: #999;
}

/* Card: Excerpt */

#main > article .entry-summary,
#main > article .entry-content {
padding: 10px 20px 0;
font-size: 13.5px;
line-height: 1.6;
color: #666;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
flex: 1;
}

/* Card: Read More hidden */

#main > article .read-more,
#main > article .read-more-container {
display: none;
}

/* Card: Footer Meta */

#main > article footer.entry-meta {
font-size: 12px;
color: #aaa;
border-top: 1px solid #f5f5f5;
padding: 12px 20px 16px;
margin-top: auto;
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}

#main > article footer.entry-meta .tags-links a,
#main > article footer.entry-meta .comments-link a {
font-size: 11px;
color: #888;
text-decoration: none;
}

/* ===== Pagination ===== */

#main > nav,
#main > .paging-navigation,
#main > .navigation {
grid-column: 1 / -1;
text-align: center;
padding: 20px 0;
}

.paging-navigation .nav-links {
display: flex;
justify-content: center;
gap: 6px;
}

.paging-navigation .nav-links a,
.paging-navigation .nav-links span {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 36px;
height: 36px;
padding: 0 10px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
text-decoration: none;
background: #fff;
color: #555;
border: 1px solid #e0e0e0;
transition: all 0.15s ease;
}

.paging-navigation .nav-links a:hover {
background: #0066cc;
color: #fff;
border-color: #0066cc;
}

.paging-navigation .nav-links .current {
background: #0066cc;
color: #fff;
border-color: #0066cc;
font-weight: 700;
}

/* ===== Single Post ===== */

.single #primary {
display: block;
}

.single #main {
display: block;
}

.single #main > article {
background: #fff;
border-radius: 10px;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
max-width: 900px;
margin: 0 auto;
overflow: visible;
}

.single .inside-article {
padding: 40px;
}

.single .entry-header {
padding: 0;
margin-bottom: 24px;
}

.single h1.entry-title {
font-size: 30px;
font-weight: 700;
line-height: 1.35;
-webkit-line-clamp: unset;
display: block;
overflow: visible;
}

.single #main > article .entry-content {
font-size: 17px;
line-height: 1.85;
color: #333;
max-width: none;
padding: 0;
display: block;
overflow: visible;
-webkit-line-clamp: unset;
}

.single #main > article .entry-content h2,
.single #main > article .entry-content h3,
.single #main > article .entry-content h4 {
margin-top: 32px;
margin-bottom: 12px;
}

.single .post-image {
height: auto;
margin-bottom: 24px;
}

.single .post-image img {
height: auto;
border-radius: 8px;
}

.single footer.entry-meta {
margin-top: 32px;
padding: 16px 0 0;
border-top: 1px solid #eee;
}

/* ===== Page ===== */

.page #primary {
display: block;
}

.page #main {
display: block;
}

.page #main > article {
background: #fff;
border-radius: 12px;
max-width: 800px;
margin: 0 auto;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
overflow: visible;
}

.page .inside-article {
padding: 48px 52px;
}

/* Page: Title */
.page h1.entry-title {
font-size: 28px;
font-weight: 700;
color: #1a1a1a;
text-align: center;
padding-bottom: 20px;
margin-bottom: 28px;
border-bottom: 2px solid #f0f0f0;
line-height: 1.3;
}

/* Page: Content Typography */
.page #main > article .entry-content {
font-size: 16px;
line-height: 1.85;
color: #444;
display: block;
-webkit-line-clamp: unset;
-webkit-box-orient: unset;
overflow: visible;
padding: 0;
max-width: none;
}

.page .entry-content h2 {
font-size: 22px;
font-weight: 700;
color: #1a1a1a;
margin-top: 36px;
margin-bottom: 14px;
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}

.page .entry-content h3 {
font-size: 18px;
font-weight: 700;
color: #333;
margin-top: 28px;
margin-bottom: 10px;
}

.page .entry-content p {
margin-bottom: 16px;
}

.page .entry-content ul,
.page .entry-content ol {
margin: 12px 0 20px 20px;
line-height: 1.8;
}

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

.page .entry-content a {
color: #0066cc;
text-decoration: underline;
text-underline-offset: 2px;
}

.page .entry-content a:hover {
color: #004999;
}

/* Page: Tables (Privacy Policy) */
.page .entry-content table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
font-size: 14.5px;
}

.page .entry-content table th,
.page .entry-content table td {
padding: 12px 16px;
text-align: left;
border-bottom: 1px solid #eee;
}

.page .entry-content table th {
font-weight: 700;
background: #f8f9fa;
color: #333;
}

.page .entry-content table tr:hover td {
background: #fafbfc;
}

/* Page: Blockquotes */
.page .entry-content blockquote {
border-left: 4px solid #0066cc;
margin: 20px 0;
padding: 16px 24px;
background: #f8f9fc;
border-radius: 0 8px 8px 0;
color: #555;
font-style: italic;
}

/* Page: Contact Form (WPForms / CF7 등) */
.page .entry-content input[type="text"],
.page .entry-content input[type="email"],
.page .entry-content input[type="url"],
.page .entry-content input[type="tel"],
.page .entry-content textarea,
.page .entry-content select {
width: 100%;
padding: 12px 16px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 15px;
font-family: inherit;
background: #fafbfc;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page .entry-content input[type="text"]:focus,
.page .entry-content input[type="email"]:focus,
.page .entry-content textarea:focus {
border-color: #0066cc;
box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
outline: none;
background: #fff;
}

.page .entry-content textarea {
min-height: 160px;
resize: vertical;
}

.page .entry-content input[type="submit"],
.page .entry-content button[type="submit"],
.page .entry-content .wpcf7-submit,
.page .entry-content .wpforms-submit {
display: inline-block;
padding: 12px 32px;
background: #0066cc;
color: #fff;
border: none;
border-radius: 8px;
font-size: 15px;
font-weight: 600;
font-family: inherit;
cursor: pointer;
transition: background 0.2s ease, transform 0.1s ease;
}

.page .entry-content input[type="submit"]:hover,
.page .entry-content button[type="submit"]:hover {
background: #0052a3;
transform: translateY(-1px);
}

/* Page: Footer meta 숨김 */
.page footer.entry-meta {
display: none;
}

/* ===== Comments ===== */

.comments-area {
max-width: 900px;
margin: 24px auto 0;
background: #fff;
border-radius: 10px;
padding: 30px;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ===== Footer ===== */

.site-footer {
background: #fff;
border-top: 1px solid #e8e8e8;
margin-top: 40px;
}

/* ===== Responsive ===== */

@media (max-width: 1024px) {
#main {
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}

.gpc-sidebar {
width: 190px;
}
}

@media (max-width: 768px) {
#primary {
flex-direction: column;
}

.gpc-sidebar {
width: 100%;
position: static;
order: -1;
}

.gpc-sidebar-inner {
padding: 14px;
}

.gpc-sidebar-cats {
display: flex;
flex-wrap: wrap;
gap: 4px;
}

.gpc-sidebar-cats a {
padding: 6px 12px;
font-size: 13px;
}

.gpc-cat-count {
display: none;
}

.gpc-sidebar-title {
display: none;
}

#main {
grid-template-columns: 1fr;
gap: 14px;
}

#main > article .entry-title {
font-size: 15px;
}

.single .inside-article,
.page .inside-article {
padding: 20px;
}

.page h1.entry-title {
font-size: 22px;
padding-bottom: 14px;
margin-bottom: 20px;
}

.single h1.entry-title {
font-size: 24px;
}

.single .entry-content {
font-size: 15.5px;
}
}
