* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0052cc;
    --dark-blue: #003d99;
    --light-blue: #e6f0ff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --bg-light: #f5f7fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Header Navigation */
header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--primary-blue);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-blue);
}

.search-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 200px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e6f0ff 100%);
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-content h1 .highlight {
    color: var(--primary-blue);
}

.hero-content p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.day-badge {
    position: absolute;
    bottom: -20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.day-badge .day-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.day-badge .day-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Curriculum Section */
.curriculum-section {
    max-width: 1400px;
    margin: 5rem auto 0;
    padding: 4rem 2rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.tag:hover,
.tag.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: var(--primary-blue);
}

.post-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-image.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Skeleton Loading Animation */
@keyframes skeleton-loading {
    0% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #f0f0f0; }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    width: 80%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px 8px 0 0;
}

.post-card.loading {
    cursor: default;
    pointer-events: none;
}

.post-card.loading:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

/* Spinner Loading Animation */
.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
    width: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-blue);
    border-top: 5px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Hide Related Posts sidebar widget */
.sidebar-widget:has(#related-posts),
.post-sidebar {
    display: none !important;
}

/* Expand main content when sidebar is hidden */
.post-detail-container {
    display: block !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

.post-main-content {
    width: 100% !important;
}

/* Post Navigation (Next/Previous) */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    gap: 1.5rem;
}

.nav-item {
    flex: 1;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 50%;
}

.nav-item:hover:not(.disabled) {
    border-color: var(--primary-blue);
    background-color: var(--light-blue);
    transform: translateY(-2px);
}

.nav-item.disabled {
    cursor: default;
    opacity: 0.3;
    border-style: dashed;
}

.nav-item .nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.nav-item .nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-item.next {
    text-align: right;
    align-items: flex-end;
}

@media (max-width: 600px) {
    .post-navigation {
        flex-direction: column;
    }
    .nav-item {
        max-width: 100%;
    }
}

/* Spinner & Animation Fixes */
.loading-spinner-container {
    min-height: 300px;
}

.spinner {
    box-shadow: 0 0 15px rgba(0, 82, 204, 0.1);
}

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

.post-day {
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.post-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-blue);
    background-color: var(--light-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    width: fit-content;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-dark);
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.post-author {
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-source {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-arrow {
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.post-card:hover .post-arrow {
    transform: translateX(4px);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 3rem 0;
}

.btn-load-more {
    padding: 0.75rem 2rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 8px;
    margin: 4rem 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-section p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: var(--primary-blue);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

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

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

/* Post Detail Styles */
.post-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
}

.post-main-content {
    min-width: 0;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header .post-day {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--border-color);
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info .name {
    font-weight: 600;
    font-size: 1rem;
}

.author-info .role-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-featured-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

.post-body h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.info-box {
    background-color: var(--light-blue);
    border-left: 4px solid var(--primary-blue);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

.info-box h4 {
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.info-box ul {
    padding-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Courier New', Courier, monospace;
}

.reference-box {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 3rem 0;
}

/* Sidebar */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.related-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.related-post-item:hover {
    opacity: 0.8;
}

.related-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info .day {
    font-size: 0.7rem;
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
}

.related-info .title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.view-all-btn {
    display: block;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Discussions */
.discussions-section {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
}

.comment-content {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-user {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.comment-text {
    font-size: 0.95rem;
}

.comment-input-area {
    margin-top: 2rem;
    opacity: 0.6;
    pointer-events: none; /* Read-only */
}

.comment-input-area textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    resize: vertical;
}

.comment-input-area .btn-post {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    display: block;
    margin-left: auto;
}

/* Categories Page Styles */
.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.categories-header {
    margin-bottom: 4rem;
}

.categories-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.categories-header h1 .highlight {
    color: var(--primary-blue);
}

.categories-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.category-search {
    max-width: 600px;
    position: relative;
}

.category-search input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff;
}

.category-search::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.category-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-blue);
}

.category-card.featured {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
}

.category-card.wide {
    grid-column: span 3;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
}

.category-card.highlight {
    background-color: var(--primary-blue);
    color: white;
    border: none;
}

.category-card.highlight .category-description,
.category-card.highlight .category-lessons {
    color: rgba(255, 255, 255, 0.9);
}

.category-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.category-card.featured .category-icon-wrapper,
.category-card.wide .category-icon-wrapper {
    margin-bottom: 0;
    width: 64px;
    height: 64px;
    font-size: 2rem;
}

.category-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.category-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    flex-grow: 1;
}

.category-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.category-lessons {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--light-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

.category-card.highlight .category-lessons {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-arrow {
    font-size: 1.2rem;
    color: var(--primary-blue);
}

.category-card.highlight .category-arrow {
    color: white;
}

.specialized-section {
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.specialized-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
}

.specialized-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.specialized-item {
    padding: 1rem 2rem;
    background-color: var(--bg-light);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.specialized-item:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Responsive for Categories */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .category-card.featured, .category-card.wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .category-card.featured, .category-card.wide {
        grid-column: span 1;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    .categories-header {
        padding: 2rem 1rem;
        text-align: center;
    }
    .categories-header h1 {
        font-size: 1.75rem;
    }
    .category-search input {
        width: 100%;
    }
}

/* Post Detail Mobile Optimization */
@media (max-width: 768px) {
    .post-detail-container {
        display: flex;
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 2rem;
    }

    .post-main-content {
        width: 100%;
    }

    .post-header {
        margin-bottom: 1.5rem;
    }

    .post-header h1 {
        font-size: 1.85rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .author-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .author-info .name {
        font-size: 0.95rem;
    }

    .post-body {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .post-sidebar {
        margin-top: 1rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .sidebar-widget {
        padding: 1.25rem;
    }

    /* Fix for any potential absolute positioning or floating elements */
    .post-header, .post-body, .post-sidebar, .sidebar-widget {
        position: static !important;
        float: none !important;
        clear: both;
    }
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-light: #1a1a1a;
    --text-dark: #f5f7fa;
    --text-light: #a0a0a0;
    --border-color: #333333;
    background-color: #121212;
}

[data-theme="dark"] header {
    background-color: #1a1a1a;
    border-bottom-color: #333333;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a192f 100%);
}

[data-theme="dark"] .post-card {
    background-color: #1a1a1a;
    border-color: #333333;
}

[data-theme="dark"] .tag {
    background-color: #1a1a1a;
    border-color: #333333;
    color: #f5f7fa;
}

[data-theme="dark"] .btn-secondary {
    color: #f5f7fa;
    border-color: #333333;
}

[data-theme="dark"] .category-card {
    background-color: #1a1a1a;
    border-color: #333333;
}

[data-theme="dark"] .category-search input {
    background-color: #1a1a1a;
    border-color: #333333;
    color: #f5f7fa;
}

[data-theme="dark"] .specialized-item {
    background-color: #1a1a1a;
    color: #f5f7fa;
}

[data-theme="dark"] footer {
    background-color: #1a1a1a;
    border-top-color: #333333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }

    .logo {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }

    nav {
        gap: 1.25rem;
        justify-content: center;
        width: 100%;
        order: 2;
    }

    .search-container {
        width: 100%;
        justify-content: center;
        order: 3;
        margin-top: 0.25rem;
    }

    .search-input {
        width: 100%;
        max-width: none;
        height: 40px;
        background-color: var(--bg-light);
        border-radius: 8px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        padding: 0.9rem;
        font-size: 1rem;
    }

    .hero-image {
        order: -1;
        margin-bottom: 1rem;
    }

    .day-badge {
        position: absolute;
        bottom: -10px;
        right: 50%;
        transform: translateX(50%);
        width: auto;
        min-width: 160px;
    }

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

    .filter-tags {
        gap: 0.5rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-section {
        margin: 2rem 1rem;
        padding: 2rem 1rem;
    }

    .newsletter-section h2 {
        font-size: 1.5rem;
    }

    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.6rem 1rem;
    }

    nav {
        gap: 1rem;
    }
    
    nav a {
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 1.85rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .post-title {
        font-size: 1rem;
    }

    .newsletter-section h2 {
        font-size: 1.2rem;
    }

    .newsletter-section p {
        font-size: 0.85rem;
    }
}
