/**
 * Info pages (Privacy Policy, Terms, Contact, About) — mobile & tablet.
 * Design from new_design/components/info/*
 * Breakpoints: 1024px (tablet), 640px (mobile)
 */

:root {
  --info-gutter: 16px;
}

/* Prevent horizontal scroll */
body .news-article-wiki-container {
  box-sizing: border-box;
}

/* ========== Tablet & Mobile (max-width: 1024px) ========== */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .news-article-wiki-container {
        grid-template-columns: 1fr !important;
        column-gap: 0 !important;
        row-gap: clamp(20px, 2.5vw, 32px) !important;
        margin: 20px var(--info-gutter) calc(var(--bottom-bar-h, 64px) + env(safe-area-inset-bottom, 0px) + 24px) !important;
        padding: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    /* News block — no extra container, same margin as main content */
    .news-recommendations-sidebar {
        order: 2 !important;
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }

    .news-article-main {
        order: 1 !important;
        min-width: 0 !important;
    }

    .news-article-main::before {
        display: none !important;
    }

    .news-article-sidebar {
        order: 3 !important;
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .news-article-sidebar .ad-slot {
        width: 100% !important;
        min-width: 0 !important;
    }

    .rec-cards-wrapper,
    .rec-cards-viewport {
        width: 100% !important;
        max-width: none !important;
    }

    /* ── 4 news cards grid (like home) — no "Latest News" label ── */
    .static-page-news-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: clamp(8px, 1vw, 16px) !important;
    }

    .static-page-news-grid .news-card-search {
        border-radius: 8px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        overflow: hidden;
        min-width: 0;
    }

    .static-page-news-grid .news-card-search:hover {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.06);
        transform: none;
    }

    .static-page-news-grid .news-image-container-search {
        aspect-ratio: 16 / 9;
    }

    .static-page-news-grid .news-content-search {
        padding: clamp(8px, 1vw, 14px);
        gap: 4px;
        min-width: 0;
    }

    .static-page-news-grid .news-date-search {
        font-size: 10px;
    }

    .static-page-news-grid .news-title-search {
        font-size: clamp(13px, 0.9vw, 15px);
        font-weight: 600;
        line-height: 1.35;
    }

    .static-page-news-grid .news-description-search {
        font-size: clamp(11px, 0.66vw, 13px);
        line-height: 1.45;
    }

    .static-page-news-grid .news-stat-search {
        font-size: 11px;
        padding: 4px 6px;
        gap: 5px;
    }

    .static-page-news-grid .news-stat-search i {
        font-size: 11px !important;
        width: auto !important;
        height: auto !important;
    }

    .static-page-news-grid .news-read-more {
        font-size: 12px;
    }

    .static-page-news-grid .news-read-more::after {
        font-size: 12px;
    }

    /* ── Page Header (design: p clamp(14px,1.2vw,22px), icon 36–48px) ── */
    .info-page-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px 20px;
        border-radius: 12px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, 0.06);
        margin-bottom: 16px;
    }

    .info-page-header__icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        border-radius: 10px;
    }

    .info-page-header__icon i,
    .info-page-header__icon [data-lucide],
    .info-page-header__icon .lucide-icon {
        width: 22px !important;
        height: 22px !important;
        font-size: 22px !important;
    }

    .info-page-header h1 {
        font-size: clamp(18px, 1.4vw, 24px);
        font-weight: 700;
    }

    .info-page-header p {
        font-size: 13px;
    }

    .info-page-header__date {
        font-size: 12px;
        margin-top: 4px;
    }

    /* ── Info Content Card ── */
    .info-content-card {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.06);
        min-width: 0;
    }

    /* ── Info Section (design: heading px 12–22, py 8–14; body px 12–22, py 10–16) ── */
    .info-section-heading {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        background: #f8f9fb;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }

    .info-section-heading + .info-section-heading,
    .info-section-body + .info-section-heading {
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .info-section-num {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        border-radius: 6px;
        font-size: 12px;
    }

    .info-section-heading h2 {
        font-size: 15px;
    }

    .info-section-body {
        padding: 14px 16px;
        font-size: 14px;
        line-height: 1.7;
    }

    .info-section-body p + p {
        margin-top: 10px;
    }

    .info-section-body ul {
        padding-left: 20px;
        gap: 8px;
        margin: 12px 0;
    }
}

/* ========== Contact Page (max-width: 1024px) ── */
@media (max-width: 1024px) {
    .contact-content-wrapper {
        gap: 16px;
        min-width: 0;
        overflow-x: hidden;
    }

    .contact-methods-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-method-card {
        padding: 16px;
        border-radius: 12px;
        min-width: 0;
    }

    .contact-method-header h3 {
        font-size: 15px;
    }

    .contact-method-header p {
        font-size: 12px;
    }

    .contact-method-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        border-radius: 8px;
    }

    .contact-method-icon .lucide-icon,
    .contact-method-icon i {
        width: 16px !important;
        height: 16px !important;
        font-size: 16px !important;
    }

    .contact-method-desc {
        font-size: 13px;
    }

    .contact-method-footer {
        margin-top: 12px;
        padding-top: 12px;
        font-size: 12px;
    }

    .contact-email-box {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .contact-email-text {
        font-size: 13px;
    }

    .contact-copy-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
    }

    .contact-telegram-btn {
        padding: 12px;
        font-size: 13px;
        min-height: 44px;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .contact-include-section {
        padding: 16px;
        border-radius: 12px;
    }

    .contact-section-heading h2 {
        font-size: 16px;
    }

    .contact-include-intro {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .contact-include-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-include-card {
        padding: 14px;
        border-radius: 8px;
    }

    .contact-include-card-heading span {
        font-size: 14px;
    }

    .contact-include-card li {
        font-size: 13px;
        padding-left: 16px;
    }

    .contact-include-card li::before {
        top: 6px;
        width: 4px;
        height: 4px;
    }
}

/* ========== Tablet only (641px–1024px) ── 2 col contact methods ── */
@media (min-width: 641px) and (max-width: 1024px) {
    .contact-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-include-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Mobile only (max-width: 640px) ── */
@media (max-width: 640px) {
    .news-article-wiki-container {
        margin-left: 16px !important;
        margin-right: 16px !important;
    }

    .info-page-header {
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .info-page-header__icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .info-page-header h1 {
        font-size: 18px;
    }

    .info-section-heading {
        padding: 10px 14px;
    }

    .info-section-heading h2 {
        font-size: 14px;
    }

    .info-section-body {
        padding: 12px 14px;
        font-size: 13px;
    }

    .contact-methods-grid {
        gap: 12px;
    }

    .contact-method-card {
        padding: 14px;
    }

    .contact-include-grid {
        grid-template-columns: 1fr;
    }
}
