/*
Theme Name: Simple Readable Theme
Description: A clean, readable WordPress theme optimized for older audiences with excellent legibility and simple navigation.
Version: 1.0
Author: Your Name
Text Domain: simple-readable-theme
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f8f8;
    font-size: 18px;
}

/* WordPress Core Classes */
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { text-align: center; margin: 20px auto; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: #666; margin-top: 8px; }
.screen-reader-text { display: none; }

/* Header */
.site-header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title a {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.site-title a:hover {
    color: #666;
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid #333;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
}

.search-toggle {
    background: none;
    border: 2px solid #333;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
}

/* Navigation Menu */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    border-bottom-color: #333;
}

/* Hero Section for Single Posts */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), #666;
    color: white;
    text-align: center;
    padding: 80px 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content .entry-title {
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 30px;
    line-height: 1.3;
    max-width: 800px;
}

.entry-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-divider {
    width: 1px;
    height: 15px;
    background-color: rgba(255,255,255,0.5);
}

/* Main Content */
.site-main {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.entry-content {
    font-size: 18px;
    line-height: 1.7;
}

.entry-content p {
    margin-bottom: 24px;
    color: #444;
    text-align: justify;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 30px 0 20px;
    color: #333;
    line-height: 1.3;
}

.entry-content h2 { font-size: 1.8rem; }
.entry-content h3 { font-size: 1.5rem; }
.entry-content h4 { font-size: 1.3rem; }

/* Images and Media */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.wp-video,
.wp-embedded-content {
    margin: 40px 0;
    border-radius: 4px;
    overflow: hidden;
}

/* Post Navigation and Sharing */
.post-navigation {
    margin: 50px 0 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous a,
.nav-next a {
    padding: 12px 20px;
    background: #f0f0f0;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: #e0e0e0;
}

/* Archive/Blog Layout */
.blog .site-main,
.archive .site-main {
    max-width: 1000px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
}

.post-card .entry-title {
    font-size: 1.4rem;
    margin: 20px;
    line-height: 1.3;
}

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

.post-card .entry-title a:hover {
    color: #666;
}

.post-card .entry-summary {
    padding: 0 20px 20px;
    color: #666;
    font-size: 16px;
}

.post-card .entry-meta {
    padding: 0 20px 15px;
    font-size: 14px;
    color: #888;
    justify-content: flex-start;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    font-size: 16px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #333;
    color: white;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 80px;
}

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

/* Comments */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.comment-list {
    list-style: none;
    margin-bottom: 30px;
}

.comment-body {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 10px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 16px;
    margin-bottom: 15px;
    font-family: inherit;
}

.comment-form input[type="submit"] {
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    width: auto;
    padding: 12px 24px;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e0e0e0;
        padding: 20px;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }

    .hero-section {
        padding: 60px 20px;
        min-height: 250px;
    }

    .hero-content .entry-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .entry-meta {
        flex-direction: column;
        gap: 8px;
    }

    .meta-divider {
        display: none;
    }

    .site-main {
        margin: 40px auto;
    }

    .entry-content p {
        font-size: 17px;
        text-align: left;
    }
    
    .post-navigation {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 15px;
    }

    .site-title a {
        font-size: 20px;
    }

    .hero-section {
        padding: 40px 15px;
    }

    .hero-content .entry-title {
        font-size: 1.5rem;
    }

    .site-main {
        padding: 0 15px;
    }

    .entry-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Accessibility improvements */
.nav-toggle:focus,
.search-toggle:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    body {
        background: white;
        color: black;
    }
    
    .hero-section {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .post-card,
    .nav-previous a,
    .nav-next a {
        transition: none;
    }
}