/* =============================================
   MMGURU NEWS SECTION — v1.0
   ============================================= */

/* =============================================
   BASE OVERRIDES FOR NEWS PAGES
   ============================================= */

/* Archive: add horizontal padding (single already has padding via .single rule) */
.news-archive .home-section {
    padding-left: 4%;
    padding-right: 4%;
    padding-bottom: 50px;
}

/* Single: override the white card wrapper — we handle our own layout */
.news-single .site-content {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Limit archive content width on very wide screens */
.news-archive-wrap {
    max-width: 1300px;
    margin: 0 auto;
}

/* Single: full width (no max-width constraint) */
.news-single-wrap {
    margin: 0 auto;
}

/* =============================================
   BREADCRUMBS (shared)
   ============================================= */

.news-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 16px 0 20px;
    font-size: 13px;
    color: #9ca3af;
    list-style: none;
    margin: 0;
}
.news-breadcrumb a {
    color: #6b7280 !important;
    text-decoration: none !important;
    background: none !important;
    background-image: none !important;
    transition: color 0.15s;
}
.news-breadcrumb a:hover {
    color: #2563eb !important;
}
.news-breadcrumb .sep {
    color: #d1d5db;
    font-size: 11px;
}
.news-breadcrumb .current {
    color: #9ca3af;
}

/* =============================================
   CATEGORY BADGE
   ============================================= */

.news-cat-badge {
    display: inline-block;
    background: #2563eb;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none !important;
    background-image: none !important;
    transition: background 0.15s;
    white-space: nowrap;
    line-height: 1.3;
}
a.news-cat-badge:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
}

/* =============================================
   ARCHIVE — HEADER
   ============================================= */

.news-archive-header {
    margin-bottom: 22px;
}
.news-archive-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1d1b31;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.news-archive-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* =============================================
   ARCHIVE — CATEGORY NAV PILLS
   ============================================= */

.news-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.news-cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    background-image: none !important;
    background: #f1f5f9;
    color: #4b5563 !important;
    border: 1.5px solid #e2e8f0;
    transition: all 0.15s;
    white-space: nowrap;
}
.news-cat-pill:hover {
    background: #e8eef8 !important;
    border-color: #93c5fd;
    color: #2563eb !important;
}
.news-cat-pill.active {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb;
}

/* =============================================
   ARCHIVE — FEATURED ARTICLE
   ============================================= */

.news-featured {
    margin-bottom: 30px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    background: #fff;
}
.news-featured:hover {
    box-shadow: 0 6px 24px rgba(37,99,235,0.14);
}
.news-featured-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
    text-decoration: none !important;
    background-image: none !important;
    color: inherit !important;
}
.news-featured-img {
    background-size: cover;
    background-position: center;
    background-color: #e8eef8;
    min-height: 260px;
    position: relative;
}
.news-featured-img--placeholder {
    background: linear-gradient(135deg, #1d1b31 0%, #2563eb 60%, #60a5fa 100%) !important;
}
.news-featured-body {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.news-featured-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d1b31;
    line-height: 1.35;
    margin: 0;
    letter-spacing: -0.01em;
}
.news-featured:hover .news-featured-title {
    color: #2563eb;
}
.news-featured-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-featured-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    flex-wrap: wrap;
}
.news-featured-meta time {
    font-weight: 500;
}
.news-read-time::before {
    content: '·';
    margin-right: 6px;
}

/* =============================================
   ARCHIVE — NEWS GRID
   ============================================= */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

/* =============================================
   ARCHIVE — NEWS CARD
   ============================================= */

.news-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    text-decoration: none !important;
    background-image: none !important;
    color: inherit !important;
    transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover {
    box-shadow: 0 8px 22px rgba(37,99,235,0.1);
    transform: translateY(-2px);
}
.news-card-img-wrap {
    position: relative;
    overflow: hidden;
    background: #e8eef8;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
}
.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}
.news-card:hover .news-card-img {
    transform: scale(1.04);
}
.news-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1d1b31 0%, #2563eb 60%, #60a5fa 100%);
    opacity: 0.6;
}
.news-card-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
}
.news-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}
.news-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1d1b31;
    line-height: 1.42;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}
.news-card:hover .news-card-title {
    color: #2563eb;
}
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
    margin-top: auto;
    flex-wrap: wrap;
}
.news-card-meta time {
    font-weight: 500;
}
.news-card-meta .meta-sep::before {
    content: '·';
    color: #d1d5db;
}

/* =============================================
   ARCHIVE — PAGINATION
   ============================================= */

.news-pagination {
    margin-top: 10px;
}
.news-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    flex-wrap: wrap;
}
.news-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563 !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none !important;
    background-image: none !important;
    transition: all 0.15s;
}
.news-pagination .page-numbers:hover {
    background: #f0f5ff;
    border-color: #93c5fd;
    color: #2563eb !important;
}
.news-pagination .page-numbers.current {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb;
}
.news-pagination .page-numbers.dots {
    background: none !important;
    border: none !important;
    color: #9ca3af !important;
    box-shadow: none;
}
.news-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 15px;
    padding: 60px 0;
}

/* =============================================
   SCROLL — SEPARATOR & SCROLL-LOADED TITLE
   ============================================= */

.news-scroll-sep {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
    margin: 40px 0;
}
.news-scroll-title a {
    color: #1d1b31 !important;
    text-decoration: none !important;
    background-image: none !important;
}
.news-scroll-title a:hover {
    color: #2563eb !important;
}

/* =============================================
   SINGLE — ARTICLE CARD
   ============================================= */

.news-article {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 16px rgba(37,99,235,0.06);
    overflow: hidden;
    margin-bottom: 36px;
}

/* Meta row: category badge + date + read time + author */
.news-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 28px 32px 0;
    font-size: 13px;
    color: #9ca3af;
}
/* Автор — прижат к правому краю */
.news-author-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s;
}
.news-author-link i {
    font-size: 15px;
    color: #d1d5db;
    transition: color 0.15s;
}
.news-author-link:hover,
.news-author-link:hover i {
    color: #2563eb;
}
@media (max-width: 480px) {
    .news-author-link { display: none; }
}
.news-article-meta time {
    font-weight: 500;
    color: #6b7280;
}
.news-read-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #9ca3af;
    font-size: 13px;
}
.news-read-time-badge::before {
    content: '·';
    color: #d1d5db;
    margin-right: 2px;
}

/* Title */
.news-article-title {
    font-size: clamp(20px, 2.8vw, 30px);
    font-weight: 800;
    color: #1d1b31;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 14px 32px 10px;
    padding: 0;
}

/* Lead / excerpt */
.news-article-lead {
    font-size: 16px;
    color: #374151;
    line-height: 1.7;
    font-style: italic;
    margin: 18px 32px;
    padding: 16px 20px;
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 0 8px 8px 0;
}

/* Hero image */
.news-article-img-wrap {
    max-height: 380px;
    overflow: hidden;
}
.news-article-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    object-position: center;
    display: block;
}
@media (max-width: 767px) {
    .news-article-img-wrap { max-height: 220px; }
    .news-article-img      { max-height: 220px; }
}

/* Article content */
.news-article-content {
    padding: 28px 32px;
    font-size: 19px;
    line-height: 1.78;
    color: #374151;
    margin-bottom: 0;
}
.news-article-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1d1b31;
    margin: 32px 0 12px;
    letter-spacing: -0.01em;
}
.news-article-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1d1b31;
    margin: 24px 0 10px;
}
.news-article-content h2:first-child,
.news-article-content h3:first-child {
    margin-top: 0;
}
.news-article-content p {
    margin: 0 0 18px;
}
.news-article-content p:last-child {
    margin-bottom: 0;
}
.news-article-content ul,
.news-article-content ol {
    padding-left: 24px;
    margin: 0 0 18px;
}
.news-article-content li {
    margin-bottom: 6px;
    line-height: 1.65;
}
.news-article-content blockquote {
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    color: #4b5563;
    font-style: italic;
    font-size: 19px;
}
.news-article-content blockquote p:last-child { margin: 0; }
.news-article-content a {
    color: #2563eb !important;
}
.news-article-content a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* =============================================
   SINGLE — FOOTER (TAGS + SOURCE)
   ============================================= */

.news-article-footer {
    padding: 0 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.news-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.news-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #4b5563 !important;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none !important;
    background-image: none !important;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
}
.news-tag:hover {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb;
}
.news-article-source {
    font-size: 13px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}
.news-article-source a {
    color: #2563eb !important;
    text-decoration: none !important;
    background-image: none !important;
}
.news-article-source a:hover {
    text-decoration: underline !important;
}

/* =============================================
   SINGLE — SHARE BUTTONS
   ============================================= */

.news-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 32px;
    border-top: 1px solid #f0f2f5;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    flex-wrap: wrap;
}
.news-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    text-decoration: none !important;
    background-image: none !important;
    font-size: 20px;
    transition: all 0.15s;
    border: 1.5px solid transparent;
    line-height: 1;
}
.news-share-tg  { background: #f0f9ff; color: #0088cc !important; border-color: #bae6fd; }
.news-share-tg:hover  { background: #0088cc !important; color: #fff !important; border-color: #0088cc; }
.news-share-vk  { background: #f0f4ff; color: #4c75a3 !important; border-color: #c7d2fe; }
.news-share-vk:hover  { background: #4c75a3 !important; color: #fff !important; border-color: #4c75a3; }
.news-share-tw  { background: #f0fbff; color: #1da1f2 !important; border-color: #bae0e9; }
.news-share-tw:hover  { background: #1da1f2 !important; color: #fff !important; border-color: #1da1f2; }
.news-share-copy { background: #f5f6f8; color: #6b7280 !important; border-color: #e5e7eb; }
.news-share-copy:hover,
.news-share-copy.copied { background: #059669 !important; color: #fff !important; border-color: #059669; }

/* =============================================
   SINGLE — RELATED ARTICLES
   ============================================= */

.news-related {
    border-radius: 12px;
}
.news-related-title {
    font-size: 17px;
    font-weight: 700;
    color: #1d1b31;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
}

/* Grid — 3 columns on desktop */
.news-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card — column layout (image top, text bottom) */
.news-related-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    background-image: none !important;
    color: inherit !important;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: box-shadow 0.2s;
}
.news-related-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

/* Image wrap — 16:9 aspect ratio */
.news-related-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}
.news-related-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.news-related-card:hover .news-related-card-img {
    transform: scale(1.05);
}
.news-related-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1d1b31 0%, #2563eb 100%);
    opacity: 0.4;
}

/* Body */
.news-related-card-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.news-related-card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2563eb;
    line-height: 1;
}
.news-related-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1d1b31;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}
.news-related-card:hover h4 {
    color: #2563eb;
}
.news-related-card time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 2px;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 960px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-archive .home-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    .news-archive-header h1 {
        font-size: 22px;
    }
    .news-featured-inner {
        grid-template-columns: 1fr;
    }
    .news-featured-img {
        min-height: 220px;
    }
    .news-featured-body {
        padding: 22px;
    }
    .news-featured-title {
        font-size: 19px;
    }
    .news-article-meta  { padding: 20px 20px 0; }
    .news-article-title { margin: 12px 20px 6px; }
    .news-article-lead  { margin: 14px 20px; }
    .news-article-content { padding: 20px; }
    .news-article-footer  { padding: 0 20px 20px; }
    .news-share { padding: 16px 20px; }
    .news-related { padding: 20px; }

    /* Related — mobile: 1 column, horizontal card (text left, image right) */
    .news-related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .news-related-card {
        flex-direction: row;
        align-items: stretch;
        border-radius: 8px;
    }
    .news-related-card-img-wrap {
        order: 2;
        width: 110px;
        min-width: 110px;
        aspect-ratio: unset;
        align-self: stretch;
    }
    .news-related-card-body {
        order: 1;
        flex: 1;
        padding: 10px 12px;
        gap: 4px;
    }
    .news-related-card h4 {
        font-size: 13px;
    }
}

@media (max-width: 580px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-cat-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .news-related-card-img-wrap {
        width: 90px;
        min-width: 90px;
    }
}


/* =============================================
   TG SUBSCRIBE WIDGET (outside article body)
   ============================================= */
.news-tg-subscribe {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #1a1f2e 0%, #162032 100%);
    border: 1px solid rgba(41, 182, 246, 0.25);
    border-radius: 12px;
    padding: 18px 20px;
    margin: 24px 0;
    color: #fff;
}
.news-tg-subscribe-icon {
    font-size: 2.2rem;
    color: #29b6f6;
    flex-shrink: 0;
}
.news-tg-subscribe-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.news-tg-subscribe-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}
.news-tg-subscribe-text span {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}
.news-tg-subscribe-btn {
    flex-shrink: 0;
    background: #29b6f6;
    color: #0d1117;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}
.news-tg-subscribe-btn:hover {
    background: #4fc3f7;
    color: #0d1117;
}
@media (max-width: 480px) {
    .news-tg-subscribe { flex-wrap: wrap; }
    .news-tg-subscribe-btn { width: 100%; text-align: center; padding: 10px; }
}

/* =============================================
   LOAD MORE BUTTON
   ============================================= */
.news-load-more-wrap {
    text-align: center;
    padding: 32px 0 16px;
}
.news-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 36px;
    background: #1e2637;
    border: 1.5px solid rgba(41,182,246,0.35);
    border-radius: 8px;
    color: #c8d6e8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    white-space: nowrap;
}
.news-load-more-btn:hover {
    border-color: #29b6f6;
    background: #263044;
    color: #fff;
}
.news-load-more-btn.is-loading {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}
.news-load-more-btn.is-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: mnp-spin 0.7s linear infinite;
}
@keyframes mnp-spin { to { transform: rotate(360deg); } }
