/*
Theme Name: Blog Theme
Description: Modern WordPress theme designed for QuoteManager plugin integration. Clean layout with full-width support and character showcase capabilities.
Author: Justus
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: blog-theme
Tags: blog, quotes, characters, full-width, gutenberg

This theme is optimized for use with the QuoteManager plugin and provides
clean layout systems for character showcases and quote displays.
*/

/* =================================================================
   CSS CUSTOM PROPERTIES - RESPONSIVE BREAKPOINTS
   ================================================================= */

:root {
    /* Standard breakpoints - mobile first approach */
    --bp-xs: 480px;   /* Small mobile */
    --bp-sm: 640px;   /* Large mobile */
    --bp-md: 768px;   /* Tablet */
    --bp-lg: 1024px;  /* Desktop */
    --bp-xl: 1200px;  /* Large desktop */
    
    /* Z-index scale */
    --z-timeline-backdrop: 9998;
}


/* =================================================================
   TYPOGRAPHY
   ================================================================= */

/* GDPR-Compliant Typography - Mixed approach */
body h1, body h2, body h3, body h4, body h5, body h6 {
    font-family: "Georgia", "Times New Roman", "Times", serif !important;
    font-weight: 600 !important;
    font-feature-settings: "liga" 1, "dlig" 1;
}

/* Clean sans-serif for all body content */
body, body p, body div, body span, body li, body td, body th, 
.post-content, .entry-content, .page-content, .site-main,
.excerpt, .comment-content, .widget-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Helvetica", "Arial", "Liberation Sans", sans-serif !important;
    line-height: 1.6 !important;
}

/* Image captions use theme font */
.blog-theme .wp-caption-text,
.blog-theme .wp-block-image figcaption,
.blog-theme .wp-block-gallery figcaption,
.blog-theme figcaption,
.blog-theme .gallery-caption {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Helvetica", "Arial", "Liberation Sans", sans-serif;
    font-size: 13px;
    color: var(--qm-text-muted, #6c7781);
    font-style: italic;
    font-weight: normal;
    line-height: 1.6;
    text-align: center;
}

/* =================================================================
   QUOTE SLIDER COMPONENT
   ================================================================= */
/* Quote Slider styles moved to: css/components/quote-slider-v2.css */

/* =================================================================
   GLOBAL IMAGE STYLING
   ================================================================= */

/* Global image styling - exclude avatars and character images */
img:not(.avatar img):not(.wie-is-wie-block img):not(.personages-block img):not(.character-image-container img):not(.quote-avatar img) {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
}

/* Base responsive image behavior for all images */
img {
    max-width: 100%;
    height: auto;
}

/* Avatar and character images - circular styling */
.wie-is-wie-block img,
.personages-block img,
.character-image-container img,
.avatar img,
.quote-avatar img {
    border-radius: 50%;
}

/* Square avatar option */
.avatar-square img,
.quote-avatar .avatar-square img {
    border-radius: 8px;
}

/* Specific styling for post thumbnails */
.post-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.single-post .post-thumbnail img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
}

/* Gallery and content images */
.wp-block-image img,
.wp-block-gallery img,
.entry-content img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-image img:hover,
.entry-content img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Header with rounded corners and better styling */
.site-header {
    background: white;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100px;
    border-radius: 0 0 20px 20px; /* Rounded bottom corners */
    margin-bottom: 1rem; /* Space after header */
}

/* Optional overlay for better text readability - REMOVED for white background */

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2; /* Above overlay */
}

.site-title,
h1.site-title,
div.site-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    font-family: "Georgia", "Times New Roman", "Times", serif !important;
    color: var(--qm-text-primary, #2c3e50);
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

.site-title a,
.site-title a:visited,
.site-title a:link,
.site-title a:active,
.site-title a:focus,
.site-title a:hover {
    color: var(--qm-text-primary, #2c3e50) !important; /* Force dark color for links */
    text-decoration: none !important;
}

.site-title:hover {
    color: var(--qm-accent-color, var(--qm-accent-color));
}

.main-navigation {
    position: relative;
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Desktop: hide menu toggle */
@media (min-width: 1025px) { /* --bp-lg+ */
    .menu-toggle {
        display: none !important;
    }
}

.main-navigation a {
    color: var(--qm-text-primary, #333);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: var(--qm-accent-color, var(--qm-accent-color));
}

/* =================================================================
   MAIN CONTENT AREA
   ================================================================= */

.site-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem 2rem; /* Reduced top padding */
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
}

.content-area {
    background: var(--qm-background-primary, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem 2rem 2rem; /* Reduced top padding */
    margin-bottom: 2rem;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
    width: 100%;
}

/* =================================================================
   QUOTEMANAGER PLUGIN INTEGRATION
   ================================================================= */

/* Full-width container system for QuoteManager blocks */
.fullwidth-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
    overflow-x: hidden;
}

.fullwidth-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Homepage containers removed - using clean page layouts */

/* WordPress columns override for better layouts */
.wp-block-columns {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.wp-block-column {
    margin-bottom: 0;
}

/* Custom column layouts */
.wp-block-columns.homepage-layout {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.wp-block-columns.homepage-layout.columns-2 {
    grid-template-columns: 1fr 1fr;
}

.wp-block-columns.homepage-layout.columns-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* =================================================================
   PAGE TITLES - Clean & Prominent
   ================================================================= */

/* Single post titles */
.single-post .entry-header {
    text-align: center;
    padding: 1rem 0 1.5rem 0; /* Reduced top padding */
    border-bottom: 1px solid var(--qm-border-color, #eee);
    margin-bottom: 2rem;
}

.single-post .entry-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: var(--qm-text-primary, #1a1a1a);
}

/* Archive and blog page titles */
.archive .page-title,
.blog .page-title,
.search .page-title {
    text-align: center;
    padding: 3rem 0 2rem 0;
    border-bottom: 1px solid var(--qm-border-color, #eee);
    margin-bottom: 3rem;
}

.archive .page-title h1,
.blog .page-title h1,
.search .page-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--qm-text-primary, #1a1a1a);
}

/* Page titles for regular pages */
.page .entry-header {
    text-align: center;
    padding: 0.5rem 0 1rem 0; /* Reduced top padding */
    border-bottom: 1px solid var(--qm-border-color, #eee);
    margin-bottom: 1.5rem;
}

.page .entry-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--qm-text-primary, #1a1a1a);
}

/* Responsive page titles */
@media (max-width: 768px) {
    .single-post .entry-title {
        font-size: 2rem;
    }
    
    .archive .page-title h1,
    .blog .page-title h1,
    .page .entry-title {
        font-size: 1.8rem;
    }
    
    .single-post .entry-header,
    .archive .page-title,
    .blog .page-title,
    .page .entry-header {
        padding: 1rem 0 1.5rem 0; /* Reduced top padding for mobile */
    }
}

/* =================================================================
   FOOTER
   ================================================================= */

.site-footer {
    background: var(--qm-text-primary, #333);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-navigation ul.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

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

.footer-navigation ul.footer-menu a {
    color: white;
    text-decoration: none;
}

.footer-navigation ul.footer-menu a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-navigation ul.footer-menu {
        flex-direction: column;
        gap: 1rem;
    }
}

.header-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

body {
    top: 0 !important;
}

.goog-te-balloon-frame {
    display: none !important;
}

.goog-logo-link {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
}

.goog-te-gadget > span > a {
    display: none !important;
}

.goog-te-gadget .goog-te-combo {
    color: #333 !important;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 1024px) { /* --bp-lg */
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0.5rem;
        position: relative;
        z-index: 1000;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .site-branding {
        flex: 1;
    }
    
    /* Mobile Navigation - ALWAYS SHOW MENU TOGGLE */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
        position: relative !important;
        z-index: 9999 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .main-navigation {
        position: relative;
    }
    
    /* REMOVED: Conflicting mobile navigation CSS block
       This was interfering with mobile-nav.css positioning

    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        z-index: 9998;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        border: 1px solid var(--qm-border-color, #ddd);
        border-radius: 6px;
        margin-top: 0.5rem;
    }
    */
    
    .main-navigation.toggled ul {
        display: flex !important;
    }
    
    .main-navigation a {
        font-size: 1.1rem;
        padding: 1.2rem 0;
        border-bottom: 1px solid var(--qm-border-color, #eee);
    }
    
    .main-navigation a:last-child {
        border-bottom: none;
    }
    
    .site-main {
        padding: 1rem;
        max-width: 100vw; /* Prevent overflow on very small screens */
    }
    
    .content-area {
        padding: 1rem;
        max-width: 100%;
        word-wrap: break-word;
    }
    
    .fullwidth-inner {
        padding: 0 1rem;
    }
    
    /* Global mobile content fixes */
    .entry-content {
        overflow-x: hidden;
        word-wrap: break-word;
    }
    
    /* Prevent images from breaking layout */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix WordPress blocks on mobile */
    .wp-block {
        max-width: 100% !important;
    }
    
    /* Better mobile tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        max-width: 100%;
        margin: 1rem 0;
    }
    
    /* Fix for long URLs and code blocks */
    pre, code {
        overflow-x: auto;
        word-wrap: break-word;
        max-width: 100%;
    }
    
    /* Fix WordPress embed responsiveness */
    .wp-block-embed,
    .wp-block-embed__wrapper {
        max-width: 100% !important;
        overflow: hidden;
    }
    
    /* Ensure videos are responsive */
    iframe, video {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Long text and URL breaking */
    .entry-content p,
    .comment-content p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Homepage inner responsive removed */
    
    /* Hero responsive styles removed */
    
    /* Mobile column layouts */
    .wp-block-columns.homepage-layout,
    .wp-block-columns.homepage-layout.columns-2,
    .wp-block-columns.homepage-layout.columns-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* =================================================================
   GUTENBERG EDITOR STYLES
   ================================================================= */

.wp-block {
    max-width: 1200px;
}

.wp-block-group {
    margin: 2rem 0;
}

/* Ensure QuoteManager blocks display properly */
.wp-block[data-type^="quotemanager/"] {
    margin: 2rem 0;
}

/* =================================================================
   QUOTEMANAGER BLOCK STYLES
   ================================================================= */

/**
 * QuoteManager Blocks Styling
 * Pure block functionality integrated into theme
 */

/* Wie-is-wie component styles moved to: css/components/wie-is-wie.css */

/* Comments Styling */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--qm-border-color, #eee);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--qm-text-primary, #333);
}

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

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--qm-background-tint, #f9f9f9);
    border-radius: 8px;
    border-left: 3px solid var(--qm-accent-color, #007cba);
}

.comment-list .children {
    margin-top: 1rem;
    margin-left: 2rem;
    border-left: 1px solid #ddd;
    padding-left: 1rem;
}

.comment-body {
    position: relative;
}

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

.comment-author img {
    border-radius: 50%;
    margin-right: 0.5rem;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--qm-text-primary, #333);
}

.comment-metadata {
    font-size: 0.9rem;
    color: #666;
}

.comment-metadata a {
    color: #666;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--qm-accent-color, #007cba);
}

.comment-content {
    margin: 1rem 0;
    line-height: 1.6;
}

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

.reply {
    text-align: right;
}

.comment-reply-link {
    color: var(--qm-accent-color, #007cba);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--qm-accent-color, #007cba);
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.comment-reply-link:hover {
    background: var(--qm-accent-color, #007cba);
    color: white;
}

.comment-awaiting-moderation {
    color: #e74c3c;
    font-style: italic;
    display: block;
    margin: 1rem 0;
}

.no-comments {
    font-style: italic;
    color: #666;
    text-align: center;
    padding: 2rem;
    background: var(--qm-background-tint, #f9f9f9);
    border-radius: 8px;
}

/* Comment Form */
.comment-form {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--qm-background-tint, #f9f9f9);
    border-radius: 8px;
}

.comment-form h3 {
    margin-bottom: 1.5rem;
    color: var(--qm-text-primary, #333);
}

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

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--qm-text-primary, #333);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--qm-accent-color, #007cba);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.comment-form .required {
    color: #e74c3c;
}

.comment-form input[type="submit"] {
    background: var(--qm-accent-color, #007cba);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: #005177;
}

/* Comment Navigation */
.comment-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--qm-border-color, #eee);
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: space-between;
}

.comment-navigation a {
    color: var(--qm-accent-color, #007cba);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--qm-accent-color, #007cba);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: var(--qm-accent-color, #007cba);
    color: white;
}

/* Responsive design */
@media (max-width: 768px) { /* --bp-md */
    .wie-is-wie-featured {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .wie-is-wie-featured .featured-image img {
        width: 120px;
        height: 120px;
    }
    
    .wie-is-wie-featured .featured-name {
        font-size: 1.5rem;
    }
    
    .wie-is-wie-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wie-is-wie-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) { /* --bp-xs */
    .wie-is-wie-grid[data-columns="2"],
    .wie-is-wie-grid[data-columns="3"],
    .wie-is-wie-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .wie-is-wie-featured {
        padding: 1.5rem;
    }
}

/* Grid columns moved to quote-slider-v2.css component */

/* Featured background image styles for quote items */
.quote-slider-v2-item.has-featured-background {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    padding: 2rem !important;
    min-height: 300px !important;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    justify-content: center;
}

.character-image-container {
    position: relative;
    margin-bottom: 1rem;
}


.character-color-indicator {
    position: absolute;
    bottom: -3px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.character-avatar-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}


.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--qm-text-primary, #333);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.slider-prev {
    left: 20px;
}

.slider-next {
    right: 20px;
}

.slider-dots {
    text-align: center;
    margin-top: 2rem;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.slider-dot.active {
    background: var(--qm-accent-color, #007cba);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.4);
}

.slider-arrow:hover {
    background: white;
    border-color: var(--qm-accent-color, #007cba);
    color: var(--qm-accent-color, var(--qm-accent-color));
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.slider-dot:hover {
    transform: scale(1.2);
    background: #666;
}


/* Legacy quote carousel styling removed - using quote-slider-v2.css */

/* Character grid styling moved to wie-is-wie.css */

/* =================================================================
   TYPOGRAPHY ENHANCEMENTS
   ================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--qm-text-primary, #333);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

a {
    color: var(--qm-accent-color, var(--qm-accent-color));
    transition: color 0.3s ease;
}

a:hover {
    color: #005a87;
}

/* =================================================================
   UTILITY CLASSES
   ================================================================= */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Utility classes - maar niet voor header transitions */
.screen-reader-text { display: none; }
.visible { display: block; }

/* =================================================================
   POSTS & BLOG STYLING
   ================================================================= */

.posts-container {
    display: grid;
    gap: 2rem;
}

.post-item {
    background: var(--qm-background-primary, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    margin: 0;
}

/* Post thumbnail styling is now handled globally above */

.post-content {
    padding: 2rem;
}

.entry-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    line-height: 1.3;
    display: block !important; /* Ensure titles are always visible */
    visibility: visible !important;
}

.entry-title a {
    color: var(--qm-text-primary, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: var(--qm-accent-color, var(--qm-accent-color));
}

/* Entry header and title styling */
.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Fix excessive spacing issues - override conflicting styles */
.single-post .entry-header {
    margin-bottom: 1rem !important;
    padding-bottom: 0 !important;
    text-align: center;
    border-bottom: 1px solid var(--qm-border-color, #eee);
}

.single-post .entry-header .entry-title {
    margin: 0 0 0.5rem 0 !important;
    font-size: 2.5rem;
}

.single-post .entry-meta {
    margin: 0 0 1rem 0 !important;
}

h1.entry-title {
    margin-top: 0 !important;
}

.entry-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
    justify-content: center !important;
    text-align: center !important;
}

.entry-meta span {
    display: flex;
    align-items: center;
}

.entry-summary {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    background: var(--qm-accent-color, #007cba);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background: #005a87;
    color: white !important;
    text-decoration: none !important;
}

/* Single Post Styling - consolidated above to fix spacing issues */

.single-post .post-thumbnail {
    margin: 2rem 0;
    text-align: center;
}

/* Single post thumbnail styling is now handled globally above */

.entry-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 2rem 0 1rem;
    color: var(--qm-text-primary, #333);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content blockquote {
    padding: 1rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.1rem;
}

/* Post disclaimer styling */
.post-disclaimer {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid var(--qm-accent-color, #007cba);
    border-radius: 4px;
}

.post-disclaimer p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--qm-border-color, #eee);
}

.post-tags {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

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

.post-navigation a {
    display: block;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--qm-text-primary, #333);
    transition: background-color 0.3s ease;
}

.post-navigation a:hover {
    background: #e9ecef;
}

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

/* Pagination */
.pagination {
    margin: 3rem 0;
    text-align: center;
}

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

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    color: var(--qm-text-primary, #333);
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--qm-accent-color, #007cba);
    color: white;
}

/* =================================================================
   SIDEBAR STYLING
   ================================================================= */

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

.sidebar-content {
    display: grid;
    gap: 2rem;
}

.widget {
    background: var(--qm-background-primary, #ffffff);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--qm-text-primary, #333);
    border-bottom: 2px solid var(--qm-accent-color, #007cba);
    padding-bottom: 0.5rem;
}

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

.widget li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.widget a {
    color: var(--qm-text-primary, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: var(--qm-accent-color, var(--qm-accent-color));
}

.widget .post-date {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-top: 0.25rem;
}

.widget_search .search-form {
    position: relative;
}

.widget_search input[type="search"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.widget_search button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--qm-accent-color, #007cba);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Mobile sidebar layout */
@media (max-width: 1024px) { /* --bp-lg */
    .site-main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .widget-area {
        margin-top: 0;
        order: -1;
    }
    
    .sidebar-content {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

    .slider-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .quote-slide {
        width: 250px;
        height: 250px;
        padding: 1.5rem;
        min-width: 250px;
        max-width: 250px;
        min-height: 250px;
        max-height: 250px;
    }
    
    .quote-slide blockquote {
        font-size: 1rem;
    }
    
    .quote-carousel .splide__slide {
        margin: 0 0.25rem;
    }
}

/* Avatar CSS now handled by consolidated image styling above */

/* Character and Post Links in Quote Slider */
.quote-slider-v2 .character-link {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.2s ease;

/* ==========================================================================
   QuoteManager Plugin Styling - Moved from inline CSS
   ========================================================================== */

/* Personages Block */
.personages-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    margin: 20px 0;
}

.personages-block.layout-fullwidth {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.personages-block h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
    padding-bottom: 5px;
}

/* Character Container Layouts */
.characters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.characters-container.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.characters-container.layout-list {
    flex-direction: column;
    align-items: stretch;
}

/* Character Slider */
.character-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.character-slide {
    flex: 0 0 180px;
    text-align: center;
    background: linear-gradient(135deg, var(--character-color, #667eea) 0%, var(--character-color-dark, #764ba2) 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 2px solid var(--character-color, #ddd);
}

.character-slide:hover {
    transform: translateY(-5px);
}

.character-slide img {
    width: var(--image-size, 60px);
    height: var(--image-size, 60px);
    border-radius: 50%;
    margin: 0 auto 15px;
    object-fit: cover;
    border: 4px solid var(--character-color, #ddd);
}

.character-slide h3 {
    margin: 0 0 10px 0;
    color: var(--qm-text-primary, #333);
    font-size: 18px;
}

.character-slide p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Character Carousel */
.character-carousel {
    position: relative;
}

.carousel-viewport {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.character-carousel-slide {
    flex: 0 0 300px;
    background: linear-gradient(135deg, var(--character-color, #667eea) 0%, var(--character-color-dark, #764ba2) 100%);
    color: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 200px;
}

.character-carousel-slide .slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.character-carousel-slide .slide-content {
    position: relative;
    z-index: 1;
    padding: 25px;
}

.character-carousel-slide .avatar-container {
    margin-bottom: 15px;
    text-align: center;
}

.character-carousel-slide img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    object-fit: cover;
    border: 4px solid var(--character-color, #ddd);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.character-carousel-slide h3 {
    margin: 0 0 12px 0;
    color: var(--qm-text-primary, #333);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

.character-carousel-slide p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* Carousel Controls */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--qm-text-primary, #333);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev:disabled,
.carousel-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: translateY(-50%) scale(0.9);
}

/* Carousel Dots */
.carousel-dots {
    text-align: center;
    margin-top: 25px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.5);
}

.carousel-dot.active {
    background: rgba(255,255,255,0.9);
    transform: scale(1.2);
}

/* Grid Layout */
.character-grid-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--qm-background-tint, #f9f9f9);
    border-radius: 8px;
    border-left: 4px solid var(--character-color, #ddd);
    transition: all 0.3s ease;
}

.character-grid-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.character-grid-item .avatar-container {
    margin-right: 15px;
    flex-shrink: 0;
}

.character-grid-item img {
    width: var(--image-size, 60px);
    height: var(--image-size, 60px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.character-grid-item .placeholder-avatar {
    width: var(--image-size, 60px);
    height: var(--image-size, 60px);
    border-radius: 50%;
    background: var(--character-color, #ddd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.character-grid-item .character-info {
    flex: 1;
    min-width: 0;
}

.character-grid-item h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--qm-text-primary, #333);
}

.character-grid-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Empty States */
.personages-block .no-characters {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.personages-block .no-characters p {
    font-size: 0.9em;
}

/* Under Construction Messages */
.layout-under-construction {
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--qm-accent-color, #007cba);
    border-radius: 8px;
    background: #f0f6fc;
}

.layout-under-construction p {
    color: var(--qm-accent-color, #007cba);
    margin: 0;
}

/* Layout-specific styling */
.characters-container.layout-grid {
    display: grid;
    gap: 15px;
}

.characters-container.layout-cards {
    display: grid;
    gap: 20px;
}

.characters-container.layout-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.characters-container.layout-compact {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.characters-container.layout-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    min-height: 300px;
}

.characters-container.layout-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff7eb3 0%, #ff758c 100%);
    padding: 30px;
    min-height: 350px;
}

.characters-container.layout-minimal {
    display: grid;
    gap: 10px;
}

.characters-container.layout-featured {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Character Slide Styling */
.character-slide {
    text-align: center;
    color: white;
    padding: 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.character-slide h3 {
    margin: 0 0 10px 0;
    color: var(--qm-text-primary, #333);
    font-size: 18px;
}

.character-slide p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Character Carousel Styling */
.character-carousel {
    position: relative;
}

.carousel-viewport {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
    will-change: transform;
}

.character-carousel-slide {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    border: 2px solid;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    box-sizing: border-box;
}

.carousel-slide-decoration {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.08;
    transform: rotate(45deg);
    z-index: 0;
}

.carousel-slide-content {
    position: relative;
    z-index: 1;
}

.character-carousel-slide-content {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.character-carousel-avatar {
    margin-bottom: 15px;
}

.character-carousel-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    object-fit: cover;
    border: 4px solid;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.character-carousel-slide h3 {
    margin: 0 0 12px 0;
    color: var(--qm-text-primary, #333);
    font-size: 16px;
    font-weight: 600;
}

.character-carousel-slide p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

/* Carousel Navigation */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #ff7eb3;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #ff7eb3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev {
    left: -20px;
}

.carousel-next {
    right: -20px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #ff7eb3;
    color: white;
}

/* Carousel Dots */
.carousel-dots {
    text-align: center;
    margin-top: 25px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: rgba(255,255,255,0.9);
}

/* Character Grid Item Styling */
.character-grid-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 2px solid;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.character-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.character-grid-avatar {
    margin-right: 15px;
    flex-shrink: 0;
}

.character-grid-avatar img {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.character-grid-placeholder {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.character-grid-content {
    flex: 1;
    min-width: 0;
}

.character-grid-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--qm-text-primary, #333);
}

.character-grid-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Under Construction Message */
.layout-under-construction {
    text-align: center;
    padding: 1rem;
    border: 1px dashed #ccc;
    border-radius: 6px;
    background: var(--qm-background-tint, #f9f9f9);
    margin-bottom: 8px;
}

.layout-under-construction p {
    color: #999;
    margin: 0;
    font-size: 14px;
}

/* No Characters Message */
.no-characters-message {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* Character slide white background variant */
.character-slide.white-bg {
    flex: 0 0 250px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border: 2px solid;
    color: var(--qm-text-primary, #333);
}

.character-slide .character-image {
    border-radius: 50%;
    margin: 0 auto 15px;
    object-fit: cover;
    border: 4px solid;
}

.character-slide h3 {
    margin: 0 0 10px 0;
    color: var(--qm-text-primary, #333);
    font-size: 18px;
}

.character-slide p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Slider Info */
.slider-info {
    text-align: center;
    margin-top: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.quote-slider-v2 .character-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.quote-slider-v2 .post-title-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.quote-slider-v2 .post-title-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* =================================================================
   CAPTION STYLES
   ================================================================= */

/* WordPress Image Captions */
.wp-caption {
    max-width: 100%;
    margin: 1.5rem 0;
    text-align: center;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.blog-theme .wp-caption-text {
    font-size: 0.7rem;
    color: #555;
    font-style: normal;
    font-weight: 500;
    margin-top: 0.5rem;
    margin-bottom: 0;
    padding: 0.25rem 0.5rem;
    line-height: 1.1;
    text-align: left;
    background: var(--qm-background-tint, #f9f9f9);
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: block;
    position: relative;
    max-width: fit-content;
    width: auto;
    clear: both !important;
}

/* Gutenberg Figure Captions - Perfect small label styling */
:root .wp-block-image figcaption,
:root .wp-block-gallery figcaption,
.wp-block-image .wp-block-image figcaption {
    font-size: 0.7rem !important;
    color: #555 !important;
    font-style: normal !important;
    font-weight: 500 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
    padding: 0.25rem 0.5rem !important;
    line-height: 1.1 !important;
    text-align: left !important;
    background: #f9f9f9 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    display: block !important;
    position: relative !important;
    max-width: fit-content !important;
    width: auto !important;
    clear: both !important;
}

.wp-block-image {
    margin: 1.5rem 0;
}

.wp-block-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Gallery Captions */
.wp-block-gallery .wp-block-image figcaption {
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 0.5rem;
    font-size: 0.8rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    border-radius: 0 0 8px 8px;
}

/* Media & Text Block Captions */
.wp-block-media-text figcaption {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: left;
}

/* WordPress Image Alignment Classes */
.alignleft {
    float: left !important;
    margin: 0 1.5rem 1rem 0 !important;
    max-width: 50% !important;
}

/* More specific selector for Gutenberg blocks - enhanced specificity for text wrapping */
.entry-content .alignleft,
.entry-content figure.wp-block-image.alignleft {
    float: left !important;
    margin: 0 1.5rem 1rem 0 !important;
    max-width: 50% !important;
}

.entry-content .alignright,
.entry-content figure.wp-block-image.alignright {
    float: right !important;
    margin: 0 0 1rem 1.5rem !important;
    max-width: 50% !important;
}

.aligncenter,
.wp-block-image.aligncenter {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    float: none !important;
}

/* Classic Editor Image Alignment with Captions */
.alignleft .wp-caption-text,
.alignright .wp-caption-text {
    text-align: center;
}

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

/* Responsive Caption Adjustments */
@media (max-width: 768px) { /* --bp-md */
    .wp-caption-text,
    .wp-block-image figcaption,
    .wp-block-gallery figcaption {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }
    
    .wp-block-gallery .wp-block-image figcaption {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

/* Dark Mode Caption Support */
@media (prefers-color-scheme: dark) {
    .wp-caption-text,
    .wp-block-image figcaption,
    .wp-block-gallery figcaption:not(.wp-block-gallery .wp-block-image figcaption),
    .wp-block-media-text figcaption,
    .wie-is-wie-container.compact-name .single-name,
    .wie-is-wie-single.compact-name .single-name,
    .quote-slider-v2 .quote-author,
    .quote-slider-v2-item .quote-author {
        color: #ccc !important;
    }
}
/* Updated Sun Jul 27 19:56:30 CEST 2025 */

/* ULTRA HIGH SPECIFICITY - Caption styling for single names */
.wie-is-wie-container.layout-single.compact-name .single-name,
.wie-is-wie-container.compact-name .single-name,
.wie-is-wie-single.compact-name .single-name,
.wie-is-wie-container .compact-name .single-name,
body .wie-is-wie-container.compact-name .single-name {
    font-size: 0.7rem !important;
    color: #555 !important;
    font-style: normal !important;
    font-weight: 500 !important;
    margin: 0.5rem 0 0 0 !important;
    padding: 0.25rem 0.5rem !important;
    line-height: 1.1 !important;
    text-align: left !important;
    background: #f9f9f9 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 2px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    display: block !important;
    position: relative !important;
    max-width: fit-content !important;
    width: auto !important;
    clear: both !important;
}

/* Normal large styling for single names when compact is disabled */
.wie-is-wie-container.layout-single:not(.compact-name) .single-name,
.wie-is-wie-container:not(.compact-name) .single-name,
.wie-is-wie-single:not(.compact-name) .single-name {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--qm-accent-color) !important;
    margin: 0 0 0.5rem 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    line-height: normal !important;
    text-align: inherit !important;
    display: block !important;
    position: static !important;
    max-width: none !important;
    width: auto !important;
    clear: none !important;
}

/* Author centering fix */
.entry-meta {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
}

/* Specific fix for single post author centering */
.single-post .entry-meta {
    justify-content: center !important;
    text-align: center !important;
}

/* Specific fix for post author span - exclude quote slider */
.entry-meta .post-author:not(.quote-slider-v2 .post-author):not(.quote-slider-v2-item .post-author) {
    text-align: center !important;
    justify-self: center !important;
    align-self: center !important;
    width: 100% !important;
}

/* Force author link to center - exclude quote slider */  
.entry-meta .post-author a:not(.quote-slider-v2 .post-author a):not(.quote-slider-v2-item .post-author a) {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
}

/* Ensure quote slider author names are visible and properly styled */
.quote-slider-v2 .quote-author,
.quote-slider-v2-item .quote-author {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: left !important;
    width: auto !important;
}

/* Site slogan italic */
.site-description {
    font-style: normal; /* Remove italic */
    font-size: 0.9rem;
    color: #6c757d; /* Subtle grey */
    margin-top: 0.25rem;
    font-weight: 400;
}

/* === COMPONENT IMPORTS === */
@import url('css/components/qm-badges.css');
