/* ============================================================
   MOBILNYMECHANIK.PL — BLOG STYLES
   Archive + Single Post (matching JSX mockup)
   Version: 3.1.0
   ============================================================ */

/* ============================================================
   MAIN CONTAINER (override parent theme constraints)
   ============================================================ */
.mm-blog-main,
.mm-single-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ============================================================
   SHARED: BREADCRUMBS (dark theme)
   ============================================================ */
.mm-blog-hero .mm-breadcrumbs,
.mm-single-hero .mm-breadcrumbs {
    font-size: 13px;
    font-weight: 400;
    color: var(--mm-gray-500);
    margin-bottom: 16px;
}

.mm-blog-hero .mm-breadcrumbs a,
.mm-single-hero .mm-breadcrumbs a {
    color: var(--mm-gray-400);
    text-decoration: none;
}

.mm-blog-hero .mm-breadcrumbs a:hover,
.mm-single-hero .mm-breadcrumbs a:hover {
    color: var(--mm-white);
}

.mm-breadcrumbs__sep {
    margin: 0 6px;
    color: var(--mm-gray-500);
}

.mm-breadcrumbs__current {
    color: var(--mm-gray-300);
}

/* ============================================================
   SHARED: CATEGORY BADGE
   ============================================================ */
.mm-cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    line-height: 1.4;
}

.mm-cat-badge--md {
    font-size: 12px;
    padding: 4px 12px;
}

/* ============================================================
   ARCHIVE: HERO (full-width background)
   ============================================================ */
.mm-blog-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    padding: 40px 20px 44px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    color: rgba(255, 255, 255, 0.7);
}

.mm-blog-hero__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

.mm-blog-hero__title {
    color: #F8FAFC;
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.mm-blog-hero__desc {
    font-size: 16px;
    margin: 0;
    max-width: 500px;
}

/* ============================================================
   ARCHIVE: CATEGORY FILTER (full-width background)
   ============================================================ */
.mm-category-filter {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.mm-category-filter__inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mm-category-filter__inner::-webkit-scrollbar {
    display: none;
}

.mm-cat-btn {
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--mm-gray-200);
    color: var(--mm-gray-500);
    background: transparent;
    transition: all 0.15s ease;
}

.mm-cat-btn:hover {
    border-color: var(--mm-gray-300);
    color: var(--mm-gray-700);
}

.mm-cat-btn--active {
    background: var(--mm-dark);
    color: var(--mm-white);
    border-color: var(--mm-dark);
}

/* ============================================================
   ARCHIVE: POSTS SECTION (full-width background)
   ============================================================ */
.mm-blog-posts {
    background: #F8FAFC;
    min-height: 400px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0 20px;
}

.mm-blog-posts__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 36px 0 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================================
   ARCHIVE: POST CARD (standard - horizontal)
   ============================================================ */
.mm-post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.mm-post-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.mm-post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.mm-post-card__thumb {
    width: 240px;
    min-width: 240px;
    height: 126px;
    min-height: 126px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mm-post-card__thumb-placeholder {
    font-size: 40px;
    color: #CBD5E1;
}

.mm-post-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mm-post-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.mm-post-card__date,
.mm-post-card__time {
    font-size: 12px;
    color: #94A3B8;
}

.mm-post-card__title {
    font-size: 17px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 6px;
    line-height: 1.3;
}

.mm-post-card__excerpt {
    font-size: 14px;
    color: #64748B;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

/* ============================================================
   ARCHIVE: POST CARD FEATURED (first post - vertical)
   ============================================================ */
.mm-post-card--featured {
    flex-direction: column;
    padding: 0;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.mm-post-card--featured .mm-post-card__thumb {
    width: 100%;
    min-width: 100%;
    height: 0;
    min-height: 0;
    padding-bottom: 52.5%; /* 1200:630 ratio */
    border-radius: 0;
    margin: 0;
    position: relative;
}

.mm-post-card--featured .mm-post-card__thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.mm-post-card--featured .mm-post-card__body {
    padding: 20px 24px 24px;
}

.mm-post-card--featured .mm-post-card__meta {
    gap: 12px;
    margin-bottom: 10px;
}

.mm-post-card__title--featured {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.mm-post-card--featured .mm-post-card__excerpt {
    font-size: 15px;
    line-height: 1.65;
}

.mm-post-card--featured .mm-post-card__date,
.mm-post-card--featured .mm-post-card__time {
    font-size: 13px;
}

/* ============================================================
   ARCHIVE: POST GRID (rest of posts)
   ============================================================ */
.mm-post-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================================
   ARCHIVE: PAGINATION
   ============================================================ */
.mm-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.mm-pagination a,
.mm-pagination span {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.mm-pagination .page-numbers {
    background: var(--mm-white);
    color: var(--mm-gray-500);
    border: 1px solid var(--mm-gray-200);
}

.mm-pagination .page-numbers:hover {
    border-color: var(--mm-gray-300);
    color: var(--mm-gray-700);
}

.mm-pagination .page-numbers.current {
    background: var(--mm-dark);
    color: var(--mm-white);
    border-color: var(--mm-dark);
    font-weight: 700;
}

.mm-pagination .prev,
.mm-pagination .next {
    padding: 0 12px;
}

.mm-pagination .dots {
    border: none;
    background: transparent;
}

/* ============================================================
   SINGLE: HERO
   ============================================================ */
.mm-single-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    padding: 40px 20px 48px;
}

.mm-single-hero__inner {
    max-width: 720px;
    margin: 0 auto;
}

.mm-single-hero .mm-cat-badge {
    margin-bottom: 14px;
}

.mm-single-hero__title {
    color: #F8FAFC;
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 16px;
    line-height: 1.18;
    letter-spacing: -0.025em;
    max-width: 640px;
}

.mm-single-hero__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--mm-gray-400);
    font-size: 14px;
    flex-wrap: wrap;
}

.mm-single-hero__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--mm-gray-600);
}

/* ============================================================
   SINGLE: FEATURED IMAGE (overlaps hero)
   ============================================================ */
.mm-single-image {
    max-width: 720px;
    margin: -20px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.mm-single-image img {
    border-radius: 12px;
    width: 100%;
    height: 320px;
    display: block;
    object-fit: cover;
    border: 1px solid #0F172A;
}

/* ============================================================
   SINGLE: ARTICLE CONTENT (prose)
   ============================================================ */
.mm-single-content {
    padding: 36px 20px 0;
}

.mm-single-content__inner {
    max-width: 720px;
    margin: 0 auto;
}

.mm-prose {
    font-size: 17px;
    line-height: 1.8;
    color: var(--mm-gray-700);
}

.mm-prose h2 {
    font-size: 22px;
    font-weight: 800;
    color: #1E293B;
    margin: 36px 0 14px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.mm-prose h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    margin: 28px 0 10px;
    line-height: 1.3;
}

.mm-prose p {
    margin: 0 0 18px;
}

.mm-prose strong {
    color: #1E293B;
    font-weight: 700;
}

.mm-prose ul,
.mm-prose ol {
    padding-left: 20px;
    margin: 0 0 18px;
}

.mm-prose ul li,
.mm-prose ol li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.mm-prose a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mm-prose a:hover {
    color: #1D4ED8;
}

.mm-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.mm-prose blockquote {
    border-left: 3px solid var(--mm-orange);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--mm-gray-50);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--mm-gray-600);
}

.mm-prose blockquote p:last-child {
    margin-bottom: 0;
}

.mm-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.mm-prose th,
.mm-prose td {
    padding: 10px 14px;
    border: 1px solid var(--mm-gray-200);
    text-align: left;
}

.mm-prose th {
    background: var(--mm-gray-50);
    font-weight: 700;
    color: var(--mm-gray-900);
}

.mm-prose code {
    background: var(--mm-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.mm-prose pre {
    background: var(--mm-dark);
    color: var(--mm-gray-300);
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.mm-prose pre code {
    background: transparent;
    padding: 0;
}

/* ============================================================
   SINGLE: TAGS
   ============================================================ */
.mm-single-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid #E2E8F0;
}

.mm-tag {
    background: var(--mm-gray-100);
    color: var(--mm-gray-600);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--mm-gray-200);
    text-decoration: none;
    transition: all 0.15s ease;
}

.mm-tag:hover {
    background: var(--mm-gray-200);
    color: var(--mm-gray-700);
}

/* ============================================================
   SINGLE: AUTHOR BOX
   ============================================================ */
.mm-author-box {
    display: flex;
    gap: 16px;
    padding: 24px;
    margin-top: 32px;
    background: #F8FAFC;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
}

.mm-author-box__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mm-author-box__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-author-box__avatar-fallback {
    font-size: 22px;
}

.mm-author-box__content {
    flex: 1;
}

.mm-author-box__name {
    font-weight: 700;
    font-size: 15px;
    color: #1E293B;
    margin-bottom: 4px;
}

.mm-author-box__bio {
    font-size: 14px;
    color: var(--mm-gray-500);
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   SINGLE: RELATED POSTS
   ============================================================ */
.mm-related-posts {
    padding: 48px 20px;
    margin-top: 32px;
    background: #F8FAFC;
}

.mm-related-posts__inner {
    max-width: 720px;
    margin: 0 auto;
}

.mm-related-posts__title {
    font-size: 22px;
    font-weight: 800;
    color: #1E293B;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.mm-related-posts__grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================================
   ARCHIVE: EMPTY STATE
   ============================================================ */
.mm-blog-empty {
    text-align: center;
    padding: 60px 20px;
}

.mm-blog-empty p {
    font-size: 16px;
    color: #64748B;
    margin: 0 0 20px;
}

.mm-blog-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1E293B;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.15s;
}

.mm-blog-empty__btn:hover {
    background: #0F172A;
}

/* ============================================================
   RESPONSIVE: TABLET (< 992px)
   ============================================================ */
@media (max-width: 991px) {
    .mm-related-posts__grid {
        gap: 12px;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (< 768px)
   ============================================================ */
@media (max-width: 767px) {
    /* Archive Hero */
    .mm-blog-hero {
        padding: 32px 16px 36px;
    }

    .mm-blog-hero__title {
        font-size: 26px;
    }

    .mm-blog-hero__desc {
        font-size: 15px;
    }

    /* Category Filter */
    .mm-category-filter {
        padding: 0 16px;
    }

    .mm-category-filter__inner {
        padding: 10px 0;
    }

    /* Posts Section */
    .mm-blog-posts {
        padding: 24px 16px 36px;
    }

    /* Post Card - stack vertically */
    .mm-post-card {
        flex-direction: column;
        padding: 16px;
    }

    .mm-post-card__thumb {
        width: 100%;
        min-width: 100%;
        height: 160px;
        min-height: 160px;
    }

    .mm-post-card__title {
        font-size: 16px;
    }

    /* Featured Card */
    .mm-post-card--featured .mm-post-card__thumb {
        height: 0;
        min-height: 0;
        padding-bottom: 52.5%;
    }

    .mm-post-card__title--featured {
        font-size: 20px;
    }

    /* Pagination */
    .mm-pagination a,
    .mm-pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* Single Hero */
    .mm-single-hero {
        padding: 32px 16px 40px;
    }

    .mm-single-hero__title {
        font-size: 26px;
    }

    .mm-single-hero__meta {
        font-size: 13px;
        gap: 12px;
    }

    /* Featured Image */
    .mm-single-image {
        padding: 0 16px;
        margin-top: -16px;
    }

    .mm-single-image img {
        border-radius: 8px;
        height: 200px;
    }

    /* Prose */
    .mm-single-content {
        padding: 24px 16px 0;
    }

    .mm-prose {
        font-size: 16px;
    }

    .mm-prose h2 {
        font-size: 20px;
        margin: 28px 0 12px;
    }

    .mm-prose h3 {
        font-size: 17px;
        margin: 24px 0 8px;
    }

    /* Author Box - stack */
    .mm-author-box {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .mm-author-box__avatar {
        margin: 0 auto;
    }

    /* Related Posts */
    .mm-related-posts {
        padding: 36px 16px;
    }

    .mm-related-posts__title {
        font-size: 20px;
    }
}
