/* =============================================
   NEWS BLOG — Style inspired by egldscanmind.io
   Structure inspired by successful-blog.com
   ============================================= */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #111;
    background: #fff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #0b57d0;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0944a8;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header === */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

.header-brand {
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    color: #111;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-accent {
    color: #3257a1;
}

.header-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-list li a {
    display: block;
    padding: 7px 14px;
    border-radius: 7px;
    color: #111;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.nav-list li a:hover {
    background: #f0f4ff;
    color: #3257a1;
    text-decoration: none;
}

/* === Header Search === */
.header-search {
    flex-shrink: 0;
}

.search-form {
    display: flex;
    gap: 0;
}

.search-input {
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px 0 0 7px;
    font-size: 0.85rem;
    outline: none;
    width: 160px;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #3257a1;
}

.search-btn {
    padding: 7px 14px;
    background: #3257a1;
    color: #fff;
    border: none;
    border-radius: 0 7px 7px 0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #274680;
}

/* === Main Content === */
.site-main {
    flex: 1;
    padding: 40px 0;
}

/* === Section Title === */
.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #111;
}

/* === Posts List (successful-blog.com structure) === */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(50, 87, 161, 0.08);
    border-color: #c5d0e6;
}

.post-thumb {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.post-title a {
    color: #111;
}

.post-title a:hover {
    color: #3257a1;
    text-decoration: none;
}

.post-category {
    display: inline-block;
    margin-right: 12px;
}

.post-category a {
    font-size: 0.8rem;
    font-weight: 500;
    color: #3257a1;
    background: #eef2fb;
    padding: 2px 10px;
    border-radius: 12px;
}

.post-category a:hover {
    background: #dce4f5;
    text-decoration: none;
}

.post-date {
    font-size: 0.8rem;
    color: #6b7280;
}

.post-excerpt {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 0.9rem;
    color: #111;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f0f4ff;
    border-color: #3257a1;
    text-decoration: none;
}

.page-link.current {
    background: #3257a1;
    color: #fff;
    border-color: #3257a1;
}

/* === Post Detail === */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 30px;
}

.post-detail-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #111;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.post-category-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #3257a1;
    padding: 4px 14px;
    border-radius: 14px;
}

.post-category-badge:hover {
    background: #274680;
    text-decoration: none;
    color: #fff;
}

.post-date-detail {
    font-size: 0.9rem;
    color: #6b7280;
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #1f2937;
}

.post-content p {
    margin-bottom: 1.2em;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5em 0 0.6em;
    color: #111;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.2em 0 0.5em;
    color: #111;
}

.post-content img {
    border-radius: 8px;
    margin: 1.5em 0;
}

.post-content blockquote {
    border-left: 4px solid #3257a1;
    padding: 12px 20px;
    margin: 1.5em 0;
    background: #f8fafc;
    color: #374151;
    font-style: italic;
}

.post-content ul, .post-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.post-content li {
    margin-bottom: 0.4em;
}

/* === Recent Posts Sidebar === */
.recent-posts-sidebar {
    max-width: 800px;
    margin: 40px auto 20px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: #111;
}

.recent-posts-list {
    list-style: none;
}

.recent-posts-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.recent-posts-list li:last-child {
    border-bottom: none;
}

.recent-posts-list li a {
    font-size: 0.9rem;
    color: #111;
    font-weight: 500;
}

.recent-posts-list li a:hover {
    color: #3257a1;
}

.rp-date {
    font-size: 0.78rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* === Back Link === */
.back-link {
    max-width: 800px;
    margin: 20px auto 0;
}

.back-link a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #3257a1;
}

/* === Search Page === */
.search-form-large {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin-bottom: 30px;
}

.search-input-large {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-large:focus {
    border-color: #3257a1;
}

.search-btn-large {
    padding: 12px 24px;
    background: #3257a1;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn-large:hover {
    background: #274680;
}

/* === No Posts === */
.no-posts {
    font-size: 1rem;
    color: #6b7280;
    text-align: center;
    padding: 40px 0;
}

/* === Footer (egldscanmind.io style — blue) === */
.site-footer {
    background: #3257a1;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: #fff;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links li a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* === Official Website Button === */
.official-link-block {
    max-width: 800px;
    margin: 30px auto;
    text-align: center;
}

.official-link-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #3257a1;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(50, 87, 161, 0.2);
}

.official-link-btn:hover {
    background: #274680;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(50, 87, 161, 0.3);
}

.official-link-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(50, 87, 161, 0.2);
}

/* === Responsive === */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .header-nav {
        order: 3;
        width: 100%;
    }

    .nav-list {
        justify-content: center;
    }

    .header-search {
        width: 100%;
        order: 2;
    }

    .search-form {
        width: 100%;
    }

    .search-input {
        flex: 1;
        width: auto;
    }

    .post-item {
        flex-direction: column;
    }

    .post-thumb {
        width: 100%;
        height: 200px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-detail-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .nav-list li a {
        padding: 5px 8px;
        font-size: 0.82rem;
    }

    .post-item {
        padding: 14px;
    }
}
