:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99,102,241,.15);
    --accent: #a78bfa;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-surface: #16162a;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(99,102,241,.15);
    --border-hover: rgba(99,102,241,.35);
    --gradient-hero: linear-gradient(135deg, #0f0f1a 0%, #1e1b4b 50%, #0f0f1a 100%);
    --gradient-primary: linear-gradient(135deg, #6366f1, #a78bfa);
    --gradient-card: linear-gradient(145deg, #1a1a2e, #16162a);
    --shadow-card: 0 4px 24px rgba(0,0,0,.3);
    --shadow-glow: 0 0 30px rgba(99,102,241,.2);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --max-width: 1200px;
    --header-h: 72px;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-surface: #f1f5f9;
    --text: #1e293b;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --border: rgba(99,102,241,.12);
    --border-hover: rgba(99,102,241,.3);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 50%, #f8fafc 100%);
    --gradient-card: linear-gradient(145deg, #ffffff, #f8fafc);
    --shadow-card: 0 4px 24px rgba(0,0,0,.06);
    --shadow-glow: 0 0 30px rgba(99,102,241,.1);
}

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

html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; }

body {
    font-family: "Inter", -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration:none; transition: color var(--transition); }
a:hover { color: var(--accent); }

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

.container { max-width: var(--max-width); margin:0 auto; padding:0 24px; }

/* === HEADER === */
.site-header {
    position: fixed; top:0; left:0; right:0; z-index:1000;
    background: rgba(15,15,26,.85);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    transition: background var(--transition);
}
[data-theme="light"] .site-header { background: rgba(248,250,252,.85); }

.site-header .container {
    display:flex; align-items:center; justify-content:space-between; height:100%;
}

.site-brand {
    display:flex; align-items:center; gap:12px; font-weight:800; font-size:1.35rem;
    color: var(--text);
}
.site-brand svg { width:36px; height:36px; }
.site-brand .brand-dot { color: var(--primary); }
.site-brand .brand-sub {
    font-size:.7rem; font-weight:500; color:var(--text-muted);
    letter-spacing:.5px; text-transform:uppercase;
}

.header-nav { display:flex; align-items:center; gap:8px; }
.header-nav a {
    padding: 8px 16px; border-radius: var(--radius-sm);
    color: var(--text-muted); font-size:.9rem; font-weight:500;
    transition: all var(--transition);
}
.header-nav a:hover { color: var(--text); background: var(--primary-glow); }

.theme-toggle {
    width:40px; height:40px; border:1px solid var(--border); border-radius:50%;
    background:transparent; color:var(--text-muted); cursor:pointer; font-size:1.1rem;
    display:flex; align-items:center; justify-content:center; transition: all var(--transition);
    margin-left:8px;
}
.theme-toggle:hover { border-color:var(--primary); color:var(--primary); }

.mobile-toggle {
    display:none; background:none; border:none; color:var(--text); font-size:1.5rem; cursor:pointer;
}

/* === HERO === */
.hero {
    padding: calc(var(--header-h) + 80px) 0 80px;
    background: var(--gradient-hero);
    position:relative; overflow:hidden; text-align:center;
}
.hero::before {
    content:""; position:absolute; inset:0;
    background: radial-gradient(ellipse 600px 400px at 50% 30%, rgba(99,102,241,.12), transparent);
}
.hero-content { position:relative; z-index:1; max-width:780px; margin:0 auto; }
.hero-badge {
    display:inline-flex; align-items:center; gap:8px;
    padding: 6px 18px; border-radius:50px;
    background: var(--primary-glow); border:1px solid var(--border);
    color: var(--primary-light); font-size:.8rem; font-weight:600;
    letter-spacing:.5px; text-transform:uppercase; margin-bottom:28px;
}
.hero-badge .pulse {
    width:8px; height:8px; border-radius:50%; background:var(--primary);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.5)} }

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight:900; line-height:1.1; margin-bottom:20px;
    letter-spacing:-.03em;
}
.hero h1 .gradient-text {
    background: var(--gradient-primary); -webkit-background-clip:text;
    -webkit-text-fill-color:transparent; background-clip:text;
}
.hero p {
    font-size:1.15rem; color:var(--text-muted); max-width:560px;
    margin:0 auto 36px; line-height:1.8;
}
.hero-cta {
    display:inline-flex; align-items:center; gap:10px;
    padding: 14px 32px; border-radius:var(--radius-sm);
    background: var(--gradient-primary); color:#fff;
    font-weight:600; font-size:1rem;
    box-shadow: 0 4px 20px rgba(99,102,241,.35);
    transition: all var(--transition);
}
.hero-cta:hover { transform:translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,.45); color:#fff; }

.hero-stats {
    display:flex; justify-content:center; gap:48px; margin-top:56px;
    padding-top:40px; border-top:1px solid var(--border);
}
.hero-stat { text-align:center; }
.hero-stat .num {
    font-size:2rem; font-weight:800;
    background: var(--gradient-primary); -webkit-background-clip:text;
    -webkit-text-fill-color:transparent; background-clip:text;
}
.hero-stat .label { font-size:.8rem; color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px; margin-top:4px; }

/* === POSTS GRID === */
.posts-section { padding: 80px 0; }
.section-header { text-align:center; margin-bottom:56px; }
.section-header h2 {
    font-size:2rem; font-weight:800; letter-spacing:-.02em; margin-bottom:12px;
}
.section-header p { color:var(--text-muted); font-size:1.05rem; }

.posts-grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap:28px;
}

.post-card {
    background: var(--gradient-card);
    border:1px solid var(--border);
    border-radius: var(--radius);
    overflow:hidden;
    transition: all var(--transition);
    display:flex; flex-direction:column;
}
.post-card:hover {
    transform:translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.post-card-thumb {
    position:relative; overflow:hidden; aspect-ratio:16/10;
    background: var(--bg-surface);
}
.post-card-thumb img {
    width:100%; height:100%; object-fit:cover;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.post-card:hover .post-card-thumb img { transform:scale(1.05); }

.post-card-thumb .category-badge {
    position:absolute; top:14px; left:14px;
    padding: 4px 14px; border-radius:50px;
    background: rgba(99,102,241,.85); backdrop-filter:blur(8px);
    color:#fff; font-size:.72rem; font-weight:600;
    text-transform:uppercase; letter-spacing:.5px;
}

.post-card-body { padding:24px; flex:1; display:flex; flex-direction:column; }

.post-card-meta {
    display:flex; align-items:center; gap:16px;
    font-size:.78rem; color:var(--text-dim); margin-bottom:14px;
}
.post-card-meta span { display:flex; align-items:center; gap:5px; }

.post-card-body h3 {
    font-size:1.15rem; font-weight:700; line-height:1.4;
    margin-bottom:12px; letter-spacing:-.01em;
}
.post-card-body h3 a { color:var(--text); }
.post-card-body h3 a:hover { color:var(--primary-light); }

.post-card-excerpt {
    color:var(--text-muted); font-size:.9rem; line-height:1.7;
    flex:1; margin-bottom:18px;
}

.post-card-footer {
    display:flex; align-items:center; justify-content:space-between;
    padding-top:16px; border-top:1px solid var(--border);
}
.post-card-author {
    display:flex; align-items:center; gap:10px; font-size:.82rem;
}
.post-card-author img {
    width:30px; height:30px; border-radius:50%; border:2px solid var(--border);
}
.read-more-link {
    font-size:.82rem; font-weight:600; color:var(--primary-light);
    display:flex; align-items:center; gap:4px;
}
.read-more-link:hover { gap:8px; }

/* No-thumb placeholder */
.post-card-thumb-placeholder {
    aspect-ratio:16/10; background:var(--bg-surface);
    display:flex; align-items:center; justify-content:center;
    font-size:3rem; color:var(--primary); opacity:.3;
}

/* === SINGLE POST === */
.single-header {
    padding: calc(var(--header-h) + 60px) 0 40px;
    background: var(--gradient-hero); text-align:center;
}
.single-header .container { max-width:800px; }
.single-meta {
    display:flex; align-items:center; justify-content:center; gap:20px; flex-wrap:wrap;
    font-size:.85rem; color:var(--text-dim); margin-bottom:20px;
}
.single-meta span { display:flex; align-items:center; gap:6px; }
.single-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight:800; line-height:1.2; letter-spacing:-.02em;
    margin-bottom:16px;
}
.single-header .excerpt-text { color:var(--text-muted); font-size:1.1rem; max-width:600px; margin:0 auto; }

.single-featured {
    max-width:900px; margin:-30px auto 0; position:relative; z-index:2;
    border-radius:var(--radius); overflow:hidden;
    box-shadow: var(--shadow-card); border:1px solid var(--border);
}
.single-featured img { width:100%; display:block; }

.single-content {
    max-width:760px; margin:48px auto 80px; padding:0 24px;
}
.single-content h2 { font-size:1.6rem; font-weight:700; margin:48px 0 16px; letter-spacing:-.01em; }
.single-content h3 { font-size:1.3rem; font-weight:600; margin:36px 0 12px; }
.single-content p { margin-bottom:20px; font-size:1.05rem; line-height:1.85; color:var(--text-muted); }
.single-content ul, .single-content ol { margin:0 0 20px 24px; color:var(--text-muted); }
.single-content li { margin-bottom:8px; }
.single-content blockquote {
    margin:32px 0; padding:24px 28px;
    border-left:4px solid var(--primary);
    background:var(--primary-glow); border-radius:0 var(--radius-sm) var(--radius-sm) 0;
    font-style:italic; color:var(--text);
}
.single-content pre {
    background:var(--bg-card); border:1px solid var(--border);
    border-radius:var(--radius-sm); padding:20px 24px;
    overflow-x:auto; margin:24px 0;
    font-family:"JetBrains Mono",monospace; font-size:.88rem; line-height:1.7;
}
.single-content code {
    font-family:"JetBrains Mono",monospace;
    background:var(--primary-glow); padding:2px 8px;
    border-radius:4px; font-size:.88em; color:var(--primary-light);
}
.single-content pre code { background:none; padding:0; color:var(--text); }
.single-content img {
    border-radius:var(--radius-sm); margin:28px 0;
    box-shadow: var(--shadow-card);
}
.single-content a { color:var(--primary-light); text-decoration:underline; text-underline-offset:3px; }
.single-content a:hover { color:var(--accent); }

/* Post nav */
.post-navigation {
    max-width:760px; margin:0 auto 60px; padding:0 24px;
    display:grid; grid-template-columns:1fr 1fr; gap:20px;
}
.post-nav-link {
    padding:24px; background:var(--bg-card); border:1px solid var(--border);
    border-radius:var(--radius-sm); transition: all var(--transition);
}
.post-nav-link:hover { border-color:var(--border-hover); transform:translateY(-2px); }
.post-nav-label { font-size:.75rem; color:var(--text-dim); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }
.post-nav-title { font-size:.95rem; font-weight:600; color:var(--text); }
.post-nav-link.next { text-align:right; }

/* === SIDEBAR === */
.blog-layout { display:grid; grid-template-columns:1fr 320px; gap:48px; align-items:start; }
.widget {
    background:var(--bg-card); border:1px solid var(--border);
    border-radius:var(--radius); padding:24px; margin-bottom:24px;
}
.widget-title {
    font-size:.85rem; font-weight:700; text-transform:uppercase;
    letter-spacing:.5px; color:var(--text-dim); margin-bottom:18px;
    padding-bottom:12px; border-bottom:1px solid var(--border);
}

/* === CTA SECTION === */
.cta-section {
    padding:80px 0; text-align:center;
}
.cta-box {
    background: var(--gradient-card); border:1px solid var(--border);
    border-radius:var(--radius); padding:56px 40px;
    position:relative; overflow:hidden;
}
.cta-box::before {
    content:""; position:absolute; inset:0;
    background:radial-gradient(ellipse 500px 300px at 50% 50%, rgba(99,102,241,.08), transparent);
}
.cta-box h2 { font-size:1.8rem; font-weight:800; margin-bottom:14px; position:relative; }
.cta-box p { color:var(--text-muted); margin-bottom:28px; position:relative; max-width:500px; margin-left:auto; margin-right:auto; }
.cta-box .hero-cta { position:relative; }

/* === FOOTER === */
.site-footer {
    border-top:1px solid var(--border);
    padding:56px 0 28px; background:var(--bg-surface);
}
.footer-grid {
    display:grid; grid-template-columns:2fr 1fr 1fr 1fr;
    gap:40px; margin-bottom:40px;
}
.footer-brand { display:flex; flex-direction:column; gap:14px; }
.footer-brand p { color:var(--text-muted); font-size:.9rem; line-height:1.7; }
.footer-heading {
    font-size:.8rem; font-weight:700; text-transform:uppercase;
    letter-spacing:.5px; color:var(--text-dim); margin-bottom:16px;
}
.footer-links { list-style:none; }
.footer-links li { margin-bottom:10px; }
.footer-links a { color:var(--text-muted); font-size:.9rem; }
.footer-links a:hover { color:var(--primary-light); }

.footer-bottom {
    padding-top:28px; border-top:1px solid var(--border);
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
    font-size:.8rem; color:var(--text-dim);
}
.footer-social { display:flex; gap:12px; }
.footer-social a {
    width:36px; height:36px; border-radius:50%; border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center;
    color:var(--text-muted); font-size:.9rem; transition: all var(--transition);
}
.footer-social a:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-glow); }

/* === PAGINATION === */
.pagination {
    display:flex; align-items:center; justify-content:center; gap:8px;
    padding:48px 0;
}
.pagination a, .pagination span {
    min-width:42px; height:42px; display:flex; align-items:center; justify-content:center;
    border-radius:var(--radius-sm); border:1px solid var(--border);
    font-weight:500; font-size:.9rem; transition: all var(--transition);
}
.pagination a { color:var(--text-muted); background:var(--bg-card); }
.pagination a:hover { border-color:var(--primary); color:var(--primary); }
.pagination .current {
    background:var(--gradient-primary); color:#fff; border-color:transparent;
}

/* === SEARCH === */
.search-form {
    display:flex; gap:0; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden;
}
.search-form input[type="search"] {
    flex:1; padding:10px 16px; background:var(--bg-surface); border:none;
    color:var(--text); font-size:.9rem; outline:none;
}
.search-form button {
    padding:10px 18px; background:var(--gradient-primary); border:none;
    color:#fff; cursor:pointer; font-size:.9rem;
}

/* === COMMENTS === */
.comments-area { max-width:760px; margin:0 auto 60px; padding:0 24px; }
.comments-title { font-size:1.3rem; font-weight:700; margin-bottom:28px; }
.comment {
    padding:20px; background:var(--bg-card); border:1px solid var(--border);
    border-radius:var(--radius-sm); margin-bottom:16px;
}
.comment-meta { font-size:.82rem; color:var(--text-dim); margin-bottom:10px; }
.comment-content p { font-size:.95rem; color:var(--text-muted); }

/* === 404 === */
.error-404 {
    min-height:80vh; display:flex; align-items:center; justify-content:center;
    text-align:center;
}
.error-404 h1 {
    font-size:8rem; font-weight:900; line-height:1;
    background:var(--gradient-primary); -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.error-404 p { color:var(--text-muted); margin:16px 0 32px; font-size:1.1rem; }

/* === RESPONSIVE === */
@media (max-width:1024px) {
    .blog-layout { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
    .header-nav { display:none; }
    .mobile-toggle { display:block; }
    .header-nav.active {
        display:flex; flex-direction:column;
        position:absolute; top:var(--header-h); left:0; right:0;
        background:var(--bg-card); border-bottom:1px solid var(--border);
        padding:16px;
    }
    .hero h1 { font-size:2rem; }
    .hero-stats { flex-direction:column; gap:20px; }
    .posts-grid { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; }
    .post-navigation { grid-template-columns:1fr; }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from { opacity:0; transform:translateY(24px); }
    to { opacity:1; transform:translateY(0); }
}
.animate-in {
    animation: fadeInUp .6s cubic-bezier(.4,0,.2,1) forwards;
    opacity:0;
}
.post-card:nth-child(1) { animation-delay:.05s; }
.post-card:nth-child(2) { animation-delay:.1s; }
.post-card:nth-child(3) { animation-delay:.15s; }
.post-card:nth-child(4) { animation-delay:.2s; }
.post-card:nth-child(5) { animation-delay:.25s; }
.post-card:nth-child(6) { animation-delay:.3s; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width:8px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--primary-dark); border-radius:4px; }
::-webkit-scrollbar-thumb:hover { background:var(--primary); }

/* =================================================================
   DARK MODE DEEP FIX — WordPress overrides & missing elements
   ================================================================= */

/* --- WordPress Core Block Overrides --- */
body .wp-block-button__link,
body .wp-block-file__button {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    transition: all var(--transition) !important;
}
body .wp-block-button__link:hover,
body .wp-block-file__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,.4) !important;
}

/* WordPress preset color overrides */
body .has-very-light-gray-background-color,
body .has-white-background-color {
    background-color: var(--bg-card) !important;
}
body .has-very-dark-gray-background-color,
body .has-black-background-color {
    background-color: var(--bg-surface) !important;
}
body .has-cyan-bluish-gray-background-color {
    background-color: var(--bg-card) !important;
}
body .has-very-light-gray-color,
body .has-white-color,
body .has-cyan-bluish-gray-color {
    color: var(--text) !important;
}

/* WordPress preset gradient overrides */
body [class*="has-"][class*="-gradient-background"] {
    background: var(--gradient-card) !important;
}

/* --- Body & Global --- */
body, html {
    background-color: var(--bg);
    color: var(--text);
}

/* --- ALL form elements --- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="color"],
textarea,
select {
    background-color: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-family: inherit;
    font-size: .95rem;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
}
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg width=12 height=12 viewBox=0 0 12 12%3E%3Cpath fill=%2394a3b8 d=M6 8L1 3h10z/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Buttons */
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.button,
.btn {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
button:hover,
input[type="submit"]:hover,
.button:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99,102,241,.35);
}

/* --- Comments section --- */
.comments-area {
    max-width: 760px;
    margin: 0 auto 60px;
    padding: 0 24px;
}
.comment-respond {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-top: 32px;
}
.comment-reply-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}
.comment-form label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.comment-form .comment-form-comment,
.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url {
    margin-bottom: 18px;
}
.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}
.comment-form .form-submit {
    margin-top: 8px;
}
.comment-form .required {
    color: var(--primary-light);
}
.comment-notes,
.logged-in-as {
    font-size: .85rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.comment-list .comment {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}
.comment-list .children {
    list-style: none;
    padding-left: 24px;
    margin-top: 16px;
}
.comment-author {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.comment-author a { color: var(--primary-light); }
.comment-metadata {
    font-size: .78rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}
.comment-metadata a { color: var(--text-dim); }
.comment-content {
    color: var(--text-muted);
    line-height: 1.7;
}
.comment-content p { margin-bottom: 10px; }
.reply a {
    font-size: .8rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* --- Avatars --- */
.avatar,
img.avatar {
    border-radius: 50% !important;
    border: 2px solid var(--border) !important;
    background: var(--bg-surface);
}

/* --- Screen reader focus --- */
.screen-reader-text:focus {
    background-color: var(--bg-card) !important;
    color: var(--text) !important;
    border: 2px solid var(--primary) !important;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}
th, td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}
th {
    background: var(--bg-surface);
    color: var(--text);
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}
td {
    background: var(--bg-card);
    color: var(--text-muted);
}
tr:hover td {
    background: var(--bg-card-hover);
}

/* --- Horizontal rule --- */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* --- WordPress Gallery & Figures --- */
figure {
    margin: 24px 0;
}
figcaption,
.wp-caption-text {
    font-size: .82rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}
.wp-caption {
    background: transparent;
    border: none;
    max-width: 100%;
}
.gallery-item {
    background: transparent;
}

/* --- WordPress Embeds & iframes --- */
.wp-block-embed,
.wp-block-video,
.wp-block-audio {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin: 24px 0;
}
iframe {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* --- WordPress Separator --- */
.wp-block-separator {
    border-color: var(--border) !important;
    opacity: 1;
}
.wp-block-separator.has-background {
    background-color: var(--border) !important;
}

/* --- WordPress Quote --- */
.wp-block-quote,
.wp-block-pullquote {
    border-left: 4px solid var(--primary) !important;
    background: var(--primary-glow) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 24px 28px !important;
    margin: 32px 0 !important;
    color: var(--text) !important;
}
.wp-block-quote cite,
.wp-block-pullquote cite {
    color: var(--text-dim) !important;
    font-size: .85rem;
    font-style: normal;
}
.wp-block-pullquote {
    border-left: 4px solid var(--accent) !important;
}

/* --- WordPress Lists --- */
.wp-block-list {
    color: var(--text-muted);
    padding-left: 24px;
}

/* --- WordPress Code Block --- */
.wp-block-code {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text) !important;
}
.wp-block-code code {
    color: var(--text) !important;
    background: transparent !important;
}
.wp-block-preformatted {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    color: var(--text);
}

/* --- WordPress Table Block --- */
.wp-block-table table {
    border-color: var(--border);
}
.wp-block-table td,
.wp-block-table th {
    border-color: var(--border) !important;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: var(--bg-surface);
}

/* --- WordPress Group/Columns --- */
.wp-block-group,
.wp-block-columns {
    color: var(--text);
}

/* --- WordPress Navigation / Pages --- */
.wp-block-navigation a,
.wp-block-page-list a {
    color: var(--text-muted) !important;
}
.wp-block-navigation a:hover,
.wp-block-page-list a:hover {
    color: var(--primary-light) !important;
}

/* --- Calendar widget --- */
.wp-calendar-table {
    background: var(--bg-card);
}
.wp-calendar-table caption {
    color: var(--text);
    font-weight: 700;
    padding: 12px;
}
.wp-calendar-table th {
    background: var(--bg-surface);
}
.wp-calendar-table td {
    background: var(--bg-card);
}
.wp-calendar-table td a {
    color: var(--primary-light);
    font-weight: 700;
}
.wp-calendar-nav a {
    color: var(--primary-light);
}

/* --- Widget overrides --- */
.widget ul {
    list-style: none;
    padding: 0;
}
.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a {
    color: var(--text-muted);
    font-size: .9rem;
}
.widget ul li a:hover { color: var(--primary-light); }

/* --- Tag Cloud --- */
.tagcloud a,
.wp-block-tag-cloud a {
    background: var(--primary-glow) !important;
    color: var(--primary-light) !important;
    border: 1px solid var(--border) !important;
    border-radius: 50px !important;
    padding: 5px 14px !important;
    font-size: .82rem !important;
    display: inline-block;
    margin: 3px;
    transition: all var(--transition);
}
.tagcloud a:hover,
.wp-block-tag-cloud a:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* --- WordPress Admin Bar fix --- */
#wpadminbar {
    background: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border);
}

/* --- Selection --- */
::selection {
    background: var(--primary);
    color: #fff;
}

/* --- Focus outlines --- */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Sticky post indicator --- */
.sticky .post-card-body::before {
    content: "📌 Destacado";
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

/* --- Post password form --- */
.post-password-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    max-width: 480px;
    margin: 40px auto;
}
.post-password-form label {
    color: var(--text-muted);
    display: block;
    margin-bottom: 12px;
}
.post-password-form input[type="password"] {
    max-width: 280px;
    margin: 0 auto 16px;
}

/* --- WordPress Align classes --- */
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(-50vw + 50%); max-width: 100vw; }

/* --- Smooth theme transitions --- */
body, .site-header, .post-card, .widget, .comment, .cta-box,
input, textarea, select, button, .footer-social a, .theme-toggle,
.hero, .site-footer, a, .search-form input, .search-form button {
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition);
}

/* --- Print --- */
@media print {
    body { background: #fff; color: #000; }
    .site-header, .site-footer, .cta-section, .theme-toggle, .mobile-toggle { display: none; }
}
