/* ==========================================
   DYNAMIC HERO HEADER IMAGE
   ========================================== */
.hero-header {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-title {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .hero-header {
        height: 180px;
    }
    .hero-title {
        font-size: 28px;
    }
}

/* ============================================
   SECURE BLOG — CLEAN CARD-STYLE LAYOUT
   Matches the reference design screenshot
   ============================================ */

/* --- RESET & GLOBAL --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}

a {
    color: #004b91;
    text-decoration: none;
}

a:hover {
    color: #005bb5;
    text-decoration: underline;
}

/* --- HEADER --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    color: #333;
    padding: 18px 40px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.logo a:hover {
    text-decoration: none;
    color: #004b91;
}

.nav-tabs {
    display: flex;
    gap: 5px;
}

.nav-tabs a {
    color: #555;
    text-decoration: none;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-tabs a:hover {
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
}

/* --- MAIN CONTAINER --- */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 0;
    padding: 0;
    align-items: flex-start;
}

/* --- CONTENT AREA --- */
.content {
    flex: 1;
    max-width: 780px;
    min-width: 0;
    background: transparent;
    padding: 0;
}

/* ==========================================
   POST CARDS — Main page post listing
   ========================================== */
.post-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 35px 40px 25px;
    margin-bottom: 0;
    border-top: none;
}

.post-card:first-of-type {
    border-top: 1px solid #ddd;
}

.post-card-header {
    margin-bottom: 20px;
}

.entry-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #333;
}

.entry-title a {
    color: #333;
    text-decoration: none;
}

.entry-title a:hover {
    color: #004b91;
    text-decoration: none;
}

.entry-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
}

.entry-meta time {
    color: #888;
}

.entry-meta a {
    color: #004b91;
}

.entry-meta a:hover {
    text-decoration: underline;
}

/* Post preview text */
.entry-summary {
    margin-bottom: 20px;
}

.entry-summary p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin: 0;
}

/* Read more link — inline style like the screenshot */
.read-more {
    color: #004b91;
    text-decoration: none;
    font-size: 16px;
}

.read-more:hover {
    text-decoration: underline;
}

/* Post card footer — categories, tags, comment link */
.post-card-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 10px;
}

.entry-footer-meta {
    font-size: 14px;
    color: #888;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.entry-footer-meta span::before {
    margin-right: 5px;
}

.comment-link a {
    color: #004b91;
    font-size: 14px;
}

.comment-link a:hover {
    text-decoration: underline;
}

/* ==========================================
   FULL POST VIEW — Single post page
   ========================================== */
.full-post {
    background: #fff;
    border: 1px solid #ddd;
    padding: 35px 40px;
}

.full-post .entry-title {
    font-size: 30px;
    margin-bottom: 8px;
}

.full-post .entry-meta {
    margin-bottom: 25px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

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

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 18px 0;
}

.entry-content iframe {
    max-width: 100%;
    margin: 18px 0;
}

.entry-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    margin: 18px 0;
}

.entry-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.entry-content pre code {
    background: none;
    padding: 0;
}

.entry-content h2, 
.entry-content h3, 
.entry-content h4 {
    margin-top: 30px;
    margin-bottom: 12px;
    color: #333;
}

.entry-content ul, 
.entry-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

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

.entry-content table th, 
.entry-content table td {
    border: 1px solid #ddd;
    padding: 10px;
}

.entry-content table th {
    background: #f8f9fa;
}

/* Entry footer below single post */
.entry-footer {
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    padding: 15px 40px;
    font-size: 14px;
    color: #888;
}

.section-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    width: 320px;
    min-width: 280px;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Sidebar widgets */
.widget {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 0;
}

.search-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
}

.search-form input:focus {
    border-color: #999;
}

.search-form button {
    padding: 10px 18px;
    background: #666;
    color: #fff;
    border: 1px solid #666;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.search-form button:hover {
    background: #555;
}

/* Recent Posts & Recent Comments Lists */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recent-posts li {
    padding: 6px 0;
    line-height: 1.5;
}

.widget-recent-posts a {
    color: #004b91;
    font-size: 15px;
}

.widget-recent-posts a:hover {
    text-decoration: underline;
}

.widget-recent-comments li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    line-height: 1.5;
}

.widget-recent-comments li:last-child {
    border-bottom: none;
}

.widget-recent-comments strong {
    color: #004b91;
}

.widget-recent-comments a {
    color: #004b91;
}

/* ==========================================
   COMMENTS SECTION
   ========================================== */
.comments-section {
    background: #fff;
    border: 1px solid #ddd;
    padding: 30px 40px;
    margin-top: 0;
    border-top: none;
}

.comments-section h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
}

.comment {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.comment:last-of-type {
    border-bottom: none;
}

.comment strong {
    color: #004b91;
    font-size: 15px;
}

.comment small {
    color: #999;
    display: block;
    margin: 3px 0 8px;
    font-size: 13px;
}

.comment p {
    margin: 0;
    font-size: 15px;
    color: #444;
}

.no-comments {
    color: #888;
    font-style: italic;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.comment-form input,
.comment-form textarea {
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #999;
    outline: none;
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.comment-form button {
    padding: 12px 25px;
    background: #004b91;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    align-self: flex-start;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: #003d75;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: #fff;
    color: #888;
    text-align: center;
    padding: 25px;
    border-top: 1px solid #ddd;
    margin-top: 30px;
    font-size: 14px;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .content {
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px 20px;
    }

    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .post-card,
    .full-post,
    .comments-section,
    .entry-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .entry-title {
        font-size: 22px;
    }
}

/* ==========================================
   POST BODY — Used by TinyMCE content
   Kept for backward compatibility
   ========================================== */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

.post-body iframe {
    max-width: 100%;
    margin: 15px 0;
}

.post-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.post-body code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.post-body pre code {
    background: none;
    padding: 0;
}
