/* ==========================================================================
   ARTICLE DETAIL - Detail článku
   ========================================================================== */

/* Layout s postranním panelem */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==========================================================================
   ARTICLE DETAIL - Hlavní obsah článku
   ========================================================================== */

.article-detail {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .article-detail {
        padding: 1.5rem;
    }
}

/* Header článku */
.article-detail-header {
    margin-bottom: 2rem;
}

.article-detail-header .section-header {
    position: relative;
    margin-bottom: 1.5rem;
}

.article-detail-header .section-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1e293b;
    margin: 0 0 0.5rem;
}

.article-detail-header .section-header .eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #175ee6;
    background: rgba(23, 94, 230, 0.08);
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .article-detail-header .section-header h1 {
        font-size: 1.75rem;
    }
}

/* Čas čtení */
.article-reading-time-simple {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.article-reading-time-simple i {
    color: #175ee6;
}

/* Tagy a kategorie */
.article-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag--category {
    background: rgba(23, 94, 230, 0.08);
    color: #175ee6;
    border: 1px solid rgba(23, 94, 230, 0.2);
}

.tag--category:hover {
    background: rgba(23, 94, 230, 0.15);
    border-color: rgba(23, 94, 230, 0.3);
}

.tag--tag {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.tag--tag:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.tag i {
    font-size: 0.75rem;
}

/* Cover obrázek */
.article-detail-cover {
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.article-detail-cover img:hover {
    transform: scale(1.02);
}

/* Obsah článku */
.article-detail-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 3rem;
}

.article-detail-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.article-detail-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 2rem 0 0.875rem;
    line-height: 1.4;
}

.article-detail-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.5rem 0 0.75rem;
}

.article-detail-content p {
    margin: 0 0 1.25rem;
}

.article-detail-content ul,
.article-detail-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.75rem;
}

.article-detail-content li {
    margin-bottom: 0.5rem;
}

.article-detail-content a {
    color: #175ee6;
    text-decoration: underline;
    text-decoration-color: rgba(23, 94, 230, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

.article-detail-content a:hover {
    text-decoration-color: #175ee6;
}

.article-detail-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-left: 4px solid #175ee6;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-detail-content figure {
    margin: 2rem 0;
}

.article-detail-content figcaption {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.article-detail-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.article-detail-content code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Courier New', monospace;
}

.article-detail-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.article-detail-content th,
.article-detail-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.article-detail-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.article-detail-content tr:hover {
    background: #f8fafc;
}

/* ==========================================================================
   GALERIE
   ========================================================================== */

.article-gallery {
    margin-bottom: 3rem;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(23, 94, 230, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 1.5rem 1rem 0.75rem;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* ==========================================================================
   PŘÍLOHY
   ========================================================================== */

.article-attachments {
    margin-bottom: 3rem;
}

.attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-item {
    margin-bottom: 0.75rem;
}

.attachment-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.attachment-item a:hover {
    background: white;
    border-color: #175ee6;
    box-shadow: 0 2px 8px rgba(23, 94, 230, 0.1);
}

.attachment-item i {
    font-size: 1.5rem;
    color: #175ee6;
    flex-shrink: 0;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.attachment-desc {
    font-size: 0.875rem;
    color: #64748b;
}

.attachment-size {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
    flex-shrink: 0;
}

/* ==========================================================================
   FOOTER ČLÁNKU
   ========================================================================== */

.article-footer {
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
    margin-top: 3rem;
}

.article-signature {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   SOUVISEJÍCÍ ČLÁNKY
   ========================================================================== */

.related-articles {
    margin-top: 4rem;
    padding: 3rem 0;
    background: #f8fafc;
    border-radius: 12px;
}

.related-articles .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.related-articles .section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
}

.related-articles .section-header .eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #175ee6;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

.related-articles .article-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-articles .article-card:hover {
    box-shadow: 0 8px 24px rgba(23, 94, 230, 0.15);
    transform: translateY(-4px);
}

.related-articles .article-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

.related-articles .article-card-title a {
    color: #1e293b;
    text-decoration: none;
}

.related-articles .article-card-title a:hover {
    color: #175ee6;
}

.related-articles .article-card-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   LIGHTBOX (Kompatibilní s veřejným webem)
   ========================================================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: calc(90vh - 120px);
    width: 100%;
    height: 100%;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    z-index: 1002;
}

.lightbox-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-description {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.4;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.lightbox-download {
    position: absolute;
    top: -40px;
    left: 0;
    background: transparent;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.lightbox-download:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}
