/* Blog pages. Everything is scoped under .blog-page so the site's styles stay untouched. */
.blog-page { --blog-ink: #101e76; --blog-blue: #007aff; --blog-soft: #5283d9; --blog-line: #d5eaff; --blog-tint: #eff9ff; margin-top: 141px; color: var(--blog-ink); background: #fbfdff; }
.blog-page *, .blog-page *::before, .blog-page *::after { box-sizing: border-box; }
.blog-wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px 24px; }

/* Hero */
.blog-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 280px; padding: 32px 56px; overflow: hidden; border-radius: 32px; background: linear-gradient(120deg, #e4f4ff, #eff8ff 55%, #bfebff); }
.blog-hero__copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.blog-hero__title { margin: 14px 0; color: var(--blog-ink); font-size: 44px; font-weight: 600; line-height: 1.1; }
.blog-hero__text { max-width: 620px; margin: 0; color: #0064dd; font-size: 18px; line-height: 1.45; }
.blog-hero__mascot { flex-shrink: 0; width: 250px; height: auto; }
.blog-hero__photo { flex-shrink: 0; width: 42%; max-height: 260px; object-fit: cover; border-radius: 20px; }
.blog-hero--article { min-height: 225px; padding: 24px 30px; border-radius: 16px; }
.blog-hero--article .blog-hero__title { font-size: 34px; }
.blog-hero--article .blog-hero__text { font-size: 16px; }
.blog-hero--article .blog-meta { margin-top: 14px; }
.blog-pill { display: inline-block; padding: 7px 18px; border-radius: 24px; color: #fff; background: var(--blog-blue); }

/* Filters */
.blog-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0; }
.blog-filter { display: inline-block; padding: 12px 22px; border: 1px solid #cce4ff; border-radius: 28px; color: var(--blog-blue); background: #fff; font: inherit; line-height: 1.2; text-decoration: none; cursor: pointer; }
.blog-filter:hover { border-color: var(--blog-blue); }
.blog-filter.is-active { color: #fff; background: var(--blog-blue); border-color: var(--blog-blue); }
.blog-filters__language { margin-left: auto; }
.blog-select { max-width: 100%; appearance: auto; }

.blog-section-title { margin: 24px 0 14px; color: var(--blog-ink); font-size: 28px; font-weight: 600; }

/* Cards */
.blog-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.blog-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--blog-line); border-radius: 14px; background: #fff; box-shadow: 0 3px 12px #cae2f944; transition: box-shadow .15s, transform .15s; }
.blog-card:hover { box-shadow: 0 8px 22px #b4d6f666; transform: translateY(-2px); }
.blog-card__image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.blog-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 14px 16px; }
.blog-card__title { margin: 10px 0 6px; font-size: 19px; font-weight: 600; line-height: 1.25; }
/* The stretched link makes the whole card clickable. */
.blog-card__link { color: var(--blog-ink); text-decoration: none; }
.blog-card__link::after { content: ''; position: absolute; inset: 0; }
.blog-card__link:focus-visible { outline: none; }
.blog-card__link:focus-visible::after { outline: 2px solid var(--blog-blue); outline-offset: -2px; border-radius: 14px; }
.blog-card__text { margin: 0 0 12px; color: var(--blog-soft); font-size: 14px; line-height: 1.4; }
.blog-tag { display: inline-block; padding: 4px 12px; border-radius: 15px; color: #1a2a4a; font-size: 12px; line-height: 1.4; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; margin-top: auto; color: #5487df; font-size: 13px; }
.blog-meta__date { margin-left: auto; }
.blog-flag { width: 22px; height: 22px; object-fit: cover; border-radius: 50%; }
.blog-empty { padding: 40px 0; color: var(--blog-soft); text-align: center; }
.blog-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }

/* Call to action */
.blog-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 8px; padding: 14px 30px; border-radius: 28px; background: linear-gradient(110deg, #e0f2ff, #c9eaff); }
.blog-cta__art { flex-shrink: 0; width: 160px; height: auto; }
.blog-cta__copy { flex: 1; min-width: 0; }
.blog-cta__title { margin: 0 0 6px; color: #0050d4; font-size: 23px; font-weight: 600; }
.blog-cta__text { margin: 0; color: #437bd3; font-size: 15px; }
.blog-button { flex-shrink: 0; display: inline-block; padding: 15px 30px; border: 0; border-radius: 30px; color: #fff; background: var(--blog-blue); font: inherit; text-decoration: none; cursor: pointer; }
.blog-button:hover { color: #fff; background: #0067d8; }

/* Article layout */
.blog-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; color: #2864d9; font-size: 13px; }
.blog-breadcrumbs a { color: inherit; text-decoration: none; }
.blog-breadcrumbs a:hover { text-decoration: underline; }
.blog-preview { margin: 0 0 8px; padding: 10px 16px; border-radius: 10px; color: #7a5200; background: #fff3cd; }
.blog-article { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "content toc" "content related"; gap: 22px; align-items: start; }
.blog-article__content { grid-area: content; min-width: 0; }
.blog-toc { grid-area: toc; }
.blog-related { grid-area: related; }
.blog-block { margin-bottom: 16px; scroll-margin-top: 150px; }
.blog-heading { margin: 22px 0 10px; color: var(--blog-ink); font-size: 30px; font-weight: 600; }
.blog-text { color: #2d4aa8; font-size: 16px; line-height: 1.55; }
.blog-text p { margin: 8px 0; }
.blog-text ul, .blog-text ol { margin: 8px 0; padding-left: 24px; }
.blog-text ul { list-style: disc; }
.blog-text ol { list-style: decimal; }
.blog-text a { color: var(--blog-blue); text-decoration: underline; }
.blog-text mark { display: inline; padding: 2px 6px; border-radius: 4px; color: var(--blog-ink); background: #e6f3ff; font-weight: 600; }

/* Cards block */
.blog-phrases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.blog-phrase { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--blog-line); border-radius: 13px; background: #fff; }
.blog-phrase__top { display: flex; gap: 14px; }
.blog-phrase__word { display: block; font-size: 15px; font-weight: 600; }
.blog-phrase__translation { margin-top: 2px; color: #5579ce; font-size: 14px; }
.blog-phrase__example { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #5180d8; background: var(--blog-tint); font-size: 13px; }
.blog-phrase__example b { color: var(--blog-blue); font-weight: 500; }
.blog-sound { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #fff; background: var(--blog-blue); cursor: pointer; }
.blog-sound:hover { background: #0067d8; }
.blog-sound--light { color: var(--blog-blue); background: #e6f3ff; }
.blog-sound--light:hover { color: #fff; }

/* Table block */
.blog-table-wrap { overflow-x: auto; border: 1px solid var(--blog-line); border-radius: 14px; }
.blog-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 15px; }
.blog-table th { padding: 14px 18px; background: #e6f3ff; font-weight: 600; text-align: left; white-space: nowrap; }
.blog-table td { padding: 12px 18px; border-top: 1px solid var(--blog-line); color: #2d4aa8; vertical-align: middle; }
.blog-table__word { display: flex; align-items: center; gap: 14px; color: var(--blog-ink); }
.blog-table__transcription { color: #5579ce; font-size: 14px; }

/* Note block */
.blog-note { display: flex; align-items: center; gap: 20px; padding: 16px 24px; border-radius: 14px; color: var(--blog-ink); font-size: 15px; }
.blog-note__icon { flex-shrink: 0; font-size: 38px; line-height: 1; }
.blog-note__label { display: inline-block; padding: 3px 14px; border-radius: 14px; font-weight: 600; }
.blog-note__text { margin: 8px 0 0; line-height: 1.45; }
.blog-note--tip { background: #fff7d4; }
.blog-note--tip .blog-note__label { background: #ffe089; }
.blog-note--important { background: #ffe9e9; }
.blog-note--important .blog-note__label { color: #d40d0d; background: #ffd0d0; }
.blog-note--remember { background: #e3f1ff; }
.blog-note--remember .blog-note__label { color: var(--blog-blue); background: #c4e2ff; }
.blog-note--note { background: #f0ecff; }
.blog-note--note .blog-note__label { color: #5b2fd8; background: #dcd2ff; }

/* Side column */
.blog-box { padding: 14px; border: 1px solid var(--blog-line); border-radius: 15px; background: #fff; }
.blog-box__title { margin: 0 0 10px; color: var(--blog-ink); font-size: 20px; font-weight: 600; }
.blog-toc__link { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; color: var(--blog-ink); font-size: 14px; text-decoration: none; }
.blog-toc__link:hover { color: var(--blog-blue); background: #e6f3ff; }
.blog-toc__icon { flex-shrink: 0; width: 22px; text-align: center; }
.blog-related__header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.blog-related__header .blog-box__title { margin: 0; }
.blog-related__header a { color: var(--blog-blue); font-size: 14px; text-decoration: none; white-space: nowrap; }
.blog-related__item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf4fb; color: var(--blog-ink); font-size: 13px; line-height: 1.4; text-decoration: none; }
.blog-related__item:last-child { border-bottom: 0; }
.blog-related__item:hover b { color: var(--blog-blue); }
.blog-related__item img { flex-shrink: 0; width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.blog-related__item > span { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.blog-audio-status { color: #5487df; font-size: 12px; }

@media (max-width: 1100px) {
    .blog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-phrases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-article { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "toc" "content" "related"; }
    .blog-filters__language { margin-left: 0; }
}

@media (max-width: 767px) {
    .blog-wrap { padding: 0 14px 16px; }
    .blog-hero { flex-direction: column; align-items: flex-start; min-height: 0; padding: 22px; border-radius: 22px; }
    .blog-hero__title, .blog-hero--article .blog-hero__title { font-size: 28px; }
    .blog-hero__text { font-size: 15px; }
    .blog-hero__mascot { align-self: center; width: 150px; }
    .blog-hero__photo { width: 100%; max-height: 200px; }
    .blog-filter { padding: 9px 14px; font-size: 13px; }
    .blog-filters__language, .blog-select { width: 100%; }
    .blog-cards, .blog-phrases { grid-template-columns: minmax(0, 1fr); }
    .blog-heading { font-size: 24px; }
    .blog-note { align-items: flex-start; gap: 12px; padding: 14px; }
    .blog-note__icon { font-size: 28px; }
    .blog-cta { flex-direction: column; text-align: center; padding: 20px; }
    .blog-cta__art { width: 110px; }
    .blog-button { width: 100%; padding: 13px 18px; white-space: normal; }
}
