/*
Theme Name: OnMe Blog
Theme URI: 
Author: OnMe Team
Author URI: 
Description: 
Version: 1.0.18
Text Domain: onme-blog
Tags: mobile-first, flat-design, responsive, apk-download
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --border-color: #E5E7EB;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-glass: rgba(255, 255, 255, 0.4);
    --bg-glass-strong: rgba(255, 255, 255, 0.6);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.06);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.05);
    --border-radius: 16px;
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #f5f7fa 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

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

a:hover {
    color: #1976D2;
}

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

/* Container - Mobile Optimized */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

@media screen and (min-width: 640px) {
    .container {
        padding: 0 16px;
    }
}

@media screen and (min-width: 1024px) {
    .container {
        padding: 0 24px;
    }
}


/* Header - Optimized & Compact */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 24px;
}

.main-navigation {
    margin-left: auto;
}

.site-branding {
    display: flex;
    align-items: center;
    line-height: 0;
}

.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    line-height: 1;
}

.site-logo:hover {
    color: #1F2937;
    transform: scale(1.02);
}

/* Custom Logo */
.custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
}



.custom-logo {
    max-height: 40px;
    width: auto;
    height: 40px;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

/* Navigation - Compact */

/* Navigation - Modern Glass Style */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

/* Hover bridge */
.main-navigation .menu-item-has-children::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
    z-index: 999;
    display: none;
}

.main-navigation .menu-item-has-children:hover::before {
    display: block;
}

.main-navigation a {
    color: #374151;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 8px;
}

/* Remove old underline effect */
.main-navigation a::before {
    display: none;
}

/* New Hover Effect - Text Color Only */
.main-navigation a:hover {
    color: var(--primary-color);
    background: transparent;
}

.main-navigation .current-menu-item>a,
.main-navigation .current_page_item>a,
.main-navigation .current-menu-ancestor>a {
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
}

/* Dropdown Submenu - Minimal Glass */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 6px;
    margin-top: 8px;
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
    animation: submenuFadeIn 0.2s ease;
}

@keyframes submenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .main-navigation li:hover>.sub-menu {
        display: flex;
    }
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    padding: 8px 12px;
    white-space: nowrap;
    border-radius: 8px;
    font-size: 14px;
    background: transparent;
    color: #374151;
    transition: all 0.2s ease;
    position: relative;
}

/* Remove underline from submenu items */
.main-navigation .sub-menu a::before {
    display: none;
}

.main-navigation .sub-menu a:hover {
    color: var(--primary-color);
    background: transparent;
    transform: translateX(2px);
}

/* Level 2 Submenu (nested) */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 4px;
    margin-top: 0;
}

/* Menu item with children indicator */
.main-navigation .menu-item-has-children>a::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 4px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23374151"%3E%3Cpath d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"%3E%3C/path%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.main-navigation .menu-item-has-children:hover>a::after {
    opacity: 0.8;
}

.main-navigation .sub-menu .menu-item-has-children>a::after {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23374151"%3E%3Cpath d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"%3E%3C/path%3E%3C/svg%3E');
    float: right;
    margin-left: 8px;
}

/* Mobile Menu Toggle - Hamburger */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* Hamburger Icon - Three Lines */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 5px;
}

.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: #1F2937;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active State - Animated X */
.menu-toggle.active {
    background: rgba(255, 255, 255, 0.6);
}

.menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* Main Content */
.site-main {
    padding: 32px 0;
    min-height: calc(100vh - 300px);
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
    padding: 24px;
    text-align: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.page-description {
    color: var(--text-light);
    font-size: 16px;
}

/* Home Sections */
.home-section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.section-description {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* Single App Page */
.app-single {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* App Color Blur Background */
.app-blur-background {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 600px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    /* Very subtle for premium feel */
    filter: blur(120px);
    -webkit-filter: blur(120px);
}

/* ... (skipping unchanged lines) ... */

/* Post Content - Dynamic Gradient Background */
.post-card-content {
    --bg-rgb: 255, 255, 255;
    /* Default fallback */
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 24px;
    margin-top: 0;
    flex-grow: 1;
    z-index: 1;

    /* Glass effect with Dynamic Gradient */
    background-color: rgba(255, 255, 255, 0.6);
    background-image: linear-gradient(to bottom,
            rgba(var(--bg-rgb), 0.15) 0%,
            rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-top: 1px solid rgba(255, 255, 255, 0.5);

    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background-image 0.5s ease, color 0.3s ease;
}

/* ... (skipping unchanged lines) ... */

.post-single-card {
    --bg-rgb: 255, 255, 255;
    /* Modern glass gradient */
    background: linear-gradient(180deg, rgba(var(--bg-rgb), 0.12) 0%, rgba(255, 255, 255, 0.9) 50%, #ffffff 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 48px;
}

/* Ensure full title on single posts/pages */
.post-single-card .post-title {
    display: block;
    overflow: visible;
    text-overflow: unset;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    white-space: normal;
}

.post-single-thumbnail {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    display: flex;
    /* Flexbox helper */
    align-items: center;
    /* Vertical center helper */
    justify-content: center;
    /* Horizontal center helper */
}

.post-single-card .post-single-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

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

.site-main .container {
    position: relative;
}

.app-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}


.app-header-content {
    flex: 1;
}

.app-header .app-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    color: var(--text-dark);
}

.app-details {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.app-details h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.app-description {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* Typography - Headings */
.app-description h1,
.app-description h2,
.app-description h3,
.app-description h4,
.app-description h5,
.app-description h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.app-description h1 {
    font-size: 28px;
}

.app-description h2 {
    font-size: 24px;
}

.app-description h3 {
    font-size: 20px;
}

.app-description h4 {
    font-size: 18px;
}

.app-description h5 {
    font-size: 16px;
}

.app-description h6 {
    font-size: 14px;
}

/* Typography - Paragraphs */
.app-description p {
    margin-bottom: 16px;
    line-height: 1.8;
}

/* Typography - Lists */
.app-description ul,
.app-description ol {
    margin: 16px 0;
    padding-left: 24px;
}

.app-description li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.app-description ul {
    list-style: disc;
}

.app-description ol {
    list-style: decimal;
}

.app-description ul ul,
.app-description ol ul {
    list-style: circle;
    margin-top: 8px;
}

.app-description ol ol,
.app-description ul ol {
    list-style: lower-alpha;
    margin-top: 8px;
}

/* Typography - Links */
.app-description a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.app-description a:hover {
    color: #1e40af;
    text-decoration: none;
}

/* Typography - Emphasis */
.app-description strong,
.app-description b {
    font-weight: 700;
    color: var(--text-dark);
}

.app-description em,
.app-description i {
    font-style: italic;
}

/* Typography - Code */
.app-description code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e83e8c;
}

.app-description pre {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.app-description pre code {
    background: none;
    padding: 0;
    color: var(--text-dark);
}

/* Typography - Blockquote */
.app-description blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
    margin: 20px 0;
    color: var(--text-light);
    font-style: italic;
}

/* Typography - Tables */
.app-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.app-description table th,
.app-description table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.app-description table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.app-description table tr:nth-child(even) {
    background: rgba(249, 250, 251, 0.5);
}

/* Typography - Horizontal Rule */
.app-description hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

/* Typography - Images */
.app-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.app-info-list {
    list-style: none;
}

.app-info-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.app-info-list li:last-child {
    border-bottom: none;
}

/* Table of Contents - Ultra Glass Design */
.table-of-contents {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0;
    margin: 32px 0 40px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.table-of-contents:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.toc-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toc-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.toc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.toc-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0);
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.toc-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

.toc-toggle-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.table-of-contents.collapsed .toc-toggle-icon {
    transform: rotate(-90deg);
}

/* Animated Collapse */
.toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-of-contents.collapsed .toc-list {
    /* Handled by JS for smooth animation, but here as fallback/initial */
    border-top: none;
}

.toc-list ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-item {
    display: block;
    margin: 0;
}

.toc-item:before {
    display: none;
}

.toc-link {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

/* Hover Effects */
.toc-link:hover {
    background: rgba(255, 255, 255, 0.4);
    color: var(--primary-color);
    padding-left: 28px;
}

/* Nested Levels - Visual Hierarchy via Indentation */
.toc-level-3>.toc-link {
    font-size: 14px;
    color: #4B5563;
}

.toc-level-3>.toc-link:hover {
    color: var(--primary-color);
}

.toc-level-4>.toc-link {
    font-size: 14px;
    color: #6B7280;
}

.toc-level-4>.toc-link:hover {
    color: var(--primary-color);
}

/* Remove bullet points */
.toc-link::before {
    display: none;
}

.toc-link:hover::before {
    display: none;
}

/* Heading Deep Linking Styles */
.post-content h2[id]:hover::after,
.post-content h3[id]:hover::after,
.post-content h4[id]:hover::after {
    content: '#';
    display: inline-block;
    margin-left: 8px;
    color: var(--primary-color);
    font-weight: 400;
    opacity: 0.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }

    to {
        opacity: 0.5;
        transform: translateX(0);
    }
}

/* Nested bullets */
.toc-level-3>.toc-link::before {
    display: none;
}

.toc-level-4>.toc-link::before {
    display: none;
}

/* Smooth scroll behavior for TOC links */
html {
    scroll-behavior: smooth;
}

/* Highlight target heading */
:target {
    scroll-margin-top: 100px;
    animation: highlightHeading 2s ease-out;
}

@keyframes highlightHeading {
    0% {
        background: rgba(59, 130, 246, 0.15);
        padding: 8px 16px;
        margin: -8px -16px;
        border-radius: 8px;
    }

    100% {
        background: transparent;
        padding: 0;
        margin: 0;
    }
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
    min-width: 120px;
}

.info-value {
    color: var(--text-light);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    word-break: break-all;
}

/* Allow wrapping for links and long text on mobile */
.info-value a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 639px) {
    .info-label {
        min-width: 100px;
        font-size: 14px;
    }

    .info-value {
        font-size: 14px;
    }
}

/* Footer */
.site-footer {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 48px 0 32px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    color: var(--text-light);
    font-size: 14px;
}

/* Footer Navigation */
.footer-navigation {
    width: 100%;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin: 0;
    padding: 0;
}

.footer-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.footer-menu a::after {
    display: none;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-light);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Responsive Video Embeds */
.post-content iframe[src*="youtube.com"],
.post-content iframe[src*="youtu.be"],
.post-content iframe[src*="vimeo.com"] {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Social Icon Colors on Hover */
.social-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-tiktok:hover {
    background: #000000;
    border-color: #000000;
    color: white;
}

.social-youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

.social-x:hover {
    background: #000000;
    border-color: #000000;
    color: white;
}

.social-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.social-pinterest:hover {
    background: #e60023;
    border-color: #e60023;
    color: white;
}

.social-mastodon:hover {
    background: #6364ff;
    border-color: #6364ff;
    color: white;
}

.social-bluesky:hover {
    background: #1185fe;
    border-color: #1185fe;
    color: white;
}

.social-telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: white;
}

/* Footer Copyright & Disclaimer */
.footer-copyright,
.footer-disclaimer {
    text-align: center;
    line-height: 1.6;
}

.footer-copyright {
    font-weight: 500;
    color: var(--text-dark);
}

.footer-copyright a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-copyright a:hover {
    opacity: 0.8;
}

.footer-disclaimer {
    font-size: 13px;
    color: var(--text-light);
    max-width: 800px;
    opacity: 0.85;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .site-footer {
        padding: 32px 0 24px;
        margin-top: 48px;
    }

    .footer-content {
        gap: 20px;
    }

    .footer-menu {
        gap: 8px 20px;
        font-size: 13px;
    }

    .footer-social {
        gap: 12px;
    }

    .social-icon {
        width: 36px;
        height: 36px;
    }

    .social-icon svg {
        width: 18px;
        height: 18px;
    }

    .footer-disclaimer {
        font-size: 12px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-dark);
    min-width: 44px;
    text-align: center;
    transition: all 0.3s ease;
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Search Form */
.search-form {
    margin-bottom: 32px;
}

.search-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-submit {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #1F2937;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    flex-shrink: 0;
}

.search-submit:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.search-submit:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

.search-submit svg {
    width: 22px;
    height: 22px;
}

/* Load More Button */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    margin-bottom: 16px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 32px;
    /* Use horizontal padding only */
    min-width: 160px;
    height: 50px;
    /* Fixed height */
    box-sizing: border-box;
    /* Include padding/border in height */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    text-decoration: none;
    /* For anchor tag */
    line-height: 1;
    /* Prevent line-height from adding extra height */
}

.load-more-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.load-more-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

.load-more-btn:disabled,
.load-more-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
    height: 50px;
    /* Enforce height */
    min-width: 160px;
    /* Enforce width */
    padding: 0 32px;
    /* Enforce padding */
}

.load-more-btn .btn-loader {
    display: none;
    /* Hide loader since we are using text */
}

.load-more-btn .btn-text {
    display: inline-block;
    min-width: 84px;
    text-align: center;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.load-more-error {
    text-align: center;
    color: #DC2626;
    font-size: 14px;
    margin-top: 16px;
    padding: 12px 20px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

/* Tablet Styles */
@media screen and (min-width: 768px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .page-title {
        font-size: 32px;
    }

    .site-main {
        padding: 48px 0;
    }
}

/* Desktop Styles - Archive Cards */
@media screen and (min-width: 1024px) {
    /* padding: 18px; - Missing selector */
}


.app-content .app-title {
    font-size: 17px;
}

/* Mobile Archive Cards - Removed (using new responsive design above) */

/* Mobile Menu */


.app-header {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
    margin-bottom: 20px;
}



.app-header .app-title {
    font-size: 20px;
    margin-bottom: 0;
    line-height: 1.3;
}

.app-details {
    padding: 20px 16px;
    margin-bottom: 20px;
}

.app-details h2 {
    font-size: 20px;
    margin-bottom: 14px;
}

/* } - Removed extra brace */

/* Tablet Optimization (640px - 1023px) */
@media screen and (min-width: 640px) and (max-width: 1023px) {
    .app-header {
        flex-direction: row;
        text-align: left;
        padding: 20px;
        gap: 20px;
    }

    .app-header img {
        width: 110px;
        height: 110px;
        margin: 0;
        border-radius: 22px;
    }
}

.app-header .app-title {
    font-size: 24px;
    margin-bottom: 0;
    line-height: 1.25;
}


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

/* Loading State */
.loading {
    text-align: center;
    padding: 48px 0;
    color: var(--text-light);
}

/* Screenshots Horizontal Scroll */
.app-screenshots-horizontal {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.app-screenshots-horizontal::-webkit-scrollbar {
    height: 8px;
}

.app-screenshots-horizontal::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.app-screenshots-horizontal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.app-screenshots-horizontal::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

.app-screenshots-horizontal .screenshot-item {
    flex-shrink: 0;
    width: 220px;
    height: auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.app-screenshots-horizontal .screenshot-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.app-screenshots-horizontal .screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.app-screenshots-horizontal .screenshot-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Styles - Optimized */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
    min-height: 300px;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-image:active {
    cursor: grabbing;
}

/* Loading Spinner */
.lightbox-loader {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 36px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    font-weight: 300;
    user-select: none;
    z-index: 10;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.lightbox-nav[style*="visibility: hidden"],
.lightbox-nav[style*="opacity: 0"] {
    opacity: 0;
    pointer-events: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Zoom Controls */
.lightbox-controls {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lightbox-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.lightbox-controls button:active {
    transform: scale(0.95);
}

/* Counter */
.lightbox-counter {
    position: absolute;
    top: -50px;
    left: 0;
    color: white;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* ========== ARCHIVE ULTRA FLAT DESIGN ========== */

/* Clickable Card Link */


/* Archive Icon */



/* Archive MOD Features - Mobile Optimized */
.app-mod-features-archive {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

@media screen and (min-width: 640px) {
    .app-mod-features-archive {
        gap: 6px;
        margin-top: 8px;
    }
}



/* App Icon Enhancements - Ultra Flat */

/* Screenshot Skeleton Loading */
.app-screenshots-horizontal .screenshot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(245, 245, 245, 0.1) 0%,
            rgba(245, 245, 245, 0.2) 50%,
            rgba(245, 245, 245, 0.1) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 12px;
    z-index: -1;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.app-screenshots-horizontal .screenshot-item img {
    animation: fadeInImage 0.3s ease;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Screenshots & Lightbox */
@media screen and (max-width: 767px) {
    .app-screenshots-horizontal .screenshot-item {
        width: 180px;
    }

    .lightbox-nav {
        font-size: 28px;
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: -45px;
        right: 0;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .lightbox-counter {
        top: -45px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .lightbox-controls {
        bottom: -55px;
        gap: 6px;
        padding: 6px;
    }

    .lightbox-controls button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .lightbox-image {
        max-height: 70vh;
        border-radius: 6px;
    }

    .lightbox-image-wrapper {
        min-width: 200px;
        min-height: 200px;
        max-width: 95vw;
        max-height: 75vh;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .app-screenshots-horizontal .screenshot-item {
        width: 200px;
    }

    .lightbox-image {
        max-height: 80vh;
    }
}

@media screen and (min-width: 1024px) {
    .app-screenshots-horizontal .screenshot-item {
        width: 240px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    .lightbox-nav:hover,
    .lightbox-close:hover,
    .lightbox-controls button:hover {
        transform: none;
    }

    .lightbox-nav:active {
        transform: translateY(-50%) scale(0.9) !important;
    }

    /* Ensure buttons are visible and clickable on mobile */
    .lightbox-nav {
        opacity: 1 !important;
    }

    .lightbox-nav[style*="visibility: hidden"] {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .lightbox-close:active {
        transform: rotate(90deg) scale(0.9);
    }

    .lightbox-controls button:active {
        transform: scale(0.9);
    }
}

/* Prevent text selection and improve touch handling */
.lightbox-overlay * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ========== MODERN FLAT DOWNLOAD BUTTON ========== */
.app-download-section {
    margin: 28px 0;
}

.download-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.download-btn-large:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.download-btn-large:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

.download-btn-large svg {
    flex-shrink: 0;
}

.download-btn-large span {
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

/* ========== ULTRA FLAT DESIGN: MOD FEATURES ========== */
.mod-features-section {
    margin-top: 24px;
}

.app-mod-features-flat {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.mod-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #FAFAFA;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
    transition: background 0.2s ease, border-left-color 0.2s ease;
}

.mod-feature-item:hover {
    background: #F0F0F0;
    border-left-color: #388E3C;
}

.mod-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.mod-text {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.4;
}

/* Old mod badges - hide them */
.app-mod-features {
    display: none;
}

/* ========== RESPONSIVE MODERN FLAT DESIGN ========== */
@media screen and (max-width: 767px) {
    .download-btn-large {
        padding: 12px 20px;
        gap: 10px;
        font-size: 15px;
    }

    .download-icon {
        font-size: 18px;
    }

    .download-title {
        font-size: 15px;
    }

    .download-btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .mod-feature-item {
        padding: 10px 14px;
        gap: 10px;
    }

    .mod-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .mod-text {
        font-size: 13px;
    }
}

/* ========== BREADCRUMBS - SEO OPTIMIZED ========== */
/* ========== BREADCRUMBS - SEO OPTIMIZED ========== */
.breadcrumbs {
    padding: 0;
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-light);
    text-transform: uppercase;
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.breadcrumbs svg {
    width: 12px;
    height: 12px;
    opacity: 0.4;
    margin: 0 2px;
}

.breadcrumb-separator {
    color: var(--text-light);
    user-select: none;
    padding: 0 4px;
}

/* Mobile optimization */
@media (max-width: 640px) {
    .breadcrumbs {
        font-size: 12px;
        padding: 8px 0;
        margin-bottom: 16px;
    }

    .breadcrumb-list {
        padding: 0 12px;
        gap: 4px;
    }

    .breadcrumb-separator {
        padding: 0 2px;
    }

    .breadcrumb-item span,
    .breadcrumb-item a {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===================================
   Featured Posts Grid
   =================================== */
.featured-section {
    margin-bottom: 48px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Featured Card Styles */
.featured-card.featured-large .post-title {
    font-size: 24px;
}

.featured-card.featured-large .post-excerpt {
    display: block;
    font-size: 16px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Tablet & Desktop */
@media screen and (min-width: 768px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .featured-card.featured-large {
        grid-column: span 2;
    }

    /* Force consistent image height for alignment */
    .featured-grid .post-thumbnail {
        height: 280px;
        width: 100%;
        aspect-ratio: auto !important;
    }

    .featured-grid .post-thumbnail img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
}

@media screen and (min-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    /* 
       Layout:
       Row 1: [Large (2)] [Normal (1)]
       Row 2: [Normal (1)] [Normal (1)] [Normal (1)]
    */

    .featured-card:nth-child(1) {
        grid-column: span 2;
    }

    .featured-card:nth-child(2) {
        grid-column: span 1;
    }

    .featured-card:nth-child(3),
    .featured-card:nth-child(4),
    .featured-card:nth-child(5) {
        grid-column: span 1;
    }

    .featured-card.featured-large .post-title {
        font-size: 30px;
    }

    .featured-card.featured-large .post-excerpt {
        font-size: 16px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* ===================================
   Blog Post Cards - Modern Glassmorphism
   =================================== */

/* Post Grid - Responsive */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media screen and (min-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Fix for 3 items layout on tablet: make the 3rd item full width */
    .post-grid>.post-card:nth-child(3):last-child {
        grid-column: span 2;
    }
}

@media screen and (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    /* Reset grid column for 3rd item on desktop */
    .post-grid>.post-card:nth-child(3):last-child {
        grid-column: auto;
    }
}

/* Post Card - Glass Effect */
/* Post Card - Column Layout (Image Top, Content Bottom) */
.post-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.post-card:hover {
    /* transform: translateY(-6px); */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.9);
}

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Post Thumbnail - Standard Display */
.post-thumbnail {
    position: relative;
    width: 100%;
    /* Remove absolute positioning to let it stack */
    aspect-ratio: 16/9;
    /* Or 4/3 depending on preference, or remove for auto height */
    overflow: hidden;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover fills the area, Contain shows full image */
    transition: transform 0.5s ease;
}

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

.post-thumbnail-overlay {
    display: none;
    /* No overlay needed on image anymore */
}

/* Placeholder when no thumbnail */
.post-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E5E7EB;
}

.placeholder-icon {
    width: 60px;
    height: 60px;
    color: #9CA3AF;
}

/* Post Content - Dynamic Gradient Background */
.post-card-content {
    --bg-rgb: 255, 255, 255;
    /* Default fallback */
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    padding: 24px;
    margin-top: 0;
    flex-grow: 1;
    z-index: 1;

    /* Glass effect with Dynamic Gradient */
    background-color: rgba(255, 255, 255, 0.6);
    background-image: linear-gradient(to bottom,
            rgba(var(--bg-rgb), 0.15) 0%,
            rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-top: 1px solid rgba(255, 255, 255, 0.5);

    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background-image 0.5s ease, color 0.3s ease;
}

/* Category Badge */
.post-meta-top {
    margin-bottom: 4px;
}

.post-category-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    /* Set by JS */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #fff !important;
    /* Force white on hover for max contrast */
}

/* Post Title */
.post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #1F2937;
    /* Dark text for contrast on light bg */
    text-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Post Excerpt */
.post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #4B5563;
    /* Dark gray for readability */
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Post Meta Bottom - Hidden or Simplified */
/* Post Meta Bottom */
.post-meta-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    width: 100%;
}

/* Post Author */
.post-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
}

.post-author svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    flex-shrink: 0;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: var(--primary-color);
}

/* Post Date */
.post-date {
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.post-date svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    flex-shrink: 0;
}

/* Post Meta Separator */
.meta-separator {
    color: var(--text-light);
    opacity: 0.4;
    font-weight: 300;
}

/* Mobile Optimizations */
@media screen and (max-width: 640px) {
    .post-card {
        border-radius: 16px;
    }

    .post-card-content {
        padding: 16px;
    }

    .post-title {
        font-size: 17px;
    }

    .post-excerpt {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .post-meta-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Typography - Headings in Content */
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    line-height: 1.3;
    position: relative;
}

.post-content h2 {
    font-size: 28px;
}

.post-content h3 {
    font-size: 24px;
}

.post-content h4 {
    font-size: 20px;
}

.post-content h5 {
    font-size: 18px;
}

.post-content h6 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

/* Typography - Paragraphs & Lists */
.post-content p {
    margin-bottom: 24px;
    line-height: 1.8;
    font-size: 17px;
    color: #374151;
}

.post-content ul,
.post-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 12px;
    position: relative;
    line-height: 1.7;
}

.post-content ol li::marker {
    color: var(--primary-color);
    font-weight: 600;
}

/* Blockquotes */
.post-content blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 16px 16px 0;
    font-style: italic;
    color: var(--text-dark);
    font-size: 18px;
    line-height: 1.8;
}

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

/* Horizontal Rule */
.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 48px 0;
}

/* Images & Media */
.post-content img,
.post-content iframe,
.post-content video {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin: 24px 0;
}

.post-content figure {
    margin: 32px auto;
    text-align: center;
    max-width: 100%;
}

.post-content .wp-caption {
    width: auto !important;
}

.post-content figure img {
    margin: 0 auto;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.post-content figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 12px;
    font-style: italic;
}

/* Tables - Responsive & Glass Style */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 32px 0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Custom Scrollbar for Table */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 16px 16px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.post-content table {
    width: 100%;
    min-width: 600px;
    /* Force horizontal scroll on small screens */
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 15px;
}

.post-content th,
.post-content td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

.post-content th {
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content tr:hover td {
    background: rgba(255, 255, 255, 0.3);
}

/* Code Blocks */
.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 32px 0;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: var(--shadow);
}

.post-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.post-content p code,
.post-content li code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #dc2626;
}

/* Links in Content */
.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

/* Mobile Adjustments */
@media screen and (max-width: 640px) {
    .post-content h2 {
        font-size: 24px;
    }
}

/* ===================================
   Post List Item (Horizontal) - Merged from list-style.css
   =================================== */
.post-list-item {
    margin-bottom: 30px;
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);

    /* Glass Border Effect */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
}

.post-list-item:hover {
    /* transform: translateY(-5px); */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.8);
}

.post-list-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    flex-direction: row;
    align-items: stretch;
    position: relative;
}

.post-list-item .post-thumbnail-wrapper {
    width: 280px;
    min-width: 280px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.post-list-item .post-thumbnail {
    height: 100%;
    padding-top: 0;
}

.post-list-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-list-item .post-thumbnail-placeholder {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.post-list-item .post-content-wrapper {
    flex: 1;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;

    /* Glass effect from Card */
    background-color: rgba(255, 255, 255, 0.6);
    background-image: linear-gradient(to bottom,
            rgba(var(--bg-rgb), 0.15) 0%,
            rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-left: 1px solid rgba(255, 255, 255, 0.5);
    transition: background-image 0.5s ease;
}

.post-list-item .post-meta-top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}

.post-list-item .post-category-badge {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    margin-right: 15px;
    border: 1px solid transparent;
}

.post-list-item .post-date {
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    /* Match badge size */
    font-weight: 500;
    /* Slightly bolder */
}

.post-list-item .post-date svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.post-list-item .post-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.post-list-item .post-excerpt {
    color: #4B5563;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-list-item .post-meta-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Force left alignment */
    margin-top: auto;
    width: 100%;
}

.post-list-item .post-author {
    display: none;
    /* Hide author as requested previously, just in case */
}

/* Responsive - Keep Horizontal Layout */
@media (max-width: 768px) {
    .post-list-item {
        margin-bottom: 20px;
        /* Reduce margin */
    }

    .post-list-link {
        /* Ensure flex-row is maintained */
        flex-direction: row !important;
        height: 140px;
        /* Fixed height for consistency */
    }

    .post-list-item .post-thumbnail-wrapper {
        width: 120px;
        /* Fixed width for thumb */
        min-width: 120px;
        height: 100%;
    }

    .post-list-item .post-content-wrapper {
        padding: 12px 16px;
        /* Compact padding */
        border-left: 1px solid rgba(255, 255, 255, 0.5);
        /* Keep border left */
        border-top: none;
    }

    .post-list-item .post-title {
        font-size: 16px;
        /* Smaller title */
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
    }

    .post-list-item .post-excerpt {
        display: none;
        /* Hide excerpt on mobile to save space */
    }

    .post-list-item .post-meta-top {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .post-list-item .post-category-badge {
        padding: 2px 8px;
        margin-right: 8px;
        font-size: 10px;
    }

    .post-list-item .author-avatar {
        width: 16px;
        height: 16px;
    }

    .post-list-item .author-name {
        font-size: 11px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .post-list-link {
        flex-direction: column;
    }

    .post-list-item .post-thumbnail-wrapper {
        width: 100%;
        height: 220px;
        min-width: 0;
    }

    .post-list-item .post-content-wrapper {
        padding: 20px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.5);
    }

    .post-list-item .post-title {
        font-size: 18px;
    }

    .post-list-item .post-excerpt {
        display: none;
        /* Hide excerpt on mobile */
    }

    .post-list-item .post-meta-bottom {
        margin-top: 8px;
        /* Add some space on mobile */
    }
}

/* Responsive - Keep Horizontal Layout (Override previous vertical layout) */
@media (max-width: 768px) {
    .post-list-item {
        margin-bottom: 20px;
    }

    .post-list-link {
        flex-direction: row !important;
        /* Force Horizontal */
        height: 110px;
        /* Reduced fixed height for mobile */
    }

    .post-list-item .post-thumbnail-wrapper {
        width: 140px;
        /* Wider for horizontal rect */
        min-width: 140px;
        height: 100%;
    }

    .post-list-item .post-content-wrapper {
        padding: 10px 12px;
        border-left: 1px solid rgba(255, 255, 255, 0.5);
        border-top: none;
        justify-content: center;
        /* Center content vertically */
        align-items: flex-start;
        /* Force align left horizontally */
        text-align: left;
    }

    .post-list-item .post-title {
        font-size: 15px;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
        width: 100%;
        /* Ensure full width for text-align to work */
    }

    .post-list-item .post-meta-top {
        margin-bottom: 4px;
        font-size: 11px;
        width: 100%;
    }

    .post-list-item .post-category-badge {
        padding: 2px 8px;
        margin-right: 8px;
        font-size: 10px;
    }

    .post-list-item .post-meta-bottom {
        margin-top: 4px;
        display: flex;
        justify-content: flex-start;
        /* Force Left */
        width: 100%;
    }

    .post-list-item .post-date {
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: flex-start !important;
        /* Force Left */
        width: 100%;
        text-align: left;
    }

    .post-list-item .post-date svg {
        width: 12px;
        height: 12px;
    }


    .post-content h3 {
        font-size: 21px;
    }

    .post-content h4 {
        font-size: 19px;
    }

    .post-content p {
        font-size: 16px;
    }

    .post-content blockquote {
        padding: 20px;
        font-size: 16px;
        margin: 24px 0;
    }

    .post-content ul,
    .post-content ol {
        padding-left: 20px;
    }
}

/* Single Post Styles */
.post-single {
    max-width: 800px;
    margin: 0 auto;
}

.post-single-card {
    /* Ultra-modern glass effect */
    background: rgba(255, 255, 255, 0.8);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
    overflow: hidden;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.post-single-thumbnail {
    width: 100%;
    height: auto;
    max-height: 480px;
    overflow: hidden;
    position: relative;
}

.post-single-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-single-content-wrapper {
    padding: 40px;
}

/* Global Breadcrumbs */
.breadcrumbs {
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.breadcrumbs svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

.breadcrumbs .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Single Post Breadcrumbs Override */
.post-single-content-wrapper .breadcrumbs {
    font-size: 13px;
    opacity: 0.8;
}

.post-single .post-header {
    margin-bottom: 32px;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.post-single .post-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-dark);
}

@media screen and (min-width: 768px) {
    .post-single .post-title {
        font-size: 36px;
    }
}

@media screen and (min-width: 1024px) {
    .post-single .post-title {
        font-size: 40px;
    }
}

.post-meta-top {
    margin-bottom: 16px;
}

.post-single .post-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    color: var(--text-light);
    flex-wrap: wrap;
    border-top: none;
    padding-top: 0;
    margin-top: 16px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
}

.post-single .post-meta time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-single .post-content {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: var(--text-dark);
    line-height: 1.8;
}

@media screen and (max-width: 640px) {

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

    /* Force remove padding from inner elements on mobile too */
    .post-single .post-header,
    .post-single .post-content {
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .post-single .post-title {
        font-size: 26px;
    }
}

/* Related Posts Grid */
.related-posts {
    margin-top: 48px;
}

/* Ensure backward compatibility - app-grid can be used as post-grid */
.app-grid.post-grid,
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

@media screen and (min-width: 768px) {

    .app-grid.post-grid,
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media screen and (min-width: 1024px) {

    .app-grid.post-grid,
    .app-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
}

/* Ensure post and app cards work in both grids */
.post-card {
    height: 100%;
}

/* ===================================
   MOBILE MENU - Glass Minimal Design
   =================================== */

/* Mobile - Stack menu vertically */
@media (max-width: 767px) {

    /* Header stays on top always */
    .site-header {
        position: sticky;
        z-index: 9999;
        padding: 10px 0;
    }

    .site-logo {
        font-size: 18px;
    }

    .custom-logo {
        max-height: 36px;
    }

    /* Show hamburger button - Flat Modern */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        width: 44px;
        height: 44px;
        cursor: pointer;
        padding: 0;
        transition: transform 0.2s ease;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .menu-toggle:hover {
        background: transparent;
        transform: scale(1.1);
        box-shadow: none;
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }

    /* Hamburger Icon - Three Lines */
    .hamburger-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 24px;
        height: 24px;
        gap: 6px;
    }

    .hamburger-icon span {
        display: block;
        width: 24px;
        height: 2px;
        background: #1F2937;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    /* Active State - Animated X */
    .menu-toggle.active {
        background: transparent;
    }

    .menu-toggle.active .hamburger-icon span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .hamburger-icon span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .menu-toggle.active .hamburger-icon span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hide menu by default */
    .main-navigation {
        display: none;
    }

    /* Push actions to right on mobile when nav is hidden */
    .header-actions {
        margin-left: auto;
    }

    /* Show menu when active - Fixed dropdown below header */
    .main-navigation.active {
        display: block;
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        z-index: 9998;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Menu wrapper - Glass popup matching submenu */
    .main-navigation ul {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 12px;
        padding: 6px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        max-height: calc(100vh - 80px);
        overflow-y: auto;

        display: flex;
        flex-direction: column;
        gap: 2px;
        margin: 0;
        list-style: none;
    }

    /* Menu items */
    .main-navigation li {
        width: 100%;
        position: relative;
    }

    .main-navigation a {
        display: block;
        padding: 12px 16px;
        font-size: 15px;
        color: #374151;
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.2s ease;
        position: relative;
    }

    .main-navigation a:hover,
    .main-navigation a:active {
        background: transparent;
        color: var(--primary-color);
        transform: translateX(2px);
    }

    /* Remove desktop underline */
    .main-navigation a::before {
        display: none;
    }

    /* Current menu item */
    .main-navigation .current-menu-item>a,
    .main-navigation .current_page_item>a {
        background: transparent;
        color: var(--primary-color);
        font-weight: 600;
    }

    /* Submenu */
    .main-navigation .sub-menu {
        display: none;
        position: static;
        background: rgba(59, 130, 246, 0.04);
        border: none;
        border-radius: 10px;
        padding: 4px;
        margin: 4px 0 0 0;
        min-width: auto;
        box-shadow: none;
        animation: none;
        backdrop-filter: none;
    }

    .main-navigation .menu-item-has-children.active>.sub-menu {
        display: flex;
    }

    .main-navigation .sub-menu li {
        width: 100%;
    }

    .main-navigation .sub-menu a {
        padding: 12px 16px 12px 32px;
        font-size: 15px;
    }

    .main-navigation .sub-menu .sub-menu a {
        padding-left: 48px;
        font-size: 14px;
    }

    /* Arrow for items with submenu */
    .main-navigation .menu-item-has-children>a::after {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.5;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .main-navigation .menu-item-has-children.active>a::after {
        transform: translateY(-50%) rotate(180deg);
        opacity: 1;
    }

    /* Nested submenu arrows */
    .main-navigation .sub-menu .menu-item-has-children>a::after {
        transform: translateY(-50%);
    }

    .main-navigation .sub-menu .menu-item-has-children.active>a::after {
        transform: translateY(-50%) rotate(180deg);
    }
}

/* Header Layout - Flexbox Order Control */
.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 16px;
}

/* Default Desktop Layout: [Logo] [Nav] [Search] */
.site-branding {
    order: 1;
    margin-right: auto;
}

.main-navigation {
    order: 2;
    margin-left: auto;
}

.search-toggle {
    order: 3;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1F2937;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.search-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* Mobile Layout: [Search] [Logo] [Hamburger] */
@media (max-width: 767px) {
    .header-inner {
        justify-content: space-between;
        gap: 12px;
    }

    .menu-toggle {
        order: 1;
    }

    .site-branding {
        order: 2;
        margin: 0;
        flex-grow: 1;
        justify-content: center;
    }

    .search-toggle {
        order: 3;
    }

    /* Ensure logo is centered */
    .site-logo,
    .custom-logo-link {
        justify-content: center;
    }
}

/* Search Modal - Full Screen Glass */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 100%;
    max-width: 600px;
    padding: 20px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: -60px;
    right: 20px;
    background: transparent;
    border: none;
    color: #1F2937;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-close:hover {
    transform: rotate(90deg);
}

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

.search-modal .search-field {
    width: 100%;
    padding: 20px 60px 20px 24px;
    font-size: 24px;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid #E5E7EB;
    background: transparent;
    color: #1F2937;
    border-radius: 0;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-modal .search-field:focus {
    border-color: var(--primary-color);
}

.search-modal .search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 10px;
    transition: color 0.2s ease;
}

.search-modal .search-submit:hover {
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .search-close {
        right: 0;
        top: -80px;
    }
}

/* Tablet - Slightly adjust spacing */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-navigation a {
        padding: 8px 12px;
        font-size: 14px;
    }

    .main-navigation ul {
        gap: 6px;
    }
}

/* Mobile Performance Optimization */
@media (max-width: 767px) {

    .post-card,
    .post-single-card,
    .post-card-content,
    .app-blur-background {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    .app-blur-background {
        filter: blur(60px);
        -webkit-filter: blur(60px);
    }
}

/* Category Section Layout */
.category-content-wrapper .post-grid {
    margin-bottom: 24px;
}

.category-content-wrapper .post-list-wrapper {
    margin-top: 24px;
}

.view-more-wrapper {
    margin-top: 32px;
    text-align: center;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}


/* Category Section Layout */
.category-content-wrapper .post-grid {
    margin-bottom: 24px;
}

.category-content-wrapper .post-list-wrapper {
    margin-top: 24px;
}

.view-more-wrapper {
    margin-top: 32px;
    text-align: center;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Homepage Sidebar Layout */
.home-content-container {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.home-main-column {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.home-sidebar-column {
    width: 300px;
    flex-shrink: 0;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
}

.ad-placeholder {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    height: 600px;
    /* Tall vertical banner */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 1024px) {
    .home-content-container {
        flex-direction: column;
    }

    .home-sidebar-column {
        width: 100%;
        margin-top: 30px;
    }

    .ad-placeholder {
        height: 250px;
        /* Shorter on mobile */
    }
}

/* =========================================
   Widget Styles
   ========================================= */

.widget {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    letter-spacing: -0.01em;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color, #3b82f6);
    border-radius: 2px;
}

/* Ad Widget Specific Styling - Minimalist & Gentle */
/* Ad Widget Specific Styling - Minimalist & Gentle */
.widget_onme_ad_widget,
.widget_onme_category_ad_widget {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 20px;
}

.widget_onme_ad_widget .widget-title,
.widget_onme_category_ad_widget .widget-title {
    font-family: 'Inter', sans-serif;
    /* Ensure modern font */
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9ca3af;
    /* Subtle gray */
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.widget_onme_ad_widget .widget-title::after,
.widget_onme_ad_widget .widget-title::before,
.widget_onme_category_ad_widget .widget-title::after,
.widget_onme_category_ad_widget .widget-title::before {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    position: static;
    /* Reset absolute positioning from generic widget */
}

.ad-widget-content {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: center;
}



.ad-widget-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Responsive Utilities for Ads */
.onme-desktop-only,
.onme-mobile-only {
    width: 100%;
    text-align: center;
}

.onme-desktop-only img,
.onme-mobile-only img {
    margin: 0 auto;
}

@media (max-width: 767px) {
    .onme-desktop-only {
        display: none !important;
    }

    .widget_onme_ad_widget,
    .widget_onme_category_ad_widget {
        margin-bottom: 10px;
    }
}

@media (min-width: 768px) {
    .onme-mobile-only {
        display: none !important;
    }
}

/* =========================================
   Table of Contents (TOC) Styling
   ========================================= */
.table-of-contents {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    display: inline-block;
    /* Make it fit content width if possible, or keep block but compact */
    width: 100%;
}

.table-of-contents:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-color: rgba(255, 255, 255, 0.8);
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
    /* Remove line */
}

.toc-title {
    font-size: 16px;
    /* Smaller title */
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.toc-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6B7280;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toc-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.toc-toggle-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.table-of-contents.collapsed .toc-toggle-icon {
    transform: rotate(-90deg);
}

.toc-content-wrapper {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-of-contents.collapsed .toc-content-wrapper {
    grid-template-rows: 0fr;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    min-height: 0;
    /* Required for grid transition */
}

.toc-item {
    margin: 0;
    padding: 2px 0;
    /* Reduced padding */
}

.toc-item a {
    display: block;
    color: #4B5563;
    text-decoration: none;
    font-size: 14px;
    /* Smaller font */
    line-height: 1.4;
    padding: 4px 8px;
    /* Compact padding */
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.toc-item a:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(2px);
}

/* Indentation for nested levels */
.toc-level-2>a {
    font-weight: 600;
    color: #374151;
}

.toc-level-3 {
    margin-left: 12px;
}

.toc-level-3>a {
    font-size: 13px;
    color: #6B7280;
}

.toc-level-4 {
    margin-left: 24px;
}

.toc-level-4>a {
    font-size: 13px;
    color: #9CA3AF;
}

/* Numbering */
.toc-list ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Collapsed State Overrides for Compactness */
.table-of-contents.collapsed {
    padding: 8px 16px;
}

.table-of-contents.collapsed .toc-header {
    margin-bottom: 0;
}

/* =========================================
   Post Tags Styling
   ========================================= */
.post-tags-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    /* Space for scrollbar if visible/needed */
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.post-tags-container::-webkit-scrollbar {
    display: none;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 44px;
    /* Slightly smaller than load more (50px) for tags */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
}

.tag-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--primary-color);
    /* Optional: highlight text color on hover */
}

/* Mobile adjustments for Single Post Thumbnail */
@media (max-width: 767px) {
    .post-single-thumbnail {
        height: 300px;
        /* Ensure 300px height on mobile */
    }

    .post-single-card .post-single-thumbnail img {
        object-position: center;
        /* Ensure centering on mobile */
    }
}

/* =========================================
   Responsive Video Embeds (YouTube)
   ========================================= */
.post-content iframe,
.post-content object,
.post-content embed {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* =========================================
   Author Profile Styling
   ========================================= */
.author-profile-header {
    margin-bottom: 48px;
}

.author-profile-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow);
}

.author-avatar-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.author-bio {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 800px;
}

.author-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.stat-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.author-website {
    text-decoration: none;
    transition: all 0.2s ease;
}

.author-website:hover {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Mobile Responsiveness for Author Profile */
@media (max-width: 767px) {
    .author-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .author-avatar-wrapper {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .author-title {
        font-size: 24px;
    }

    .author-bio {
        font-size: 15px;
    }

    .author-stats {
        justify-content: center;
        gap: 12px;
    }
}

/* 1. Standard WordPress Embeds (Gutenberg) */
.wp-block-embed-youtube .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 24px;
}

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

/* =========================================
   Archive Profile Styling (Matching Author)
   ========================================= */
.archive-profile-header {
    margin-bottom: 48px;
}

.archive-profile-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: var(--shadow);
}

.archive-info {
    flex: 1;
}

.archive-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.archive-description {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 800px;
}

.archive-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Mobile Responsiveness for Archive Profile */
@media (max-width: 767px) {
    .archive-profile-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .archive-title {
        font-size: 24px;
    }

    .archive-description {
        font-size: 15px;
    }

    .archive-stats {
        margin-bottom: 24px;
        display: block;
    }
}

/* =========================================
   Back to Top Button
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-dark);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #fff;
    color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
}

/* =========================================
   Footer Social Icons
   ========================================= */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.social-facebook:hover {
    background: #1877F2;
    color: #fff;
    border-color: #1877F2;
}

.social-twitter:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.social-instagram:hover {
    background: #E1306C;
    color: #fff;
    border-color: #E1306C;
}

.social-threads:hover {
    background: #000000;
    color: #fff;
    border-color: #000000;
}

.social-youtube:hover {
    background: #FF0000;
    color: #fff;
    border-color: #FF0000;
}

.social-tiktok:hover {
    background: #000000;
    color: #fff;
    border-color: #000000;
}

.social-linkedin:hover {
    background: #0077b5;
    color: #fff;
    border-color: #0077b5;
}

.social-pinterest:hover {
    background: #bd081c;
    color: #fff;
    border-color: #bd081c;
}

.social-mastodon:hover {
    background: #6364ff;
    color: #fff;
    border-color: #6364ff;
}

.social-bluesky:hover {
    background: #0560ff;
    color: #fff;
    border-color: #0560ff;
}

.social-telegram:hover {
    background: #0088cc;
    color: #fff;
    border-color: #0088cc;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* =========================================
   404 Page Styling - Modern & Animated
   ========================================= */
.error-404-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    text-align: center;
}

.error-404-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 32px;
    padding: 60px 40px;
    max-width: 600px;
    width: 100%;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Decorative background blobs */
.error-404-card::before,
.error-404-card::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
    filter: blur(60px);
}

.error-404-card::before {
    background: var(--primary-color);
    top: -50px;
    left: -50px;
    animation: blobFloat 8s infinite alternate;
}

.error-404-card::after {
    background: var(--secondary-color);
    bottom: -50px;
    right: -50px;
    animation: blobFloat 8s infinite alternate-reverse;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 20px) scale(1.1);
    }
}

.error-code-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.error-code {
    font-size: 140px;
    font-weight: 800;
    line-height: 1;
    /* Glass Text Effect */
    color: rgba(255, 255, 255, 0.1);
    -webkit-text-stroke: 2px rgba(0, 0, 0, 0.1);
    text-shadow:
        0 0 30px rgba(0, 0, 0, 0.05),
        2px 2px 0px rgba(255, 255, 255, 0.5);
    display: inline-block;
    animation: floatText 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
    letter-spacing: -5px;
}

/* Shadow for 404 text */
.error-code-shadow {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    filter: blur(10px);
    animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes floatText {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes shadowPulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.05;
    }

    50% {
        transform: translateX(-50%) scale(0.8);
        opacity: 0.02;
    }
}

.error-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #4B5563;
    letter-spacing: 0.5px;
}

.error-description {
    font-size: 15px;
    color: #9CA3AF;
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 36px;
    /* Glass Button */
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #4B5563;
    border-radius: 50px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.btn-home:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    color: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .error-code {
        font-size: 80px;
    }

    .error-404-card {
        padding: 40px 24px;
    }

    /* Footer Disclaimer List Styling */
    .footer-disclaimer ul,
    .footer-disclaimer ol {
        margin: 1em 0;
        padding-left: 1.5em;
        list-style-position: inside;
        text-align: left;
        /* Ensure lists are left aligned even if footer is centered */
    }

    .footer-disclaimer ul {
        list-style-type: disc;
    }

    .footer-disclaimer ol {
        list-style-type: decimal;
    }

    .footer-disclaimer li {
        margin-bottom: 0.5em;
    }
}

/* Modern Glass Blockquote */
blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 2rem 2.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-style: italic;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

blockquote:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 120px;
    line-height: 1;
    color: var(--primary-color);
    opacity: 0.08;
    font-family: "Times New Roman", serif;
    pointer-events: none;
}

blockquote p {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

blockquote cite::before {
    content: '— ';
    color: var(--primary-color);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    blockquote {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }

    blockquote cite {
        color: #94a3b8;
    }

    blockquote::before {
        color: #60a5fa;
        opacity: 0.1;
    }
}

/* PREMIUM GLASS BAR BLOCKQUOTE */
blockquote {
    position: relative;
    margin: 3rem 0 !important;
    padding: 2rem 2.5rem 2rem 3.5rem !important;
    /* Extra left padding for the bar */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-left: none !important;
    /* Remove solid border */
    border-radius: 16px !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    font-size: 1.15rem !important;
    line-height: 1.8 !important;
    color: var(--text-dark) !important;
    font-style: italic !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
    overflow: visible !important;
    /* Allow bar to glow outside if needed */
}

blockquote:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08) !important;
}

/* The Glass Bar */
blockquote::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    bottom: 12px !important;
    width: 6px !important;
    background: rgba(59, 130, 246, 0.6) !important;
    /* Primary color glass */
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border-radius: 10px !important;
    box-shadow:
        0 0 15px rgba(59, 130, 246, 0.4),
        inset 0 0 4px rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    z-index: 2 !important;
}

blockquote p {
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

blockquote cite {
    display: block !important;
    margin-top: 1.2rem !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    font-weight: 700 !important;
    color: var(--text-light) !important;
    opacity: 0.8 !important;
}

blockquote cite::before {
    content: '— ' !important;
    color: var(--primary-color) !important;
    margin-right: 6px !important;
}

/* Dark Mode Override */
@media (prefers-color-scheme: dark) {
    blockquote {
        background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(30, 41, 59, 0.3)) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: #e2e8f0 !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    }

    blockquote::before {
        background: rgba(96, 165, 250, 0.7) !important;
        /* Lighter blue for dark mode */
        box-shadow: 0 0 20px rgba(96, 165, 250, 0.5) !important;
    }

    blockquote cite {
        color: #cbd5e1 !important;
    }
}

/* 3D LIQUID METAL QUOTE - FINAL FIX */
blockquote {
    position: relative;
    margin: 3rem 0 !important;
    padding: 2.5rem 3rem 2.5rem 4.5rem !important;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-left: none !important;
    border-radius: 16px !important;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 0 20px rgba(255, 255, 255, 0.5) !important;
    font-size: 1.2rem !important;
    line-height: 1.7 !important;
    color: var(--text-dark) !important;
    font-style: italic !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    overflow: visible !important;
}

blockquote:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

/* The 3D Liquid Metal Bar (Using ::after) */
blockquote::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 10px !important;
    bottom: 10px !important;
    width: 8px !important;
    background: linear-gradient(180deg,
            var(--primary-color),
            #60a5fa,
            #ffffff,
            var(--primary-color),
            #1e40af) !important;
    background-size: 100% 200% !important;
    border-radius: 4px !important;
    box-shadow:
        2px 0 10px rgba(59, 130, 246, 0.4),
        inset 1px 1px 2px rgba(255, 255, 255, 0.8),
        inset -1px -1px 2px rgba(0, 0, 0, 0.2) !important;
    animation: liquidFlow 6s ease-in-out infinite alternate !important;
    z-index: 2 !important;
    /* Reset any potential text properties */
    font-size: 0 !important;
    line-height: 0 !important;
}

@keyframes liquidFlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 100%;
    }
}

/* Quote Icon (Using ::before) - STRICT RESET */
blockquote::before {
    content: '\201C' !important;
    position: absolute !important;
    top: -10px !important;
    left: 25px !important;
    font-family: Georgia, serif !important;
    font-size: 120px !important;
    line-height: 1 !important;
    color: var(--primary-color) !important;
    opacity: 0.1 !important;
    pointer-events: none !important;
    z-index: 0 !important;

    /* CRITICAL: Reset all "Bar" properties from previous versions */
    background: none !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    bottom: auto !important;
}

blockquote p {
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

blockquote cite {
    display: block !important;
    margin-top: 1.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding-left: 0 !important;
    opacity: 0.9 !important;
    position: relative !important;
    z-index: 1 !important;
}

blockquote cite::before {
    display: none !important;
}

/* Dark Mode Override */
@media (prefers-color-scheme: dark) {
    blockquote {
        background: rgba(30, 41, 59, 0.7) !important;
        border-color: rgba(255, 255, 255, 0.05) !important;
        color: #f1f5f9 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    blockquote::after {
        box-shadow:
            2px 0 15px rgba(96, 165, 250, 0.3),
            inset 1px 1px 2px rgba(255, 255, 255, 0.5),
            inset -1px -1px 2px rgba(0, 0, 0, 0.5) !important;
    }

    blockquote::before {
        color: #60a5fa !important;
        opacity: 0.1 !important;
    }

    blockquote cite {
        color: #e2e8f0 !important;
    }
}

/* LIQUID GLASS QUOTE (Overrides previous) */
blockquote {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-left: none !important;
    border-radius: 16px !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
    padding: 2.5rem 3rem 2.5rem 4.5rem !important;
    margin: 3rem 0 !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
    overflow: visible !important;
}



/* The Liquid Glass Bar */
blockquote::after {
    content: '' !important;
    position: absolute !important;
    left: -2px !important;
    top: 10px !important;
    bottom: 10px !important;
    width: 8px !important;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.1),
            var(--primary-color),
            #ffffff,
            var(--primary-color),
            rgba(255, 255, 255, 0.1)) !important;
    background-size: 100% 200% !important;
    border-radius: 10px !important;
    box-shadow:
        0 0 15px rgba(59, 130, 246, 0.4),
        inset 1px 1px 2px rgba(255, 255, 255, 0.9),
        inset -1px -1px 2px rgba(0, 0, 0, 0.1),
        inset 0 0 6px rgba(59, 130, 246, 0.6) !important;
    animation: liquidGlassFlow 5s ease-in-out infinite alternate !important;
    z-index: 2 !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

@keyframes liquidGlassFlow {
    0% {
        background-position: 0% 0%;
        filter: hue-rotate(0deg);
    }

    100% {
        background-position: 0% 100%;
        filter: hue-rotate(10deg);
    }
}

/* Quote Icon - Subtle Glass Watermark */
blockquote::before {
    content: '\201C' !important;
    position: absolute !important;
    top: -15px !important;
    left: 25px !important;
    font-family: Georgia, serif !important;
    font-size: 130px !important;
    line-height: 1 !important;
    background: linear-gradient(135deg, var(--primary-color), transparent) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    opacity: 0.15 !important;
    pointer-events: none !important;
    z-index: 0 !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    bottom: auto !important;
}

blockquote cite {
    margin-top: 1.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    padding-left: 0 !important;
    opacity: 0.8 !important;
    position: relative !important;
    z-index: 1 !important;
}

blockquote cite::before {
    display: none !important;
}

/* Dark Mode Override */
@media (prefers-color-scheme: dark) {
    blockquote {
        background: rgba(30, 41, 59, 0.6) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: #f1f5f9 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    }

    blockquote::after {
        box-shadow:
            0 0 20px rgba(96, 165, 250, 0.4),
            inset 1px 1px 2px rgba(255, 255, 255, 0.6),
            inset -1px -1px 2px rgba(0, 0, 0, 0.5),
            inset 0 0 8px rgba(96, 165, 250, 0.5) !important;
    }

    blockquote::before {
        background: linear-gradient(135deg, #60a5fa, transparent) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        opacity: 0.1 !important;
    }

    blockquote cite {
        color: #e2e8f0 !important;
    }
}

/* PADDING ADJUSTMENT (Overrides previous) */
blockquote {
    padding: 1.5rem 2rem 1.5rem 3rem !important;
    /* Reduced Desktop Padding */
    margin: 2.5rem 0 !important;
}

@media (max-width: 768px) {
    blockquote {
        padding: 1.25rem 1.5rem 1.25rem 2.5rem !important;
        /* Reduced Mobile Padding */
        margin: 2rem 0 !important;
    }
}