/* 
 * CSS-Stile für den News-Bereich und den horizontalen Slide-Effekt
 * Diese Stile sollten in die bestehende 'css/styles.css' Datei integriert werden.
 */

/* 1. News Section Container */
.news-section {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--background-color, #f4f4f4);
	z-index: 1000;
	overflow-y: auto;
	padding-top: 80px;
	box-sizing: border-box;
	transform: translateX(100%);
	transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
	visibility: hidden;
	scrollbar-width: thin;
	scrollbar-gutter: stable both-edges;
}

.hidden-section {
	visibility: hidden;
	transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.news-section:not(.hidden-section) {
	transform: translateX(0);
	visibility: visible;
}

/* 2. Horizontaler Slide-Effekt */

/* Startposition: Außerhalb des Bildschirms rechts */
.news-section {
    transform: translateX(100%);
}


/* 3. News Content Styling */
.news-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--primary-color, #007bff);
    padding-bottom: 10px;
}

.news-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-color, #333);
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.news-header .close-btn:hover {
    background-color: var(--hover-color, rgba(0, 0, 0, 0.1));
}

.news-list {
    display: grid;
    gap: 40px;
}

.news-item {
    padding: 20px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 8px;
    background-color: var(--card-background, #fff);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.news-title {
    color: var(--primary-color, #007bff);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.news-date {
    display: block;
    color: var(--secondary-text-color, #666);
    font-size: 0.9em;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border-color, #eee);
    padding-bottom: 5px;
}

.news-content {
    line-height: 1.6;
    color: var(--text-color, #333);
}

/* Lade- und Fehlermeldungen */
.loading-message, .error-message, .info-message {
    text-align: center;
    padding: 50px;
    font-style: italic;
    color: var(--secondary-text-color, #666);
}

.error-message {
    color: #d9534f; /* Rot für Fehler */
}

/* Anpassung für kleinere Bildschirme */
@media (max-width: 768px) {
    .news-content-wrapper {
        padding: 10px;
    }
    
    .news-title {
        font-size: 1.5em;
    }
}
