/* Accessibility Improvements - WCAG AA Compliance */

/* Article Meta Text - Ensure proper contrast */
.article-author,
.article-date,
.article-reading-time,
.article-comments,
.entry-meta,
.posted-on,
.byline,
.post-meta {
    color: #2d3748 !important;  /* Dark gray for 7:1 contrast ratio */
    font-weight: 500;  /* Slightly bolder for better readability */
}

/* Meta links hover state */
.article-author a,
.article-date a,
.entry-meta a,
.post-meta a {
    color: #003d7a !important;  /* Dark blue for links */
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.3s ease;
}

.article-author a:hover,
.article-date a:hover,
.entry-meta a:hover,
.post-meta a:hover {
    color: #0066cc !important;
    text-decoration-color: currentColor;
}

/* Category and tag labels */
.cat-links,
.tags-links,
.category-label,
.tag-label {
    color: #2d3748 !important;
    font-weight: 600;
}

/* Ensure proper contrast for light text on colored backgrounds */
.has-primary-background-color {
    background-color: #0066cc !important;
    color: #ffffff !important;
}

.has-primary-background-color a {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Article cards and excerpts */
.entry-summary,
.archive-description,
.post-excerpt {
    color: #2d3748 !important;
    line-height: 1.7;
}

/* Pagination */
.pagination .page-numbers,
.nav-links a,
.page-links a {
    color: #2d3748 !important;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.nav-links a:hover,
.page-links a:hover {
    background: #0066cc;
    color: #ffffff !important;
    border-color: #0066cc;
}

.pagination .current,
.page-numbers.current {
    background: #003d7a !important;
    color: #ffffff !important;
    border-color: #003d7a;
}

/* Form labels and placeholders */
label,
.comment-form label,
.search-form label {
    color: #2d3748 !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

input::placeholder,
textarea::placeholder {
    color: #5a6c7d !important;  /* Sufficient contrast for placeholders */
}

/* Buttons and CTAs */
.wp-block-button__link,
.button,
.btn,
button[type="submit"],
input[type="submit"] {
    background: #0066cc !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    transition: all 0.3s ease;
}

.wp-block-button__link:hover,
.button:hover,
.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background: #003d7a !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 122, 0.3);
}

/* Comments section */
.comment-metadata,
.comment-metadata a,
.comment-reply-link {
    color: #2d3748 !important;
}

.comment-metadata a:hover,
.comment-reply-link:hover {
    color: #0066cc !important;
}

/* Breadcrumbs */
.breadcrumb,
.breadcrumbs,
.rank-math-breadcrumb {
    color: #2d3748 !important;
}

.breadcrumb a,
.breadcrumbs a,
.rank-math-breadcrumb a {
    color: #003d7a !important;
}

/* Widget titles and content */
.widget-title,
.widgettitle {
    color: #001f3f !important;
    font-weight: 700;
}

.widget,
.widget a,
.widget li {
    color: #2d3748 !important;
}

.widget a:hover {
    color: #0066cc !important;
}

/* Footer text */
.site-footer,
.footer-widgets {
    background: #001f3f;
}

.site-footer,
.site-footer p,
.footer-widgets,
.footer-widgets p {
    color: #e2e8f0 !important;  /* Light gray on dark background */
}

.site-footer a,
.footer-widgets a {
    color: #87ceeb !important;  /* Sky blue for links */
    text-decoration: underline;
    text-decoration-color: transparent;
}

.site-footer a:hover,
.footer-widgets a:hover {
    color: #ffffff !important;
    text-decoration-color: currentColor;
}

/* Skip links for screen readers */
.screen-reader-text:focus {
    background: #0066cc;
    color: #ffffff !important;
    padding: 1rem;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100000;
    text-decoration: none;
    font-weight: 600;
}

/* Focus indicators for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #0066cc !important;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .article-author,
    .article-date,
    .article-reading-time,
    .article-comments,
    .entry-meta,
    .post-meta {
        color: #000000 !important;
        font-weight: 600;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    a {
        color: #0000ee !important;
        text-decoration: underline !important;
    }
}

/* Dark mode disabled - daylight mode only */

/* Ensure minimum font sizes for readability */
body {
    font-size: max(16px, 1rem) !important;
}

.article-author,
.article-date,
.article-reading-time,
.article-comments,
.entry-meta,
.post-meta {
    font-size: max(14px, 0.875rem) !important;
}

/* Improve link distinction */
article a:not(.button):not(.btn):not(.wp-block-button__link) {
    color: #003d7a !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

article a:not(.button):not(.btn):not(.wp-block-button__link):hover {
    color: #0066cc !important;
    text-decoration-thickness: 2px;
}

/* Ensure sufficient tap target size for mobile */
@media (max-width: 768px) {
    a,
    button,
    input,
    select,
    textarea,
    [role="button"],
    [tabindex] {
        min-height: 44px;
        min-width: 44px;
    }

    .pagination .page-numbers,
    .nav-links a {
        padding: 0.75rem 1rem;
    }
}