/*
Theme Name: HomeRunbook Blog
Theme URI: https://homerunbook.com
Author: HomeRunbook
Author URI: https://homerunbook.com
Description: Official blog theme for HomeRunbook - Visual documentation for home infrastructure. A modern block theme (Full Site Editing) designed to seamlessly integrate with the HomeRunbook application.
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hrb-blog
Tags: blog, block-styles, full-site-editing, accessibility-ready, custom-colors, custom-logo, editor-style, wide-blocks
*/

/* ==========================================================================
   Additional Styles (Beyond theme.json)

   Most styling is handled by theme.json. This file contains additional
   styles that can't be expressed in theme.json or need CSS-specific features.
   ========================================================================== */

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--wp--preset--color--primary-dark);
    color: #fff;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.2s ease-in-out;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--wp--preset--color--warning);
    outline-offset: 2px;
}

/* Post Card Hover Effects */
.post-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Header CTA Button Hover */
.header-cta .wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Button Hover Effects */
.wp-block-button__link {
    transition: all 0.2s ease-in-out;
}

.wp-block-button__link:hover {
    transform: translateY(-1px);
}

/* Link Transitions */
a {
    transition: color 0.2s ease-in-out;
}

/* Navigation Styles */
.wp-block-navigation .wp-block-navigation-item a {
    transition: color 0.2s ease-in-out;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
    color: var(--wp--preset--color--primary);
}

/* Search Block Enhancements */
.wp-block-search .wp-block-search__button {
    transition: all 0.2s ease-in-out;
}

.wp-block-search .wp-block-search__button:hover {
    background-color: var(--wp--preset--color--primary-medium);
}

/* Social Links Hover */
.wp-block-social-links .wp-social-link {
    transition: all 0.2s ease-in-out;
}

.wp-block-social-links .wp-social-link:hover {
    background-color: var(--wp--preset--color--primary) !important;
    color: #fff !important;
}

/* Card Style for Group Block */
.is-style-hrb-card {
    background: var(--wp--preset--color--card-background);
    border: 1px solid var(--wp--preset--color--border-light);
    border-radius: var(--wp--custom--border-radius--large, 12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: var(--wp--preset--spacing--30);
}

/* Gradient Button Style */
.is-style-hrb-gradient .wp-block-button__link {
    background: var(--wp--preset--gradient--header-gradient);
    border: none;
}

/* Featured Image Placeholder */
.wp-block-post-featured-image:empty {
    background-color: var(--wp--preset--color--background);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Post Content Typography */
.single-post-content p {
    margin-bottom: 1.25rem;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.single-post-content li {
    margin-bottom: 0.5rem;
}

.single-post-content img {
    margin: 1.5rem 0;
}

/* Code Block Enhancements */
.wp-block-code code {
    display: block;
    overflow-x: auto;
}

/* Separator Styling */
.wp-block-separator {
    opacity: 1;
}

/* Latest Posts Widget Styling */
.wp-block-latest-posts__featured-image {
    border-radius: var(--wp--custom--border-radius--small, 4px);
    overflow: hidden;
}

.wp-block-latest-posts__post-title {
    font-weight: 500;
}

.wp-block-latest-posts__post-date {
    font-size: 0.8rem;
    color: var(--wp--preset--color--text-muted);
}

/* Categories Widget */
.wp-block-categories-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--wp--preset--color--border-light);
}

.wp-block-categories-list li:last-child {
    border-bottom: none;
}

/* Tag Cloud */
.wp-block-tag-cloud a {
    display: inline-block;
    padding: 0.25em 0.5em;
    margin: 0.25em;
    background-color: var(--wp--preset--color--background);
    border-radius: var(--wp--custom--border-radius--small, 4px);
    transition: all 0.2s ease-in-out;
}

.wp-block-tag-cloud a:hover {
    background-color: var(--wp--preset--color--primary);
    color: #fff;
}

/* Comment Form Styling */
.wp-block-post-comments-form input[type="text"],
.wp-block-post-comments-form input[type="email"],
.wp-block-post-comments-form input[type="url"],
.wp-block-post-comments-form textarea {
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--border-radius--small, 4px);
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.wp-block-post-comments-form input:focus,
.wp-block-post-comments-form textarea:focus {
    border-color: var(--wp--preset--color--primary-medium);
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 182, 0.25);
    outline: none;
}

.wp-block-post-comments-form .form-submit input[type="submit"] {
    background-color: var(--wp--preset--color--primary);
    color: #fff;
    border: none;
    border-radius: var(--wp--custom--border-radius--medium, 8px);
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.wp-block-post-comments-form .form-submit input[type="submit"]:hover {
    background-color: var(--wp--preset--color--primary-medium);
    transform: translateY(-1px);
}

/* Pagination Styling */
.wp-block-query-pagination {
    gap: 0.5rem;
}

.wp-block-query-pagination-numbers .page-numbers,
.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: var(--wp--custom--border-radius--small, 4px);
    transition: all 0.2s ease-in-out;
}

.wp-block-query-pagination-numbers .page-numbers:hover,
.wp-block-query-pagination-previous:hover,
.wp-block-query-pagination-next:hover {
    background-color: var(--wp--preset--color--background);
    border-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background-color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
    color: #fff;
}

/* Focus States (Accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary-medium);
    outline-offset: 2px;
}

/* 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;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--wp--preset--color--background);
    border-radius: var(--wp--custom--border-radius--small, 4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    clip: auto !important;
    clip-path: none;
    color: var(--wp--preset--color--primary-dark);
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* WordPress Core Alignments */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

/* Captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: var(--wp--preset--color--text-muted);
    text-align: center;
    padding: 0.5rem 0;
}

/* Galleries */
.wp-block-gallery {
    margin-bottom: 1.5rem;
}

.wp-block-gallery .wp-block-image img {
    border-radius: var(--wp--custom--border-radius--small, 4px);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .page-header h1,
    .wp-block-query-title {
        font-size: 1.75rem !important;
    }

    .single-post-content {
        font-size: 1rem !important;
    }
}

@media (max-width: 767.98px) {
    .page-header-icon {
        display: none;
    }

    .wp-block-columns {
        flex-direction: column;
    }

    .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* Editor-specific styles */
.editor-styles-wrapper .post-card {
    transition: none;
}

.editor-styles-wrapper .post-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
