/*
Theme Name: trhthirtyone
Description: A responsive masonry layout theme with tag filtering for portfolios and blogs. Features CSS column-based masonry layout and Splide slideshow integration.
Author: Byoungil Choi
Version: 2.0.7
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trhthirtyone
Tags: portfolio, blog, masonry, responsive, tags, filtering
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* =============================================================================
   CSS RESET
   ============================================================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

ol, ul { list-style: none; }
table { border-collapse: collapse; border-spacing: 0; }
button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}
button { background: none; border: none; cursor: pointer; }
a { text-decoration: none; color: inherit; }

/* =============================================================================
   BASE STYLES
   ============================================================================= */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

p { margin-bottom: 1rem; }

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover { text-decoration: underline; }

/* =============================================================================
   HEADER & NAVIGATION
   ============================================================================= */
.site-header {
    background: transparent;
    border-bottom: none;
    padding: 2rem 0 1.5rem 0;
}

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

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #333;
    text-decoration: none;
}

.main-navigation {
    width: 100%;
}

.main-navigation .tag-filters {
    text-align: left;
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #0073aa;
}

/* =============================================================================
   TAG FILTERS
   ============================================================================= */
.tag-filters {
    text-align: center;
    margin: 2rem 0;
    padding: 0;
    background: transparent;
    border-radius: 8px;
    line-height: 1.5;
}

.tag-filter-btn {
    display: inline-block;
    margin: 0.1125rem;
    padding: 0.405rem 0.81rem;
    background: #f0f0f0;
    color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 16.2px;
    cursor: pointer;
    font-size: 0.70875rem;
    font-family: "Spline Sans Mono", monospace;
    font-weight: 300;
    font-style: normal;
    transition: all 0.3s ease;
}

.tag-filter-btn:hover,
.tag-filter-btn.active {
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

/* Header tag filter buttons have different shadow */
.main-navigation .tag-filter-btn:hover,
.main-navigation .tag-filter-btn.active {
    box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

/* Disabled state for rapid click prevention */
.tag-filter-btn.click-disabled,
.tag-filter-btn.processing {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.tag-filter-btn.processing {
    position: relative;
}

.tag-filter-btn.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Transform 효과 복원 - 모든 브라우저에서 안전하게 사용 가능 */
/* CSS 컬럼을 사용하지 않으므로 Transform 충돌 없음 */

/* =============================================================================
   MASONRY LAYOUT
   ============================================================================= */
/* Masonry.js 통합 레이아웃 - 모든 브라우저 동일 처리 */
#masonry-container {
    /* Masonry.js가 레이아웃을 완전히 제어 */
    position: relative;
    min-height: 200px;
    width: 100%;
}

/* 모든 브라우저 통합 카드 스타일 */
.post-card {
    /* Masonry.js가 position을 제어하므로 기본 스타일만 */
    display: block;
    position: relative;
    box-sizing: border-box;
    /* 기본 너비는 JavaScript에서 동적으로 설정됨 */
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    /* Masonry.js가 left, top을 제어할 수 있도록 !important 제거 */
}

/* Transform 효과 복원 완료 - Masonry.js 사용으로 안전함 */
/* 이제 모든 브라우저에서 Transform 사용 가능 */

/* =============================================================================
   POST CARDS
   ============================================================================= */
.post-card {
    display: inline-block;
    width: 100%;
    column-break-inside: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Flexbox fallback */
@supports not (column-count: 1) {
    .post-card {
        display: block;
        width: calc(33.333% - 20px);
        margin: 0 10px 20px 10px;
        flex: 0 0 calc(33.333% - 20px);
    }
    
    @media (max-width: 1024px) {
        .post-card {
            width: calc(50% - 20px);
            flex: 0 0 calc(50% - 20px);
        }
    }
    
    @media (max-width: 768px) {
        .post-card {
            width: calc(100% - 20px);
            flex: 0 0 calc(100% - 20px);
        }
    }
}

/* =============================================================================
   IMAGES - UNIFIED APPROACH
   ============================================================================= */

/* Base image styles - iOS friendly */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
    opacity: 1;
    visibility: visible;
}

/* Image containers - simplified */
.image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    -webkit-user-select: none;
    user-select: none;
}

/* Error states */
.image-container.image-load-error {
    background: #f5f5f5;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-container.image-load-error::before {
    content: "?";
    font-size: 3rem;
    color: #ccc;
    font-weight: bold;
}

.image-container.image-load-error img {
    display: none;
}

/* =============================================================================
   iOS SAFARI FIXES - SIMPLIFIED APPROACH
   ============================================================================= */

/* iOS Safari - Simple image container fixes */
.ios-browser .image-container {
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* iOS Safari - Simple image fixes */
.ios-browser .image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    -webkit-user-select: none;
    user-select: none;
}

/* iOS Edge Browser - Simple fixes */
.ios-edge-browser .image-container {
    position: relative;
    overflow: hidden;
    background: transparent;
}

.ios-edge-browser .image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    -webkit-user-select: none;
    user-select: none;
}

/* =============================================================================
   HOVER EFFECTS
   ============================================================================= */

/* Prevent size/position changes on hover */
.post-card:hover .image-container {
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    background: transparent !important;
}

.post-card:hover .image-container img,
.post-card:hover .post-image {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* =============================================================================
   SLIDESHOWS
   ============================================================================= */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #dbd6cc; /* 옅은 세피아톤 배경 */
}

.slideshow-container .splide {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slideshow-container .splide.is-initialized {
    opacity: 1;
}

.slideshow-container .splide__slide {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    background: #dbd6cc; /* 옅은 세피아톤 배경 */
}

.slideshow-container .splide__slide a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: flex-start;
    justify-content: center;
}

.slideshow-container .splide__slide img {
    width: 100%;
    height: auto;
    max-height: 100%;
    display: block;
    object-fit: cover;
    object-position: top;
}

.slideshow-container .splide__arrows,
.slideshow-container .splide__arrow {
    display: none !important;
}

.slideshow-container .splide__pagination {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.slideshow-container .splide__pagination__page {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
}

.slideshow-container .splide__pagination__page.is-active {
    background: rgba(255, 255, 255, 0.9);
}

.slideshow-container[data-navigation="false"] .splide__pagination {
    display: none;
}

/* Slideshow hover protection - minimal approach */
.post-card:hover .slideshow-container {
    /* No changes needed - let base styles handle everything */
}

/* =============================================================================
   VIDEOS
   ============================================================================= */
.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* YouTube Embed */
.video-container.youtube-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
    min-height: 200px;
    overflow: hidden;
}

.video-container.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Media Library Video */
.video-container.media-video {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    height: 0;
    padding-bottom: 56.25%;
    min-height: 200px;
}

@supports (aspect-ratio: 16/9) {
    .video-container.media-video {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 16/9;
        min-height: 200px;
    }
}

.video-container.media-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: cover;
    object-position: center;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-appearance: none;
}

/* Video error states */
.video-container.video-load-error {
    background: #000;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-container.video-load-error::before {
    content: "⚠";
    font-size: 3rem;
    color: #666;
}

.video-container.video-load-error video {
    display: none;
}

/* iOS Safari video fixes - simplified */
.ios-browser .video-container.media-video {
    background: #000;
}

.ios-browser .video-container.media-video video {
    -webkit-appearance: none;
    appearance: none;
}

/* Video hover protection */
.post-card:hover .video-container {
    transform: none !important;
    position: relative !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
}

.post-card:hover .video-container.youtube-embed {
    padding-bottom: 56.25% !important;
    height: 0 !important;
    position: relative !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
}

.post-card:hover .video-container iframe,
.post-card:hover .video-container video {
    transform: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* =============================================================================
   SINGLE POST LAYOUT
   ============================================================================= */
.single-post .post-thumbnail {
    margin-bottom: 1.5rem;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
}

/* Override for original size images */
.single-post .post-thumbnail img[style*="max-width: none"] {
    width: auto !important;
    max-width: none !important;
}

/* =============================================================================
   TEXT CONTENT
   ============================================================================= */
.text-container {
    padding: 0.4rem 0.75rem 0.5rem 0.75rem;
    border-radius: 0;
}

.post-card:hover .text-container {
    background-color: rgba(230, 230, 230, 0.9);
    transition: background-color 0.3s ease;
}

.entry-header {
    margin-bottom: 0.5rem;
}

.single-post .entry-header {
    margin-bottom: 0.25rem;
}

/* Post Card Title Styles */
.post-card .entry-title {
    font-size: 1.3125rem;
    font-weight: 400;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    font-family: "IBM Plex Sans", sans-serif;
}

/* Single Post Title Styles - Consolidated */
.single-post .entry-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    font-family: "IBM Plex Sans", sans-serif;
    color: #222;
}

/* Post Card Title Links */
.post-card .entry-title a {
    color: #333333;
    text-decoration: none;
}

.post-card .entry-title a:hover {
    color: #00aeef;
}

/* Single Post Title color is now included above */

.entry-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.single-post .entry-meta {
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.entry-meta:empty {
    display: none;
    margin: 0;
}

/* PC and Tablet: Reduce title and date size */
@media (min-width: 769px) {
    .post-card .entry-title {
        font-size: 1.125rem;
        line-height: 1.3;
        margin: 0 0 0.425rem 0;
    }
    
    .post-card .entry-meta {
        font-size: 0.74375rem;
        line-height: 1.12;
        margin-bottom: 0.425rem;
    }
}

.entry-content {
    font-size: 1rem;
    line-height: 1.5;
    color: #888;
    margin-bottom: 1rem;
    font-family: "IBM Plex Sans", sans-serif;
}

.excerpt-text {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #888;
    font-family: "IBM Plex Sans", sans-serif;
}

.entry-content .read-more-link {
    display: inline-block;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* =============================================================================
   BLOCK VIDEO SIZE CONTROLS
   ============================================================================= */
/* 미디어 라이브러리 비디오 커스텀 크기 */
.custom-video-width.wp-block-video {
    width: var(--custom-video-width) !important;
    max-width: 100% !important;
}

.custom-video-width.wp-block-video video {
    width: 100% !important;
    height: auto !important;
}

/* 유튜브 임베드 커스텀 크기 */
.custom-video-width.wp-block-embed {
    width: var(--custom-video-width) !important;
    max-width: 100% !important;
}

.custom-video-width.wp-block-embed .wp-block-embed__wrapper {
    width: 100% !important;
}

.custom-video-width.wp-block-embed iframe {
    width: 100% !important;
    height: 100% !important;
}

/* 반응형: 모바일에서는 전체 너비 */
@media (max-width: 768px) {
    .custom-video-width.wp-block-video,
    .custom-video-width.wp-block-embed {
        width: 100% !important;
    }
}

/* =============================================================================
   IMAGE CAPTIONS - OVERLAY STYLE
   ============================================================================= */
.wp-block-image {
    position: relative;
    margin: 1.5rem 0;
}

/* Single post: reduce top margin for first image to match featured image spacing */
.single-post .entry-content .wp-block-image:first-child {
    margin-top: 0.25rem;
}

.wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
}

.wp-block-image figcaption,
.wp-caption-text {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 0.15rem 0.15rem 0.15rem 0.25rem;
    font-size: 11px;
    line-height: 1.4;
    color: #e0e0e0;
    font-family: "IBM Plex Sans", sans-serif;
    font-style: normal;
    text-align: left;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    width: fit-content;
    max-width: 100%;
}

/* WordPress 기본 캡션 컨테이너 */
.wp-caption {
    position: relative;
    max-width: 100%;
    margin: 1.5rem 0;
}

.wp-caption img {
    display: block;
    width: 100%;
    height: auto;
}

/* 정렬 클래스 */
.wp-caption.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
}

.wp-caption.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
}

.wp-caption.aligncenter {
    display: block;
    margin: 1rem auto;
}

/* =============================================================================
   TAGS
   ============================================================================= */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.06rem;
    margin-top: 1rem;
}

@supports not (gap: 0.06rem) {
    .post-tags {
        margin: 1rem -0.03rem 0 -0.03rem;
    }
    
    .post-tags .tag-btn {
        margin: 0.03rem;
    }
}

.tag-btn {
    display: inline-block;
    padding: 0.225rem 0.675rem;
    background: #f0f0f0;
    color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 13.5px;
    font-size: 0.675rem;
    font-family: "Spline Sans Mono", monospace;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.tag-btn:hover {
    opacity: 0.8;
    transform: none;
}

.post-tags .tag-btn[style*="background-color"] {
    color: rgba(0, 0, 0, 0.7);
}

.post-tags .tag-btn[style*="background-color"]:hover {
    opacity: 0.8;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.site-footer {
    background: #333;
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: left;
}

.footer-nav-menu {
    display: flex;
    justify-content: flex-start;
    list-style: none;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-nav-menu a {
    color: #fff;
    text-decoration: none;
}

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

.site-info {
    font-family: "Spline Sans Mono", monospace;
    font-weight: 300;
    font-size: 12px;
}

.site-info p {
    margin: 0;
}

.site-info a {
    color: #fff;
    text-decoration: none;
}

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

/* =============================================================================
   PAGINATION
   ============================================================================= */
.pagination-nav {
    text-align: left;
    margin: 2rem 0 1rem 0;
}

.pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: "Spline Sans Mono", monospace;
    font-weight: 300;
}

.pagination li {
    display: inline;
    margin-right: 1rem;
}

.pagination li a,
.pagination li span {
    color: #00aeef;
    text-decoration: underline;
    font-size: 0.875rem;
    font-weight: 300;
    font-family: "Spline Sans Mono", monospace;
}

.pagination li a:hover {
    color: #3858e9;
    text-decoration: underline;
}

.pagination .current {
    color: #333;
    text-decoration: none;
    font-weight: 400;
    font-family: "Spline Sans Mono", monospace;
}

.pagination a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* =============================================================================
   LOADING STATES
   ============================================================================= */
.masonry-container.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.masonry-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.masonry-container.layout-updating {
    transition: opacity 0.3s ease;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-navigation .tag-filters {
        line-height: 1.6;
    }
    
    .main-navigation .tag-filter-btn {
        padding: 0.4455rem 0.891rem;
        font-size: 0.779625rem;
        margin: 0.225rem 0.12375rem;
        border-radius: 17.82px;
    }
    
    .tag-filter-btn:not(.main-navigation .tag-filter-btn) {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin: 0.2rem;
        border-radius: 16px;
    }
    
    .post-tags .tag-btn {
        padding: 0.18rem 0.54rem;
        font-size: 0.63rem;
        border-radius: 10.8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .main-navigation .tag-filters {
        line-height: 1.7;
    }
    
    .main-navigation .tag-filter-btn {
        padding: 0.4455rem 0.891rem;
        font-size: 0.779625rem;
        margin: 0.27rem 0.12375rem;
        border-radius: 17.82px;
    }
    
    .tag-filter-btn:not(.main-navigation .tag-filter-btn) {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        margin: 0.15rem;
        border-radius: 12px;
    }
    
    .post-tags .tag-btn {
        padding: 0.135rem 0.45rem;
        font-size: 0.585rem;
        border-radius: 10.8px;
    }
}

@media (max-width: 1024px) {
    .slideshow-container {
        height: auto !important;
    }
    
    .slideshow-container[style*="height"] {
        height: inherit !important;
    }
}

/* =============================================================================
   SAFARI SPECIFIC FIXES
   ============================================================================= */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .post-card {
        transform: translate(0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-font-smoothing: subpixel-antialiased;
    }
    
    .image-container {
        transform: translate(0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-font-smoothing: subpixel-antialiased;
    }
    
    .slideshow-container .splide__slide {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        transform: translateZ(0);
    }
    
    .slideshow-container .splide:not(.is-initialized) .splide__slide {
        opacity: 1 !important;
    }
    
    .video-container.youtube-embed {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translate(0, 0);
    }
    
    .video-container.youtube-embed iframe {
        transform: translate(0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .video-container.media-video {
        transform: translateZ(0);
    }
    
    .video-container.media-video video {
        -webkit-appearance: none;
        transform: translate3d(0, 0, 0);
    }
    
    .post-card:hover .video-container {
        transform: none !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        will-change: auto !important;
    }
    
    .post-card:hover .video-container iframe,
    .post-card:hover .video-container video {
        transform: none !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        will-change: auto !important;
    }
}

/* =============================================================================
   FALLBACKS
   ============================================================================= */
@supports not (object-fit: cover) {
    .video-container.media-video video {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Text-only cards */
.post-card:not(:has(.image-container)) .text-container,
.post-card.text-only .text-container {
    border-radius: 0;
}

/* Read More Link */
.read-more-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #00aeef;
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 300;
    font-family: "Spline Sans Mono", monospace;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    padding: 0.2rem 0;
}

.read-more-link:hover {
    color: #3858e9;
    text-decoration: underline;
}

/* Hide read more link in post cards */
.post-card .read-more-link {
    display: none !important;
}

/* Ensure read more link is visible in single posts */
.single-post .read-more-link,
.entry-content .read-more-link:not(.post-card .read-more-link) {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* No Image Placeholder */
.no-image-placeholder {
    background: #f5f5f5;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.placeholder-content {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}/* 
=============================================================================
   POST NAVIGATION & BACK TO TOP
   ============================================================================= */

/* Post Navigation */
.post-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    font-family: "Spline Sans Mono", monospace;
}

.post-navigation .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.post-navigation .nav-subtitle {
    display: inline;
    font-size: 0.875rem;
    color: #00aeef;
    margin-right: 0.25rem;
    font-weight: 300;
    font-family: "Spline Sans Mono", monospace;
}

.post-navigation .nav-title {
    display: inline;
    font-size: 0.875rem;
    font-weight: 300;
    font-family: "Spline Sans Mono", monospace;
    line-height: 1.3;
}

.post-navigation a {
    color: #00aeef;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: #3858e9;
    text-decoration: underline;
}

.post-navigation a:hover .nav-title {
    color: #3858e9;
}

/* Back to Top */
.back-to-top-simple {
    text-align: left;
    margin: 1rem 0 2rem 0;
    padding: 0;
}

.back-to-top-text-link {
    color: #00aeef;
    text-decoration: underline;
    font-size: 0.875rem;
    font-weight: 300;
    font-family: "Spline Sans Mono", monospace;
    transition: color 0.3s ease;
}

.back-to-top-text-link:hover {
    color: #3858e9;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
}