/* =========================================
   Mirage Mir – custom theme styles
   ========================================= */

/* ----- Root tokens (z globals.css) ----- */

:root {
    --mm-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mm-serif: "Georgia", "Iowan Old Style", "Times New Roman", serif;

    /* farby inšpirované globals.css */
    --mm-bg: #ffffff;
    --mm-surface: #f3f3f5;     /* pozadie okolo kariet */
    --mm-card-bg: #ffffff;
    --mm-border: rgba(0, 0, 0, 0.1);
    --mm-text: #030213;
    --mm-muted: #717182;
    --mm-accent: #030213;
    --mm-accent-soft: #e9ebef;
}

/* ----- Global body / layout ----- */

body {
    font-family: var(--mm-sans);
    background: var(--mm-bg);
    color: var(--mm-text);
}

.gh-main {
    padding: 56px 0 80px;
    background: var(--mm-surface);
}

.gh-main-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   FEED (News list)
   ========================================= */

.mm-feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    gap: 32px;
    align-items: flex-start;
}

.mm-feed-header {
    margin-bottom: 24px;
    text-align: left;
}

.mm-feed-title {
    font-family: var(--mm-serif);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--mm-text);
}

.mm-feed-subtitle {
    font-size: 14px;
    color: var(--mm-muted);
}

.mm-feed-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ----- Feed card ----- */

.mm-feed-card {
    background: var(--mm-card-bg);
    border-radius: 10px; /* približne 0.625rem */
    border: 1px solid var(--mm-border);
    padding: 24px 28px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.mm-feed-card-topline {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4f46e5;
    margin-bottom: 8px;
}

.mm-feed-card-topline a {
    color: inherit;
    text-decoration: none;
}

.mm-feed-card-title {
    font-family: var(--mm-serif);
    font-size: 22px;
    line-height: 1.35;
    margin: 0 0 6px;
}

.mm-feed-card-title a {
    color: var(--mm-text);
    text-decoration: none;
}

.mm-feed-card-title a:hover {
    text-decoration: underline;
}

.mm-feed-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 10px;
}

.mm-feed-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--mm-muted);
    margin-top: 8px;
}

.mm-feed-card-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mm-feed-card-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----- Buttons ----- */

.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 500;
}

.mm-btn-primary {
    background: #030213;
    color: #ffffff;
}

.mm-btn-primary:hover {
    background: #05051f;
}

.mm-btn-ghost {
    background: transparent;
    color: #030213;
    border-color: #d1d5db;
}

.mm-btn-ghost:hover {
    background: #f3f4f6;
}

.mm-feed-card-actions {
    display: flex;
    gap: 8px;
}

/* =========================================
   FEED SIDEBAR
   ========================================= */

.mm-feed-sidebar {
    position: sticky;
    top: 32px;
}

.mm-author-card {
    background: var(--mm-card-bg);
    border-radius: 10px;
    border: 1px solid var(--mm-border);
    padding: 20px 18px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
    text-align: left;
}

.mm-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #030213;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
}

.mm-author-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mm-author-bio {
    font-size: 13px;
    color: var(--mm-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* =========================================
   POST DETAIL (news detail view)
   ========================================= */

.mm-post-layout {
    max-width: 760px;
}

.mm-post-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--mm-muted);
    text-decoration: none;
    margin-bottom: 16px;
}

.mm-post-back:hover {
    text-decoration: underline;
}

.mm-post-tagline {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: 8px;
}

.mm-post-title {
    font-family: var(--mm-serif);
    font-size: 32px;
    line-height: 1.2;
    margin: 0 0 6px;
    color: var(--mm-text);
}

.mm-post-meta {
    font-size: 13px;
    color: var(--mm-muted);
    margin-bottom: 20px;
}

.mm-post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #111827;
}

.mm-post-content p {
    margin-bottom: 18px;
}

.mm-post-cta-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin: 28px 0;
}

/* =========================================
   BOOK READER + TOC
   ========================================= */

.mm-book-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: flex-start;
}

.mm-book-toc {
    position: sticky;
    top: 32px;
    font-size: 13px;
}

.mm-book-toc-title {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 8px;
}

.mm-book-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mm-book-toc-list li {
    margin-bottom: 6px;
}

.mm-book-toc-list a {
    text-decoration: none;
    color: #6b7280;
    font-size: 13px;
}

.mm-book-toc-list a:hover {
    color: #111827;
}

.mm-book-toc-list .is-active a {
    font-weight: 600;
    color: #111827;
}

/* hlavná knižná kolóna */

.mm-book-main {
    font-family: var(--mm-serif);
    max-width: 680px;
}

.mm-book-image {
    margin: 0 0 24px;
}

.mm-book-image img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 16px;
}

.mm-book-header {
    margin-bottom: 32px;
}

.mm-book-title {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 8px;
}

.mm-book-subtitle {
    font-size: 14px;
    color: var(--mm-muted);
}

.mm-book-content {
    font-size: 17px;
    line-height: 1.8;
    color: #111827;
}

.mm-book-content p {
    margin-bottom: 20px;
}

.mm-book-content h2 {
    font-size: 20px;
    margin: 28px 0 8px;
}

/* zvýraznenie anchoru pri skoku */

.mm-book-content :target {
    background: #fff7c2;
    transition: background 0.4s ease-out;
}

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

@media (max-width: 960px) {
    .mm-feed-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .mm-feed-sidebar {
        position: static;
        margin-top: 24px;
    }

    .mm-book-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .mm-book-toc {
        position: static;
        margin-bottom: 16px;
    }

    .mm-post-cta-row {
        flex-direction: column;
    }
}