/*
Theme Name: NewsPress
Theme URI: https://example.com/newspress
Author: Claude
Author URI: https://example.com
Description: A news-focused WordPress theme with built-in Schema.org NewsArticle structured data support
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newspress
Tags: news, blog, grid-layout, one-column, two-columns, custom-colors, custom-logo, featured-images, footer-widgets, full-width-template, theme-options, translation-ready
*/

/* Normalize */
html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.8;
    color: #333;
    margin: 0;
    padding: 0;
    font-size: 17px;
    background-color: #f8f8f8;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    clear: both;
    margin: 0.5em 0;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

h6 {
    font-size: 1em;
}

p {
    margin: 0 0 1.5em;
}

a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus,
a:active {
    color: #005177;
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.container:after {
    content: "";
    display: table;
    clear: both;
}

.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: relative;
    margin-bottom: 2rem;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.site-title a {
    color: #111;
    text-decoration: none;
}

.site-description {
    margin: 0.5em 0 0;
    font-size: 0.875em;
    font-style: italic;
    color: #666;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-navigation {
    display: block;
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li {
    position: relative;
    margin-right: 1.5rem;
}

.main-navigation a {
    display: block;
    padding: 0.5em 0;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: #0073aa;
    text-decoration: none;
}

.site-main {
    padding: 2rem 0;
}

.content-area {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    float: left;
    width: 70%;
    box-sizing: border-box;
}

.right-sidebar {
    float: right;
    width: 28%;
    box-sizing: border-box;
}

.site-footer {
    background-color: #222;
    color: #999;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

/* Front Page Sections */
.front-page-section {
    margin-bottom: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.front-page-section:last-child {
    border-bottom: none;
}

.section-title {
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #0073aa;
}

.section-description {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Grid Layout */
.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}

.grid-item {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.article-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.article-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-item:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-content {
    padding: 1rem;
}

.entry-title {
    font-size: 2.2rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111;
    letter-spacing: -0.01em;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
    margin: 1rem 0;
}

.entry-summary {
    font-size: 0.9375rem;
    color: #555;
}

/* List Layout */
.article-list .list-item {
    display: flex;
    margin-bottom: 1.5rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.article-list .article-thumbnail {
    flex: 0 0 30%;
    padding-top: 0;
    height: auto;
}

.article-list .article-content {
    flex: 1;
    padding: 1.5rem;
}

/* Entry Meta Group */
.entry-meta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.entry-author img {
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.entry-reading-time {
    background-color: #f1f1f1;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Featured Layout */
.layout-featured {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.featured-main {
    grid-column: 1 / 5;
    grid-row: 1 / 3;
}

.featured-main .entry-title {
    font-size: 1.5rem;
}

.featured-secondary {
    grid-column: 5 / 9;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Single Article */
.single .entry-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.single .entry-title {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.single .entry-meta {
    margin-bottom: 1rem;
}

.single .post-thumbnail {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.single .post-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.single .post-thumbnail:hover img {
    transform: scale(1.02);
}

.single .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single .entry-content p,
.single .entry-content ul,
.single .entry-content ol {
    margin-bottom: 1.5em;
}

.single .entry-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9375rem;
    color: #666;
}

/* Category and Tag Styling */
.entry-categories {
    margin-bottom: 1rem;
}

.category-label {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: background-color 0.2s;
}

.category-label:hover {
    background-color: #005c87;
    text-decoration: none;
    color: white;
}

.entry-tags {
    margin: 1rem 0;
}

.entry-tags a {
    display: inline-block;
    background-color: #f1f1f1;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.entry-tags a:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Subtitle styling */
.single .entry-content .is-style-text-subtitle {
    font-size: 1.6rem;
    font-weight: 600;
    color: #111;
    margin: 2.5rem 0 1rem;
    position: relative;
    padding-left: 16px;
    line-height: 1.4;
    border-left: 4px solid #0073aa;
}

/* Widgets */
.widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #0073aa;
    color: #111;
}

.widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.widget li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
}

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

/* Recent posts widget with thumbnails */
.widget_recent_entries_with_thumbnails li {
    display: flex;
    align-items: center;
}

.recent-post-thumbnail {
    flex: 0 0 80px;
    margin-right: 1rem;
}

.recent-post-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.recent-post-title {
    font-weight: 500;
}

.recent-post-date {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Popular posts widget */
.widget_popular_posts li {
    position: relative;
    padding-left: 2rem;
}

.popular-post-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    background-color: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Category widget */
.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories .cat-count {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
    color: #666;
}

/* Tag cloud widget */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
}

.widget_tag_cloud .tag-cloud-link {
    display: inline-block;
    background-color: #f1f1f1;
    padding: 0.25rem 0.5rem;
    margin: 0 0.5rem 0.5rem 0;
    font-size: 0.75rem !important;
    border-radius: 3px;
    color: #666;
}

.widget_tag_cloud .tag-cloud-link:hover {
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
}

/* Search widget styling */
.wp-block-search__input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.7rem;
    width: 100%;
}

.wp-block-search__button {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.wp-block-search__button:hover {
    background-color: #005c87;
}

/* Social sharing */
.social-sharing {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.share-title {
    margin-right: 1rem;
    font-weight: 500;
}

.social-sharing a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0.8rem;
    margin-bottom: 0.5rem;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.social-sharing a:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.share-facebook {
    background-color: #3b5998;
}

.share-twitter {
    background-color: #1da1f2;
}

.share-linkedin {
    background-color: #0077b5;
}

.share-pinterest {
    background-color: #bd081c;
}

/* Footer styling */
.site-footer {
    background-color: #222;
    color: #999;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-widget-title {
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0073aa;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
    color: #fff;
    text-decoration: none;
}

.site-footer .widget li {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-info {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.breadcrumbs a {
    color: #0073aa;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #ccc;
}

.current {
    color: #333;
    font-weight: 500;
}

/* Pagination */
.pagination,
.posts-navigation {
    margin: 2rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin-right: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #333;
}

.page-numbers.current {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.page-numbers:hover {
    background-color: #f1f1f1;
    text-decoration: none;
}

.page-numbers.current:hover {
    background-color: #0073aa;
}

.page-numbers.dots {
    border: none;
}

.page-numbers.next,
.page-numbers.prev {
    font-weight: 500;
}

/* Comments section */
.comments-area {
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.comment-respond {
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #111;
}

.comment-notes {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: border-color 0.2s, background-color 0.2s;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    background-color: #fff;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.comment-form-cookies-consent input {
    margin-right: 10px;
}

.form-submit {
    margin-top: 1.5rem;
}

.form-submit input[type="submit"] {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-submit input[type="submit"]:hover {
    background-color: #005c87;
}

/* Comment list styling */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

.comment-content {
    margin-top: 1rem;
    line-height: 1.6;
}

/* Author box */
.author-box {
    display: flex;
    align-items: flex-start;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.author-avatar {
    flex: 0 0 100px;
    margin-right: 1.5rem;
}

.author-avatar img {
    border-radius: 50%;
}

.author-description {
    flex: 1;
}

.author-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.author-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-link {
    display: inline-block;
    font-size: 0.9rem;
    color: #0073aa;
    text-decoration: none;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 115, 170, 0.8);
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.back-to-top.visible,
.back-to-top:hover {
    opacity: 1;
    visibility: visible;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
}

/* Responsive videos */
.wp-video,
.wp-audio-shortcode,
.video-container {
    margin-bottom: 1.5rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Message styles for notices, alerts etc. */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 3px;
}

.message-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #0c5192;
}

.message-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #1e4620;
}

.message-warning {
    background-color: #fff8e1;
    border-left: 4px solid #ffb74d;
    color: #945600;
}

.message-error {
    background-color: #ffebee;
    border-left: 4px solid #ef5350;
    color: #981111;
}

/* Dark mode toggle */
.dark-mode-toggle {
    margin-left: 15px;
    display: flex;
    align-items: center;
}

#dark-mode-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--body-color);
}

#dark-mode-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Dark mode support */
:root {
    --body-bg: #ffffff;
    --body-color: #333333;
    --heading-color: #23282d;
    --link-color: #0073aa;
    --link-hover-color: #005177;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #dddddd;
    --button-bg: #0073aa;
    --button-color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --body-bg: #1a1a1a;
        --body-color: #f0f0f0;
        --heading-color: #ffffff;
        --link-color: #4cace6;
        --link-hover-color: #71c2f5;
        --border-color: #444444;
        --card-bg: #2a2a2a;
        --input-bg: #333333;
        --input-border: #555555;
        --button-bg: #0073aa;
        --button-color: #ffffff;
    }
    
    body {
        background-color: var(--body-bg);
        color: var(--body-color);
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: var(--heading-color);
    }
    
    a {
        color: var(--link-color);
    }
    
    a:hover {
        color: var(--link-hover-color);
    }
    
    .site-header,
    .site-footer,
    .widget,
    .comment-body,
    .author-box,
    .content-area,
    .comments-area {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
    
    input, textarea, select {
        background-color: var(--input-bg);
        border-color: var(--input-border);
        color: var(--body-color);
    }
    
    button, 
    .button, 
    .more-link, 
    input[type="submit"] {
        background-color: var(--button-bg);
        color: var(--button-color);
    }
    
    .dark-mode .sun-icon {
        opacity: 0;
        transform: rotate(-90deg);
    }
    
    .dark-mode .moon-icon {
        opacity: 1;
        transform: rotate(0);
    }
}

/* Dark mode class */
.dark-mode {
    --body-bg: #1a1a1a;
    --body-color: #f0f0f0;
    --heading-color: #ffffff;
    --link-color: #4cace6;
    --link-hover-color: #71c2f5;
    --border-color: #444444;
    --card-bg: #2a2a2a;
    --input-bg: #333333;
    --input-border: #555555;
}

.dark-mode body,
body.dark-mode {
    background-color: var(--body-bg);
    color: var(--body-color);
}

.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3, 
.dark-mode h4, 
.dark-mode h5, 
.dark-mode h6 {
    color: var(--heading-color);
}

.dark-mode .site-header,
.dark-mode .site-footer,
.dark-mode .widget,
.dark-mode .comment-body,
.dark-mode .author-box,
.dark-mode .entry-footer,
.dark-mode .related-posts,
.dark-mode .content-area,
.dark-mode .comments-area {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.dark-mode img {
    filter: brightness(0.9);
}

.dark-mode .site-title a,
.dark-mode .entry-title a {
    color: var(--heading-color);
}

.dark-mode .entry-meta,
.dark-mode .entry-footer {
    color: #aaa;
}

/* Add transition for smooth dark/light mode toggle */
body, 
h1, h2, h3, h4, h5, h6, 
a, 
.site-header, 
.site-footer, 
.widget, 
.entry-content, 
input, textarea, 
button, 
img {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

/* Reading progress indicator */
.progress-container {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 4px;
}

.progress-bar {
    height: 4px;
    background: var(--link-color, #0073aa);
    width: 0%;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive layout adjustments */
@media (max-width: 992px) {
    .content-area {
        width: 65%;
    }
    
    .right-sidebar {
        width: 33%;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .is-style-text-subtitle {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .content-area,
    .right-sidebar {
        float: none;
        width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .site-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .main-navigation {
        margin-top: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
    }
    
    /* Improve tap targets for mobile */
    .main-navigation li,
    .menu-item a,
    .search-toggle,
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .entry-meta-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .entry-title {
        font-size: 1.8rem;
    }
    
    .is-style-text-subtitle {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .entry-title {
        font-size: 1.6rem;
    }
    
    .is-style-text-subtitle {
        font-size: 1.2rem;
    }
    
    .content-area,
    .comments-area {
        padding: 1.5rem;
    }
    
    .widget {
        padding: 1.2rem;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    .social-sharing {
        justify-content: center;
    }
    
    .share-title {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    .comment-form input[type="submit"] {
        width: 100%;
    }
}

/* Layout fixes */
.container:after {
  content: "";
  display: table;
  clear: both;
}

/* Improve image display */
img, 
.wp-post-image {
  height: auto;
  max-width: 100%;
}

/* Fix for comment form */
.comment-form input,
.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.comment-form input[type="submit"] {
  background-color: #0073aa;
  color: white;
  cursor: pointer;
  font-weight: bold;
  padding: 12px 20px;
  border: none;
  transition: background-color 0.3s;
  width: auto;
}

.comment-form input[type="submit"]:hover {
  background-color: #005e8a;
}

/* Related posts section */
.related-posts {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.related-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0073aa;
}

.widget_related_posts ul.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_related_posts ul.related-posts-list li {
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.widget_related_posts ul.related-posts-list li:last-child {
    border-bottom: none;
}

.widget_related_posts .related-post-thumbnail {
    flex: 0 0 80px;
    margin-right: 1rem;
    border-radius: 4px;
    overflow: hidden;
}

.widget_related_posts .related-post-content {
    flex: 1;
}

.widget_related_posts .related-post-title {
    display: block;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    color: #333;
    text-decoration: none;
}

.widget_related_posts .related-post-title:hover {
    color: #0073aa;
}

.widget_related_posts .related-post-date {
    font-size: 0.75rem;
    color: #666;
}

/* Fix for multiple back-to-top buttons */
.back-to-top + .back-to-top {
    display: none;
}

/* Improve blockquote styling */
blockquote {
  border-left: 4px solid var(--link-color, #0073aa);
  padding-left: 1.5rem;
  font-style: italic;
  margin-left: 0;
  color: #666;
  background-color: #f9f9f9;
  padding: 1rem 1.5rem;
  border-radius: 0 4px 4px 0;
}

blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-style: normal;
  color: #555;
}

/* Improve code blocks */
pre, code {
  background-color: #f1f1f1;
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

code {
  padding: 0.1em 0.3em;
  font-size: 0.9em;
}

pre {
  padding: 1rem;
  overflow: auto;
  line-height: 1.45;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Prevent content overflow */
.entry-content *:not(img) {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Better focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(0, 115, 170, 0.5);
  outline-offset: 2px;
}

/* Fix search form styles */
.search-form {
  display: flex;
  margin-bottom: 1.5rem;
}

.search-field {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  padding: 0.6rem;
}

.search-submit {
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  padding: 0 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-submit:hover {
  background-color: #005c87;
}

/* Table styling */
table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

th, td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

thead th {
  background-color: #f1f1f1;
  border-bottom: 2px solid #ddd;
  font-weight: 600;
}

tr:hover {
  background-color: #f9f9f9;
}

/* Lists styling */
.entry-content ul,
.entry-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: 0.5rem;
}

/* Fix for responsive layouts */
@media (max-width: 768px) {
  .layout-featured {
    grid-template-columns: 1fr;
  }
  
  .featured-main {
    grid-column: 1;
    grid-row: auto;
  }
  
  .featured-secondary {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
  
  .article-list .list-item {
    flex-direction: column;
  }
  
  .article-list .article-thumbnail {
    width: 100%;
    padding-top: 56.25%;
  }
}

/* Fix the container on large screens */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}
