/* Blog and audio media */
.audio-upload-field { display: grid; gap: .65rem; }
.audio-upload-field > span { font-weight: 750; }
.audio-upload-field audio,
.translation-extra audio,
.flashcard-audio { width: 100%; max-width: 520px; }

.audio-panel {
    margin: 1.25rem 0 2rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line);
    border-left: 5px solid var(--yellow);
    border-radius: 5px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    display: grid;
    grid-template-columns: minmax(160px, .35fr) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}
.audio-panel > div { display: grid; gap: .15rem; }
.audio-panel .eyebrow { margin: 0; }
.audio-panel audio { width: 100%; }
.flashcard-audio { margin: .4rem auto 1rem; }

.home-public-section { padding: 1rem 0 4.5rem; }
.home-blog-section { padding-top: 3.8rem; background: #eef6f1; border-top: 1px solid var(--line); }
.public-course-card { min-height: 280px; }
.public-course-card > small { margin-top: auto; color: var(--muted); }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
}
.blog-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.blog-card-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--teal-pale); }
.blog-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.blog-card:hover .blog-card-cover img { transform: scale(1.025); }
.blog-card-body { flex: 1; padding: 1.35rem; display: flex; flex-direction: column; }
.blog-card-body h2 { margin: 1rem 0 .6rem; font-size: 1.35rem; }
.blog-card-body h2 a { color: var(--navy); }
.blog-card-body p { color: var(--muted); }
.blog-card-body .card-action { margin-top: auto; padding-top: 1rem; color: var(--teal); font-weight: 800; }

.blog-article { max-width: 940px; padding-top: 2.2rem; padding-bottom: 5rem; }
.blog-article-header { max-width: 820px; margin: 2rem 0; }
.blog-article-header h1 { margin: .75rem 0 1rem; font-size: clamp(2.5rem, 6vw, 4.8rem); }
.blog-article-header > p { color: var(--muted); font-size: 1.15rem; line-height: 1.75; }
.blog-hero-image { margin: 1.5rem 0 2rem; overflow: hidden; border-radius: 7px; background: var(--teal-pale); }
.blog-hero-image img { width: 100%; display: block; }
.blog-copy { max-width: 760px; margin: 2rem auto; font-size: 1.12rem; line-height: 1.9; }
.blog-copy p { margin: 0 0 1.45rem; }
.blog-gallery { margin-top: 3rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.blog-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--white); }
.blog-gallery img { width: 100%; display: block; }
.blog-gallery figcaption { padding: .75rem .9rem; color: var(--muted); font-size: .86rem; }

.admin-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.admin-gallery-card { padding: .9rem; border: 1px solid var(--line); border-radius: 5px; background: var(--white); display: grid; gap: .8rem; }
.admin-gallery-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.gallery-meta-form { display: grid; gap: .65rem; }
.compact-media-preview { margin-bottom: .4rem; }
.pagination-wrap { margin-top: 2rem; }

@media (min-width: 1051px) {
    .inline-editor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .blog-grid, .admin-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .blog-grid, .blog-gallery, .admin-gallery-grid, .audio-panel { grid-template-columns: 1fr; }
    .blog-article { padding-top: 1.5rem; }
    .blog-copy { font-size: 1.05rem; }
}
.pagination-wrap { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .8rem; }
.pagination-status { color: var(--muted); font-size: .9rem; font-weight: 700; }
