/**
 * Rocket Booster Main CSS
 *
 * ブログモード用のフルスタイル
 * RocketWeaverがない場合、または通常のブログページで使用
 *
 * @package RocketBooster
 * @since 1.1.0
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Colors */
    --rb-primary: #4f46e5;
    --rb-primary-dark: #3730a3;
    --rb-primary-light: #818cf8;

    /* Text */
    --rb-text: #1a202c;
    --rb-text-light: #718096;
    --rb-text-muted: #a0aec0;

    /* Backgrounds */
    --rb-bg: #ffffff;
    --rb-bg-gray: #f7fafc;
    --rb-bg-dark: #1a202c;

    /* Borders */
    --rb-border: #e2e8f0;
    --rb-border-dark: #cbd5e0;

    /* Shadows */
    --rb-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --rb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --rb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Spacing */
    --rb-radius: 0.5rem;
    --rb-radius-lg: 0.75rem;

    /* Layout */
    --rb-container-width: 1200px;
    --rb-content-width: 720px;

    /* Typography */
    --rb-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;

    /* Transitions */
    --rb-transition: 0.2s ease;
}

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

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

* {
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--rb-font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--rb-text);
    background-color: var(--rb-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* WordPress Admin Bar */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--rb-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--rb-primary);
    text-decoration: none;
    transition: color var(--rb-transition);
}

a:hover {
    color: var(--rb-primary-dark);
}

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

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

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

/* ==========================================================================
   RocketWeaver Content Override
   ショートコード埋め込み時にテーマスタイルが干渉しないようにリセット
   ========================================================================== */

/*
 * ショートコードが通常ページ内で使われた場合、
 * 親の.containerからブレイクアウトしてフルワイド表示
 */
.rocketweaver-page {
    /* 親コンテナからブレイクアウト */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
}

.rocketweaver-content {
    max-width: none;
    width: 100%;
}

/* ビルダーコンテンツ内のテーマクラスをリセット */
.rocketweaver-page .container,
.rocketweaver-content .container {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* ビルダーレイアウト */
.rocketweaver-layout {
    max-width: none;
    width: 100%;
}

.rocketweaver-column {
    max-width: none;
}

/* ビルダーで作成されたセクション（プラグイン側のクラス） */
.rw-section,
.rw-container,
.rw-row,
.rw-column {
    max-width: none;
}

.site-content {
    min-height: calc(100vh - 200px);
}

.site-main {
    padding: 3rem 0;
}

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

.site-header {
    background: var(--rb-bg);
    border-bottom: 1px solid var(--rb-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--rb-container-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.site-title a {
    color: var(--rb-text);
}

.site-title a:hover {
    color: var(--rb-primary);
}

.site-description {
    font-size: 0.875rem;
    color: var(--rb-text-light);
    margin: 0.25rem 0 0;
}

/* Custom Logo */
.custom-logo-link {
    display: block;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--rb-text);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

.primary-menu-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.primary-menu-container li {
    position: relative;
}

.primary-menu-container a {
    color: var(--rb-text);
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    transition: color var(--rb-transition);
}

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

/* Dropdown Menu */
.primary-menu-container .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--rb-bg);
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    box-shadow: var(--rb-shadow-lg);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--rb-transition);
}

.primary-menu-container li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu-container .sub-menu a {
    padding: 0.5rem 1rem;
}

/* ==========================================================================
   Page Header (Archive, Category, Tag pages)
   ========================================================================== */

.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rb-border);
    max-width: var(--rb-content-width);
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Page Content (Static Pages)
   ========================================================================== */

.page-content,
.single-post {
    max-width: 1200px;
    margin: 0 auto;
}

.page-content .entry-header,
.single-post .entry-header {
    margin-bottom: 2rem;
}

.page-content .entry-title,
.single-post .entry-title {
    font-size: 2.25rem;
    line-height: 1.3;
}

.page-content .post-thumbnail,
.single-post .post-thumbnail {
    margin-bottom: 2rem;
}

.page-content .post-thumbnail img,
.single-post .post-thumbnail img {
    width: 100%;
    border-radius: var(--rb-radius);
}

.page-content .entry-content,
.single-post .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.page-content .entry-content p,
.single-post .entry-content p {
    margin-bottom: 1.5rem;
}

.page-content .entry-content h2,
.single-post .entry-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content .entry-content h3,
.single-post .entry-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-description,
.archive-description {
    color: var(--rb-text-light);
    font-size: 1.1rem;
    max-width: 600px;
}

.archive-description p {
    margin-bottom: 0;
}

/* Category/Tag prefix removal */
.page-title .archive-title-prefix {
    display: none;
}

/* ==========================================================================
   Posts Grid (Home, Archive, Category pages)
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   Post Card
   ========================================================================== */

.post-card {
    background: var(--rb-bg);
    border-radius: var(--rb-radius-lg);
    overflow: hidden;
    box-shadow: var(--rb-shadow);
    transition: transform var(--rb-transition), box-shadow var(--rb-transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rb-shadow-lg);
}

/* Post Thumbnail */
.post-card .post-thumbnail {
    position: relative;
    overflow: hidden;
}

.post-card .post-thumbnail a {
    display: block;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--rb-transition);
}

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

/* Post Content */
.post-card .post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .entry-header {
    margin-bottom: 1rem;
}

.post-card .entry-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--rb-text-light);
    margin-bottom: 0.75rem;
}

.post-card .entry-meta .separator {
    color: var(--rb-text-muted);
}

.post-card .cat-links a {
    color: var(--rb-primary);
    font-weight: 500;
}

.post-card .entry-title {
    font-size: 1.25rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.post-card .entry-title a {
    color: var(--rb-text);
}

.post-card .entry-title a:hover {
    color: var(--rb-primary);
}

/* Entry Excerpt */
.post-card .entry-excerpt {
    color: var(--rb-text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.post-card .entry-excerpt p {
    margin-bottom: 0;
}

/* Entry Footer */
.post-card .entry-footer {
    margin-top: auto;
}

.post-card .read-more {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--rb-primary);
}

.post-card .read-more:hover {
    gap: 0.5rem;
}


/* ==========================================================================
   Single Post (Additional Styles)
   ========================================================================== */

.single-post .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--rb-text-light);
    font-size: 0.95rem;
}

.single-post .entry-meta a {
    color: var(--rb-primary);
}

.page-content .entry-content h4,
.single-post .entry-content h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.page-content .entry-content ul,
.page-content .entry-content ol,
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

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

.page-content .entry-content blockquote,
.single-post .entry-content blockquote {
    border-left: 4px solid var(--rb-primary);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--rb-bg-gray);
    border-radius: 0 var(--rb-radius) var(--rb-radius) 0;
}

.page-content .entry-content blockquote p:last-child,
.single-post .entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.page-content .entry-content pre,
.single-post .entry-content pre {
    background: var(--rb-bg-dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--rb-radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.page-content .entry-content code,
.single-post .entry-content code {
    background: var(--rb-bg-gray);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.page-content .entry-content pre code,
.single-post .entry-content pre code {
    background: none;
    padding: 0;
}

.page-content .entry-content img,
.single-post .entry-content img {
    border-radius: var(--rb-radius);
    margin: 1.5rem 0;
}

.page-content .entry-content table,
.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.page-content .entry-content th,
.page-content .entry-content td,
.single-post .entry-content th,
.single-post .entry-content td {
    border: 1px solid var(--rb-border);
    padding: 0.75rem;
    text-align: left;
}

.page-content .entry-content th,
.single-post .entry-content th {
    background: var(--rb-bg-gray);
    font-weight: 600;
}

/* Entry Footer */
.page-content .entry-footer,
.single-post .entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rb-border);
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-links a {
    display: inline-block;
    background: var(--rb-bg-gray);
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--rb-text-light);
    transition: all var(--rb-transition);
}

.tags-links a:hover {
    background: var(--rb-primary);
    color: #fff;
}

.tags-links a[rel="tag"]::before {
    content: "#";
    opacity: 0.6;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.post-navigation {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--rb-border);
    border-bottom: 1px solid var(--rb-border);
}

.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    display: flex;
    flex-direction: column;
}

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

.post-navigation .nav-subtitle {
    font-size: 0.875rem;
    color: var(--rb-text-light);
    margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--rb-text);
    transition: color var(--rb-transition);
}

.post-navigation a:hover .nav-title {
    color: var(--rb-primary);
}

/* ==========================================================================
   Sidebar / Widget Area
   ========================================================================== */

.widget-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--rb-bg);
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    padding: 1.25rem;
}

.widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-light);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rb-border);
}

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

.widget li {
    padding: 0.5rem 0;
}

.widget li:first-child {
    padding-top: 0;
}

.widget li:last-child {
    padding-bottom: 0;
}

.widget a {
    color: var(--rb-text);
    font-size: 0.95rem;
    display: block;
    transition: color var(--rb-transition);
}

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

/* Post count */
.widget li span,
.widget li .post-count {
    color: var(--rb-text-muted);
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* Search Widget */
.widget_search .search-form {
    display: flex;
    gap: 0;
}

.widget_search .search-field {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--rb-border);
    border-right: none;
    border-radius: var(--rb-radius) 0 0 var(--rb-radius);
    font-size: 0.9rem;
    background: var(--rb-bg-gray);
}

.widget_search .search-field:focus {
    outline: none;
    border-color: var(--rb-primary);
    background: var(--rb-bg);
}

.widget_search .search-submit {
    padding: 0.625rem 1rem;
    background: var(--rb-primary);
    color: #fff;
    border: 1px solid var(--rb-primary);
    border-radius: 0 var(--rb-radius) var(--rb-radius) 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background var(--rb-transition);
}

.widget_search .search-submit:hover {
    background: var(--rb-primary-dark);
}

/* Categories & Archives Widget */
.widget_categories ul,
.widget_archive ul {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.widget_categories li,
.widget_archive li {
    padding: 0;
}

.widget_categories a,
.widget_archive a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--rb-border);
}

.widget_categories li:last-child a,
.widget_archive li:last-child a {
    border-bottom: none;
}

/* Recent Posts Widget */
.widget_recent_entries li {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--rb-border);
}

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

.widget_recent_entries .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--rb-text-muted);
    margin-top: 0.25rem;
}

/* Tag Cloud Widget */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--rb-bg-gray);
    border-radius: 9999px;
    font-size: 0.8rem !important;
    color: var(--rb-text-light);
    transition: all var(--rb-transition);
}

.widget_tag_cloud .tagcloud a:hover {
    background: var(--rb-primary);
    color: #fff;
}

/* Calendar Widget */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.widget_calendar caption {
    font-weight: 600;
    padding-bottom: 0.75rem;
}

.widget_calendar th,
.widget_calendar td {
    text-align: center;
    padding: 0.5rem;
}

.widget_calendar th {
    font-weight: 500;
    color: var(--rb-text-light);
    font-size: 0.75rem;
}

.widget_calendar td a {
    font-weight: 600;
    color: var(--rb-primary);
}

/* Recent Comments Widget */
.widget_recent_comments li {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--rb-border);
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.widget_recent_comments .comment-author-link {
    font-weight: 500;
}

/* Text Widget */
.widget_text .textwidget {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--rb-text-light);
}

.widget_text .textwidget p:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    background: var(--rb-bg-dark);
    color: #ffffff;
    margin-top: 4rem;
}

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

.footer-widgets:empty {
    display: none;
}

.footer-widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    max-width: var(--rb-container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-widget {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget-title {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

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

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

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: color var(--rb-transition);
}

.footer-widget a:hover {
    color: #ffffff;
}

/* Footer Search */
.footer-widget .search-form {
    display: flex;
}

.footer-widget .search-field {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    border-radius: var(--rb-radius) 0 0 var(--rb-radius);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.875rem;
}

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

.footer-widget .search-field:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.footer-widget .search-submit {
    padding: 0.5rem 0.875rem;
    background: var(--rb-primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--rb-radius) var(--rb-radius) 0;
    cursor: pointer;
    font-size: 0.875rem;
}

/* Footer Tag Cloud */
.footer-widget .tagcloud a {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    margin: 0.125rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--rb-radius);
    font-size: 0.8rem !important;
    color: rgba(255, 255, 255, 0.7);
}

.footer-widget .tagcloud a:hover {
    background: var(--rb-primary);
    color: #fff;
}

.site-info {
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.site-info a {
    color: rgba(255, 255, 255, 0.7);
}

.site-info a:hover {
    color: #ffffff;
}

.site-info .sep {
    margin: 0 0.25rem;
}

/* Footer Menu */
.footer-menu {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.footer-menu li {
    list-style: none;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.footer-menu a:hover {
    color: #ffffff;
}

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

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background: var(--rb-bg);
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    color: var(--rb-text);
    font-weight: 500;
    transition: all var(--rb-transition);
}

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

.pagination .dots {
    background: none;
    border: none;
}

.pagination .dots:hover {
    background: none;
    color: var(--rb-text);
}

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

.comments-area {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rb-border);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

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

.comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rb-border);
}

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

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

.comment-author .avatar {
    border-radius: 50%;
}

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

.comment-metadata {
    font-size: 0.875rem;
    color: var(--rb-text-light);
}

.comment-content {
    line-height: 1.7;
}

.reply {
    margin-top: 1rem;
}

.reply a {
    font-size: 0.875rem;
    font-weight: 500;
}

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

.comment-reply-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

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

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

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

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

.comment-form .form-submit {
    margin-top: 1.5rem;
}

.comment-form .submit {
    background: var(--rb-primary);
    color: #ffffff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--rb-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--rb-transition);
}

.comment-form .submit:hover {
    background: var(--rb-primary-dark);
}

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

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--rb-border);
    border-radius: var(--rb-radius);
    font-size: 1rem;
}

.search-form .search-submit {
    background: var(--rb-primary);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--rb-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--rb-transition);
}

.search-form .search-submit:hover {
    background: var(--rb-primary-dark);
}

/* ==========================================================================
   No Posts / 404
   ========================================================================== */

.no-posts,
.error-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.no-posts h2,
.error-404 h1 {
    margin-bottom: 1rem;
}

.no-posts p,
.error-404 p {
    color: var(--rb-text-light);
    margin-bottom: 2rem;
}

.button {
    display: inline-block;
    background: var(--rb-primary);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--rb-radius);
    font-weight: 600;
    transition: background var(--rb-transition);
}

.button:hover {
    background: var(--rb-primary-dark);
    color: #ffffff;
}

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

.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;
}

.alignwide {
    max-width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
}

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

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--rb-text-light);
    margin-top: 0.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    margin: 0;
}

.gallery-item img {
    border-radius: var(--rb-radius);
}

/* Screen Reader Text */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    overflow: hidden;
    height: 1px;
    width: 1px;
    white-space: nowrap;
}

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

@media (max-width: 1024px) {
    :root {
        --rb-container-width: 100%;
    }

    .single-post-container {
        grid-template-columns: 1fr;
    }

    .widget-area {
        margin-top: 3rem;
    }
}

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

    .header-container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .primary-menu-container {
        display: none;
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--rb-border);
    }

    .primary-menu-container.is-open {
        display: block;
    }

    .primary-menu-container ul {
        flex-direction: column;
        gap: 0;
    }

    .primary-menu-container li {
        border-bottom: 1px solid var(--rb-border);
    }

    .primary-menu-container li:last-child {
        border-bottom: none;
    }

    .primary-menu-container a {
        padding: 0.75rem 0;
    }

    .primary-menu-container .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

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

    .single-post .entry-title {
        font-size: 1.75rem;
    }

    .post-navigation .nav-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .site-main {
        padding: 2rem 0;
    }

    .post-card .post-content {
        padding: 1rem;
    }

    .page-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    img {
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    .site-header,
    .site-footer,
    .sidebar,
    .widget-area,
    .pagination,
    .post-navigation,
    .comments-area {
        display: none !important;
    }
}

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

.search-results-count {
    color: var(--rb-text-light);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results .page-content {
    max-width: 600px;
    margin: 0 auto;
}

.no-results .page-content p {
    color: var(--rb-text-light);
    margin-bottom: 2rem;
}

.search-form-container {
    max-width: 400px;
    margin: 2rem auto;
}

.search-suggestions {
    text-align: left;
    background: var(--rb-bg-gray);
    padding: 1.5rem 2rem;
    border-radius: var(--rb-radius);
    margin-top: 2rem;
}

.search-suggestions h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.search-suggestions ul {
    list-style: disc;
    margin-left: 1.5rem;
    color: var(--rb-text-light);
}

.search-suggestions li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

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

.error-404 {
    text-align: center;
    padding: 3rem 0;
}

.error-404 .page-header .page-title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--rb-primary);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 0;
}

.error-404 .page-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.error-404 .page-content > p {
    color: var(--rb-text-light);
    margin-bottom: 2rem;
}

.error-404-search {
    max-width: 400px;
    margin: 2rem auto;
}

.error-404-widgets {
    margin: 3rem 0;
    text-align: left;
}

.error-404-widgets .widget-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-404-widgets .widget-column h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rb-text-light);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rb-border);
}

.error-404-widgets .widget-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-404-widgets .widget-column li {
    padding: 0.375rem 0;
}

.error-404-widgets .widget-column a {
    color: var(--rb-text);
    font-size: 0.95rem;
    transition: color var(--rb-transition);
}

.error-404-widgets .widget-column a:hover {
    color: var(--rb-primary);
}

.error-404-action {
    margin-top: 2rem;
}

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

.comment-body {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--rb-bg-gray);
    border-radius: var(--rb-radius);
}

.comment-body .comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-body .comment-author .avatar {
    border-radius: 50%;
}

.comment-body .comment-metadata {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--rb-text-light);
}

.comment-body .comment-metadata a {
    color: var(--rb-text-light);
}

.comment-body .comment-metadata a:hover {
    color: var(--rb-primary);
}

.comment-body .comment-content {
    margin-top: 1rem;
}

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

.comment-body .reply a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rb-primary);
}

.children {
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--rb-border);
}

.comment-awaiting-moderation {
    color: var(--rb-warning, #f59e0b);
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.logged-in-as,
.comment-notes {
    font-size: 0.9rem;
    color: var(--rb-text-light);
    margin-bottom: 1rem;
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.comment-form p {
    margin-bottom: 1rem;
}

/* ==========================================================================
   Theme JS Enhancements (moved from theme.js dynamic injection)
   ========================================================================== */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--rb-primary, #4f46e5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--rb-primary-dark, #4338ca);
    transform: translateY(-5px);
}

/* Header Scroll Effects */
.site-header {
    transition: all 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

/* Form Loading State */
.is-loading {
    position: relative;
    color: transparent !important;
}

.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: rb-spin 0.6s linear infinite;
}

@keyframes rb-spin {
    to { transform: rotate(360deg); }
}

/* Post Card Animation */
.post-card.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.post-card.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
