/*
Theme Name: AccessPress
Description: A lightweight, accessible WordPress theme inspired by GeneratePress with Pro features and comprehensive screen reader support. Built with WCAG 2.1 AA compliance and ARIA best practices.
Version: 1.0.0
Author: Manus AI
Text Domain: accesspress
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, one-column, two-columns, right-sidebar, theme-options, threaded-comments, translation-ready, blog, e-commerce

AccessPress is a modern, lightweight, and highly accessible WordPress theme designed with screen reader users in mind. It follows WCAG 2.1 AA guidelines and implements comprehensive ARIA support for an inclusive web experience.
*/

/* Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

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

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e1e1e1;
    padding: 1rem 0;
}

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

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

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

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

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

/* Navigation */
.main-navigation {
    position: relative;
}

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

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
    color: #005fcc;
}

.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
    color: #005fcc;
    font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: #f5f5f5;
}

/* Main Content */
.site-main {
    padding: 2rem 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.has-sidebar .content-area {
    grid-template-columns: 2fr 1fr;
}

/* Posts and Pages */
.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    line-height: 1.3;
    color: #333;
}

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

.entry-content {
    line-height: 1.7;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    color: #333;
}

.entry-content p {
    margin: 0 0 1.5rem;
}

.entry-content a {
    color: #005fcc;
    text-decoration: underline;
}

.entry-content a:hover,
.entry-content a:focus {
    color: #004499;
}

/* Sidebar */
.widget-area {
    padding: 0;
}

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.widget-title {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    color: #333;
}

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

.widget li {
    margin-bottom: 0.5rem;
}

.widget a {
    color: #005fcc;
    text-decoration: none;
}

.widget a:hover,
.widget a:focus {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget {
    margin: 0;
}

.footer-widget .widget-title {
    color: #fff;
    border-bottom: 2px solid #555;
    padding-bottom: 0.5rem;
}

.site-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    font-size: 0.875rem;
    color: #ccc;
}

.site-info a {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #e1e1e1;
        border-top: none;
        z-index: 999;
    }
    
    .main-navigation.toggled ul {
        display: flex;
    }
    
    .has-sidebar .content-area {
        grid-template-columns: 1fr;
    }
    
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .entry-title {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .menu-toggle,
    .main-navigation,
    .widget-area,
    .site-footer {
        display: none;
    }
    
    .site-main {
        padding: 0;
    }
    
    a {
        text-decoration: none;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        background: #000;
        color: #fff;
    }
    
    .site-header {
        background: #000;
        border-color: #fff;
    }
    
    .widget {
        background: #111;
        border: 1px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

