/* =============================================================================
   Universo Energia — Theme CSS
   ============================================================================= */

/* ─── Custom Properties ────────────────────────────────────────────────────── */
:root {
    --ue-primary:        #1d4ed8;
    --ue-primary-dark:   #1e3a8a;
    --ue-primary-light:  #3b82f6;
    --ue-accent:         #f59e0b;
    --ue-accent-dark:    #d97706;
    --ue-green:          #10b981;
    --ue-dark:           #0f172a;
    --ue-dark-2:         #1e293b;
    --ue-text:           #334155;
    --ue-text-muted:     #64748b;
    --ue-border:         #e2e8f0;
    --ue-bg:             #f8fafc;
    --ue-white:          #ffffff;
    --ue-card-shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --ue-card-shadow-hover: 0 10px 25px rgba(0,0,0,.12);
    --ue-radius:         10px;
    --ue-radius-lg:      16px;
    --ue-radius-full:    9999px;
    --ue-transition:     .2s ease;
    --ue-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --ue-container:      1200px;
    --ue-header-h:       64px;
}

/* ─── 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(--ue-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ue-text);
    background: var(--ue-bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--ue-primary); text-decoration: none; }
a:hover { color: var(--ue-primary-dark); }
ul { list-style: none; }

/* ─── Skip Link ─────────────────────────────────────────────────────────────── */
.ue-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--ue-primary);
    color: var(--ue-white);
    padding: .5rem 1rem;
    z-index: 9999;
    border-radius: 0 0 var(--ue-radius) 0;
    font-weight: 600;
}
.ue-skip-link:focus { top: 0; }

/* ─── Container ─────────────────────────────────────────────────────────────── */
.ue-container {
    max-width: var(--ue-container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.ue-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    border-radius: var(--ue-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background var(--ue-transition), color var(--ue-transition), border-color var(--ue-transition), box-shadow var(--ue-transition);
    text-decoration: none;
    white-space: nowrap;
}
.ue-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.ue-btn--primary {
    background: var(--ue-primary);
    color: var(--ue-white);
    border-color: var(--ue-primary);
}
.ue-btn--primary:hover {
    background: var(--ue-primary-dark);
    border-color: var(--ue-primary-dark);
    color: var(--ue-white);
    box-shadow: 0 4px 12px rgba(29,78,216,.35);
}

.ue-btn--outline {
    background: transparent;
    color: var(--ue-primary);
    border-color: var(--ue-primary);
}
.ue-btn--outline:hover {
    background: var(--ue-primary);
    color: var(--ue-white);
}

.ue-btn--ghost {
    background: transparent;
    color: var(--ue-text-muted);
    border-color: var(--ue-border);
}
.ue-btn--ghost:hover {
    background: var(--ue-border);
    color: var(--ue-text);
}

/* ─── Tags ──────────────────────────────────────────────────────────────────── */
.ue-tag {
    display: inline-flex;
    align-items: center;
    padding: .25rem .75rem;
    background: rgba(29,78,216,.1);
    color: var(--ue-primary);
    border-radius: var(--ue-radius-full);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--ue-transition);
}
.ue-tag:hover { background: rgba(29,78,216,.2); color: var(--ue-primary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--ue-header-h);
    background: var(--ue-dark);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.ue-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--ue-header-h);
    gap: 1.5rem;
}

/* Brand */
.ue-header__brand a,
.ue-header__logo-text {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.ue-logo-main {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ue-white);
    letter-spacing: -.02em;
}
.ue-header__brand .custom-logo {
    height: 40px;
    width: auto;
}

/* Nav */
.ue-nav__list {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.ue-nav__list li a {
    display: block;
    padding: .5rem .875rem;
    color: rgba(255,255,255,.8);
    font-size: .9rem;
    font-weight: 500;
    border-radius: var(--ue-radius);
    transition: color var(--ue-transition), background var(--ue-transition);
    text-decoration: none;
}
.ue-nav__list li a:hover,
.ue-nav__list li.current-menu-item a,
.ue-nav__list li.current_page_item a {
    color: var(--ue-white);
    background: rgba(255,255,255,.1);
}

/* Hamburger */
.ue-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.ue-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ue-white);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}
.ue-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ue-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ue-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════════════════════════
   HERO (HOME)
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-hero {
    background: linear-gradient(135deg, var(--ue-dark) 0%, var(--ue-dark-2) 60%, #0c2461 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.ue-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(59,130,246,.15) 0%, transparent 70%);
    pointer-events: none;
}

.ue-hero__content {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.ue-hero__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--ue-white);
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: 1rem;
}

.ue-hero__subtitle {
    font-size: clamp(.95rem, 2vw, 1.1rem);
    color: rgba(255,255,255,.7);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Search ────────────────────────────────────────────────────────────────── */
.ue-search {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.ue-search__inner {
    display: flex;
    align-items: center;
    background: var(--ue-white);
    border-radius: var(--ue-radius-full);
    padding: .5rem .875rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.3);
    gap: .5rem;
}

.ue-search__icon {
    width: 18px;
    height: 18px;
    color: var(--ue-text-muted);
    flex-shrink: 0;
}

.ue-search__input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--ue-text);
    background: transparent;
    font-family: var(--ue-font);
}
.ue-search__input::placeholder { color: var(--ue-text-muted); }

.ue-search__clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ue-text-muted);
    padding: 2px;
    display: flex;
    align-items: center;
}
.ue-search__clear svg { width: 16px; height: 16px; }
.ue-search__clear:hover { color: var(--ue-text); }

.ue-search__results {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    background: var(--ue-white);
    border-radius: var(--ue-radius-lg);
    box-shadow: var(--ue-card-shadow-hover);
    overflow: hidden;
    z-index: 50;
    border: 1px solid var(--ue-border);
}

.ue-search__results:empty { display: none; }

.ue-search-result-item {
    display: block;
    padding: .875rem 1.25rem;
    text-decoration: none;
    color: var(--ue-text);
    border-bottom: 1px solid var(--ue-border);
    transition: background var(--ue-transition);
}
.ue-search-result-item:last-child { border-bottom: none; }
.ue-search-result-item:hover { background: var(--ue-bg); color: var(--ue-primary); }
.ue-search-result-item strong { display: block; font-weight: 600; }
.ue-search-result-item span { font-size: .85rem; color: var(--ue-text-muted); display: block; margin-top: 2px; }

.ue-search-no-result {
    padding: 1rem 1.25rem;
    color: var(--ue-text-muted);
    font-size: .9rem;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ALPHABET NAV
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-alphabet-section {
    background: var(--ue-white);
    border-bottom: 1px solid var(--ue-border);
    padding: .75rem 0;
    position: sticky;
    top: var(--ue-header-h);
    z-index: 80;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.ue-alphabet-section--slim { padding: .625rem 0; }

.ue-alphabet-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    justify-content: center;
}

.ue-letter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--ue-radius);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    transition: background var(--ue-transition), color var(--ue-transition);
    color: var(--ue-primary);
}
.ue-letter-link:hover {
    background: var(--ue-primary);
    color: var(--ue-white);
}
.ue-letter-link.active {
    background: var(--ue-primary);
    color: var(--ue-white);
}
.ue-letter-link.disabled {
    color: #cbd5e1;
    cursor: default;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   GLOSSARY GRID (HOME)
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-glossary-section {
    padding: 3rem 0 4rem;
}

.ue-letter-section {
    margin-bottom: 3rem;
    scroll-margin-top: calc(var(--ue-header-h) + 60px);
}

.ue-letter-section__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ue-border);
}

.ue-letter-badge {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--ue-primary) 0%, var(--ue-primary-light) 100%);
    color: var(--ue-white);
    border-radius: var(--ue-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(29,78,216,.3);
}

.ue-letter-section__meta { flex: 1; }
.ue-letter-section__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ue-dark);
    line-height: 1.2;
    margin: 0;
}
.ue-letter-count {
    font-size: .82rem;
    color: var(--ue-text-muted);
    font-weight: 500;
}

/* Terms Grid */
.ue-terms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    align-items: stretch;
}

.ue-term-card {
    display: flex;
    height: 100%;      /* preenche a célula do grid */
}

.ue-term-card__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .875rem 1rem;
    background: var(--ue-white);
    border: 1px solid var(--ue-border);
    border-radius: var(--ue-radius);
    text-decoration: none;
    color: var(--ue-text);
    transition: border-color var(--ue-transition), box-shadow var(--ue-transition), transform var(--ue-transition);
    box-shadow: var(--ue-card-shadow);
    flex: 1;           /* cresce para ocupar 100% do .ue-term-card */
}

.ue-term-card__link:hover {
    border-color: var(--ue-primary-light);
    box-shadow: var(--ue-card-shadow-hover);
    transform: translateY(-2px);
    color: var(--ue-primary);
}

.ue-term-card__title {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.4;
    flex: 1;
}

.ue-term-card__excerpt {
    display: none;
}

.ue-term-card__arrow {
    width: 16px;
    height: 16px;
    color: var(--ue-text-muted);
    flex-shrink: 0;
    transition: color var(--ue-transition), transform var(--ue-transition);
}
.ue-term-card__link:hover .ue-term-card__arrow {
    color: var(--ue-primary);
    transform: translateX(3px);
}

.ue-letter-section__footer {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LETTER HERO (taxonomy-alfabeto)
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-letter-hero {
    background: linear-gradient(135deg, var(--ue-dark) 0%, var(--ue-dark-2) 100%);
    padding: 2.5rem 0 2rem;
}

.ue-letter-hero__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.ue-letter-hero__badge {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--ue-primary) 0%, var(--ue-accent) 100%);
    color: var(--ue-white);
    border-radius: var(--ue-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.ue-letter-hero__title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--ue-white);
    margin: 0 0 .25rem;
}

.ue-letter-hero__count {
    color: rgba(255,255,255,.65);
    font-size: .95rem;
}

/* ─── Archive Grid ──────────────────────────────────────────────────────────── */
.ue-archive-section { padding: 2.5rem 0 4rem; }

.ue-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.ue-archive-card__link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: var(--ue-text);
}

.ue-archive-card__inner {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.25rem;
    background: var(--ue-white);
    border: 1px solid var(--ue-border);
    border-radius: var(--ue-radius-lg);
    height: 100%;
    transition: border-color var(--ue-transition), box-shadow var(--ue-transition), transform var(--ue-transition);
    box-shadow: var(--ue-card-shadow);
}
.ue-archive-card__link:hover .ue-archive-card__inner {
    border-color: var(--ue-primary-light);
    box-shadow: var(--ue-card-shadow-hover);
    transform: translateY(-3px);
}

.ue-archive-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ue-dark);
    line-height: 1.4;
    margin: 0;
    transition: color var(--ue-transition);
}
.ue-archive-card__link:hover .ue-archive-card__title { color: var(--ue-primary); }

.ue-archive-card__excerpt {
    font-size: .875rem;
    color: var(--ue-text-muted);
    line-height: 1.6;
    flex: 1;
}

.ue-archive-card__cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ue-primary);
    margin-top: .25rem;
}
.ue-archive-card__cta svg { width: 14px; height: 14px; transition: transform var(--ue-transition); }
.ue-archive-card__link:hover .ue-archive-card__cta svg { transform: translateX(3px); }

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.ue-pagination {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.ue-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .75rem;
    border-radius: var(--ue-radius);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--ue-white);
    color: var(--ue-text);
    border: 1px solid var(--ue-border);
    transition: all var(--ue-transition);
}
.ue-pagination .page-numbers:hover,
.ue-pagination .page-numbers.current {
    background: var(--ue-primary);
    color: var(--ue-white);
    border-color: var(--ue-primary);
}
.ue-pagination .page-numbers.dots { pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════════════════════
   SINGLE GLOSSARIO
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-main--single {
    padding: 2.5rem 0 4rem;
}

.ue-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
}

/* Article */
.ue-article {
    background: var(--ue-white);
    border-radius: var(--ue-radius-lg);
    border: 1px solid var(--ue-border);
    overflow: hidden;
}

.ue-article__header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--ue-border);
    position: relative;
}

.ue-article__letter-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--ue-primary) 0%, var(--ue-primary-light) 100%);
    color: var(--ue-white);
    border-radius: var(--ue-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    opacity: .2;
}

.ue-article__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--ue-dark);
    line-height: 1.25;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
    padding-right: 4rem;
}

.ue-article__meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.ue-article__date {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: var(--ue-text-muted);
}
.ue-article__date svg { width: 14px; height: 14px; }

/* Content */
.ue-article__content {
    padding: 2rem;
    font-size: 1.0rem;
    line-height: 1.8;
    color: var(--ue-text);
}
.ue-article__content h2,
.ue-article__content h3,
.ue-article__content h4 {
    font-weight: 700;
    color: var(--ue-dark);
    margin: 1.75em 0 .75em;
    line-height: 1.3;
}
.ue-article__content h2 { font-size: 1.4rem; }
.ue-article__content h3 { font-size: 1.15rem; }
.ue-article__content p { margin-bottom: 1.25em; }
.ue-article__content ul, .ue-article__content ol {
    margin: 1em 0 1.25em 1.5rem;
}
.ue-article__content ul { list-style: disc; }
.ue-article__content ol { list-style: decimal; }
.ue-article__content li { margin-bottom: .4em; }
.ue-article__content a { color: var(--ue-primary); text-decoration: underline; }
.ue-article__content a:hover { color: var(--ue-primary-dark); }
.ue-article__content strong { font-weight: 700; color: var(--ue-dark); }
.ue-article__content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: rgba(29,78,216,.05);
    border-left: 4px solid var(--ue-primary);
    border-radius: 0 var(--ue-radius) var(--ue-radius) 0;
    color: var(--ue-text-muted);
    font-style: italic;
}
.ue-article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: .9rem;
}
.ue-article__content th, .ue-article__content td {
    border: 1px solid var(--ue-border);
    padding: .625rem .875rem;
    text-align: left;
}
.ue-article__content th {
    background: var(--ue-bg);
    font-weight: 700;
    color: var(--ue-dark);
}
.ue-article__content tr:nth-child(even) td { background: rgba(248,250,252,.8); }

/* Article Footer */
.ue-article__footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--ue-border);
    background: var(--ue-bg);
}
.ue-article__actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.ue-single-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: calc(var(--ue-header-h) + 1.5rem);
}

.ue-sidebar-widget {
    background: var(--ue-white);
    border: 1px solid var(--ue-border);
    border-radius: var(--ue-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--ue-card-shadow);
}

.ue-sidebar-widget__title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--ue-dark);
    margin-bottom: 1rem;
    padding-bottom: .625rem;
    border-bottom: 1px solid var(--ue-border);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Sidebar Alphabet */
.ue-sidebar-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}
.ue-sidebar-alpha-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--ue-primary);
    transition: all var(--ue-transition);
}
.ue-sidebar-alpha-link:hover,
.ue-sidebar-alpha-link.active {
    background: var(--ue-primary);
    color: var(--ue-white);
}

/* Related list */
.ue-related-list li { margin-bottom: .35rem; }
.ue-related-list a {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .88rem;
    color: var(--ue-text);
    text-decoration: none;
    transition: color var(--ue-transition);
    padding: .25rem 0;
}
.ue-related-list a:hover { color: var(--ue-primary); }
.ue-related-list a svg { width: 14px; height: 14px; color: var(--ue-text-muted); flex-shrink: 0; }

.ue-sidebar-more {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ue-primary);
    margin-top: .75rem;
    text-decoration: none;
}
.ue-sidebar-more svg { width: 14px; height: 14px; }
.ue-sidebar-more:hover { color: var(--ue-primary-dark); }

/* Sidebar Search */
.ue-sidebar-search { position: relative; }
.ue-sidebar-search__input {
    width: 100%;
    padding: .625rem .875rem;
    border: 1px solid var(--ue-border);
    border-radius: var(--ue-radius);
    font-size: .9rem;
    font-family: var(--ue-font);
    color: var(--ue-text);
    outline: none;
    transition: border-color var(--ue-transition);
}
.ue-sidebar-search__input:focus { border-color: var(--ue-primary); }
.ue-sidebar-search .ue-search__results { top: calc(100% + .25rem); }

/* ═══════════════════════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-breadcrumb {
    margin-bottom: 1.5rem;
}
.ue-main--single .ue-breadcrumb { margin-bottom: 1.25rem; }
.ue-letter-hero .ue-breadcrumb { margin-bottom: 0; }

.ue-breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .82rem;
}

.ue-breadcrumb li {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: var(--ue-text-muted);
}

.ue-letter-hero .ue-breadcrumb li { color: rgba(255,255,255,.5); }
.ue-letter-hero .ue-breadcrumb li a { color: rgba(255,255,255,.7); }
.ue-letter-hero .ue-breadcrumb li a:hover { color: var(--ue-white); }

.ue-breadcrumb li + li::before {
    content: '/';
    color: var(--ue-border);
}
.ue-letter-hero .ue-breadcrumb li + li::before { color: rgba(255,255,255,.25); }

.ue-breadcrumb a {
    text-decoration: none;
    color: var(--ue-text-muted);
    transition: color var(--ue-transition);
}
.ue-breadcrumb a:hover { color: var(--ue-primary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */

.ue-footer {
    background: var(--ue-dark);
    color: rgba(255,255,255,.7);
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.ue-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.ue-footer__logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ue-white);
    display: block;
    margin-bottom: .75rem;
}
.ue-footer__desc {
    font-size: .875rem;
    line-height: 1.7;
    color: rgba(255,255,255,.5);
    margin-top: .75rem;
}

.ue-footer__nav h4,
.ue-footer__letters h4 {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
    margin-bottom: 1rem;
}

.ue-footer__menu li { margin-bottom: .35rem; }
.ue-footer__menu a {
    font-size: .9rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: color var(--ue-transition);
}
.ue-footer__menu a:hover { color: var(--ue-white); }

.ue-footer__alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.ue-footer__alphabet a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    background: rgba(255,255,255,.06);
    transition: all var(--ue-transition);
}
.ue-footer__alphabet a:hover {
    background: var(--ue-primary);
    color: var(--ue-white);
}

.ue-footer__bottom {
    padding: 1.25rem 0;
    text-align: center;
    font-size: .82rem;
    color: rgba(255,255,255,.3);
}
.ue-footer__bottom a {
    color: rgba(255,255,255,.5);
    text-decoration: none;
}
.ue-footer__bottom a:hover { color: var(--ue-white); }

/* ═══════════════════════════════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Empty state */
.ue-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--ue-text-muted);
}
.ue-empty p { margin-bottom: 1.5rem; font-size: 1.05rem; }

/* 404 */
.ue-404 {
    text-align: center;
    padding: 6rem 2rem;
}
.ue-404__code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--ue-border);
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -.05em;
}
.ue-404__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ue-dark);
    margin-bottom: .75rem;
}
.ue-404__text {
    color: var(--ue-text-muted);
    margin-bottom: 2rem;
}
.ue-404__actions { display: flex; justify-content: center; }

/* Back to Top */
.ue-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--ue-primary);
    color: var(--ue-white);
    border: none;
    border-radius: var(--ue-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(29,78,216,.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--ue-transition);
    z-index: 90;
}
.ue-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ue-back-to-top:hover { background: var(--ue-primary-dark); }
.ue-back-to-top svg { width: 20px; height: 20px; }

/* ─── Infinite Scroll Loader ─────────────────────────────────────────────────── */
#ue-infinite-sentinel {
    height: 1px;
    margin-top: 2rem;
}

.ue-infinite-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: 2rem 0;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.ue-infinite-loader.visible { opacity: 1; }

.ue-infinite-loader span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ue-primary);
    animation: ue-bounce 1.2s ease-in-out infinite;
}
.ue-infinite-loader span:nth-child(2) { animation-delay: .2s; }
.ue-infinite-loader span:nth-child(3) { animation-delay: .4s; }

@keyframes ue-bounce {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40%           { transform: scale(1);  opacity: 1;  }
}

/* Page Article */
.ue-main--page { padding: 2.5rem 0 4rem; }
.ue-page-article { max-width: 800px; }
.ue-page-article__header { margin-bottom: 2rem; }
.ue-page-article__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--ue-dark);
    line-height: 1.25;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .ue-single-layout {
        grid-template-columns: 1fr;
    }
    .ue-single-sidebar {
        position: static;
    }
    .ue-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .ue-hamburger { display: flex; }

    .ue-nav {
        display: none;
        position: fixed;
        top: var(--ue-header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--ue-dark);
        z-index: 99;
        padding: 1.5rem;
        overflow-y: auto;
    }
    .ue-nav.open { display: block; }
    .ue-nav__list { flex-direction: column; gap: .25rem; align-items: stretch; }
    .ue-nav__list li a {
        font-size: 1rem;
        padding: .875rem 1rem;
    }

    .ue-hero { padding: 2.5rem 0 2rem; }
    .ue-hero__title { font-size: 1.75rem; }

    .ue-terms-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ue-terms-grid .ue-term-card { min-height: unset; }

    .ue-letter-section__header {
        flex-wrap: wrap;
    }
    .ue-letter-section__see-all {
        width: 100%;
        justify-content: center;
    }

    .ue-archive-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ue-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ue-article__header { padding: 1.5rem; }
    .ue-article__content { padding: 1.5rem; }
    .ue-article__footer { padding: 1.25rem 1.5rem; }

    .ue-letter-hero__badge { width: 60px; height: 60px; font-size: 2rem; }

    .ue-alphabet-nav ul { gap: .15rem; }
    .ue-letter-link { width: 28px; height: 28px; font-size: .78rem; }
}

@media (max-width: 480px) {
    .ue-container { padding: 0 1rem; }

    .ue-terms-grid { grid-template-columns: 1fr; }
    .ue-terms-grid .ue-term-card { min-height: unset; }
    .ue-archive-grid { grid-template-columns: 1fr; }

    .ue-article__title { font-size: 1.4rem; padding-right: 0; }
    .ue-article__letter-badge { display: none; }

    .ue-article__actions { flex-direction: column; }
    .ue-article__actions .ue-btn { justify-content: center; }

    .ue-letter-hero__inner { flex-direction: column; text-align: center; gap: 1rem; }
    .ue-letter-hero__badge { width: 70px; height: 70px; }
}
