/*
Theme Name: Outer Space Universe v5
Theme URI: https://www.outerspaceuniverse.org
Author: Brian
Author URI: https://www.outerspaceuniverse.org
Description: A modern, mobile-friendly theme for Outer Space Universe. Maintains the classic deep-space color scheme with updated responsive layout and Gutenberg block editor support.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: osu-v5
Tags: blog, custom-menu, featured-images, responsive-layout, dark, space
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --osu-bg-darkest: #0a0a14;
    --osu-bg-dark: #10101e;
    --osu-bg-medium: #1a1a2e;
    --osu-bg-card: #16162a;
    --osu-bg-card-hover: #1e1e38;
    --osu-border: #2a2a4a;
    --osu-border-light: #3a3a5a;
    --osu-text-primary: #d4d4e8;
    --osu-text-secondary: #9a9ab8;
    --osu-text-muted: #6a6a88;
    --osu-accent: #b8a0d8;
    --osu-accent-light: #d4c0f0;
    --osu-accent-hover: #c8b0e8;
    --osu-link: #c0a8e0;
    --osu-link-hover: #e0d0ff;
    --osu-header-bg: rgba(10, 10, 20, 0.85);
    --osu-sidebar-bg: #12122a;
    --osu-font-body: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --osu-font-heading: 'Georgia', 'Times New Roman', serif;
    --osu-max-width: 1200px;
    --osu-content-width: 780px;
    --osu-sidebar-width: 300px;
    --osu-gap: 30px;
    --osu-radius: 8px;
    --osu-radius-sm: 4px;
    --osu-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --osu-shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.6);
    --osu-transition: 0.25s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--osu-font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--osu-text-primary);
    background-color: var(--osu-bg-darkest);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(40, 20, 80, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(20, 30, 80, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
}

a {
    color: var(--osu-link);
    text-decoration: none;
    transition: color var(--osu-transition);
}

a:hover, a:focus {
    color: var(--osu-link-hover);
    text-decoration: underline;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--osu-font-heading);
    color: var(--osu-text-primary);
    line-height: 1.3;
    margin-top: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
    margin: 0 0 1.2em;
}

/* ============================================
   SITE HEADER / BANNER
   ============================================ */
.site-header-banner {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: url('https://www.outerspaceuniverse.org/wp-content/uploads/osu-header-bnr.jpg') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--osu-bg-darkest));
    pointer-events: none;
}

.site-logo {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.site-logo img {
    max-height: 120px;
    width: auto;
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.site-navigation {
    background: var(--osu-bg-dark);
    border-bottom: 1px solid var(--osu-border);
    border-top: 1px solid var(--osu-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-inner {
    max-width: var(--osu-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Hamburger button */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--osu-border-light);
    border-radius: var(--osu-radius-sm);
    color: var(--osu-text-primary);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all var(--osu-transition);
}

.menu-toggle:hover {
    border-color: var(--osu-accent);
    color: var(--osu-accent);
}

.menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
    transition: all var(--osu-transition);
}

/* Nav menu */
.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.primary-menu li {
    position: relative;
}

.primary-menu > li > a {
    display: block;
    padding: 14px 16px;
    color: var(--osu-text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--osu-transition);
    white-space: nowrap;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-parent > a {
    color: var(--osu-accent-light);
    text-decoration: none;
}

/* Dropdown */
.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--osu-bg-dark);
    border: 1px solid var(--osu-border);
    border-radius: 0 0 var(--osu-radius) var(--osu-radius);
    box-shadow: var(--osu-shadow-lg);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    z-index: 999;
}

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

.primary-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--osu-text-secondary);
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
}

.primary-menu .sub-menu a:hover {
    color: var(--osu-accent-light);
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   LAYOUT
   ============================================ */
.site-content-wrap {
    max-width: var(--osu-max-width);
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: 1fr var(--osu-sidebar-width);
    gap: var(--osu-gap);
}

.site-content-wrap.full-width {
    grid-template-columns: 1fr;
}

.site-main {
    min-width: 0;
}

/* ============================================
   POST CARDS (Home / Archive)
   ============================================ */
.post-card {
    background: var(--osu-bg-card);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 28px 32px;
    margin-bottom: 28px;
    transition: border-color var(--osu-transition), box-shadow var(--osu-transition);
}

.post-card:hover {
    border-color: var(--osu-border-light);
    box-shadow: var(--osu-shadow);
}

.post-card .entry-title {
    font-size: 1.6rem;
    margin: 0 0 8px;
    font-weight: normal;
}

.post-card .entry-title a {
    color: var(--osu-accent-light);
    text-decoration: none;
}

.post-card .entry-title a:hover {
    color: var(--osu-link-hover);
    text-decoration: underline;
}

.post-card .entry-meta {
    font-size: 0.82rem;
    color: var(--osu-text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--osu-border);
}

.post-card .entry-meta a {
    color: var(--osu-text-secondary);
}

.post-card .entry-content {
    color: var(--osu-text-primary);
    font-size: 0.95rem;
}

.post-card .entry-content p:last-child {
    margin-bottom: 0;
}

.post-card .post-thumbnail {
    margin: 0 0 18px;
    border-radius: var(--osu-radius-sm);
    overflow: hidden;
}

.post-card .post-thumbnail img {
    width: auto;
    max-width: 50%;
    max-height: 400px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.02);
}

.read-more-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--osu-accent);
    font-size: 0.88rem;
    font-weight: 500;
}

.read-more-link:hover {
    color: var(--osu-accent-hover);
}

.entry-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--osu-border);
    font-size: 0.82rem;
    color: var(--osu-text-muted);
}

.entry-footer a {
    color: var(--osu-text-secondary);
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-content {
    background: var(--osu-bg-card);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 36px 40px;
}

.single-post-content .entry-title {
    font-size: 2rem;
    margin: 0 0 10px;
    color: var(--osu-text-primary);
}

.single-post-content .entry-meta {
    font-size: 0.82rem;
    color: var(--osu-text-muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--osu-border);
}

.single-post-content .entry-meta a {
    color: var(--osu-text-secondary);
}

.single-post-content .entry-body {
    font-size: 1rem;
    line-height: 1.8;
}

.single-post-content .entry-body h2,
.single-post-content .entry-body h3,
.single-post-content .entry-body h4 {
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

.single-post-content .entry-body img {
    border-radius: var(--osu-radius-sm);
    margin: 1em auto;
}

.single-post-content .entry-body blockquote {
    border-left: 3px solid var(--osu-accent);
    margin: 1.5em 0;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--osu-radius-sm) var(--osu-radius-sm) 0;
    color: var(--osu-text-secondary);
    font-style: italic;
}

.single-post-content .post-thumbnail {
    margin: 0 0 24px;
    border-radius: var(--osu-radius-sm);
    overflow: hidden;
}

.post-tags {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--osu-border);
    font-size: 0.85rem;
    color: var(--osu-text-muted);
}

.post-tags a {
    color: var(--osu-text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--osu-border);
    display: inline-block;
    margin: 3px 4px 3px 0;
    font-size: 0.8rem;
    transition: all var(--osu-transition);
}

.post-tags a:hover {
    border-color: var(--osu-accent);
    color: var(--osu-accent);
    text-decoration: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.site-sidebar {
    min-width: 0;
}

.sidebar-widget {
    background: var(--osu-bg-card);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 22px 24px;
    margin-bottom: 24px;
}

.sidebar-widget h3,
.sidebar-widget .widget-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--osu-accent);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--osu-border);
    font-family: var(--osu-font-body);
    font-weight: 600;
}

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

.sidebar-widget ul li {
    padding: 0;
    margin: 0;
}

.sidebar-widget ul li a {
    display: block;
    padding: 7px 0;
    color: var(--osu-text-secondary);
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: color var(--osu-transition), padding-left var(--osu-transition);
    text-decoration: none;
}

.sidebar-widget ul li a:hover {
    color: var(--osu-accent-light);
    padding-left: 6px;
    text-decoration: none;
}

.sidebar-widget ul li .count,
.sidebar-widget ul li a .count {
    float: right;
    color: var(--osu-text-muted);
    font-size: 0.8rem;
}

/* Search widget */
.search-form {
    display: flex;
    max-width: 100%;
    overflow: hidden;
}

.search-form .search-field {
    flex: 1;
    min-width: 0;
    background: var(--osu-bg-dark);
    border: 1px solid var(--osu-border);
    border-right: none;
    border-radius: var(--osu-radius-sm) 0 0 var(--osu-radius-sm);
    padding: 10px 14px;
    color: var(--osu-text-primary);
    font-size: 0.9rem;
    font-family: var(--osu-font-body);
    outline: none;
    transition: border-color var(--osu-transition);
}

.search-form .search-field:focus {
    border-color: var(--osu-accent);
}

.search-form .search-submit {
    background: var(--osu-accent);
    color: var(--osu-bg-darkest);
    border: none;
    padding: 10px 16px;
    border-radius: 0 var(--osu-radius-sm) var(--osu-radius-sm) 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: background var(--osu-transition);
}

.search-form .search-submit:hover {
    background: var(--osu-accent-hover);
}

/* Ensure search form inside sidebar doesn't overflow */
.sidebar-widget .search-form {
    margin: 0;
}

.sidebar-widget .search-form .search-field {
    width: 0;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius-sm);
    color: var(--osu-text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all var(--osu-transition);
}

.pagination a:hover {
    border-color: var(--osu-accent);
    color: var(--osu-accent);
    text-decoration: none;
}

.pagination .current {
    background: var(--osu-accent);
    color: var(--osu-bg-darkest);
    border-color: var(--osu-accent);
    font-weight: 600;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
}

.nav-links a {
    color: var(--osu-accent);
    font-size: 0.9rem;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    background: var(--osu-bg-card);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 28px 32px;
    margin-top: 28px;
}

.comments-area h2,
.comments-area h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

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

.comment-list .comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--osu-border);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    color: var(--osu-accent-light);
    font-size: 0.95rem;
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--osu-text-muted);
    margin-bottom: 8px;
}

.comment-content {
    font-size: 0.92rem;
    color: var(--osu-text-primary);
}

.comment-respond {
    margin-top: 24px;
}

.comment-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--osu-text-secondary);
    margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: var(--osu-bg-dark);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius-sm);
    padding: 10px 14px;
    color: var(--osu-text-primary);
    font-family: var(--osu-font-body);
    font-size: 0.9rem;
    margin-bottom: 14px;
    outline: none;
    transition: border-color var(--osu-transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--osu-accent);
}

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

.comment-form .submit {
    background: var(--osu-accent);
    color: var(--osu-bg-darkest);
    border: none;
    padding: 12px 28px;
    border-radius: var(--osu-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background var(--osu-transition);
}

.comment-form .submit:hover {
    background: var(--osu-accent-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--osu-bg-dark);
    border-top: 1px solid var(--osu-border);
    padding: 24px 20px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--osu-text-muted);
    margin-top: 40px;
}

.site-footer a {
    color: var(--osu-text-secondary);
}

.footer-inner {
    max-width: var(--osu-max-width);
    margin: 0 auto;
}

/* ============================================
   YARPP (Related Posts)
   ============================================ */
.yarpp-related,
.related-posts {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--osu-border);
}

.yarpp-related h3,
.related-posts h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--osu-accent);
}

.yarpp-related ol,
.yarpp-related ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.yarpp-related li {
    padding: 6px 0;
}

.yarpp-related li a {
    color: var(--osu-text-secondary);
    font-size: 0.9rem;
}

.yarpp-related li a:hover {
    color: var(--osu-accent-light);
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.page-content {
    background: var(--osu-bg-card);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 36px 40px;
}

.page-content .entry-title {
    font-size: 2rem;
    margin: 0 0 20px;
}

/* ============================================
   GUTENBERG BLOCK COMPATIBILITY
   ============================================ */
.wp-block-image {
    margin: 1.5em 0;
}

.wp-block-image img {
    border-radius: var(--osu-radius-sm);
}

.wp-block-image figcaption {
    color: var(--osu-text-muted);
    font-size: 0.82rem;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    padding: 8px 14px;
    border-top: 1px solid var(--osu-border);
    letter-spacing: 0.02em;
}

/* Classic [caption] shortcode styling */
.wp-caption {
    max-width: 100%;
    background: var(--osu-bg-dark);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 10px;
    margin: 1.5em auto;
    text-align: center;
    box-shadow: var(--osu-shadow);
}

.wp-caption.aligncenter {
    display: table;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption.alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
}

.wp-caption.alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
}

.wp-caption img {
    border-radius: var(--osu-radius-sm);
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.wp-caption .wp-caption-text,
.wp-caption-text {
    color: var(--osu-text-muted);
    font-size: 0.82rem;
    font-style: italic;
    text-align: center;
    margin: 10px 4px 2px;
    padding-top: 8px;
    border-top: 1px solid var(--osu-border);
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* Gutenberg figure with caption */
.wp-block-image figure,
figure.wp-block-image {
    background: var(--osu-bg-dark);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 10px;
    box-shadow: var(--osu-shadow);
    display: table;
    margin: 1.5em auto;
}

.wp-block-image figure img,
figure.wp-block-image img {
    border-radius: var(--osu-radius-sm);
}

.wp-block-image figure figcaption,
figure.wp-block-image figcaption {
    display: table-caption;
    caption-side: bottom;
    color: var(--osu-text-muted);
    font-size: 0.82rem;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
    padding: 8px 4px 2px;
    border-top: 1px solid var(--osu-border);
    letter-spacing: 0.02em;
}

.wp-block-gallery {
    margin: 1.5em 0;
}

/* ============================================
   WORDPRESS [gallery] SHORTCODE GRID
   ============================================ */
.gallery {
    display: grid;
    gap: 16px;
    margin: 1.5em 0;
}

.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }

.gallery-item {
    margin: 0;
    text-align: center;
}

.gallery-item .gallery-icon {
    overflow: hidden;
    border-radius: var(--osu-radius-sm);
    border: 1px solid var(--osu-border);
    background: var(--osu-bg-dark);
    transition: border-color var(--osu-transition), box-shadow var(--osu-transition);
}

.gallery-item .gallery-icon:hover {
    border-color: var(--osu-accent);
    box-shadow: var(--osu-shadow);
}

.gallery-item .gallery-icon img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.35s ease;
}

.gallery-item .gallery-icon:hover img {
    transform: scale(1.04);
}

.gallery-item .gallery-caption {
    color: var(--osu-text-muted);
    font-size: 0.8rem;
    font-style: italic;
    padding: 6px 4px;
    line-height: 1.4;
}

/* Gallery grid responsive */
@media (max-width: 768px) {
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-columns-2,
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   IMAGE GALLERIES INDEX PAGE GRID
   Turns stacked [caption] blocks into a grid
   ============================================ */
.gallery-index-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 1.5em 0;
}

.gallery-index-grid .wp-caption {
    margin: 0;
    width: 100% !important;
}

.gallery-index-grid .wp-caption img {
    width: 100% !important;
    height: auto;
}

@media (max-width: 640px) {
    .gallery-index-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 400px) {
    .gallery-index-grid {
        grid-template-columns: 1fr;
    }
}

.wp-block-quote {
    border-left: 3px solid var(--osu-accent);
    margin: 1.5em 0;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--osu-radius-sm) var(--osu-radius-sm) 0;
}

.wp-block-quote p {
    color: var(--osu-text-secondary);
    font-style: italic;
}

.wp-block-quote cite {
    color: var(--osu-text-muted);
    font-size: 0.85rem;
}

.wp-block-separator {
    border: none;
    border-top: 1px solid var(--osu-border);
    margin: 2em 0;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
    border: 1px solid var(--osu-border);
    padding: 10px 14px;
    text-align: left;
}

.wp-block-table th {
    background: var(--osu-bg-dark);
    color: var(--osu-accent-light);
}

.wp-block-embed {
    margin: 1.5em 0;
}

.wp-block-embed .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-block-embed .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wp-block-video {
    margin: 1.5em 0;
}

.has-text-align-center {
    text-align: center;
}

.wp-block-buttons {
    margin: 1.5em 0;
}

.wp-block-button__link {
    background: var(--osu-accent);
    color: var(--osu-bg-darkest);
    padding: 12px 24px;
    border-radius: var(--osu-radius-sm);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background var(--osu-transition);
}

.wp-block-button__link:hover {
    background: var(--osu-accent-hover);
    color: var(--osu-bg-darkest);
    text-decoration: none;
}

/* Alignments */
.alignwide {
    margin-left: -20px;
    margin-right: -20px;
    max-width: calc(100% + 40px);
}

.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

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

.alignleft {
    float: left;
    margin: 0 1.5em 1em 0;
}

.alignright {
    float: right;
    margin: 0 0 1em 1.5em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .site-content-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    /* Mobile navigation */
    .menu-toggle {
        display: block;
    }

    .primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--osu-bg-dark);
        border-bottom: 1px solid var(--osu-border);
        box-shadow: var(--osu-shadow-lg);
        z-index: 1000;
    }

    .primary-menu.is-open {
        display: flex;
    }

    .nav-inner {
        flex-wrap: wrap;
        position: relative;
        padding: 10px 20px;
    }

    .primary-menu > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid var(--osu-border);
    }

    .primary-menu .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        background: rgba(0, 0, 0, 0.2);
    }

    .primary-menu .sub-menu a {
        padding-left: 40px;
        border-bottom: 1px solid var(--osu-border);
    }

    /* Adjust content padding */
    .site-header-banner {
        min-height: 140px;
    }

    .site-logo img {
        max-height: 80px;
    }

    .post-card {
        padding: 20px;
    }

    .single-post-content {
        padding: 24px 20px;
    }

    .page-content {
        padding: 24px 20px;
    }

    .comments-area {
        padding: 20px;
    }

    h1 { font-size: 1.6rem; }
    .single-post-content .entry-title { font-size: 1.6rem; }
    .post-card .entry-title { font-size: 1.35rem; }

    .alignleft,
    .alignright {
        float: none;
        margin: 1em auto;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .site-content-wrap {
        padding: 16px 12px;
    }

    .post-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .single-post-content {
        padding: 18px 16px;
    }

    .sidebar-widget {
        padding: 16px 18px;
    }
}

/* ============================================
   EDITOR STYLES
   ============================================ */
.editor-styles-wrapper {
    background: var(--osu-bg-card) !important;
    color: var(--osu-text-primary) !important;
    font-family: var(--osu-font-body) !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
    color: var(--osu-text-primary) !important;
    font-family: var(--osu-font-heading) !important;
}

.editor-styles-wrapper a {
    color: var(--osu-link) !important;
}

/* ============================================
   UTILITY
   ============================================ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ============================================
   SOCIAL / FOLLOW BUTTONS (optional)
   ============================================ */
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--osu-border);
    color: var(--osu-text-secondary);
    font-size: 0.9rem;
    transition: all var(--osu-transition);
    text-decoration: none;
}

.social-links a:hover {
    border-color: var(--osu-accent);
    color: var(--osu-accent);
    text-decoration: none;
}

/* ============================================
   ARCHIVE / CATEGORY HEADERS
   ============================================ */
.archive-header {
    background: var(--osu-bg-card);
    border: 1px solid var(--osu-border);
    border-radius: var(--osu-radius);
    padding: 24px 32px;
    margin-bottom: 28px;
}

.archive-header h1 {
    font-size: 1.6rem;
    margin: 0 0 6px;
}

.archive-header .archive-description {
    color: var(--osu-text-secondary);
    font-size: 0.92rem;
    margin: 0;
}
