/* ============================================================
   detail-aktuality.css — Fajn Účet
   Styly specifické pro stránku "Detail aktuality".
   Obecné styly (layout, sidebar, header…) jsou v obecne.css.
   ============================================================ */

/* =============================================================
   LAYOUT STRÁNKY
   ============================================================= */
.detail-page {
    padding-bottom: 3rem;
    overflow-x: hidden;
    max-width: 100%;
}

/* =============================================================
   NAVIGACE ZPĚT
   ============================================================= */
.detail-back {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: all 0.15s;
    padding: 0.5rem 1rem;
    border: 2px solid hsl(var(--border));
    border-radius: 9999px;
    background: white;
    margin-bottom: -0.5rem;
}

.detail-back:hover {
    border-color: hsl(var(--primary) / 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* =============================================================
   ČLÁNEK — KARTA
   ============================================================= */
.detail-article {
    overflow: hidden;
}

/* Náhledový obrázek (4:3) */
.detail-article__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.detail-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge kategorie na obrázku */
.detail-article__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}

.detail-article__badge--kariera    { background: hsl(142 76% 36% / 0.85); color: #fff; }
.detail-article__badge--trh-prace  { background: hsl(217 91% 60% / 0.85); color: #fff; }
.detail-article__badge--tipy       { background: hsl(270 67% 47% / 0.85); color: #fff; }
.detail-article__badge--legislativa { background: hsl(340 82% 52% / 0.85); color: #fff; }

/* =============================================================
   HLAVIČKA ČLÁNKU
   ============================================================= */
.detail-article__header {
    padding: 1.5rem 1.5rem 0;
}

@media (min-width: 768px) {
    .detail-article__header { padding: 2rem 2rem 0; }
}

.detail-article__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .detail-article__title { font-size: 1.75rem; }
}

.detail-article__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid hsl(var(--border));
}

.detail-article__author,
.detail-article__date,
.detail-article__reading {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}

.detail-article__author {
    font-weight: 500;
}

/* =============================================================
   OBSAH ČLÁNKU
   ============================================================= */
.detail-article__content {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .detail-article__content { padding: 1.5rem 2rem; }
}

.detail-article__lead {
    font-size: 1.0625rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.detail-article__content h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-top: 1.75rem;
    margin-bottom: 0.625rem;
}

.detail-article__content p {
    font-size: 0.9375rem;
    color: hsl(var(--foreground) / 0.85);
    line-height: 1.75;
    margin-bottom: 1rem;
}

/* Citát */
.detail-article__quote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid hsl(var(--primary));
    background: hsl(var(--primary) / 0.04);
    border-radius: 0 0.75rem 0.75rem 0;
}

.detail-article__quote p {
    font-size: 1rem;
    font-style: italic;
    color: hsl(var(--foreground));
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.detail-article__quote cite {
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
}

/* Obrázky v obsahu článku — obecné */
.detail-article__content figure {
    margin: 1.5rem 0;
}

.detail-article__content figure img {
    display: block;
    border-radius: 0.5rem;
    height: auto;
}

.detail-article__content figcaption {
    font-size: 0.8125rem;
    font-style: italic;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Obrázek — na celou šířku */
.detail-article__figure--full {
    margin-left: 0;
    margin-right: 0;
}

.detail-article__figure--full img {
    width: 100%;
}

/* Obrázek — menší, zarovnaný doleva */
.detail-article__content .detail-article__figure--left {
    float: left;
    max-width: 40%;
    margin: 1.5rem 1.5rem 1.5rem 0;
}

.detail-article__figure--left img {
    width: 100%;
}

@media (max-width: 639px) {
    .detail-article__figure--left {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }
}

/* Obrázek — menší, zarovnaný doprava */
.detail-article__content .detail-article__figure--right {
    float: right;
    max-width: 40%;
    margin: 1.5rem 0 1.5rem 1.5rem;
}

.detail-article__figure--right img {
    width: 100%;
}

@media (max-width: 639px) {
    .detail-article__figure--right {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }
}

/* Clearfix po float obrázcích */
.detail-article__content::after {
    content: '';
    display: table;
    clear: both;
}

/* Tip box */
.detail-article__tip {
    display: flex;
    gap: 0.875rem;
    padding: 1.25rem;
    margin-top: 1.5rem;
    background: hsl(142 76% 36% / 0.06);
    border: 1px solid hsl(142 76% 36% / 0.2);
    border-radius: 0.75rem;
}

.detail-article__tip-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    background: hsl(142 76% 36% / 0.12);
    color: hsl(142 76% 36%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-article__tip-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: hsl(142 76% 30%);
    margin-bottom: 0.25rem;
}

.detail-article__tip p:last-child {
    font-size: 0.875rem;
    color: hsl(var(--foreground) / 0.8);
    line-height: 1.65;
    margin-bottom: 0;
}

/* =============================================================
   SDÍLENÍ
   ============================================================= */
.detail-article__share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid hsl(var(--border));
    border-bottom: 1px solid hsl(var(--border));
}

@media (min-width: 768px) {
    .detail-article__share { padding: 1rem 2rem; }
}

.detail-article__share-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
}

.detail-article__share-buttons {
    display: flex;
    gap: 0.5rem;
}

.detail-share-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(var(--border));
    background: white;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
}

.detail-share-btn svg {
    width: 0.9375rem;
    height: 0.9375rem;
}

.detail-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.detail-share-btn--facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: #fff;
}

.detail-share-btn--x:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}

.detail-share-btn--linkedin:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    color: #fff;
}

.detail-share-btn--copy:hover {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: #fff;
}

.detail-share-btn--copied {
    background: hsl(142 76% 36%) !important;
    border-color: hsl(142 76% 36%) !important;
    color: #fff !important;
}

/* =============================================================
   PATIČKA ČLÁNKU (autor + tagy)
   ============================================================= */
.detail-article__footer {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (min-width: 768px) {
    .detail-article__footer { padding: 1.25rem 2rem; }
}

/* Karta autora */
.detail-article__author-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    margin: -0.5rem -0.75rem;
    transition: background 0.15s;
}

.detail-article__author-card:hover {
    background: hsl(var(--primary) / 0.05);
}

.detail-article__author-card:hover .detail-article__author-name {
    color: hsl(var(--primary));
}

.detail-article__author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-article__author-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.detail-article__author-role {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

/* Tagy */
.detail-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.detail-article__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: all 0.15s;
}

.detail-article__tag:hover {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

/* =============================================================
   SOUVISEJÍCÍ AKTUALITY
   ============================================================= */
.detail-related {
    margin-top: 0.5rem;
}

.detail-related__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 767px) {
    .detail-related__grid { grid-template-columns: 1fr; }
}

.detail-related__item {
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.detail-related__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-related__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.detail-related__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-related__badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.detail-related__badge--kariera    { background: hsl(142 76% 36% / 0.85); color: #fff; }
.detail-related__badge--trh-prace  { background: hsl(217 91% 60% / 0.85); color: #fff; }
.detail-related__badge--tipy       { background: hsl(270 67% 47% / 0.85); color: #fff; }
.detail-related__badge--legislativa { background: hsl(340 82% 52% / 0.85); color: #fff; }

.detail-related__body {
    padding: 0.875rem 1rem;
}

.detail-related__item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    line-height: 1.4;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-related__date {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* =============================================================
   RESPONSIVITA
   ============================================================= */
@media (max-width: 639px) {
    .detail-article__header {
        padding: 1.25rem 1rem 0;
    }

    .detail-article__title {
        font-size: 1.25rem;
    }

    .detail-article__meta {
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-article__content {
        padding: 1.25rem 1rem;
    }

    .detail-article__lead {
        font-size: 0.9375rem;
    }

    .detail-article__share {
        padding: 1rem;
    }

    .detail-article__footer {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-article__quote {
        padding: 1rem 1.25rem;
    }

    .detail-article__tip {
        flex-direction: column;
        gap: 0.625rem;
    }
}
