/* RESET + BASE */

#wrapper {
    overflow: visible;
}

a {
    text-decoration: none;
    color: inherit;
}

/* PAGE WRAPPER */
.page {
    max-width: 1120px;
    margin: 20px auto 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
    padding: 24px 28px 32px;
    color: #111827;
    line-height: 1.5;
}
.page {
    font-family: "Nunito", sans-serif;
}
.page div,.page p,.page section,.page span {
    font-family: "Nunito", sans-serif;
}

.page * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

/* HEADER */
.page .header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 18px;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.header-illustration {
    width: 72px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fde68a, #f9a8d4);
}

.header-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .03em;
}

/* SEARCH */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.search-input-wrap {
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 18px;
    outline: none;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.search-button {
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 18px;
    font-weight: 600;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-button::before {
    content: "🔍";
    font-size: 18px;
}

.search-button:hover {
    background: #1d4ed8;
}

/* LAYOUT */
.content {
    display: flex;
    gap: 26px;
    margin-top: 22px;
}

.main-column {
    flex: 2.8;
}

.side-column {
    flex: 1;
}

/* WORD HEADER */
.word-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.word-title {
    font-size: 28px;
    font-weight: 800;
}

.audio-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #e5f0ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* CHIPS */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.chip {
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: 700;
    background: #E6E6E6;
    color: #424242;
}

.chip-primary {
    background: #CAEBFF;
    color: #424242;
    font-size: 16px;
    font-weight: 700;
}

/* DEFINITION SECTION */
.main-layout-top {
    display: grid;
    /*grid-template-columns: 2.1fr 1.2fr;
    gap: 16px;*/
    align-items: flex-start;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #3A89FF;
    margin-bottom: 8px;
}

.tag-part-of-speech {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #FFEEE5;
    color: #FF7979;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tag-adj {
    background: #fef3c7;
    color: #b45309;
    margin-top: 14px;
}

.definition-item {
    margin-bottom: 2px;
    font-size: 18px;
}

.definition-item .index {
    font-weight: 600;
    font-size: 18px;
    margin-right: 4px;
}

.example {
    font-size: 18px;
    color: #6b7280;
    margin-left: 22px;
    margin-bottom: 6px;
}

.example-label {
    font-style: italic;
    margin-right: 4px;
}

.example span {
    font-size: 18px;
}

/* ILLUSTRATION */
.illustration-card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    overflow: hidden;
}

.illustration-img {
    height: 140px;
    background: linear-gradient(135deg, #bfdbfe, #f9a8d4);
}

.illustration-caption {
    padding: 8px 10px 10px;
    font-size: 16px;
    text-align: center;
    color: #4b5563;
    background: #fff;
}

/* EXAMPLE BLOCK (COLLAPSIBLE) */
.link-more {
    margin-top: 14px;
    font-size: 18px;
    color: #2563eb;
    cursor: pointer;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0;
}

.example-block {
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    transition: max-height .25s ease;
    background: #F5F5F5;
}

.example-block-header {
    padding: 10px 14px;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.example-block-title {
    font-size: 18px;
    font-weight: 800;
    margin: 14px 0;
    color: #424242;
}

.example-block-body {
    padding: 0 10px 10px 10px;
    font-size: 18px;
    background: #F5F5F5;
}

.example-block-inner {
    background: white;
    border-radius: 8px;
    padding: 10px 16px;
}

.example-section {
    margin-bottom: 14px;
}

.example-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-weight: 700;
    color: #424242;
}

.circle-number {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e5f0ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #424242;
}

.example-list {
    list-style: disc;
    padding-left: 24px;
    line-height: 1.5;
}

.example-list li {
    margin: 12px 0;
}

/* GENERIC COLLAPSIBLE */
.collapsible {
    overflow: hidden;
}

.collapsible.closed .example-block-body,
.collapsible.closed .collapse-panel {
    display: none;
}

.collapse-arrow {
    transition: transform .2s ease;
}

.collapsible.closed .collapse-arrow {
    transform: rotate(180deg);
}

/* ĐỒNG NGHĨA & TRÁI NGHĨA */
.block-card {
    margin-top: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 16px 18px 10px;
    font-size: 18px;
}

.block-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #3A89FF;
    margin-bottom: 10px;
}

.meaning-heading {
    font-weight: 800;
    font-size: 18px;
    color: #424242;
    margin: 6px 0;
}

.syn-row {
    overflow: hidden;
}

.syn-row-label {
    font-weight: 600;
    margin-right: 4px;
    float: left;
    margin-top: 7px;
    display: inline-block;
}

.pill-row {
    margin: 4px 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #E6E6E6;
    color: #424242;
    border: 1px solid #e5e7eb;
    font-size: 16px;
    font-weight: 700;
}

.pill a {
    color: #424242;
}

.pill-dn {
    background: #EDFFEE;
}
tr.row-dn td {
    background: #EDFFEE !important;
}
.pill-anton {
    background: #FFF0F0;
}
tr.row-tn td {
    background: #FFF0F0 !important;
}

.collapse-btn {
    width: 100%;
    border-radius: 8px 8px 0 0;
    border: none;
    background: #F5F5F5;
    padding: 8px 10px;
    font-size: 18px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.collapse-panel {
    padding: 0 10px 8px 10px;
    font-size: 18px;
    color: #4b5563;
    display: none;
    background: #F5F5F5;
}

.collapse-panel.open {
    display: block;
}

/* TỪ DỄ NHẦM LẪN */
.confuse-card {
    margin-top: 16px;
    border-radius: 10px;
    background: #F0F4FF;
    padding: 14px 18px;
    font-size: 18px;
}

.confuse-title {
    font-weight: 700;
    font-size: 24px;
    color: #424242;
    margin-bottom: 6px;
}

.confuse-content {
    color: #424242;
    font-size: 16px;
    font-weight: 500;
}

/* TABS: PHÂN TÍCH NGỮ PHÁP / NGỮ CẢNH */
.tabs-card {
    margin-top: 18px;
    border-radius: 5px;
    border: 1px solid #EBEBEB;
    overflow: hidden;
    font-size: 18px;
}

.tabs-header {
    display: flex;
    margin: 10px 20px 0 20px;
    gap: 20px;
}

.tab {
    flex: 1;
    border-radius: 8px;
    padding: 10px 0;
    text-align: center;
    cursor: pointer;
    font-weight: 400;
    font-size: 16px;
    border: none;
    background: #F5F5F5;
    border-bottom: 1px solid #e5e7eb;
    color: #424242;
}

.tab + .tab {
    border-left: 1px solid #e5e7eb;
}

.tab.active {
    background: linear-gradient(315deg, #1270E3 0%, #59C2FF 100%);
    color: #fff;
    border-bottom-color: transparent;
}

.tab-body {
    padding: 12px 18px 16px;
    background: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel li {
    list-style: disc outside none;
}

.tab-panel.active {
    display: block;
}

/* CA DAO, TỤC NGỮ, THÀNH NGỮ */
.proverb-card {
    margin-top: 22px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 16px 20px;
}

.proverb-title {
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 12px;
}

.proverb-section {
    margin-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 30px;
}

.proverb-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.proverb-section-title {
    background: #E6E6E6;
    color: #424242;
    padding: 6px 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 100px;
    margin-bottom: 6px;
    display: inline-block;
}

.proverb-section-desc {
    margin: 10px 0;
    font-weight: 500;
    color: #424242;
}

.proverb-link-detail {
    font-size: 18px;
    color: #2563eb;
    cursor: pointer;
    float: right;
}

/* BÀI VIẾT LIÊN QUAN */
.related-card {
    margin-top: 22px;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #EBEBEB;
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    color: #3A89FF;
    margin-bottom: 12px;
}

.related-item {
    position: relative;
    padding: 10px 10px 10px 22px;
    border-radius: 10px;
    background: #F0F6FF;
    margin-bottom: 10px;
}

.related-index {
    background: #CAEBFF;
    color: #424242;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    margin-right: 8px;
    font-weight: 700;
}

.related-item > .related-index {
    float: left;
}



.related-article-title {
    font-size: 16px;
    color: #424242;
    font-weight: 700;
    line-height: 1.5;
    margin-top: 4px;
}

.related-desc {
    font-size: 16px;
    color: #999999;
    margin-top: 8px;
    padding-left: 39px;
}

/* TỪ LIÊN QUAN + FOOTER ACTIONS */

.related-words-title {
    margin-top: 4px;
    font-weight: 700;
    font-size: 16px;
    float: left;
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.tag-item {
    color: #424242;
    background: #E6E6E6;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
}

.footer-actions {
    margin-top: 18px;
    font-size: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
    color: #2563eb;
    overflow: hidden;
}

.footer-actions span {
    cursor: pointer;
}

.footer-actions .report {
    color: #dc2626;
}

/* SIDEBAR */
.sidebar-card {
    padding: 10px 0;
    position: sticky;
    top: 0;
    right: 0;
}

.sidebar-title {
    color: #424242;
    padding: 0 16px 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    padding: 9px 16px;
    font-size: 16px;
    cursor: pointer;
    background: #F5F5F5;
    margin-bottom: 8px;
    border-radius: 8px;
}

.sidebar-item:first-of-type {
    border-top: none;
}

.sidebar-item.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(315deg, #1270E3 0%, #59C2FF 100%) !important;
}

.sidebar-item:hover:not(.active) {
    background: #e5f0ff;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .page {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

@media (max-width: 900px) {
    .content {
        flex-direction: column;
    }

    .side-column {
        order: -1;
    }

    .main-layout-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 16px 14px 24px;
    }

    .header-title {
        font-size: 22px;
    }

    .word-title {
        font-size: 24px;
    }

    .search-button {
        padding-inline: 14px;
        font-size: 18px;
    }
}


/* HERO HEADER */

.hero-header {
    background: #fafafa;
    padding: 20px 0 28px;
    text-align: center;
    background-image: url("/themes/images/vdict/mini-bg.png");
    background-position: 0 38%;
    background-size: cover;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    position: relative;
    height: 115px;
}

.hero-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #333;
    margin-bottom: 16px;
}

/* Thanh search */
.hero-search {
    position: absolute;
    top: 15px;
    left: 5%;
    width: 90%;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

input.hero-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    padding: 24px 18px;
    font-size: 15px;
}

.hero-search-btn {
    border: none;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    background: linear-gradient(315deg, #1270E3 0%, #59C2FF 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 999px;
    margin: 4px; /* tạo border trắng mỏng quanh nút như hình */
}

.hero-search-icon {
    font-size: 16px;
}

/* “Ảnh” phía dưới – tạm thời là block màu, bạn có thể đổi thành img */
.hero-illustration {
    margin-top: 10px;
    height: 30px;
    border-radius: 12px;
}

/* Responsive */

@media (max-width: 640px) {
    .hero-title {
        font-size: 24px;
    }

    .hero-search-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .hero-search-btn {
        padding: 0 16px;
        font-size: 13px;
    }

    .hero-illustration {
        height: 60px;
    }
}
.page strong,.page b {
    font-family: "Nunito", sans-serif;
    font-weight: 800 !important;
}

.notice {
    margin: 10px 0;
    max-width: 1100px;
    border: 1px solid #cfeefe;
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: white;
}


/* pure-css circular icon with an "i" */
.notice__icon{
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff 0%, #eaf5ff 100%);
    display:flex;
    align-items:center;
    justify-content:center;
    border: 1px solid #cfeefe;
    font-weight:700;
    color: #2b90ff;
    font-size:16px;
    line-height:1;
}

/* Bảng cách sử dụng từ */
.usage-table-wrapper {
    font-size: 13px;
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.usage-table th,
.usage-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    vertical-align: top;
    color: #424242;
    font-size: 16px;
    font-weight: 500;
}

.usage-table th {
    background: #f9fafb;
    font-weight: 700;
    text-align: center;
    color: #424242;
    font-size: 16px;
}

.usage-table tr > td:first-child {
    text-align: center;
}

.usage-word-col {
    width: 120px;
    white-space: nowrap;
}

.usage-example {
    display: block;
    margin-top: 2px;
    font-style: italic;
    color: #999999;
    font-size: 16px;
}

/* tuỳ chọn: nền xen kẽ giữa các dòng cho dễ nhìn */
.usage-table tbody tr:nth-child(even) td {
    background: #fcfcfd;
}

/* NGỮ CẢNH – DANH SÁCH ĐÁNH SỐ */
.context-block {
    margin-top: 6px;
    font-size: 13px;
}

.context-item {
    margin-bottom: 14px;
}

.context-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-weight: 600;
}

.context-number {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e5f0ff;
    color: #424242;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.context-title {
    font-size: 18px;
}

.context-list {
    margin-left: 22px;
    list-style: disc;
    padding-left: 14px;
    font-size: 16px;
    color: #424242;
    font-weight: 500;
}

.context-list li {
    margin: 12px 0;
    font-size: 16px;
    color: #424242;
    font-weight: 500;
}

/* câu trích dẫn văn chương cho nổi một chút */
.context-quote {
    margin-left: 22px;
    margin-top: 4px;
}
.context-quote p {
    margin-bottom: 4px;
}

.item-hide {
    display: none;
}