/* ==========================================================================
   Blog Layout
   ========================================================================== */
.blog-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.blog-main {
    flex: 1;
    min-width: 0;
}

.blog-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

@media (max-width: 992px) {
    .blog-layout {
        flex-direction: column;
    }
    
    .blog-sidebar {
        width: 100%;
        position: static;
    }
}

/* --- Page Header --- */
.page-header {
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.page-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* --- Article Card --- */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    display: flex;
    border: 1px solid rgba(0,0,0,0.05);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-thumb {
    width: 300px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.article-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    align-items: center;
}

.category-badge {
    background: var(--primary-light);
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.article-body h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-readmore {
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

@media (max-width: 640px) {
    .article-card {
        flex-direction: column;
    }
    
    .article-thumb {
        width: 100%;
        height: 200px;
    }
}

/* --- Sidebar Widgets --- */
.sidebar-widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.03);
}

.widget-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--surface-alt);
    letter-spacing: 1px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
}

.search-form button {
    width: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* Profile Card */
.profile-card {
    text-align: center;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
    border: 3px solid var(--surface-alt);
}

.profile-info h4 {
    margin-bottom: 10px;
    color: var(--secondary);
}

.profile-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Calendar */
.calendar {
    font-size: 0.9rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 2px;
}

.calendar-day-head {
    font-weight: 700;
    padding: 5px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.calendar-day {
    padding: 8px 0;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.calendar-day.has-post {
    background: rgba(0, 77, 153, 0.1);
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
}

.calendar-day.has-post:hover {
    background: var(--primary);
    color: white;
}

.calendar-day.empty {
    color: #e2e8f0;
}

/* Sidebar List (Archives/Categories) */
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-list li a {
    display: flex;
    justify-content: space-between;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.sidebar-list li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.sidebar-list .count {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: normal;
}

/* --- Search Info --- */
/* --- Single Post --- */
.single-post {
    background: white;
    padding: 60px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.post-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--surface-alt);
    padding-bottom: 30px;
}

.post-title {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-top: 15px;
    line-height: 1.3;
}

.post-thumbnail {
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.post-content p {
    margin-bottom: 25px;
}

.post-content h3 {
    font-size: 1.8rem;
    margin: 50px 0 25px;
    color: var(--primary);
    padding-left: 15px;
    border-left: 5px solid var(--primary);
}

.post-content ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 10px;
    list-style: disc;
}

.post-content img {
    margin: 40px 0;
    border-radius: 8px;
}

.post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--surface-alt);
}

.post-share {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.post-share span {
    font-weight: 700;
    color: var(--text-muted);
}

.post-share a {
    width: 44px;
    height: 44px;
    background: var(--surface-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.post-share a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-nav a {
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition-fast);
}

.post-nav a:hover {
    color: var(--accent);
}

.breadcrumb {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.breadcrumb a {
    color: white;
}

@media (max-width: 768px) {
    .single-post {
        padding: 30px 20px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-nav {
        flex-direction: column;
        gap: 20px;
    }
}
