/*
Theme Name: PureFrame
Author: FRANKHOST LTD
Description: A clean, minimal theme designed for use with page builders like Elementor, Beaver Builder, Brizy, and SiteOrigin Page Builder.
Version: 1.3.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pureframe
Tags: one-column, accessibility-ready, custom-background, custom-logo, block-styles
Quicksand Font: Source: https://fonts.google.com/specimen/Quicksand, License: SIL Open Font License, https://scripts.sil.org/OFL
Copyright: Copyright (C) 2025 FRANKHOST LTD. PureFrame is distributed under the terms of the GNU General Public License v2 or later.

Screenshot image credit:
Image for theme screenshot, Credit Illustration by Revendo
License: Custom copyright license written by Unsplash
License URL: https://unsplash.com/license
Source: https://unsplash.com/illustrations/heres-a-caption-laptop-illustration-on-a-neutral-background-kEZrWOYuL80
*/

/* Skip link accessibility styles */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.screen-reader-text:focus, .skip-link:focus {
    position: absolute;
    left: 8px;
    top: 8px;
    width: auto;
    height: auto;
    background: #0073e6;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 1000;
    outline: 2px solid #fff;
    text-decoration: none;
}


body, button, input, select, textarea {
    font-family: 'Quicksand', Arial, sans-serif;
    color: #222;
    background: #fff;
    font-size: 16px;
    line-height: 1.6;
}

/* Minimal, beautiful base styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header styles */
.site-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.site-title {
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: #222;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.main-navigation a {
    text-decoration: none;
    color: #555;
    padding: 0.5rem 0;
}

.main-navigation a:hover {
    color: #0073e6;
}

/* Footer styles */
.site-footer {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: 2rem;
}

/* Post thumbnail styles (minimal) */
.post-thumbnail {
    margin-bottom: 1.5rem;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Block styles for editor */
.wp-block-quote.is-style-pureframe-simple-quote {
    border-left: 3px solid #0073e6;
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
}

.wp-block-button.is-style-pureframe-minimal-button .wp-block-button__link {
    background: transparent !important;
    color: #0073e6 !important;
    border: 1px solid #0073e6 !important;
}

.wp-block-button.is-style-pureframe-minimal-button .wp-block-button__link:hover {
    background: #0073e6 !important;
    color: #fff !important;
}

/* Search form styles */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.search-form label {
    flex: 1;
}

.search-field {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.search-submit {
    padding: 0.5rem 1rem;
    background: #0073e6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-submit:hover {
    background: #005bb5;
}

/* 404 page styles */
.error-404 .widget {
    margin-bottom: 2rem;
}

.error-404 .widget ul {
    list-style: none;
    padding: 0;
}

.error-404 .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.error-404 .widget li:last-child {
    border-bottom: none;
}
a {
    color: #0073e6;
    text-decoration: underline;
    transition: color 0.2s;
}
a:hover {
    color: #005bb5;
    text-shadow: 0 2px 8px rgba(255,255,255,0.5);
    transition: color 0.2s, text-shadow 0.2s;
}


/* Sleek button style */
.button, button, input[type="submit"] {
    background: #0073e6;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.6em 1.2em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.button:hover, button:hover, input[type="submit"]:hover {
    background: #005bb5;
    box-shadow: 0 4px 16px rgba(220,220,220,0.25);
    transition: background 0.2s, box-shadow 0.2s;
}

/* Recommended WordPress core classes for compatibility */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
    text-align: center;
}
.wp-caption img {
    margin-bottom: 0.5em;
    max-width: 100%;
    height: auto;
}
.wp-caption-text {
    font-size: 0.95em;
    color: #666;
}
.gallery-caption {
    font-size: 0.95em;
    color: #888;
    text-align: center;
}
.sticky {
    border-left: 3px solid #0073e6;
    background: #f8fafd;
}
.bypostauthor {
    font-weight: 500;
}
.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
    clear: both;
}

/* Enhanced keyboard focus styles for accessibility */
/* Skip links and general links */
a:focus, a:active, .skip-link:focus {
    outline: 3px solid #ff9800;
    outline-offset: 2px;
    background: #fff3e0;
    color: #d84315;
    text-decoration: none;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.3);
    transition: all 0.2s ease-in-out;
}

/* Form fields focus styles */
button:focus, 
input[type="submit"]:focus, 
input[type="button"]:focus, 
input[type="reset"]:focus, 
textarea:focus, 
select:focus, 
input[type="text"]:focus, 
input[type="search"]:focus, 
input[type="email"]:focus, 
input[type="url"]:focus, 
input[type="password"]:focus, 
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="checkbox"]:focus,
input[type="radio"]:focus {
    outline: 3px solid #ff9800;
    outline-offset: 2px;
    background: #fff3e0;
    color: #d84315;
    border-color: #ff9800;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

/* Navigation menu focus styles */
nav a:focus, 
nav a:active, 
.main-navigation a:focus, 
.main-navigation a:active,
.main-navigation ul li a:focus,
.main-navigation ul li a:active {
    outline: 3px solid #ff9800;
    outline-offset: 2px;
    background: #fff3e0;
    color: #d84315;
    text-decoration: none;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.3);
    transition: all 0.2s ease-in-out;
    position: relative;
    z-index: 10;
}

/* Menu list items focus enhancement */
.main-navigation ul li:focus-within {
    background: rgba(255, 152, 0, 0.05);
    border-radius: 3px;
}

/* Dropdown menu focus styles */
.main-navigation ul ul a:focus,
.main-navigation ul ul a:active {
    background: #fff3e0;
    color: #d84315;
    outline: 3px solid #ff9800;
    outline-offset: 1px;
    border-radius: 3px;
    margin: 1px;
}

/* Comment form and search form focus */
.comment-form input:focus,
.comment-form textarea:focus,
.search-form input:focus,
.widget input:focus,
.widget select:focus,
.widget textarea:focus {
    outline: 3px solid #ff9800;
    outline-offset: 2px;
    background: #fff3e0;
    color: #d84315;
    border-color: #ff9800;
    box-shadow: 0 0 0 1px rgba(255, 152, 0, 0.3);
}

/* Custom logo and site title focus */
.site-logo a:focus,
.site-title a:focus {
    outline: 3px solid #ff9800;
    outline-offset: 3px;
    background: transparent;
    border-radius: 3px;
    text-decoration: none;
}

/* Post navigation and pagination focus */
.nav-links a:focus,
.page-numbers:focus,
.prev:focus,
.next:focus {
    outline: 3px solid #ff9800;
    outline-offset: 2px;
    background: #fff3e0;
    color: #d84315;
    border-radius: 3px;
    text-decoration: none;
}

/* Widget area links focus */
.widget a:focus,
.widget-area a:focus {
    outline: 3px solid #ff9800;
    outline-offset: 2px;
    background: #fff3e0;
    color: #d84315;
    border-radius: 3px;
    text-decoration: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    a:focus, 
    button:focus, 
    input:focus, 
    textarea:focus, 
    select:focus,
    nav a:focus {
        outline: 4px solid #000;
        background: #ffff00;
        color: #000;
        box-shadow: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *:focus {
        transition: none;
    }
}

/* Navigation menu keyboard accessibility enhancements */
.main-navigation {
    position: relative;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: inherit;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.main-navigation ul li a:hover {
    background: rgba(0, 115, 230, 0.1);
    text-decoration: none;
}

/* Dropdown menu accessibility */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    color: #333;
}

.main-navigation ul ul a:hover,
.main-navigation ul ul a:focus {
    background: #f5f5f5;
}

/* Show dropdown on focus or hover */
.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul {
    display: flex;
}

/* Mobile responsive navigation */
@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        background: transparent;
        padding: 0;
        margin-left: 1rem;
    }
    
    .main-navigation ul li:hover > ul,
    .main-navigation ul li:focus-within > ul {
        display: flex;
    }
}

/* Form field enhancements for better accessibility */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:hover, textarea:hover, select:hover {
    border-color: #bbb;
}

/* Label enhancements */
label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #333;
}

/* Required field indicators */
.required {
    color: #d84315;
}

/* Error state styling */
.error input, .error textarea, .error select {
    border-color: #d84315;
    background: #fff5f5;
}

.error label {
    color: #d84315;
}

/* Success state styling */
.success input, .success textarea, .success select {
    border-color: #4caf50;
    background: #f1f8e9;
}

/* Post meta and archive styling */
.entry-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: #666;
    text-decoration: none;
}

.entry-meta a:hover {
    color: #0073e6;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 1.8em;
    margin-bottom: 0.5rem;
}

.archive-description {
    color: #666;
    font-size: 1.1em;
}

/* Post navigation */
.post-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.post-navigation a {
    display: block;
    padding: 1rem;
    background: #f8fafd;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 1rem;
}

.post-navigation a:hover {
    background: #e8f2fd;
}

.nav-subtitle {
    font-size: 0.9em;
    color: #666;
    display: block;
}

.nav-title {
    font-weight: 600;
    color: #222;
}

/* Comments */
.comments-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 1.3em;
    margin-bottom: 1.5rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .comment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafd;
    border-radius: 4px;
}

.comment-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5rem;
}

.comment-content {
    margin-top: 1rem;
}

/* Pagination improvements */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination .nav-links a,
.pagination .nav-links .current {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid #ddd;
}

.pagination .nav-links a:hover {
    background: #0073e6;
    color: #fff;
    border-color: #0073e6;
}

.pagination .nav-links .current {
    background: #0073e6;
    color: #fff;
    border-color: #0073e6;
}
