/*
Theme Name: Developer Portal
Theme URI: https://developer-portal.com
Author: Developer Portal Team
Author URI: https://developer-portal.com
Description: Un tema moderno y minimalista para WordPress optimizado para scripts, tutoriales y contenido tech. Incluye espacios optimizados para ads de Adsterra y Google AdSense. Soporte para Dark/Light mode.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: developer-portal
Tags: blog, portfolio, grid-layout, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout
*/

/* ============================================
   CSS VARIABLES & THEMES
============================================ */
:root {
    /* Light Theme Colors - Modern & Minimalist */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-rgb: 99, 102, 241;
    
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Light Mode Neutrals */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows - Soft & Modern */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-card: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
    --shadow-card-hover: 0 10px 40px -10px rgb(0 0 0 / 0.15);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Container */
    --container-max: 1280px;
    --container-narrow: 768px;
    
    /* Header Height */
    --header-height: 64px;
}

/* Dark Theme - Modern & Minimalist */
[data-theme="dark"] {
    /* Backgrounds - Deep Dark */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --bg-card: #141416;
    --bg-hover: #1f1f23;
    
    /* Text - Soft White */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-inverse: #0a0a0b;
    
    /* Borders - Subtle */
    --border-color: #27272a;
    --border-light: #1f1f23;
    
    /* Shadows - Deeper */
    --shadow-card: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-card-hover: 0 20px 50px -15px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 10px 30px -5px rgb(0 0 0 / 0.5);
    
    /* Primary stays vibrant */
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Focus Styles for Accessibility */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   LAYOUT
============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

.container-narrow {
    max-width: var(--container-narrow);
}

.main-content {
    display: block;
}

.main-content.with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
    .main-content.with-sidebar {
        grid-template-columns: 1fr 300px;
        gap: var(--spacing-2xl);
    }
}

/* Posts Area */
.posts-area {
    min-width: 0;
}

/* ============================================
   HEADER & NAVIGATION
============================================ */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--spacing-lg);
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: color var(--transition-fast);
}

.site-logo:hover {
    color: var(--primary-color);
}

.site-logo svg,
.site-logo img {
    width: 32px;
    height: 32px;
}

/* Main Navigation */
.main-navigation {
    display: none;
    flex: 1;
    justify-content: center;
}

@media (min-width: 768px) {
    .main-navigation {
        display: flex;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-parent > a {
    color: var(--primary-color);
    background: var(--bg-hover);
}

/* Dropdown Arrow */
.nav-menu > li.menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform var(--transition-fast);
}

.nav-menu > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding: var(--spacing-sm);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    z-index: 1000;
    list-style: none;
    margin: 0;
}

/* Dark mode dropdown fix */
[data-theme="dark"] .nav-menu .sub-menu {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu .sub-menu li a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-menu .sub-menu li a:hover {
    color: var(--primary-color);
    background-color: var(--bg-hover);
}

[data-theme="dark"] .nav-menu .sub-menu li a:hover {
    background-color: #334155;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.header-btn:hover {
    color: var(--primary-color);
    background: var(--bg-hover);
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0);
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.mobile-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.mobile-navigation.active {
    display: block;
}

@media (min-width: 768px) {
    .mobile-navigation {
        display: none !important;
    }
}

.mobile-nav-menu > li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-menu > li:last-child {
    border-bottom: none;
}

.mobile-nav-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    color: var(--text-primary);
    font-weight: 500;
}

.mobile-nav-menu .sub-menu {
    padding-left: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
}

.mobile-nav-menu .sub-menu li a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: var(--spacing-3xl) 0;
    text-align: center;
    color: var(--text-inverse);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--bg-primary);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--primary-dark);
}

/* ============================================
   SEARCH SECTION
============================================ */
.search-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: var(--spacing-sm);
}

.search-input {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-button {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.search-button:hover {
    background: var(--primary-dark);
}

/* ============================================
   POSTS GRID - FIXED CARD SIZES
============================================ */
.posts-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

/* Posts Grid - Responsive */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 640px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

/* With sidebar - max 3 columns */
.main-content.with-sidebar .posts-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .main-content.with-sidebar .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .main-content.with-sidebar .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Post Card - Compact Design */
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    width: 100%;
    min-width: 0;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

/* Card Image - Aspect Ratio Based */
.post-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    display: block;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-muted);
}

.post-card-placeholder svg {
    width: 32px;
    height: 32px;
}

.post-card-category {
    position: absolute;
    top: var(--spacing-xs);
    left: var(--spacing-xs);
    padding: 3px 8px;
    background: var(--primary-color);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Card Content */
.post-card-content {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) var(--spacing-md);
    flex: 1;
}

@media (min-width: 768px) {
    .post-card-content {
        padding: var(--spacing-md) var(--spacing-lg);
    }
}

.post-card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .post-card-title {
        font-size: 0.9375rem;
    }
}

.post-card-title a {
    color: inherit;
    transition: color var(--transition-fast);
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.post-card-excerpt {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: var(--spacing-xs);
}

@media (max-width: 767px) {
    .post-card-excerpt {
        display: none;
    }
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--spacing-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .dots {
    background: transparent;
    border: none;
    color: var(--text-muted);
    min-width: auto;
    padding: 0 var(--spacing-xs);
}

.pagination .prev,
.pagination .next {
    padding: 0;
}

.pagination svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   SIDEBAR - Fully Customizable
============================================ */
.sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .sidebar {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
        width: 300px;
        flex-shrink: 0;
    }
}

.widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Widget Placeholder */
.widget-placeholder-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Search Widget - Fixed */
.widget_search .search-form,
.widget .search-form {
    display: flex;
    gap: var(--spacing-xs);
    width: 100%;
}

.widget_search .search-field,
.widget .search-input {
    flex: 1;
    min-width: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.widget_search .search-field:focus,
.widget .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.widget_search .search-submit,
.widget .search-button {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.widget_search .search-submit:hover,
.widget .search-button:hover {
    background: var(--primary-dark);
}

/* Categories Widget */
.widget_categories ul,
.widget-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories ul li,
.widget-categories ul li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.widget_categories ul li:last-child,
.widget-categories ul li:last-child {
    border-bottom: none;
}

.widget_categories ul li a,
.widget-categories ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.widget_categories ul li a:hover,
.widget-categories ul li a:hover {
    color: var(--primary-color);
}

.widget-categories .count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Recent Posts Widget */
.widget_recent_entries ul,
.widget-recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_recent_entries ul li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.widget_recent_entries ul li:last-child {
    border-bottom: none;
}

.widget_recent_entries ul li a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.widget_recent_entries ul li a:hover {
    color: var(--primary-color);
}

.widget-recent-posts .recent-post {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.widget-recent-posts .recent-post:last-child {
    border-bottom: none;
}

.widget-recent-posts .recent-post-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.widget-recent-posts .recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-recent-posts .recent-post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.widget-recent-posts .recent-post-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-recent-posts .recent-post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* ============================================
   AD SPACES
============================================ */
.ad-space {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    overflow: hidden;
}

.ad-header {
    min-height: 90px;
    margin: var(--spacing-md) auto;
    max-width: 728px;
}

.ad-below-hero {
    min-height: 250px;
    margin: var(--spacing-xl) auto;
    max-width: 970px;
}

.ad-in-feed {
    min-height: 250px;
    grid-column: 1 / -1;
}

.ad-sidebar {
    min-height: 250px;
}

.ad-sidebar-sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--spacing-lg));
    min-height: 600px;
}

.ad-content-top,
.ad-content-bottom {
    min-height: 250px;
    margin: var(--spacing-xl) 0;
}

.ad-below-script-locker {
    display: block;
    width: 100%;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    clear: both;
    overflow: hidden;
}

.ad-below-script-locker .ad-widget {
    display: block;
    width: 100%;
    min-height: 90px;
    text-align: center;
}

.ad-footer {
    min-height: 90px;
    margin: var(--spacing-xl) auto;
    max-width: 728px;
}

.ad-mobile-anchor {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 50px;
    z-index: 999;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

@media (max-width: 767px) {
    .ad-mobile-anchor {
        display: flex;
    }
    
    body {
        padding-bottom: 60px;
    }
}

/* ============================================
   SINGLE POST - MODERN MINIMALIST STYLE
============================================ */
.single-post-wrapper {
    padding: var(--spacing-2xl) 0;
}

/* Script Post Header - Clean & Modern */
.script-post-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.script-post-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.script-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.script-post-meta .post-date,
.script-post-meta .post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.script-post-meta .post-date time {
    color: var(--text-secondary);
    font-weight: 500;
}

.script-post-meta .post-author a {
    color: var(--primary-color);
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

.script-post-meta .post-author a:hover {
    opacity: 0.8;
}

/* Category Badge */
.script-post-meta .post-category {
    display: inline-flex;
    align-items: center;
}

.script-post-meta .post-category a {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

.script-post-meta .post-category a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Featured Image - Elegant */
.script-featured-image {
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .script-featured-image {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.script-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-normal);
}

.script-featured-image:hover img {
    transform: scale(1.02);
}

/* Post Description - Subtle */
.script-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary-color);
}

/* Post Content - Typography Focus */
.script-post-content {
    color: var(--text-primary);
    line-height: 1.85;
    font-size: 1.0625rem;
}

.script-post-content h2,
.script-post-content h3,
.script-post-content h4 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.script-post-content h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-light);
}

.script-post-content h3 {
    font-size: 1.25rem;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

.script-post-content h4 {
    font-size: 1.125rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.script-post-content p {
    margin-bottom: var(--spacing-md);
}

.script-post-content ul,
.script-post-content ol {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-lg);
}

.script-post-content ul { list-style: none; }
.script-post-content ol { list-style: decimal; }

.script-post-content ul li {
    position: relative;
    padding-left: var(--spacing-md);
}

.script-post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.script-post-content li {
    margin-bottom: var(--spacing-sm);
}

.script-post-content strong {
    font-weight: 700;
    color: var(--text-primary);
}

/* Code blocks - Modern Dark */
.script-post-content pre {
    background: #18181b;
    color: #e4e4e7;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--spacing-xl) 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    border: 1px solid #27272a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .script-post-content pre {
    background: #0c0c0d;
    border-color: #27272a;
}

.script-post-content code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    font-weight: 500;
}

.script-post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-weight: 400;
}

/* Blockquotes - Elegant */
.script-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.script-post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Images in content */
.script-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: var(--spacing-lg) 0;
}

/* Video embeds */
.script-post-content iframe,
.script-post-content .wp-block-embed {
    max-width: 100%;
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.script-post-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.script-post-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Post Footer - Categories & Tags - Modern */
.script-post-footer {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.script-categories,
.script-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.script-categories svg,
.script-tags svg {
    color: var(--text-muted);
    margin-right: var(--spacing-xs);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.script-categories a,
.script-tags a {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-light);
}

.script-categories a:hover,
.script-tags a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Post Navigation - Clean Modern */
.script-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-light);
}

.script-post-nav a {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-light);
}

.script-post-nav a:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .script-post-nav a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.script-post-nav .nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.script-post-nav .nav-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.script-post-nav .nav-prev {
    text-align: left;
}

.script-post-nav .nav-next {
    text-align: right;
}

.script-post-nav .nav-next .nav-label {
    justify-content: flex-end;
}

.script-post-nav svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Related Posts Section - Modern Grid */
.related-posts-section {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
    margin-top: var(--spacing-2xl);
    border-radius: var(--radius-xl);
}

.related-posts-section .section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-lg);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-lg);
}

@media (min-width: 480px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-light);
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .related-post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.related-post-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.related-post-link:hover .related-post-title {
    color: var(--primary-color);
}

.related-post-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.related-post-link:hover .related-post-image img {
    transform: scale(1.08);
}

.related-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-muted);
}

.related-post-content {
    padding: var(--spacing-sm);
}

.related-post-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

/* Legacy single post styles - keep for compatibility */
.single-post-header {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.single-post-category {
    display: inline-block;
    padding: 4px var(--spacing-md);
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.single-post-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.single-post-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.single-post-meta svg {
    width: 16px;
    height: 16px;
}

.single-post-featured-image {
    margin: var(--spacing-xl) 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.single-post-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

.single-post-content h2 { font-size: 1.5rem; }
.single-post-content h3 { font-size: 1.25rem; }

.single-post-content p {
    margin-bottom: var(--spacing-md);
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

.single-post-content ul { list-style: disc; }
.single-post-content ol { list-style: decimal; }

.single-post-content li {
    margin-bottom: var(--spacing-sm);
}

.single-post-content pre {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .single-post-content pre {
    background: #1a1a2e;
}

.single-post-content code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
}

.single-post-content pre code {
    background: none;
    padding: 0;
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.single-post-content img {
    border-radius: var(--radius-lg);
    margin: var(--spacing-lg) 0;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
}

.post-tags a {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.post-tags a:hover {
    background: var(--primary-color);
    color: white;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

@media (min-width: 640px) {
    .post-navigation {
        grid-template-columns: 1fr 1fr;
    }
}

.post-navigation a {
    display: block;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.post-navigation a:hover {
    border-color: var(--primary-color);
}

.post-navigation .nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: var(--spacing-xs);
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--text-primary);
}

/* Related Posts - FIXED HORIZONTAL LAYOUT */
.related-posts {
    margin-top: var(--spacing-2xl);
}

.related-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.related-posts .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

/* ============================================
   FOOTER
============================================ */
.site-footer {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    margin-top: var(--spacing-3xl);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.footer-description {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-legal {
    display: flex;
    gap: var(--spacing-md);
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   UTILITY CLASSES
============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }

/* ============================================
   404 PAGE
============================================ */
.error-404 {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-md);
}

.error-404-title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: var(--spacing-md);
}

.error-404-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.error-404-text {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* ============================================
   ARCHIVE PAGE
============================================ */
.archive-header {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.archive-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.archive-description {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   COMMENTS
============================================ */
.comments-section {
    margin-top: var(--spacing-2xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
}

.comment {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.comment-author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.comment-content {
    color: var(--text-secondary);
}

/* Comment Form */
.comment-form label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form button {
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.comment-form button:hover {
    background: var(--primary-dark);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   ADVERTISEMENT SPACES
============================================ */
.ad-widget {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

/* Ad Below Hero */
.ad-below-hero-container {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    display: flex;
    justify-content: center;
}

/* In-Feed Ad */
.ad-in-feed {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-lg) 0;
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* Sidebar Ads */
.sidebar-ad-top-wrapper {
    margin-bottom: var(--spacing-xl);
    display: flex;
    justify-content: center;
}

.sidebar-ad-sticky-wrapper {
    margin-top: var(--spacing-xl);
    position: sticky;
    bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
    z-index: 10;
}

/* Content Ads */
.ad-content-top,
.ad-content-bottom {
    display: flex;
    justify-content: center;
    margin: var(--spacing-xl) 0;
    width: 100%;
}

/* Google Auto Ads Helper */
.google-auto-placed {
    margin: var(--spacing-lg) auto !important;
    text-align: center !important;
    width: 100% !important;
}

/* Sticky Footer Ad */
.ad-mobile-anchor {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    padding: var(--spacing-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--border-color);
    min-height: 60px;
}

[data-theme="dark"] .ad-mobile-anchor {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

/* Add padding to body so content isn't hidden behind sticky ad */
body.has-sticky-ad {
    padding-bottom: 100px;
}

/* ============================================
   EXECUTORS PAGE
============================================ */
.executor-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    padding: var(--spacing-3xl) 0;
    text-align: center;
    color: white;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-xl);
    /* Remove margin that breaks container width */
    margin-top: var(--spacing-lg);
}

.executor-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.executor-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    color: white;
}

.executor-hero-description {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.executor-hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.executor-btn {
    background: white;
    color: #3b82f6;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-normal);
    min-width: 120px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.executor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    background: #f8fafc;
    color: #2563eb;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-size: 1rem;
}

.executor-credit {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* Add padding to body so content isn't hidden behind sticky ad */
body.has-sticky-ad {
    padding-bottom: 100px;
}

/* ============================================
   DARK MODE CONTRAST FIXES
============================================ */

/* Force text colors in Dark Mode */
[data-theme="dark"] body {
    color: var(--text-secondary);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .section-title,
[data-theme="dark"] .post-card-title,
[data-theme="dark"] .script-post-title,
[data-theme="dark"] .executor-hero-title {
    color: var(--text-primary);
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] .section-subtitle,
[data-theme="dark"] .post-card-excerpt,
[data-theme="dark"] .script-description {
    color: var(--text-secondary);
}

/* Fix Archive Header Contrast in Dark Mode */
[data-theme="dark"] .archive-header {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%) !important; /* Darker purple for contrast */
}

[data-theme="dark"] .archive-title,
[data-theme="dark"] .archive-description,
[data-theme="dark"] .archive-header p {
    color: #ffffff !important;
}

/* Fix Buttons in Dark Mode */
[data-theme="dark"] .executor-btn {
    background: #ffffff;
    color: #2563eb; /* Strong blue */
}

[data-theme="dark"] .hero-button {
    background: var(--bg-secondary);
    color: var(--primary-light);
    border: 1px solid var(--primary-color);
}

[data-theme="dark"] .search-button {
    background: var(--primary-color);
    color: #000000; /* Black text on light purple button for better contrast */
}

/* Ensure links are visible */
[data-theme="dark"] a {
    color: var(--primary-light);
}

[data-theme="dark"] a:hover {
    color: #ffffff;
}

/* Fix for potential hardcoded black text */
[data-theme="dark"] *[style*="color: #000"],
[data-theme="dark"] *[style*="color: black"],
[data-theme="dark"] *[style*="color:black"] {
    color: var(--text-primary) !important;
}

/* ============================================
   SCRIPT LOCKER SYSTEM - Minimalist Modern
============================================ */
.script-locker-container {
    position: relative;
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-lg);
    overflow: visible;
}

/* Code Block Wrapper */
.script-locker-code-wrapper {
    background: #0d1117;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #30363d;
    min-height: 100px;
}

/* When locked, the wrapper needs enough height for overlay */
.script-locker-container.locked .script-locker-code-wrapper {
    min-height: 420px;
}

/* Header Bar - Minimal */
.script-locker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.script-locker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8b949e;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.script-locker-label svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Copy Button - Clean */
.script-locker-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: transparent;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.script-locker-copy-btn svg {
    width: 12px;
    height: 12px;
}

.script-locker-copy-btn:hover:not(:disabled) {
    background: #21262d;
    color: #c9d1d9;
    border-color: #8b949e;
}

.script-locker-copy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.script-locker-copy-btn.copied {
    background: #238636;
    border-color: #238636;
    color: white;
}

/* Code Content */
.script-locker-code {
    padding: 16px;
    overflow-x: auto;
    transition: filter 0.3s ease;
    min-height: 60px;
}

.script-locker-code pre {
    margin: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.script-locker-code code {
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #c9d1d9;
    background: transparent !important;
    padding: 0 !important;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Luau/Lua Syntax Highlighting */
.script-locker-code .l-kwd {
    color: #ff79c6;
    font-weight: 500;
}

.script-locker-code .l-fnc {
    color: #8be9fd;
}

.script-locker-code .l-str {
    color: #f1fa8c;
}

.script-locker-code .l-num {
    color: #bd93f9;
}

.script-locker-code .l-cmt {
    color: #6272a4;
    font-style: italic;
}

.script-locker-code .l-blt {
    color: #50fa7b;
}

.script-locker-code .l-opr {
    color: #ff79c6;
}

.script-locker-code .l-prp {
    color: #66d9ef;
}

.script-locker-code .l-glb {
    color: #ffb86c;
}

/* Light Theme Luau Syntax Colors */
:root:not([data-theme="dark"]) .script-locker-code .l-kwd,
[data-theme="light"] .script-locker-code .l-kwd {
    color: #d63384;
}

:root:not([data-theme="dark"]) .script-locker-code .l-fnc,
[data-theme="light"] .script-locker-code .l-fnc {
    color: #0d6efd;
}

:root:not([data-theme="dark"]) .script-locker-code .l-str,
[data-theme="light"] .script-locker-code .l-str {
    color: #198754;
}

:root:not([data-theme="dark"]) .script-locker-code .l-num,
[data-theme="light"] .script-locker-code .l-num {
    color: #6f42c1;
}

:root:not([data-theme="dark"]) .script-locker-code .l-cmt,
[data-theme="light"] .script-locker-code .l-cmt {
    color: #6c757d;
}

:root:not([data-theme="dark"]) .script-locker-code .l-blt,
[data-theme="light"] .script-locker-code .l-blt {
    color: #20c997;
}

:root:not([data-theme="dark"]) .script-locker-code .l-glb,
[data-theme="light"] .script-locker-code .l-glb {
    color: #fd7e14;
}

:root:not([data-theme="dark"]) .script-locker-code .l-prp,
[data-theme="light"] .script-locker-code .l-prp {
    color: #0dcaf0;
}

/* Locked State - Blur */
.script-locker-container.locked .script-locker-code,
.script-locker-container.locked .executor-locker-content {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

/* Executor Locker Styles */
.executor-locker-wrapper {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.executor-locker-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 400px;
}

.executor-icon {
    color: #58a6ff;
    margin-bottom: 10px;
}

.executor-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c9d1d9;
    margin: 0;
}

.executor-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #238636;
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(240, 246, 252, 0.1);
    cursor: pointer;
    width: 100%;
    max-width: 280px;
}

.executor-download-btn:hover {
    background: #2ea043;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.executor-download-btn[disabled] {
    background: #21262d;
    color: #8b949e;
    border-color: #30363d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Light Theme Executor Locker */
:root:not([data-theme="dark"]) .executor-locker-wrapper,
[data-theme="light"] .executor-locker-wrapper {
    background: #f6f8fa;
    border-color: #d0d7de;
}

:root:not([data-theme="dark"]) .executor-title,
[data-theme="light"] .executor-title {
    color: #24292f;
}

:root:not([data-theme="dark"]) .executor-icon,
[data-theme="light"] .executor-icon {
    color: #0969da;
}

:root:not([data-theme="dark"]) .executor-download-btn[disabled],
[data-theme="light"] .executor-download-btn[disabled] {
    background: #f3f4f6;
    color: #8b949e;
    border-color: #d0d7de;
}

/* Unlocked Animation */
.script-locker-container.unlocked .script-locker-code,
.script-locker-container.unlocked .executor-locker-content {
    animation: unlockReveal 0.4s ease-out;
}
.script-locker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(4px);
    z-index: 10;
    padding: 24px;
    border-radius: var(--radius-lg);
}

.script-locker-container.unlocked .script-locker-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.script-locker-overlay-content {
    text-align: center;
    width: 100%;
    max-width: 340px;
    padding: 16px 0;
}

.locker-icon {
    margin-bottom: 16px;
    color: #58a6ff;
}

.locker-icon svg {
    width: 40px;
    height: 40px;
}

.locker-title {
    color: #c9d1d9;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Locker Steps - Compact */
.locker-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.locker-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #c9d1d9;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.locker-step:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.locker-step.completed {
    background: rgba(35, 134, 54, 0.15);
    border-color: rgba(35, 134, 54, 0.4);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #58a6ff;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.locker-step.completed .step-number {
    background: #238636;
}

.step-icon {
    display: flex;
    align-items: center;
    color: #ff6b6b;
    flex-shrink: 0;
}

.step-icon svg {
    width: 16px;
    height: 16px;
}

.step-text {
    flex: 1;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 500;
}

.step-check {
    display: flex;
    align-items: center;
    width: 18px;
    height: 18px;
    color: #238636;
    opacity: 0;
    transition: opacity 0.15s;
}

.step-check svg {
    width: 16px;
    height: 16px;
}

.locker-step.completed .step-check {
    opacity: 1;
}

/* Progress Bar */
.locker-progress {
    margin-top: 20px;
    text-align: center;
}

.locker-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.locker-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #58a6ff 0%, #238636 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.locker-progress-text {
    font-size: 0.75rem;
    color: #8b949e;
    font-weight: 500;
}

.locker-progress-text .progress-current {
    color: #58a6ff;
    font-weight: 700;
}

/* Light theme progress */
:root:not([data-theme="dark"]) .locker-progress-bar,
[data-theme="light"] .locker-progress-bar {
    background: rgba(0, 0, 0, 0.08);
}

:root:not([data-theme="dark"]) .locker-progress-fill,
[data-theme="light"] .locker-progress-fill {
    background: linear-gradient(90deg, #0969da 0%, #238636 100%);
}

:root:not([data-theme="dark"]) .locker-progress-text,
[data-theme="light"] .locker-progress-text {
    color: #57606a;
}

:root:not([data-theme="dark"]) .locker-progress-text .progress-current,
[data-theme="light"] .locker-progress-text .progress-current {
    color: #0969da;
}

/* ===== LIGHT THEME ===== */
:root:not([data-theme="dark"]) .script-locker-container.locked .script-locker-code-wrapper,
[data-theme="light"] .script-locker-container.locked .script-locker-code-wrapper {
    min-height: 420px;
}

:root:not([data-theme="dark"]) .script-locker-code-wrapper,
[data-theme="light"] .script-locker-code-wrapper {
    background: #f6f8fa;
    border-color: #d0d7de;
}

:root:not([data-theme="dark"]) .script-locker-header,
[data-theme="light"] .script-locker-header {
    background: #f6f8fa;
    border-color: #d0d7de;
}

:root:not([data-theme="dark"]) .script-locker-overlay,
[data-theme="light"] .script-locker-overlay {
    background: rgba(255, 255, 255, 0.97);
}

:root:not([data-theme="dark"]) .locker-title,
[data-theme="light"] .locker-title {
    color: #24292f;
}

:root:not([data-theme="dark"]) .script-locker-label,
[data-theme="light"] .script-locker-label {
    color: #57606a;
}

:root:not([data-theme="dark"]) .script-locker-copy-btn,
[data-theme="light"] .script-locker-copy-btn {
    color: #57606a;
    border-color: #d0d7de;
    background: #ffffff;
}

:root:not([data-theme="dark"]) .script-locker-copy-btn:hover:not(:disabled),
[data-theme="light"] .script-locker-copy-btn:hover:not(:disabled) {
    background: #f3f4f6;
    color: #24292f;
    border-color: #8b949e;
}

:root:not([data-theme="dark"]) .script-locker-code,
[data-theme="light"] .script-locker-code {
    background: #ffffff;
}

:root:not([data-theme="dark"]) .script-locker-code code,
[data-theme="light"] .script-locker-code code {
    color: #24292f;
}

:root:not([data-theme="dark"]) .script-locker-overlay,
[data-theme="light"] .script-locker-overlay {
    background: rgba(255, 255, 255, 0.95);
}

:root:not([data-theme="dark"]) .locker-icon,
[data-theme="light"] .locker-icon {
    color: #0969da;
}

:root:not([data-theme="dark"]) .locker-title,
[data-theme="light"] .locker-title {
    color: #24292f;
}

:root:not([data-theme="dark"]) .locker-step,
[data-theme="light"] .locker-step {
    background: #f6f8fa;
    border-color: #d0d7de;
    color: #24292f;
}

:root:not([data-theme="dark"]) .locker-step:hover,
[data-theme="light"] .locker-step:hover {
    background: #eaeef2;
    border-color: #8b949e;
    color: #24292f;
}

:root:not([data-theme="dark"]) .locker-step.completed,
[data-theme="light"] .locker-step.completed {
    background: rgba(35, 134, 54, 0.1);
    border-color: rgba(35, 134, 54, 0.4);
}

:root:not([data-theme="dark"]) .step-number,
[data-theme="light"] .step-number {
    background: #0969da;
}

:root:not([data-theme="dark"]) .locker-hint,
[data-theme="light"] .locker-hint {
    color: #6e7681;
}

/* Unlocked Animation */
.script-locker-container.unlocked .script-locker-code {
    animation: unlockReveal 0.4s ease-out;
}

@keyframes unlockReveal {
    from {
        filter: blur(6px);
        opacity: 0.5;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .script-locker-container.locked .script-locker-code-wrapper {
        min-height: 400px;
    }
    
    .script-locker-overlay {
        padding: 16px 12px;
    }
    
    .script-locker-overlay-content {
        max-width: 100%;
        padding: 8px 0;
    }
    
    .locker-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .locker-icon {
        margin-bottom: 10px;
    }
    
    .locker-title {
        font-size: 0.8125rem;
        margin-bottom: 12px;
    }
    
    .locker-steps {
        gap: 6px;
    }
    
    .locker-step {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .step-number {
        width: 18px;
        height: 18px;
        font-size: 0.625rem;
    }
    
    .step-text {
        font-size: 0.75rem;
    }
    
    .step-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .locker-progress {
        margin-top: 14px;
    }
    
    .locker-progress-text {
        font-size: 0.6875rem;
    }
    
    .script-locker-code {
        padding: 12px;
    }
    
    .script-locker-code code {
        font-size: 0.75rem;
    }
}


