/* ============================================================
   Přijímačky v kapse — Magazine Custom Styles
   Brand colors aligned with shared palette from AGENTS.md
   ============================================================ */

:root {
    --brand-primary: #2D6DA8;
    --brand-green: #27AE60;
    --brand-accent: #ffc107;
    --brand-purple: #8e44ad;
    --color-text: #3d4449;
    --color-text-light: #7f888f;
    --color-border: rgba(210, 215, 217, 0.75);
    --color-bg-light: #f5f6f7;
    --color-pr-bg: #fff3cd;
    --color-pr-border: #ffc107;
}

/* Override default theme uppercase subtitles */
header p,
#banner header p {
    text-transform: none;
}

/* --- Article Metadata (date, author, category) --- */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1.5em;
    align-items: center;
    font-size: 0.9em;
    color: var(--color-text-light);
    margin: 0.5em 0 1.5em 0;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--color-border);
}

.article-meta--compact {
    margin: 0.25em 0 0.75em 0;
    padding-bottom: 0.5em;
    font-size: 0.85em;
}

.article-meta i {
    margin-right: 0.3em;
    color: var(--brand-primary);
}

.article-meta a {
    color: var(--brand-primary);
    border-bottom: none;
    text-decoration: none;
}

.article-meta a:hover {
    color: var(--brand-green);
    text-decoration: underline;
}

/* --- PR / Sponsored Content Badge --- */
.article-meta__pr-badge {
    background: var(--color-pr-bg);
    border: 1px solid var(--color-pr-border);
    color: #856404;
    padding: 0.15em 0.6em;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* --- Tags --- */
.article-tags {
    margin: 2em 0;
    padding-top: 1em;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
}

.article-tags i {
    margin-right: 0.4em;
    color: var(--brand-primary);
}

.article-tags__tag {
    display: inline-block;
    background: var(--color-bg-light);
    color: var(--color-text) !important;
    padding: 0.2em 0.6em;
    margin: 0.2em;
    border-radius: 3px;
    font-size: 0.85em;
    border-bottom: none !important;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.article-tags__tag:hover {
    background: var(--brand-primary);
    color: #fff !important;
}

/* --- Share Buttons --- */
.article-share {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin: 2em 0;
    padding: 1em 0;
    border-top: 1px solid var(--color-border);
}

.article-share strong {
    font-size: 0.9em;
    color: var(--color-text);
}

.article-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    color: #fff !important;
    font-size: 1em;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.article-share__btn:hover {
    transform: scale(1.1);
    opacity: 0.85;
}

.article-share__btn--fb {
    background: #1877f2;
}

.article-share__btn--wa {
    background: #25D366;
}

.article-share__btn--email {
    background: var(--brand-primary);
}

.article-share__btn--copy {
    background: var(--brand-purple);
}

/* --- Sidebar: CTA Banner --- */
.sidebar-cta {
    background: linear-gradient(135deg, var(--brand-primary), #1a4a7a);
    color: #fff;
    padding: 1.5em;
    border-radius: 6px;
    margin-bottom: 2em;
}

.sidebar-cta header h2 {
    color: #fff;
    border-bottom-color: var(--brand-accent);
    font-size: 1.2em;
}

.sidebar-cta p {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-cta .button--cta {
    background: var(--brand-green) !important;
    color: #fff !important;
    border-color: var(--brand-green) !important;
    font-weight: 600;
}

.sidebar-cta .button--cta:hover {
    background: #219a52 !important;
    border-color: #219a52 !important;
}

.sidebar-cta__disclosure {
    margin-top: 0.5em;
    margin-bottom: 0 !important;
    text-align: right;
}

.sidebar-cta__disclosure small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75em;
}

/* --- Sidebar: Tiráž Section --- */
.sidebar-tiraz {
    background: var(--color-bg-light);
    padding: 1.5em;
    border-radius: 6px;
    margin-bottom: 2em;
    border-left: 4px solid var(--brand-primary);
}

.sidebar-tiraz header h2 {
    font-size: 1.1em;
}

.sidebar-tiraz p {
    font-size: 0.9em;
    margin-bottom: 0.5em;
}

/* --- Brand Accents --- */
#header .logo {
    font-size: 0.9em !important;
}
#header .logo strong {
    color: var(--brand-primary);
}

#sidebar .inner > nav#menu ul li a.active {
    color: var(--brand-primary);
}

div.plugin h2.plugin-label {
    border-bottom-color: var(--brand-primary);
}

/* Homepage masthead (static magazine H1) */
.home-masthead {
    padding: 1.75em 0 1.25em 0;
    border-bottom: 1px solid var(--color-border);
}

.home-masthead h1 {
    font-size: 1.65em !important;
    line-height: 1.3;
    margin: 0 !important;
    color: var(--brand-primary);
}

/* Featured article banner branding */
#banner {
    padding: 2.75em 0 3.5em 0 !important;
}

#banner .content header h1,
#banner .content header h2 {
    color: var(--color-text);
}

.banner-title-link {
    color: inherit;
    border-bottom: none !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.banner-title-link:hover {
    color: var(--brand-primary) !important;
}

/* --- Heading Sizes Overrides --- */
h1, h2, h3, h4, h5, h6 {
    color: #2b2e30;
    font-family: "Roboto Slab", serif;
    font-weight: 700;
}

h1 {
    font-size: 2.1em !important;
    line-height: 1.3;
    margin: 0 0 0.5em 0;
}

#banner h1,
#banner h2 {
    font-size: 2.2em !important;
    line-height: 1.25;
    margin: 0 0 0.5em 0 !important;
}

h2 {
    font-size: 1.5em !important;
    margin: 1.5em 0 0.8em 0;
    line-height: 1.35;
    border-bottom: none;
}

h3 {
    font-size: 1.2em !important;
    margin: 1.2em 0 0.6em 0;
}

h4 {
    font-size: 1.05em !important;
    margin: 1.2em 0 0.6em 0;
}

/* --- Další články: Modern Grid & Compact Image Layout --- */
.posts {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3.5em 2.5em !important;
    margin: 0 0 3em 0 !important;
    width: 100% !important;
}

.posts article {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.posts article:before,
.posts article:after {
    display: none !important;
}

.posts article p {
    flex-grow: 1;
    margin-bottom: 1.25em !important;
}

.posts article .actions {
    margin-top: auto !important;
    margin-bottom: 0 !important;
}

/* Post list grid title size */
.posts article h3 {
    font-size: 1.18em !important;
    line-height: 1.38;
    margin: 0 0 0.5em 0 !important;
}

.posts article h3 a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.posts article h3 a:hover {
    color: var(--brand-primary);
}

/* Post list article image: substantially smaller, clean 1:1 illustration thumbnail */
.posts article .image {
    display: block;
    margin: 0 0 1.25em 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f5fa;
    width: 180px;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    box-shadow: 0 3px 12px rgba(45, 109, 168, 0.08);
    border: 1px solid rgba(45, 109, 168, 0.1);
}

.posts article .image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
}

.posts article .image:hover img {
    transform: scale(1.05);
}

@media screen and (max-width: 1100px) {
    .posts {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2.5em 2em !important;
    }
}

@media screen and (max-width: 650px) {
    .posts {
        grid-template-columns: 1fr !important;
        gap: 2.5em !important;
    }
    .posts article .image {
        width: 160px;
    }
}

/* Main title under page template */
header.main h1 {
    font-size: 2.1em !important;
}

/* --- Sidebar Styling --- */
.sidebar-brand {
    margin-bottom: 0.8em;
    padding-bottom: 0.6em;
    border-bottom: 2px solid var(--brand-primary);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 0.75em;
    text-decoration: none;
    border-bottom: none !important;
}

.sidebar-brand__logo {
    width: 36px;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.sidebar-brand__title {
    font-family: "Roboto Slab", serif;
    font-size: 1.15em;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1.2;
}

.sidebar-heading {
    display: inline-block;
    font-family: "Roboto Slab", serif;
    font-size: 0.85em !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #2b2e30;
    margin: 0.6em 0 0.25em 0 !important;
    padding-bottom: 0.15em;
    border-bottom: 2px solid var(--brand-primary);
}

.sidebar-nav {
    margin-bottom: 0.4em;
}

.sidebar-nav ul {
    list-style: none;
    padding-left: 0;
}

.sidebar-nav ul li {
    padding: 0.1em 0;
}

.sidebar-nav ul li a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: none !important;
    font-weight: 600;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.sidebar-nav ul li a:hover {
    color: var(--brand-primary);
}

.sidebar-info {
    font-size: 0.8em;
    line-height: 1.35;
    color: var(--color-text);
}

.sidebar-info p {
    margin-bottom: 0.35em;
}

.sidebar-info strong {
    color: #2b2e30;
}

.sidebar-info__legal {
    font-size: 0.78em;
    color: var(--color-text-light);
    line-height: 1.3;
}

.sidebar-info__email {
    color: var(--brand-primary) !important;
    border-bottom: none !important;
    text-decoration: none;
}

.sidebar-info__email:hover {
    text-decoration: underline;
}

/* Header alignment (applied globally to sit next to the sidebar toggle button) */
#header {
    padding-top: 1.6em !important;
    padding-left: 6.5em !important;
    display: flex;
    align-items: center;
    min-height: 4.5em;
}
#header .logo {
    margin-top: 0 !important;
    line-height: 1.2;
}

/* Sidebar Social Icons */
.sidebar-social {
    display: flex;
    gap: 0.75em;
    align-items: center;
    margin: 1em 0 1em 0;
    padding-top: 0;
    border-top: none !important;
}

.sidebar-social__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    background: var(--color-bg-light);
    color: var(--brand-primary) !important;
    font-size: 1.05em;
    border-bottom: none !important;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-social__icon:hover {
    background: var(--brand-primary);
    color: #fff !important;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media screen and (max-width: 736px) {
    .home-masthead {
        padding: 1.25em 0 0.9em 0;
    }

    .home-masthead h1 {
        font-size: 1.3em !important;
    }

    #banner {
        padding: 1.75em 0 2.5em 0 !important;
    }

    #banner h1,
    #banner h2 {
        font-size: 1.65em !important;
    }

    #header .icons {
        display: none !important;
    }

    #header .logo {
        font-size: 0.95em !important;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 0.4em;
    }

    .article-meta span {
        text-align: left !important;
    }

    .article-share {
        flex-wrap: wrap;
    }
}

/* Detail článku - Cover Image Banner */
.image.main {
    max-height: 360px !important;
    overflow: hidden;
    border-radius: 10px;
    margin: 1.5em 0 2em 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.image.main img {
    width: 100% !important;
    height: 360px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 10px !important;
}

@media screen and (max-width: 736px) {
    .image.main {
        max-height: 220px !important;
        margin: 1em 0 1.5em 0 !important;
    }
    .image.main img {
        height: 220px !important;
    }
}

/* ============================================================
   Redakce Page: Professional Editorial Team Layout
   ============================================================ */
.editorial-intro {
    background: #f8fafc;
    border-left: 4px solid var(--brand-primary);
    padding: 1.2em 1.5em;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2.5em;
    font-size: 1.05em;
    line-height: 1.6;
    color: var(--color-text);
}

.editorial-team {
    display: flex;
    flex-direction: column;
    gap: 2em;
    margin-bottom: 2.5em;
}

.editorial-card {
    display: flex;
    gap: 1.75em;
    align-items: flex-start;
    padding: 1.75em;
    background: #ffffff;
    border: 1px solid rgba(45, 109, 168, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.editorial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 109, 168, 0.1);
    border-color: rgba(45, 109, 168, 0.3);
}

.editorial-card--lead {
    background: linear-gradient(180deg, #fdfefe 0%, #f4f8fc 100%);
    border: 1.5px solid rgba(45, 109, 168, 0.28);
    box-shadow: 0 6px 20px rgba(45, 109, 168, 0.08);
}

.editorial-card__avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #E2E5E9;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(45, 109, 168, 0.15);
    outline: 2px solid rgba(45, 109, 168, 0.25);
}

.editorial-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.editorial-card__body {
    flex-grow: 1;
}

.editorial-card__header {
    margin-bottom: 0.4em;
}

.editorial-card__name {
    font-size: 1.35em !important;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 0.15em 0 !important;
    line-height: 1.25;
}

.editorial-card__role {
    display: inline-block;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4em;
}

.editorial-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 0.3em 0 0.8em 0;
}

.editorial-card__tag {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 600;
    background: #eef4fb;
    color: #245889;
    padding: 0.2em 0.65em;
    border-radius: 20px;
    border: 1px solid rgba(45, 109, 168, 0.18);
}

.editorial-card__bio {
    font-size: 0.96em;
    line-height: 1.6;
    color: #4a5568;
    margin: 0 0 0.8em 0 !important;
}

.editorial-card__contact {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin-top: 0.5em;
}

.editorial-card__contact a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed var(--brand-primary) !important;
}

.editorial-card__contact a:hover {
    color: var(--brand-green);
    border-bottom-style: solid !important;
}

.editorial-join {
    background: linear-gradient(135deg, #f8fafc 0%, #eef5fb 100%);
    border: 1px dashed rgba(45, 109, 168, 0.35);
    border-radius: 12px;
    padding: 1.8em 2em;
    display: flex;
    align-items: center;
    gap: 1.5em;
    margin-top: 2.5em;
}

.editorial-join__icon {
    flex-shrink: 0;
    width: 3em;
    height: 3em;
    background: var(--brand-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
}

.editorial-join__text h3 {
    margin: 0 0 0.3em 0 !important;
    font-size: 1.2em !important;
    color: var(--brand-primary);
}

.editorial-join__text p {
    margin: 0 !important;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--color-text);
}

@media screen and (max-width: 680px) {
    .editorial-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5em 1.2em;
        gap: 1.2em;
    }
    .editorial-card__tags {
        justify-content: center;
    }
    .editorial-card__avatar {
        width: 100px;
        height: 100px;
    }
    .editorial-join {
        flex-direction: column;
        text-align: center;
        padding: 1.5em 1.2em;
    }
}


/* KaTeX Math Formula Rendering */
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.6em 0;
    margin: 1.2em 0;
}
.katex {
    font-size: 1.05em;
}
