/*
Theme Name: Hexcat News
Theme URI: https://www.hexcatsystems.com/hexcat-news
Author: Hexcat Systems
Author URI: https://www.hexcatsystems.com
Description: A secure, lightweight, and lightning-fast block theme designed for news websites, magazine portals, and editorial publications. Features clean white background, accessible typography, 100/100 Core Web Vitals optimization, and responsive category widgets.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hexcat-news
Tags: news, blog, full-site-editing, block-patterns, accessibility-ready, custom-colors, editor-style
*/

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background-color: var(--wp--preset--color--base, #ffffff);
    color: var(--wp--preset--color--contrast, #111111);
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
}

:focus-visible {
    outline: 2px solid var(--wp--preset--color--breaking-red, #db0000);
    outline-offset: 3px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.screen-reader-text:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 16px !important;
    background: #db0000 !important;
    color: #ffffff !important;
    clip: auto !important;
    z-index: 999999;
}

.wp-block-quote {
    border-left: 4px solid var(--wp--preset--color--breaking-red, #db0000);
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    font-style: italic;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.wp-block-quote p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.wp-block-quote cite {
    font-style: normal;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.wp-block-query .wp-block-group {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 8px;
    background: #ffffff;
}

.wp-block-query .wp-block-group:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.wp-block-query .wp-block-post-featured-image {
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px !important;
}

.wp-block-query .wp-block-post-featured-image img {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    object-fit: cover;
    width: 100%;
}

.wp-block-query .wp-block-group:hover .wp-block-post-featured-image img {
    transform: scale(1.04);
}

.wp-block-post-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.wp-block-post-terms a {
    display: inline-block;
    background-color: var(--wp--preset--color--breaking-red, #db0000);
    color: #ffffff !important;
    padding: 3px 9px;
    border-radius: 3px;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.wp-block-post-terms a:hover,
.wp-block-post-terms a:focus {
    background-color: #111111;
    color: #ffffff !important;
}

.wp-block-navigation-item__content {
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-block-navigation-item__content::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--wp--preset--color--breaking-red, #db0000);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-block-navigation-item__content:hover::after,
.wp-block-navigation-item__content:focus::after {
    width: 100%;
}

.single .wp-block-post-content > p:first-of-type::first-letter {
    float: left;
    font-size: 4.25rem;
    line-height: 0.85;
    font-weight: 800;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
    color: var(--wp--preset--color--breaking-red, #db0000);
    font-family: var(--wp--preset--font-family--news-serif, Georgia, serif);
}

.wp-block-post-content p {
    margin-bottom: 1.6rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1f2937;
}

.hexcat-top-bar {
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.hexcat-ticker-query {
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
}

.hexcat-ticker-query ul.wp-block-post-template {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
    animation: hexcat-ticker-run 30s linear infinite;
}

.hexcat-ticker-query ul.wp-block-post-template li {
    white-space: nowrap;
    margin-right: 48px;
    flex-shrink: 0;
}

.hexcat-ticker-query ul.wp-block-post-template a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
}

.hexcat-ticker-query ul.wp-block-post-template a:hover {
    text-decoration: underline;
}

.hexcat-ticker-query ul.wp-block-post-template:hover,
.hexcat-ticker-query ul.wp-block-post-template:focus-within {
    animation-play-state: paused;
}

@keyframes hexcat-ticker-run {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .hexcat-ticker-query ul.wp-block-post-template {
        animation: none;
        overflow-x: auto;
    }
}

.hexcat-sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 24px;
    height: fit-content;
}

@media (max-width: 768px) {
    .wp-block-columns.alignwide {
        flex-direction: column !important;
    }
    
    .hexcat-top-bar {
        padding: 6px 12px !important;
    }
    
    .hexcat-ticker-query ul.wp-block-post-template li {
        margin-right: 24px;
        font-size: 0.85rem;
    }
}
