/**
 * DhNews InfoboardOffice4K Styles
 * Additional styles for news display in InfoboardOffice4K layout
 */

.tx-dhnews-infoboard-office4k {
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;

    .infoboard-office4k-content-card {
        height: 100%;
        position: relative;
        transition: opacity 0.8s ease-in-out;

        &.transitioning {
            opacity: 0;
        }
    }

    // Loading state
    .news-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: #666;

        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #556B2F;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 1.5rem;
        }

        p {
            font-size: 1.25rem;
            margin: 0;
        }
    }

    .news-item-header,
    .news-item-content,
    .news-item-description,
    .news-item-pdf-container,
    .news-item-video-container,
    .news-item-images-container {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    // News item header
    .news-item-header {
        margin-bottom: 2rem;
        width: 100%;

        .news-date {
            font-size: 1.25rem;
            color: #556B2F;
            margin-bottom: 1rem;
            font-family: 'Garamond', 'Times New Roman', Georgia, serif;
        }

        .news-title {
            font-size: 3rem;
            margin-bottom: 0.5rem;
            line-height: 1.2;
            display: block;
        }

        .news-subtitle {
            font-size: 1.75rem;
            font-weight: 400;
            opacity: 0.8;
            margin: 0;
        }
    }

    // News item content
    .news-item-content {
        font-size: 1.25rem;
        line-height: 1.8;
        color: #666;

        h2, h3, h4 {
            margin-top: 2rem;
            margin-bottom: 1rem;
        }

        p {
            margin-bottom: 1rem;
        }

        ul, ol {
            margin-bottom: 1.5rem;
            padding-left: 2rem;

            li {
                margin-bottom: 0.75rem;
            }
        }
    }

    // PDF container
    .news-item-pdf-container {
        height: calc(100% - 150px);
        min-height: 600px;
        position: relative;
        background-color: #f5f5f5;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;

        #dflip-pdf-viewer {
            width: 100%;
            height: 100%;
        }

        // Fallback for PDF viewer
        p {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            font-size: 1.5rem;
            color: #666;

            a {
                color: #556B2F;
                text-decoration: underline;
                margin-left: 0.5rem;

                &:hover {
                    color: #3d4e21;
                }
            }
        }
    }

    // Video container
    .news-item-video-container {
        height: calc(100% - 150px);
        min-height: 600px;
        position: relative;
        background-color: #000;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;

        .news-video-player {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        .news-video-embed {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;

            iframe {
                border: 0;
                width: 100%;
                height: 100%;
            }
        }
    }

    // Images container
    .news-item-images-container {
        margin-bottom: 2rem;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;

        img {
            width: 100%;
            height: auto;
            display: block;
        }
    }

    .news-item-description {
        font-size: 1.25rem;
        line-height: 1.8;
        color: #666;
        margin-top: 2rem;
    }
}

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

// Ultra HD optimizations
@media (min-width: 2560px) {
    .tx-dhnews-infoboard-office4k {
        .news-item-pdf-container,
        .news-item-video-container,
        .news-item-images-container,
        .news-item-content,
        .news-item-description {
            max-width: 1800px;
        }

        .news-item-content,
        .news-item-description {
            font-size: 1.4rem;
        }
    }
}

// 4K optimizations
@media (min-width: 3840px) {
    .tx-dhnews-infoboard-office4k {
        .news-item-header {
            h1 {
                font-size: 4rem;
            }

            h2 {
                font-size: 2.5rem;
            }

            .news-date {
                font-size: 1.5rem;
            }
        }

        .news-item-content,
        .news-item-description {
            font-size: 1.5rem;
        }

        .news-item-pdf-container,
        .news-item-images-container {
            max-width: 2000px;
            width: 2000px;
            min-height: 1400px;
        }

        .news-item-pdf-container #dflip-pdf-viewer {
            height: 100%;
        }

        .news-item-video-container {
            min-height: 1400px;

            .news-video-player,
            .news-video-embed {
                position: relative;
                width: 2000px;
                height: 1400px;
                margin: 0 auto;
            }
        }

        .news-item-content {
            font-size: 1.6rem;
        }

        .news-loading {
            .loading-spinner {
                width: 80px;
                height: 80px;
                border-width: 5px;
            }

            p {
                font-size: 1.5rem;
            }
        }
    }
}

// Smooth transitions
.tx-dhnews-infoboard-office4k * {
    transition: opacity 0.3s ease-in-out;
}


