/*
Theme Name: DrLite Modern
Theme URI: https://drlite.es
Author: Antigravity & Nestor Casola
Description: Tema de alto rendimiento, diseño tech moderno y ultra-optimizado para el catálogo y comunidad de DrLite.
Version: 1.3.0
Text Domain: drlite-modern
*/

/* --- Variables de Tema (Dark Mode por Defecto) --- */
:root, [data-theme="dark"] {
    color-scheme: dark;
    --bg-main: #0b0f19;
    --bg-card: #111827;
    --bg-card-hover: #1e293b;
    --bg-surface: #1e293b;
    --border: #334155;
    --border-light: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0284c7;
    --accent-indigo: #818cf8;
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --header-bg: rgba(11, 15, 25, 0.88);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
    --code-bg: #050811;
}

/* --- Variables de Tema (Light Mode) --- */
[data-theme="light"] {
    color-scheme: light;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-surface: #e2e8f0;
    --border: #cbd5e1;
    --border-light: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --accent-indigo: #6366f1;
    --success: #059669;
    --success-hover: #047857;
    --warning: #d97706;
    --danger: #dc2626;
    --header-bg: rgba(255, 255, 255, 0.92);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 14px 0 rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.12);
    --code-bg: #f1f5f9;
}

:root {
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max-w: 1200px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
}

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

a:hover {
    color: var(--accent-hover);
}

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.brand-badge {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #0b0f19;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.brand img {
    height: 38px;
    width: auto;
    border-radius: var(--radius-sm);
}

/* Nav Menu & Submenus */
.site-nav {
    display: flex;
    align-items: center;
}

.nav-links, .nav-links ul, .sub-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
}

.nav-links > li > a:hover,
.nav-links > li.current-menu-item > a {
    color: var(--text-main);
    background-color: var(--bg-card-hover);
}

/* Dropdown Sub-menu */
.menu-item-has-children > a::after {
    content: "▾";
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.sub-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.4rem 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1000;
}

.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 0.55rem 1.15rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sub-menu li a:hover {
    color: var(--text-main);
    background-color: var(--bg-card-hover);
    padding-left: 1.35rem;
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 1.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Modern Theme Switch */
.theme-switch {
    position: relative;
    width: 60px;
    height: 32px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.theme-switch:hover {
    border-color: var(--accent);
}

.switch-icon {
    font-size: 0.85rem;
    line-height: 1;
    z-index: 1;
    user-select: none;
}

.switch-handle {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .switch-handle {
    transform: translateX(26px);
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #0b0f19 !important;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--text-main);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff !important;
}

.btn-success:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

/* --- Badges / Pills --- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.pill-ram {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.pill-arch {
    background-color: rgba(129, 140, 248, 0.1);
    color: var(--accent-indigo);
    border-color: rgba(129, 140, 248, 0.3);
}

.pill-featured {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.4);
}

/* --- Hero Section --- */
.hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
    position: relative;
}

.hero-tag {
    display: inline-flex;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.hero-title span {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 680px;
    margin: 0 auto 2rem;
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* View Toggle Bar */
.view-toggle-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.3rem;
    max-width: fit-content;
    margin: 0 auto;
}

.view-toggle-btn {
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
    text-decoration: none;
}

.view-toggle-btn.active {
    background-color: var(--accent);
    color: #0b0f19 !important;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

/* --- Product Cards Grid --- */
.iso-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.iso-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.iso-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.iso-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.iso-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.iso-card-title a {
    color: var(--text-main);
}

.iso-card-title a:hover {
    color: var(--accent);
}

.iso-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.iso-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.85rem;
    background-color: var(--bg-surface);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-light);
}

.spec-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-item strong {
    color: var(--text-main);
    font-weight: 600;
}

.iso-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.rating-stars {
    color: var(--warning);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-count {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Feature Boxes */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feature-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
}

.feature-box h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feature-box li {
    position: relative;
    padding-left: 1.5rem;
}

.feature-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* --- Single Product / ISO Page --- */
.single-iso-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.single-iso-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.specs-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
}

.specs-banner-item {
    text-align: center;
}

.specs-banner-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.specs-banner-item strong {
    font-size: 1.35rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Download Section */
.download-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 2rem 0;
}

.download-section h3 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    color: #fff !important;
    transition: all 0.2s ease;
}

.download-btn-mega {
    background: #d9272e;
}

.download-btn-mediafire {
    background: #1976d2;
}

.download-btn-gdrive {
    background: #0f9d58;
}

.download-btn-torrent {
    background: #475569;
}

.download-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* SHA-1 Box */
.sha-box {
    background-color: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.sha-code {
    color: var(--accent);
    word-break: break-all;
}

.copy-sha-btn {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.copy-sha-btn:hover {
    background-color: var(--accent);
    color: #0b0f19;
    border-color: var(--accent);
}

/* Reviews / Comments */
.reviews-section {
    margin-top: 3.5rem;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.review-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-author {
    font-weight: 700;
    color: var(--text-main);
}

.review-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.review-text {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- bbPress Forums (Dark / Light Mode) --- */
#bbpress-forums {
    font-size: 15px;
    color: var(--text-main);
    margin: 2.5rem 0;
}

#bbpress-forums hr {
    border-color: var(--border-light);
}

#bbpress-forums .bbp-breadcrumb {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results {
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    overflow: hidden;
    margin-bottom: 2rem;
}

li.bbp-header,
li.bbp-footer {
    background-color: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem !important;
}

li.bbp-body ul.forum,
li.bbp-body ul.topic {
    border-top: 1px solid var(--border-light);
    padding: 1rem !important;
    transition: background-color 0.15s ease;
}

li.bbp-body ul.forum:hover,
li.bbp-body ul.topic:hover {
    background-color: var(--bg-card-hover);
}

.bbp-forum-title, .bbp-topic-title a {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.bbp-forum-title:hover, .bbp-topic-title a:hover {
    color: var(--accent);
}

.bbp-forum-content, .bbp-topic-content {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.35rem;
}

/* Single Topic / Replies in bbPress */
div.bbp-topic-header, div.bbp-reply-header {
    background-color: var(--bg-surface) !important;
    border-top: 1px solid var(--border) !important;
    color: var(--text-muted);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}

div.bbp-reply-content, div.bbp-topic-content {
    padding: 1.5rem !important;
    background-color: var(--bg-card);
    color: var(--text-main);
    line-height: 1.7;
}

.bbp-reply-author, .bbp-topic-author {
    padding: 1rem !important;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-light);
}

.bbp-author-name {
    color: var(--text-main) !important;
    font-weight: 700;
}

#bbpress-forums fieldset.bbp-form {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    padding: 1.75rem;
    margin-top: 2rem;
}

#bbpress-forums fieldset.bbp-form legend {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 0.5rem;
}

#bbpress-forums input[type="text"],
#bbpress-forums select,
#bbpress-forums textarea {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-family: inherit;
    width: 100%;
}

#bbpress-forums input[type="text"]:focus,
#bbpress-forums textarea:focus {
    border-color: var(--accent);
    outline: none;
}

#bbpress-forums button.submit {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #0b0f19;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    cursor: pointer;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border-light);
    padding: 3rem 0;
    margin-top: 4rem;
    background-color: var(--header-bg);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-main);
}

/* --- Responsive & Mobile --- */
@media (max-width: 1199px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 1.25rem;
        box-shadow: var(--shadow-md);
    }
    .site-nav.nav-mobile-open {
        display: block;
    }
    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem !important;
        background: transparent;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .hero {
        padding: 2.5rem 0 1.5rem;
    }
    .specs-banner {
        grid-template-columns: 1fr 1fr;
    }
    .download-buttons {
        flex-direction: column;
    }
}

/* Navigation, keyboard access and small screens. */
html { scroll-padding-top: 6rem; }
img, video { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.screen-reader-text, .skip-link:not(:focus) {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 100001; background: var(--bg-card); padding: 1rem; }
.header-brand-nav { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.header-inner { gap: 1rem; }
.brand, .header-actions { flex-shrink: 0; }
.header-actions { gap: .55rem; }
.nav-links { gap: .1rem; }
.nav-links > li > a { padding: .6rem .55rem; white-space: nowrap; font-size: .85rem; }
.nav-links > .menu-item-has-children { display: flex; align-items: center; }
.menu-item-has-children > a::after { content: none; }
.submenu-toggle {
    display: none; align-items: center; justify-content: center; min-width: 28px; min-height: 36px;
    border: 0; background: transparent; color: var(--text-muted); border-radius: var(--radius-sm); cursor: pointer;
}
.submenu-toggle[aria-expanded] { display: inline-flex; }
.submenu-toggle[aria-expanded="true"] { color: var(--accent); }
.sub-menu { top: 100%; }
.sub-menu .sub-menu { top: 0; left: 100%; }
.site-nav .menu-item-has-children > .sub-menu { opacity: 0; visibility: hidden; transform: translateY(6px); }
.site-nav .submenu-open > .sub-menu,
.site-nav .menu-item-has-children:not(:has(> .submenu-toggle)):hover > .sub-menu,
.site-nav .menu-item-has-children:not(:has(> .submenu-toggle)):focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: none;
}
.nav-links > li.current-menu-ancestor > a { color: var(--accent); }
.nav-links > li:last-child > .sub-menu { left: auto; right: 0; }
.theme-switch { width: 60px; height: 34px; flex-shrink: 0; }
.switch-handle { left: 29px; top: 4px; width: 24px; height: 24px; }
[data-theme="light"] .switch-handle { transform: translateX(-25px); }
.switch-icon { font-family: var(--font); font-size: 17px; color: var(--text-main); }
.brand-badge { font-size: .65rem; }
.footer-links { flex-wrap: wrap; gap: .75rem 1.5rem; }
body.admin-bar .site-header { top: 32px; }

/* Shared content surfaces work in both color schemes. */
.site-main { min-height: 55vh; }
.site-main h1 { font-size: clamp(1.8rem, 5vw, 2.7rem) !important; overflow-wrap: anywhere; }
.site-main h2, .site-main h3 { line-height: 1.3; }
.site-main p, .site-main li, .site-main code { overflow-wrap: anywhere; }
.content-page article > div > p { margin-bottom: 1.25rem; }
.page-intro { color: var(--text-muted); max-width: 650px; margin-top: .75rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.team-avatar { width: 72px; height: 72px; flex-shrink: 0; border-radius: var(--radius-md); border: 2px solid var(--accent-indigo); object-fit: cover; }
.team-person-heading { flex-wrap: wrap; }
.team-person-heading .pill { white-space: normal; }
.faq-status { min-height: 1.5em; color: var(--text-muted); margin-bottom: 1rem; font-size: .9rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] { border-color: var(--accent) !important; }
.faq-item[open] .faq-icon { transform: rotate(180deg); }
.faq-item .faq-icon { transition: transform .2s; }
.faq-answer code { background: var(--code-bg); padding: .15rem .35rem; border-radius: 4px; }
.page-numbers { display: inline-flex; padding: .5rem .85rem; margin: .2rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.page-numbers.current { background: var(--accent); color: var(--bg-main); }

/* bbPress uses ID selectors for its default white surfaces. */
#bbpress-forums { font-family: var(--font); line-height: 1.65; }
#bbpress-forums .bbp-forum-content, #bbpress-forums p.bbp-topic-meta { color: var(--text-muted); }
#bbpress-forums div.even, #bbpress-forums div.odd,
#bbpress-forums ul.even, #bbpress-forums ul.odd,
#bbpress-forums .bbp-body, #bbpress-forums li.bbp-body,
#bbpress-forums .status-closed, #bbpress-forums .status-closed a { background: var(--bg-card); color: var(--text-main); }
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer,
#bbpress-forums div.bbp-reply-header, #bbpress-forums div.bbp-topic-header {
    background: var(--bg-surface); border-color: var(--border); color: var(--text-muted);
}
#bbpress-forums li.bbp-footer { border-top: 1px solid var(--border); }
#bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { border-color: var(--border-light); }
#bbpress-forums li.bbp-body ul.forum:hover, #bbpress-forums li.bbp-body ul.topic:hover { background: var(--bg-card-hover); }
#bbpress-forums .bbp-forum-title, #bbpress-forums a.bbp-topic-permalink { color: var(--text-main); font-size: 1rem; }
#bbpress-forums .bbp-forum-title:hover, #bbpress-forums a.bbp-topic-permalink:hover { color: var(--accent); }
#bbpress-forums ul.bbp-forums-list { border-color: var(--border); }
#bbpress-forums div.bbp-template-notice, #bbpress-forums .bbp-template-notice.info {
    background: var(--bg-surface); color: var(--text-main); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
#bbpress-forums .bbp-template-notice a { color: var(--accent); }
#bbpress-forums .bbp-reply-content, #bbpress-forums .bbp-topic-content { overflow-wrap: anywhere; }
#bbpress-forums .bbp-reply-content p, #bbpress-forums .bbp-topic-content p { margin-bottom: 1rem; }
#bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author { background: transparent; }
#bbpress-forums .bbp-author-avatar img { border-radius: 50%; }
#bbpress-forums div.bbp-search-form { float: none; margin-bottom: 1.5rem; }
#bbpress-forums #bbp-search-form > div { display: flex; gap: .5rem; align-items: center; }
#bbpress-forums #bbp_search { flex: 1; min-width: 0; width: auto; }
#bbpress-forums #bbp_search_submit, #bbpress-forums button[type="submit"] {
    padding: .65rem 1rem; background: var(--accent); color: var(--bg-main); border: 0; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
}
#bbpress-forums .bbp-pagination { color: var(--text-muted); }
#bbpress-forums .bbp-pagination-links a, #bbpress-forums .bbp-pagination-links span.current { border-color: var(--border); background: var(--bg-card); color: var(--text-main); border-radius: 4px; }
#bbpress-forums .bbp-pagination-links span.current { background: var(--accent); color: var(--bg-main); }
#bbpress-forums .wp-editor-container, #bbpress-forums .quicktags-toolbar { background: var(--bg-surface); border-color: var(--border); }
#bbpress-forums .wp-editor-area, #bbpress-forums input[type="password"], #bbpress-forums input[type="email"] {
    background: var(--bg-main); color: var(--text-main); border: 1px solid var(--border); border-radius: 4px; padding: .6rem; max-width: 100%;
}
#bbpress-forums pre { background: var(--code-bg); color: var(--text-main); padding: 1rem; overflow: auto; }
#bbpress-forums span.bbp-admin-links a { color: var(--text-muted); }

/* Ultimate Member forms sit on the same surfaces as the community. */
.site-main .um { color: var(--text-main); }
.site-main .um .um-field-label, .site-main .um .um-field-label label,
.site-main .um .um-name a, .site-main .um .um-account-name a { color: var(--text-main) !important; }
.site-main .um .um-field-area input, .site-main .um .um-field-area textarea, .site-main .um .um-field-area select {
    background: var(--bg-card) !important; color: var(--text-main) !important; border-color: var(--border) !important;
}
.site-main .um a.um-link, .site-main .um a.um-link-alt, .site-main .um .um-field-checkbox-option { color: var(--text-muted) !important; }
.site-main .um input.um-button, .site-main .um a.um-button { background: var(--accent) !important; color: var(--bg-main) !important; }

@media (min-width: 1200px) {
    .site-nav { display: flex; }
    .mobile-menu-toggle { display: none; }
}
@media (max-width: 1199px) {
    .header-brand-nav { gap: 0; }
    .site-nav { top: 100%; max-height: calc(100dvh - 100px); overflow-y: auto; }
    .nav-links { align-items: stretch; }
    .nav-links > .menu-item-has-children { display: grid; grid-template-columns: 1fr 44px; }
    .nav-links > li > a { display: block; padding: .8rem; font-size: 1rem; }
    .submenu-toggle { min-height: 44px; width: 44px; }
    .site-nav .menu-item-has-children > .sub-menu { display: none; grid-column: 1 / -1; }
    .site-nav .submenu-open > .sub-menu,
    .site-nav .menu-item-has-children:not(:has(> .submenu-toggle)):focus-within > .sub-menu { display: block; }
    .sub-menu .sub-menu { left: 0; }
    .nav-links > li:last-child > .sub-menu { left: 0; }
    .mobile-menu-toggle { display: block; min-width: 44px; min-height: 44px; }
}
@media (max-width: 600px) {
    .container { padding-inline: 1rem; }
    .header-inner { height: 68px; gap: .5rem; }
    .brand { font-size: 1.1rem; gap: .4rem; }
    .brand img { width: 30px; height: 30px; }
    .brand-badge, .header-actions > .btn-primary { display: none; }
    .header-actions { gap: .4rem; }
    .header-actions > .btn { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hero-subtitle { font-size: 1rem; }
    .view-toggle-bar { border-radius: var(--radius-md); max-width: 100%; flex-wrap: wrap; }
    .view-toggle-btn { font-size: .75rem; padding: .5rem .65rem; }
    .iso-card { padding: 1.15rem; }
    .iso-card-header { flex-wrap: wrap; }
    .iso-card-title { overflow-wrap: anywhere; }
    .download-section { padding: 1.25rem; }
    .specs-banner { padding: 1rem; }
    .specs-banner-item strong { font-size: 1.1rem; }
    .site-main > .container > div[style*="align-items: flex-end"] { flex-wrap: wrap; gap: 1rem; }
    .reviews-header { flex-wrap: wrap; gap: 1rem; }
    .community-page { padding-inline: .75rem; }
    #bbpress-forums .bbp-forum-info, #bbpress-forums .bbp-topic-title { width: 60%; }
    #bbpress-forums .bbp-forum-topic-count, #bbpress-forums .bbp-topic-voice-count,
    #bbpress-forums .bbp-forum-reply-count, #bbpress-forums .bbp-topic-reply-count { width: 20%; }
    #bbpress-forums .bbp-forum-freshness, #bbpress-forums .bbp-topic-freshness { display: none; }
    #bbpress-forums .bbp-forum-title, #bbpress-forums a.bbp-topic-permalink { font-size: .9rem; }
    #bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { padding: .75rem !important; }
    #bbpress-forums div.bbp-reply-author, #bbpress-forums div.bbp-topic-author { float: none; width: 100%; min-height: 0; text-align: left; border-right: 0; }
    #bbpress-forums div.bbp-reply-author img.avatar, #bbpress-forums div.bbp-topic-author img.avatar { position: static; float: left; width: 40px; height: 40px; margin: 0 .75rem .5rem 0; }
    #bbpress-forums div.bbp-reply-content, #bbpress-forums div.bbp-topic-content { margin-left: 0; padding: 1rem !important; }
    #bbpress-forums fieldset.bbp-form { padding: 1rem; }
    body.admin-bar .site-header { top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Searchable resources and the native ISO browser. */
.section-space { padding-top: 3rem; padding-bottom: 2rem; }
.section-heading { text-align: center; max-width: 760px; margin: 0 auto 2.5rem; }
.section-heading h1, .section-heading h2 { margin: .75rem 0; line-height: 1.15; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.section-heading p { color: var(--text-muted); font-size: 1.05rem; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading-row h2 { margin-top: .5rem; font-size: 1.8rem; }
.feature-band { background: var(--bg-card); border-block: 1px solid var(--border-light); padding: 1.5rem 0; }
.feature-band h3 { margin-top: 1rem; }
.page-actions.centered { justify-content: center; margin: 0; }
.layout-preview { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border-light); background: var(--bg-card); color: var(--text-muted); font-size: .8rem; }
.layout-preview .view-toggle-bar { margin: 0; }
.catalog-controls, .resource-controls { display: grid; gap: 1rem; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); align-items: end; }
.catalog-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.catalog-controls .filter-search { grid-column: span 3; }
.catalog-controls .filter-reset { justify-self: end; align-self: end; }
.resource-controls { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.catalog-controls > div, .resource-controls > div { min-width: 0; }
.catalog-controls label, .resource-controls label { display: block; margin-bottom: .4rem; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.catalog-controls input, .catalog-controls select, .resource-controls input, .resource-controls select {
    width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-main); background: var(--bg-main); padding: .65rem .8rem; max-width: 100%;
}
.catalog-controls input::placeholder, .resource-controls input::placeholder { color: var(--text-muted); opacity: 1; }
.catalog-status { margin: 1.25rem 0; color: var(--text-muted); font-size: .9rem; min-height: 1.5rem; }
.catalog-empty { text-align: center; padding: 3rem 1.5rem; background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-muted); }
.catalog-empty h2 { color: var(--text-main); margin-bottom: .75rem; }
.catalog-empty .btn { margin-top: 1rem; }
.catalog-more { text-align: center; margin: 1rem 0 2rem; min-height: 1px; }
.resource-page { padding-top: 3.5rem; padding-bottom: 4rem; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; }
.resource-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.resource-card-heading { display: flex; align-items: center; gap: 1rem; }
.resource-card h2 { font-size: 1.2rem; overflow-wrap: anywhere; }
.software-icon, .software-initial { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; border-radius: 10px; }
.software-initial { display: grid; place-items: center; background: var(--bg-surface); color: var(--accent); font-size: 1.6rem; font-weight: 800; }
.resource-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.resource-card p { color: var(--text-muted); font-size: .92rem; flex: 1; }
.resource-card > .btn { margin-top: auto; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.wallpaper-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.wallpaper-card > a { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; }
.wallpaper-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.wallpaper-card > a:hover img { transform: scale(1.04); }
.wallpaper-zoom { position: absolute; right: .75rem; bottom: .75rem; padding: .3rem .6rem; background: #0b0f19dd; color: white; border-radius: 6px; font-size: .75rem; }
.wallpaper-caption { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; padding: 1rem; align-items: center; }
.wallpaper-caption h2 { grid-column: 1/-1; font-size: 1rem; overflow-wrap: anywhere; }
.wallpaper-caption span, .wallpaper-caption a { font-size: .8rem; }
.wallpaper-caption span { color: var(--text-muted); }
body.gallery-open { overflow: hidden; }
.gallery-dialog { position: fixed; inset: 0; margin: auto; width: min(1100px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-card); color: var(--text-main); box-shadow: 0 20px 80px #0008; }
.gallery-dialog::backdrop { background: #050811df; backdrop-filter: blur(8px); }
.gallery-toolbar, .gallery-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.5rem; }
.gallery-toolbar { border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: .85rem; }
.gallery-toolbar button, .gallery-stage button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; color: var(--text-main); background: var(--bg-card); cursor: pointer; flex-shrink: 0; }
.gallery-stage { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem; background: var(--code-bg); }
.gallery-stage img { width: calc(100% - 112px); height: min(60dvh, 650px); object-fit: contain; }
.gallery-stage button { font-size: 2rem; }
.gallery-stage button:disabled { opacity: .4; }
.gallery-footer h2 { font-size: 1rem; margin: 0; }
.gallery-footer span { color: var(--text-muted); font-size: .8rem; }
.gallery-footer .btn { flex-shrink: 0; }
@media (max-width: 900px) {
    .catalog-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .catalog-controls .filter-search { grid-column: 1/-1; }
    .wallpaper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .section-heading-row { flex-direction: column; align-items: flex-start; }
    .resource-page { padding-top: 2.5rem; }
    .catalog-controls, .resource-controls { grid-template-columns: minmax(0, 1fr); padding: 1rem; gap: .85rem; }
    .catalog-controls .filter-search { grid-column: auto; }
    .catalog-controls .filter-reset { justify-self: stretch; }
    .catalog-controls input, .catalog-controls select, .resource-controls input, .resource-controls select { font-size: 16px; }
    .wallpaper-grid { grid-template-columns: minmax(0, 1fr); }
    .gallery-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 12px; }
    .gallery-toolbar, .gallery-footer { padding: .75rem; }
    .gallery-stage { padding: .5rem; gap: .25rem; }
    .gallery-stage button { width: 36px; height: 44px; }
    .gallery-stage img { width: calc(100% - 80px); height: 45dvh; }
    .gallery-footer { flex-direction: column; align-items: stretch; }
    .gallery-footer .btn { width: 100%; }
    #bbpress-forums li.bbp-header { font-size: .65rem; letter-spacing: 0; }
}
