/*
Theme Name: Onset
Theme URI: #
Author: Theme Developer
Author URI: #
Description: Bold music and culture magazine theme inspired by Onset. Dramatic typography, red accents, large imagery for artists and album reviews.
Version: 1.3.1*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    /* Colors */
    --onset-color-primary: #e31837;
    --onset-color-secondary: #1a1a1a;
    --onset-color-accent: #ffd700;
    --onset-color-text: #222222;
    --onset-color-text-light: #666666;
    --onset-color-bg: #ffffff;
    --onset-color-bg-alt: #f5f5f5;
    --onset-color-border: #e0e0e0;

    /* Typography */
    --onset-font-heading: 'Oswald', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --onset-font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --onset-font-accent: 'Playfair Display', Georgia, serif;

    /* Sizes */
    --onset-container-width: 1200px;
    --onset-spacing-unit: 1rem;
    --onset-border-radius: 0;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

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

body {
    margin: 0;
    font-family: var(--onset-font-body);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--onset-color-text);
    background-color: var(--onset-color-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--onset-font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    margin: 0 0 1.5rem;
}

a {
    color: var(--onset-color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--onset-color-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.onset-container {
    max-width: var(--onset-container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.onset-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

.onset-wrapper.onset-has-sidebar {
    grid-template-columns: 1fr 320px;
}

.onset-wrapper.onset-sidebar-left {
    grid-template-columns: 320px 1fr;
}

.onset-wrapper.onset-sidebar-left .onset-sidebar {
    order: -1;
}

/* ==========================================================================
   Header
   ========================================================================== */

.onset-header {
    background: var(--onset-color-secondary);
    color: #ffffff;
    position: relative;
    z-index: 100;
}

.onset-header-top {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

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

.onset-header-date {
    color: rgba(255,255,255,0.7);
}

.onset-header-main {
    padding: 1.5rem 0;
}

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

.onset-logo {
    font-family: var(--onset-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.onset-logo span {
    color: var(--onset-color-primary);
}

.onset-logo a {
    color: inherit;
    text-decoration: none;
}

.onset-logo img,
.custom-logo-link .custom-logo,
.onset-header-inner .custom-logo {
    max-height: 40px;
    width: auto;
    height: auto;
}

.onset-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.onset-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.onset-nav-menu li {
    position: relative;
}

.onset-nav-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #ffffff;
    font-family: var(--onset-font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.onset-nav-menu a:hover,
.onset-nav-menu .current-menu-item > a {
    color: var(--onset-color-primary);
}

.onset-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--onset-color-secondary);
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.onset-nav-menu li:hover > .sub-menu {
    display: block;
}

.onset-nav-menu .sub-menu a {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.onset-search-toggle {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.onset-search-toggle:hover {
    color: var(--onset-color-primary);
}

.onset-search-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

.onset-search-overlay {
    display: none;
    background: var(--onset-color-secondary);
    padding: 1.5rem 0;
}

.onset-search-overlay.active {
    display: block;
}

.onset-search-form {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
}

.onset-search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--onset-font-body);
    border: 2px solid rgba(255,255,255,0.2);
    border-right: none;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    outline: none;
}

.onset-search-field::placeholder {
    color: rgba(255,255,255,0.5);
}

.onset-search-field:focus {
    border-color: var(--onset-color-primary);
    background: rgba(255,255,255,0.15);
}

.onset-search-submit {
    padding: 0.75rem 1.25rem;
    background: var(--onset-color-primary);
    border: 2px solid var(--onset-color-primary);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
}

.onset-search-submit:hover {
    background: var(--onset-color-accent);
    border-color: var(--onset-color-accent);
}

.onset-search-submit svg {
    width: 20px;
    height: 20px;
    display: block;
}

button.onset-nav-close {
    display: none;
}

.onset-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.onset-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
}

.onset-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.onset-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.onset-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.onset-hero {
    background: var(--onset-color-secondary);
    color: #ffffff;
    padding: 0;
}

.onset-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    min-height: 500px;
}

.onset-hero-featured {
    position: relative;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.onset-hero-image {
    position: absolute;
    inset: 0;
}

.onset-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.onset-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
}

.onset-hero-category {
    display: inline-block;
    background: var(--onset-color-primary);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-family: var(--onset-font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.onset-hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.onset-hero-title a {
    color: #ffffff;
}

.onset-hero-title a:hover {
    color: var(--onset-color-primary);
}

.onset-hero-excerpt {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
    max-width: 600px;
}

.onset-featured-section { padding: 2rem 0; }
.onset-featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 1024px) { .onset-featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .onset-featured-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .onset-hero-inner { grid-template-columns: 1fr; min-height: auto; }
    .onset-hero-featured { min-height: auto; }
    .onset-hero-image { position: relative; aspect-ratio: 16/9; }
    .onset-hero-overlay { position: relative; padding: 1.5rem; background: var(--onset-color-secondary); }
    .onset-hero-title { font-size: 1.5rem; }
    .onset-hero-excerpt { font-size: 0.9375rem; }
    .onset-hero-sidebar { display: none; }
}

.onset-hero-sidebar {
    display: flex;
    flex-direction: column;
}

.onset-hero-sidebar-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid rgba(255,255,255,0.15);
}

.onset-hero-sidebar-item:last-child {
    border-bottom: none;
}

.onset-hero-sidebar-item a {
    display: flex;
    height: 100%;
    color: #ffffff;
}

.onset-hero-sidebar-image {
    width: 40%;
    position: relative;
}

.onset-hero-sidebar-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.onset-hero-sidebar-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.onset-hero-sidebar-title {
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

.onset-hero-sidebar-item:hover .onset-hero-sidebar-title {
    color: var(--onset-color-primary);
}

/* ==========================================================================
   Content Cards
   ========================================================================== */

.onset-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.onset-card {
    background: var(--onset-color-bg);
    border-bottom: 3px solid var(--onset-color-secondary);
    transition: border-color 0.2s ease;
}

.onset-card:hover {
    border-color: var(--onset-color-primary);
}

.onset-card--sticky {
    border-color: var(--onset-color-primary);
}

.onset-card--sticky .onset-card-badge {
    display: block;
}

.onset-card-badge {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--onset-color-primary);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-family: var(--onset-font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 2;
}

.onset-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.onset-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.onset-card:hover .onset-card-image img {
    transform: scale(1.05);
}

.onset-card-category {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--onset-color-primary);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-family: var(--onset-font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.onset-card-content {
    padding: 1.5rem;
}

.onset-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.onset-card-title a {
    color: var(--onset-color-secondary);
}

.onset-card-title a:hover {
    color: var(--onset-color-primary);
}

.onset-card-excerpt {
    color: var(--onset-color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.onset-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--onset-color-text-light);
    font-family: var(--onset-font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.onset-single-header {
    background: var(--onset-color-secondary);
    color: #ffffff;
    padding: 4rem 0;
    text-align: center;
}

.onset-single-category {
    display: inline-block;
    background: var(--onset-color-primary);
    color: #ffffff;
    padding: 0.25rem 1rem;
    font-family: var(--onset-font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.onset-single-category a {
    color: inherit;
}

.onset-single-title {
    font-size: 3rem;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.onset-single-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.onset-single-author {
    font-weight: 600;
    color: #ffffff;
}

.onset-single-featured {
    margin: -2rem auto 3rem;
    max-width: 1000px;
    padding: 0 1.5rem;
}

.onset-single-featured img {
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.onset-single-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.onset-wrapper.onset-has-sidebar .onset-single-content {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.onset-related--inline {
    background: var(--onset-color-secondary);
    color: #ffffff;
    padding: 3rem;
    margin-top: 2rem;
}

.onset-wrapper.onset-has-sidebar .onset-comments {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.onset-single-content p {
    font-size: 1.2rem;
    line-height: 1.8;
}

.onset-single-content h2 {
    margin-top: 3rem;
    color: var(--onset-color-secondary);
}

.onset-single-content blockquote {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--onset-color-bg-alt);
    border-left: 4px solid var(--onset-color-primary);
    font-family: var(--onset-font-accent);
    font-size: 1.5rem;
    font-style: italic;
}

.onset-single-content blockquote p:last-child {
    margin-bottom: 0;
}
.onset-single-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.9375rem; overflow-x: auto; display: block; }
.onset-single-content thead { background: var(--onset-color-bg-alt, #f4f4f4); }
.onset-single-content th, .onset-single-content td { padding: 0.75rem 1rem; border: 1px solid var(--onset-color-border, #ddd); text-align: left; vertical-align: top; }
.onset-single-content th { font-weight: 700; white-space: nowrap; }
.onset-single-content tr:nth-child(even) { background: var(--onset-color-bg-alt, #f8f8f8); }

/* Tags */
.onset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--onset-color-border);
}

.onset-tags a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--onset-color-bg-alt);
    color: var(--onset-color-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.onset-tags a:hover {
    background: var(--onset-color-primary);
    color: #ffffff;
}

/* Author Box */
.onset-author-box {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--onset-color-bg-alt);
    border-radius: var(--onset-radius);
}

.onset-author-avatar { flex-shrink: 0; }
.onset-author-avatar img { width: 80px; height: 80px; min-width: 80px; border-radius: 50%; object-fit: cover; display: block; }
.onset-author-info { flex: 1; }
.onset-author-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.onset-author-name a { color: var(--onset-color-text); }
.onset-author-name a:hover { color: var(--onset-color-primary); }
.onset-author-bio { font-size: 0.9375rem; color: var(--onset-color-text-light); }

/* Post Navigation */
.onset-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--onset-color-border);
}

.onset-post-nav-item {
    padding: 1.5rem;
    background: var(--onset-color-bg-alt);
}

.onset-post-nav-item--next {
    text-align: right;
}

.onset-post-nav-label {
    font-family: var(--onset-font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--onset-color-text-light);
    margin-bottom: 0.5rem;
}

.onset-post-nav-title {
    font-family: var(--onset-font-heading);
    font-size: 1.1rem;
    color: var(--onset-color-secondary);
}

.onset-post-nav-item:hover .onset-post-nav-title {
    color: var(--onset-color-primary);
}

/* Related Posts */
.onset-related {
    background: var(--onset-color-secondary);
    color: #ffffff;
    padding: 4rem 0;
    margin-top: 3rem;
}

.onset-related-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
}

.onset-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.onset-related-item {
    position: relative;
}

.onset-related-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.onset-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.onset-related-item:hover .onset-related-image img {
    transform: scale(1.1);
}

.onset-related-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.onset-related-item-title {
    font-size: 0.95rem;
    margin: 0;
    color: #ffffff;
}

.onset-related-item:hover .onset-related-item-title {
    color: var(--onset-color-primary);
}

/* ==========================================================================
   Archive
   ========================================================================== */

.onset-archive-header {
    background: var(--onset-color-secondary);
    color: #ffffff;
    padding: 3rem 0;
    text-align: center;
}

.onset-archive-title {
    margin-bottom: 0.5rem;
}

.onset-archive-description {
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.onset-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.onset-widget {
    background: var(--onset-color-bg-alt);
    padding: 1.5rem;
}

.onset-widget-title {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--onset-color-primary);
    color: var(--onset-color-secondary);
}

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

.onset-widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--onset-color-border);
}

.onset-widget li:last-child {
    border-bottom: none;
}

.onset-widget a {
    color: var(--onset-color-text);
}

.onset-widget a:hover {
    color: var(--onset-color-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.onset-footer {
    background: var(--onset-color-secondary);
    color: #ffffff;
}

.onset-footer-widgets {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.onset-footer-widget-title {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--onset-color-primary);
}

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

.onset-footer-widget li {
    padding: 0.4rem 0;
}

.onset-footer-widget a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.onset-footer-widget a:hover {
    color: var(--onset-color-primary);
}

.onset-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
}

.onset-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.onset-copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.onset-copyright p { margin: 0; }

.onset-site-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.25rem;
}

.onset-content { min-width: 0; }

.onset-footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.onset-footer-menu a {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.onset-footer-menu a:hover {
    color: var(--onset-color-primary);
}

/* Scroll to Top */
.onset-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--onset-color-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.onset-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.onset-scroll-top:hover {
    background: var(--onset-color-secondary);
}

.onset-scroll-top svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.onset-404 {
    text-align: center;
    padding: 6rem 1.5rem;
    background: var(--onset-color-secondary);
    color: #ffffff;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.onset-404-code {
    font-family: var(--onset-font-heading);
    font-size: 10rem;
    font-weight: 700;
    line-height: 1;
    color: var(--onset-color-primary);
    margin-bottom: 1rem;
}

.onset-404-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.onset-404-text {
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
    max-width: 500px;
}

.onset-404-search {
    max-width: 400px;
    width: 100%;
    margin-bottom: 2rem;
}

.onset-404-home {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--onset-color-primary);
    color: #ffffff;
    font-family: var(--onset-font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.onset-404-home:hover {
    background: #ffffff;
    color: var(--onset-color-secondary);
}

/* ==========================================================================
   Search
   ========================================================================== */

.onset-search-form {
    display: flex;
}

.onset-search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--onset-color-border);
    font-size: 1rem;
    font-family: inherit;
}

.onset-search-field:focus {
    outline: none;
    border-color: var(--onset-color-primary);
}

.onset-search-submit {
    padding: 0.75rem 1.5rem;
    background: var(--onset-color-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-family: var(--onset-font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.onset-search-submit:hover {
    background: var(--onset-color-secondary);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.onset-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.onset-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.onset-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    background: var(--onset-color-bg-alt);
    color: var(--onset-color-text);
    font-family: var(--onset-font-heading);
}

.onset-pagination .page-numbers.current,
.onset-pagination .page-numbers:hover {
    background: var(--onset-color-primary);
    color: #ffffff;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.onset-breadcrumbs {
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--onset-color-text-light);
}

.onset-breadcrumbs a {
    color: var(--onset-color-text-light);
}

.onset-breadcrumbs a:hover {
    color: var(--onset-color-primary);
}

.onset-breadcrumbs .separator {
    margin: 0 0.5rem;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.onset-comments {
    max-width: 750px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.onset-comments-title {
    margin-bottom: 2rem;
}

.onset-comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.onset-comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--onset-color-border);
}

.onset-comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.onset-comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.onset-comment-author {
    font-weight: 600;
}

.onset-comment-date {
    font-size: 0.85rem;
    color: var(--onset-color-text-light);
}

.onset-comment-content p:last-child {
    margin-bottom: 0;
}

.onset-comment-reply {
    margin-top: 1rem;
}

.onset-comment-reply a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Comment Form */
.onset-comment-form {
    margin-top: 3rem;
}

.onset-comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.onset-comment-form input[type="text"],
.onset-comment-form input[type="email"],
.onset-comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--onset-color-border);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.onset-comment-form input:focus,
.onset-comment-form textarea:focus {
    outline: none;
    border-color: var(--onset-color-primary);
}

.onset-comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.onset-comment-form button {
    padding: 1rem 2rem;
    background: var(--onset-color-primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-family: var(--onset-font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.onset-comment-form button:hover {
    background: var(--onset-color-secondary);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.onset-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: 1rem;
    background: var(--onset-color-primary);
    color: #ffffff;
    z-index: 9999;
}

.onset-skip-link:focus {
    top: 0;
}

.onset-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .onset-wrapper.onset-has-sidebar,
    .onset-wrapper.onset-sidebar-left {
        grid-template-columns: 1fr;
    }

    .onset-wrapper.onset-sidebar-left .onset-sidebar {
        order: 0;
    }

    .onset-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .onset-hero-inner {
        grid-template-columns: 1fr;
    }

    .onset-hero-sidebar {
        display: none;
    }

    .onset-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .onset-footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .onset-nav {
        display: none;
    }

    .onset-menu-toggle {
        display: flex;
    }

    .onset-nav.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--onset-color-secondary);
        padding: 4rem 1.5rem 1.5rem;
        z-index: 200;
        overflow-y: auto;
    }

    .onset-nav.active .onset-nav-menu {
        flex-direction: column;
    }

    .onset-nav.active .onset-nav-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: #ffffff;
        font-size: 2rem;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        line-height: 1;
        z-index: 201;
    }

    .onset-nav.active .onset-nav-close:hover {
        color: var(--onset-color-primary);
    }

    .onset-posts-grid {
        grid-template-columns: 1fr;
    }

    .onset-single-title {
        font-size: 2rem;
    }

    .onset-404-code {
        font-size: 6rem;
    }

    .onset-post-nav {
        grid-template-columns: 1fr;
    }

    .onset-post-nav-item--next {
        text-align: left;
    }

    .onset-footer-widgets {
        grid-template-columns: 1fr;
    }

    .onset-footer-bottom-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .onset-footer-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .onset-sidebar {
        display: none !important;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .onset-logo {
        font-size: 1.75rem;
    }

    .onset-logo img,
    .custom-logo-link .custom-logo,
    .onset-header-inner .custom-logo {
        max-height: 32px;
    }

    .onset-related-grid {
        grid-template-columns: 1fr;
    }
}

/* Interlinking Section */
.onset-interlinking {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.onset-interlinking-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}
.onset-interlinking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.onset-interlinking-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}
.onset-interlinking-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--onset-color-primary, #333);
}
.onset-interlinking-list a {
    color: var(--onset-color-primary, #333);
    text-decoration: none;
}
.onset-interlinking-list a:hover {
    text-decoration: underline;
}

/* === Grid Layouts === */
.onset-posts-grid.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.onset-posts-grid.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
.onset-posts-grid.grid-list {
    display: block;
}
.onset-posts-grid.grid-list .onset-card {
    margin-bottom: 30px;
}
@media (max-width: 1024px) {
    .onset-posts-grid.grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .onset-posts-grid.grid-3col,
    .onset-posts-grid.grid-2col {
        grid-template-columns: 1fr;
    }
}

/* Embeds & iframes */
iframe, embed, object, video {
    max-width: 100%;
}

.wp-block-embed { max-width: 100%; overflow: hidden; }

/* Code blocks */
pre {
    background: var(--onset-color-bg-alt);
    border: 1px solid var(--onset-color-border);
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875em;
    background: var(--onset-color-bg-alt);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

/* Print styles */
@media print {
    .onset-header, .onset-nav, .onset-footer, .onset-sidebar,
    .onset-scroll-top, .onset-menu-toggle, .onset-search-toggle,
    .onset-post-nav, .onset-related, .onset-interlinking,
    .onset-comments, .onset-breadcrumbs, .onset-pagination { display: none !important; }
    body { font-size: 12pt; color: #000; background: #fff; }
    a { color: #000; text-decoration: underline; }
    .onset-single-content { max-width: 100%; padding: 0; }
}

/* ==========================================================================
   Structural Diversification (body_class driven)
   ========================================================================== */

/* --- Card Style: Horizontal --- */
body.onset-card-horizontal .onset-card {
    display: grid;
    grid-template-columns: 280px 1fr;
}
body.onset-card-horizontal .onset-card .onset-card-image {
    aspect-ratio: auto;
    height: 100%;
}
body.onset-card-horizontal .onset-card .onset-card-image img {
    position: absolute;
    inset: 0;
}
body.onset-card-horizontal .onset-card .onset-card-image {
    position: relative;
    overflow: hidden;
}
body.onset-card-horizontal .onset-posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    body.onset-card-horizontal .onset-card {
        grid-template-columns: 1fr;
    }
    body.onset-card-horizontal .onset-card .onset-card-image {
        aspect-ratio: 16/10;
    }
}

/* --- Card Style: Overlay --- */
body.onset-card-overlay .onset-card {
    position: relative;
    border-bottom: none;
    overflow: hidden;
}
body.onset-card-overlay .onset-card .onset-card-image {
    aspect-ratio: 4/3;
}
body.onset-card-overlay .onset-card .onset-card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    padding: 1.5rem;
    color: #ffffff;
}
body.onset-card-overlay .onset-card .onset-card-title a {
    color: #ffffff;
}
body.onset-card-overlay .onset-card .onset-card-title a:hover {
    color: var(--onset-color-primary);
}
body.onset-card-overlay .onset-card .onset-card-excerpt {
    color: rgba(255,255,255,0.8);
}
body.onset-card-overlay .onset-card .onset-card-meta {
    color: rgba(255,255,255,0.7);
}
body.onset-card-overlay .onset-card:hover .onset-card-content {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

/* --- Card Style: Text Only --- */
body.onset-card-text .onset-card .onset-card-image {
    display: none;
}
body.onset-card-text .onset-card {
    border-bottom-width: 1px;
    padding-bottom: 0;
}
body.onset-card-text .onset-card .onset-card-content {
    padding: 1rem 0;
}
body.onset-card-text .onset-posts-grid {
    grid-template-columns: 1fr;
    gap: 0;
}
body.onset-card-text .onset-card .onset-card-title {
    font-size: 1.5rem;
}

/* --- Header Layout: Centered --- */
body.onset-header-centered .onset-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}
body.onset-header-centered .onset-logo {
    order: -1;
}
body.onset-header-centered .onset-nav {
    width: 100%;
    justify-content: center;
}
body.onset-header-centered .onset-nav-menu {
    justify-content: center;
}

/* --- Header Layout: Stacked --- */
body.onset-header-stacked .onset-header-main {
    padding: 1rem 0 0;
}
body.onset-header-stacked .onset-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 0;
}
body.onset-header-stacked .onset-logo {
    margin-bottom: 1rem;
}
body.onset-header-stacked .onset-nav {
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.75rem;
}
body.onset-header-stacked .onset-nav-menu {
    justify-content: center;
}

/* --- Featured Style: Hero (enhanced full-width) --- */
body.onset-featured-hero .onset-hero-inner {
    grid-template-columns: 1fr;
    min-height: 600px;
}
body.onset-featured-hero .onset-hero-sidebar {
    display: none;
}
body.onset-featured-hero .onset-hero-featured {
    min-height: 600px;
}
body.onset-featured-hero .onset-hero-title {
    font-size: 3.5rem;
}
body.onset-featured-hero .onset-hero-overlay {
    padding: 4rem;
}
@media (max-width: 768px) {
    body.onset-featured-hero .onset-hero-featured {
        min-height: 400px;
    }
    body.onset-featured-hero .onset-hero-title {
        font-size: 2rem;
    }
    body.onset-featured-hero .onset-hero-overlay {
        padding: 2rem;
    }
}

/* --- Featured Style: None (hide hero) --- */
body.onset-featured-none .onset-hero {
    display: none;
}

/* --- Hover: Lift --- */
body.onset-hover-lift .onset-card {
    border-bottom-color: var(--onset-color-secondary);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
body.onset-hover-lift .onset-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-bottom-color: var(--onset-color-secondary);
}

/* --- Hover: Glow --- */
body.onset-hover-glow .onset-card {
    border-bottom-color: var(--onset-color-secondary);
    transition: box-shadow 0.25s ease;
}
body.onset-hover-glow .onset-card:hover {
    box-shadow: 0 0 20px rgba(227,24,55,0.35);
    border-bottom-color: var(--onset-color-secondary);
}

/* --- Hover: Shadow --- */
body.onset-hover-shadow .onset-card {
    border-bottom-color: var(--onset-color-secondary);
    transition: box-shadow 0.25s ease;
}
body.onset-hover-shadow .onset-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    border-bottom-color: var(--onset-color-secondary);
}

/* --- Hover: None --- */
body.onset-hover-none .onset-card {
    border-bottom-color: var(--onset-color-secondary);
}
body.onset-hover-none .onset-card:hover {
    border-color: var(--onset-color-secondary);
}
body.onset-hover-none .onset-card:hover .onset-card-image img {
    transform: none;
}

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