.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mg-blog,
.mg-blog-show {
    padding: 2rem 0 4rem;
}

.mg-blog__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.55);
}

.mg-blog__breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mg-blog__breadcrumb a:hover {
    color: var(--mg-accent);
}

.mg-blog__title,
.mg-blog-show__title {
    margin: 0 0 2rem;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.mg-blog__layout {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 2rem 2.5rem;
    align-items: start;
}

.mg-blog__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mg-blog__search-label {
    position: relative;
    display: block;
}

.mg-blog__search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%);
    pointer-events: none;
}

.mg-blog__search-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
}

.mg-blog__search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.mg-blog__search-input:focus {
    outline: none;
    border-color: rgba(199, 169, 67, 0.55);
}

.mg-blog__panel {
    padding: 1.125rem 1.25rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-blog__panel-title {
    margin: 0 0 0.875rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.mg-blog__sections {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mg-blog__section-link {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.2s ease;
}

.mg-blog__section-link:hover,
.mg-blog__section-link.is-active {
    color: var(--mg-accent);
}

.mg-blog__popular {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mg-blog__popular-link {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mg-blog__popular-link:hover {
    opacity: 0.85;
}

.mg-blog__popular-thumb {
    flex: 0 0 72px;
    overflow: hidden;
    border-radius: 8px;
    background: #121212;
}

.mg-blog__popular-thumb img {
    width: 72px;
    height: 54px;
    object-fit: cover;
}

.mg-blog__popular-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.mg-blog__popular-title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
}

.mg-blog__popular-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
}

.mg-blog__popular-views svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.mg-blog__main {
    min-width: 0;
}

.mg-blog__empty {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.mg-blog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.875rem 1.5rem;
}

.mg-post-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.mg-post-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    background: #121212;
}

.mg-post-card__media img,
.mg-post-card__media picture,
.mg-post-card__media picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mg-post-card__media:not(.is-placeholder):hover img,
.mg-post-card__media:not(.is-placeholder):hover picture img {
    transform: scale(1.03);
}

.mg-post-card__placeholder,
.mg-blog__popular-placeholder,
.mg-blog-show__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 35%, rgba(199, 169, 67, 0.14) 0%, transparent 58%),
        linear-gradient(135deg, #1a1a1a 0%, #242424 50%, #1a1a1a 100%);
}

.mg-post-card__placeholder img {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.mg-blog__popular-thumb.is-placeholder {
    display: flex;
}

.mg-blog__popular-placeholder img {
    width: 22px;
    height: 22px;
    opacity: 0.45;
}

.mg-blog-show__placeholder img {
    width: 72px;
    height: 72px;
    opacity: 0.45;
}

.mg-post-card__badge {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #fff;
    color: #171717;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.mg-post-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1rem 0 0;
}

.mg-post-card__title {
    margin: 0 0 0.625rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.mg-post-card__title a {
    color: var(--mg-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mg-post-card__title a:hover {
    color: #fff;
}

.mg-post-card__excerpt {
    flex: 1 1 auto;
    margin: 0 0 0.875rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}

.mg-post-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mg-post-card__link svg {
    width: 14px;
    height: 14px;
    color: var(--mg-accent);
    transition: transform 0.2s ease;
}

.mg-post-card__link:hover {
    color: var(--mg-accent);
}

.mg-post-card__link:hover svg {
    transform: translateX(2px);
}

.mg-blog__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.mg-blog__page-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mg-blog__page-btn,
.mg-blog__page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.35rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mg-blog__page-btn svg {
    width: 16px;
    height: 16px;
}

.mg-blog__page-btn:hover,
.mg-blog__page-num:hover {
    color: #fff;
}

.mg-blog__page-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.mg-blog__page-num.is-active {
    background: var(--mg-accent);
    color: #171717;
    font-weight: 700;
}

.mg-blog__page-dots {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.875rem;
}

.mg-blog-show__article {
    min-width: 0;
    padding: 1.375rem 1.5rem 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-blog-show__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem 1rem;
    margin: 0 0 1.25rem;
}

.mg-blog-show__badge {
    padding: 0.4rem 0.875rem;
    border-radius: 999px;
    background: #fff;
    color: #171717;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.mg-blog-show__views {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

.mg-blog-show__views svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.mg-blog-show__cover {
    overflow: hidden;
    margin: 0 0 1.5rem;
    border-radius: 16px;
    background: #121212;
}

.mg-blog-show__cover img,
.mg-blog-show__cover picture,
.mg-blog-show__cover picture img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.mg-blog-show__cover.is-placeholder {
    aspect-ratio: 16 / 7;
}

.mg-blog-show__content {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
}

.mg-blog-show__lead {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.mg-blog-show__content p {
    margin: 0 0 1rem;
}

.mg-blog-show__content h2 {
    margin: 1.75rem 0 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.mg-blog-show__content h3 {
    margin: 1.5rem 0 0.875rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.mg-blog-show__content h2:first-child,
.mg-blog-show__content h3:first-child,
.mg-blog-show__lead + h2,
.mg-blog-show__lead + h3 {
    margin-top: 0;
}

.mg-blog-show__content p:last-child,
.mg-blog-show__content h2:last-child,
.mg-blog-show__content h3:last-child {
    margin-bottom: 0;
}

@media (max-width: 1199px) {
    .mg-blog__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .mg-blog__layout {
        grid-template-columns: 1fr;
    }

    .mg-blog__sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .mg-blog__search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 639px) {
    .mg-blog,
    .mg-blog-show {
        padding-top: 1.25rem;
    }

    .mg-blog__title {
        margin-bottom: 1.5rem;
    }

    .mg-blog-show__title {
        margin-bottom: 1.5rem;
    }

    .mg-blog-show__article {
        padding: 1.125rem 1rem 1.5rem;
    }

    .mg-blog__sidebar {
        grid-template-columns: 1fr;
    }

    .mg-blog__grid {
        grid-template-columns: 1fr;
    }
}
