/* ============================================================
   Dictionary search results (/Dictionary/Browse).
   Scoped under .dic so it can't affect other pages.
   ============================================================ */

.dic {
    --dic-brand: #3f51b5;
    --dic-brand-d: #2c3a91;
    --dic-brand-l: #5c6bc0;
    --dic-accent: #ff7a59;
    --dic-ink: #16225a;
    --dic-body: #5a6072;
    --dic-muted: #8a90a2;
    --dic-line: #e4e7f2;
    --dic-bg-soft: #f6f7fb;
    --dic-radius: 16px;
    --dic-shadow: 0 18px 40px -20px rgba(22, 27, 51, .3);
    --dic-shadow-sm: 0 10px 24px -16px rgba(22, 27, 51, .28);

    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    color: var(--dic-body);
    padding-bottom: 80px;
}
.dic * { box-sizing: border-box; }
.dic h1, .dic h2, .dic h3 { font-family: 'Montserrat', 'Roboto', sans-serif; color: var(--dic-ink); margin: 0; }
.dic__wrap { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ---------- Search hero ---------- */
.dic-hero {
    text-align: center;
    padding: 50px 22px 40px;
    background: linear-gradient(180deg, #eef1fb 0%, #ffffff 100%);
    border-bottom: 1px solid var(--dic-line);
    margin-bottom: 36px;
}
.dic-hero__eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--dic-brand);
    background: rgba(63, 81, 181, .1);
    padding: 6px 15px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.dic-hero h1 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; margin-bottom: 22px; }

/* search form */
.dic-search { position: relative; max-width: 620px; margin: 0 auto; }
.dic-search .form-group { margin: 0; }
.dic-search input[type="text"],
.dic-search #stf {
    width: 100%;
    height: 64px;
    padding: 0 124px 0 26px;
    border: 1.5px solid var(--dic-line);
    border-radius: 999px;
    background: #fff;
    font-size: 20px !important;
    text-align: left !important;
    color: var(--dic-ink);
    box-shadow: 0 16px 34px -20px rgba(22, 27, 51, .4);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.dic-search #stf:focus {
    outline: none;
    border-color: var(--dic-brand);
    box-shadow: 0 16px 36px -18px rgba(63, 81, 181, .5);
}
.dic-search .control-label,
.dic-search .bar { display: none; } /* drop the template floating label */
.dic-search__btn {
    position: absolute;
    right: 7px; top: 7px;
    height: 50px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--dic-brand-l), var(--dic-brand));
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 22px -10px rgba(63, 81, 181, .8);
}
.dic-search__btn:hover { transform: translateY(-1px); }

/* ---------- Layout: results + aside ---------- */
.dic-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    align-items: start;
}
@media (max-width: 900px) { .dic-layout { grid-template-columns: 1fr; } }

/* ---------- Result groups ---------- */
.dic-group { margin-bottom: 30px; }
.dic-group__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.dic-group__head h2 { font-size: 18px; font-weight: 700; }
.dic-group__count {
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--dic-brand);
    background: rgba(63, 81, 181, .1);
    padding: 3px 11px;
    border-radius: 999px;
}
.dic-group--similar .dic-group__count { color: var(--dic-accent); background: rgba(255, 122, 89, .12); }

/* ---------- Result card ---------- */
.dic-result {
    background: #fff;
    border: 1px solid var(--dic-line);
    border-radius: var(--dic-radius);
    padding: 20px 24px;
    margin-bottom: 14px;
    box-shadow: var(--dic-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dic-result:hover { transform: translateY(-3px); box-shadow: var(--dic-shadow); border-color: transparent; }
.dic-result__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 14px;
    margin-bottom: 8px;
}
.dic-result__word {
    font-family: 'Montserrat', 'Roboto', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: var(--dic-ink);
    line-height: 1.3;
}
.dic-result__word strong { color: var(--dic-brand); font-weight: 800; }
.dic-result__pron { font-size: 14px; color: var(--dic-muted); }
.dic-result__pron .zoom-hanz { cursor: default; transition: color .2s ease; }
.dic-result__pron .zoom-hanz:hover { color: var(--dic-ink); }
.dic-result__type {
    font-size: 12px;
    font-weight: 600;
    color: var(--dic-brand-d);
    background: var(--dic-bg-soft);
    border: 1px solid var(--dic-line);
    padding: 2px 10px;
    border-radius: 999px;
}
.dic-result__meaning { font-size: 16px; color: var(--dic-body); line-height: 1.6; }
.dic-result__pk { margin-top: 8px; font-size: 12px; color: var(--dic-muted); }

/* ---------- States ---------- */
.dic-state {
    text-align: center;
    background: #fff;
    border: 1px solid var(--dic-line);
    border-radius: var(--dic-radius);
    box-shadow: var(--dic-shadow-sm);
    padding: 54px 28px;
}
.dic-state__icon {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: 30px;
    color: var(--dic-brand);
    background: rgba(63, 81, 181, .1);
}
.dic-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.dic-state p { margin: 0 auto; max-width: 460px; font-size: 15.5px; color: var(--dic-body); }
.dic-state strong { color: var(--dic-ink); }

/* ---------- Aside / banners ---------- */
.dic-aside .aside-widet { margin-bottom: 22px; }
.dic-aside .aside-widet img {
    width: 100%;
    height: auto;
    border-radius: var(--dic-radius);
    box-shadow: var(--dic-shadow-sm);
    display: block;
}

@media (max-width: 520px) {
    .dic-search #stf { padding-right: 64px; font-size: 17px !important; }
    .dic-search__btn { padding: 0 16px; }
    .dic-search__btn span { display: none; }
}
