/* ===================================================================
   Vollständige, responsive style2.css für das GE Dashboard (Final)
   =================================================================== */

/* --- Grundlegende Styles und Farb-Variablen --- */
:root {
    --card-bg: #3C504F;
    --card-title-color: #CCCCCC;
    --link-color: #CCDBBE;
    --link-hover-color: #cda459;
    --font-primary: 'Open Sans', sans-serif;
    --font-headline: 'Lobster', cursive;
}

body {
    background-image: url(bb2.jpg);
    background-size: cover;
    background-attachment: fixed;
    font-family: var(--font-primary);
    color: #333;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Layout-Struktur --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
}

.dashboard-header h1 {
    font-family: var(--font-headline);
    font-size: 35px;
    color: #CCDBBE;
    margin: 0;
}

.header-date a {
    font-family: var(--font-headline);
    font-size: 22px;
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
}

.header-date a:hover {
    color: var(--link-hover-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icons a, .dropdown > i {
    font-size: 24px;
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    cursor: pointer;
}

.header-icons a:hover, .dropdown:hover > i {
    color: var(--link-hover-color);
    transform: scale(1.1);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
    border-radius: 6px;
    z-index: 1;
    right: 0;
    padding: 5px 0;
}

.dropdown-content a {
    color: var(--link-color);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: start; /* Wichtig für variable Höhen */
}

/* --- Allgemeine Widget-/Karten-Styles --- */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    transition: all 0.3s ease;
}

.card-title {
    font-family: var(--font-headline);
    color: var(--card-title-color);
    font-size: 23px;
    padding: 15px;
    margin: 0;
    font-weight: 400; 
    display: flex;
    align-items: center;
}

.drag-handle {
    cursor: move;
    color: rgba(204, 219, 190, 0.2);
    padding-right: 10px;
    flex-shrink: 0;
    font-size: 18px;
}
.drag-handle:hover {
    color: var(--link-color);
}

.title-text {
    flex-grow: 1;
    text-align: center;
}

.card-toggle-btn {
    background: none;
    border: none;
    color: var(--card-title-color);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    font-size: 14px;
    line-height: 1;
    margin-left: 10px;
    flex-shrink: 0;
}
.card-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.card.is-minimized .card-content,
.card.is-minimized .instagram-wrapper {
    height: 0;
    min-height: 0;
    flex-grow: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
    border: none;
}
.card.is-minimized .card-footer {
    display: none;
}
.card.is-minimized {
    height: fit-content; 
}

.card-placeholder {
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px dashed var(--link-color);
    border-radius: 8px;
    box-sizing: border-box;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* KORREKTUR: Feste Höhe wiederhergestellt, um alle Boxen gleich hoch zu machen */
    height: 450px;
    padding: 0 15px 15px 15px;
    overflow-y: auto;
    transition: all 0.3s ease;
}


.card-footer {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.card-footer a {
    color: var(--link-color);
    font-size: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.card-footer a:hover {
    color: var(--link-hover-color);
}

/* --- Spezifische Styles --- */
#rss-feed { display: flex; flex-direction: column; gap: 4px; }
.news-item { display: flex; align-items: center; padding: 6px 8px; border-radius: 4px; text-decoration: none; transition: background-color 0.2s ease; color: #CCCCCC; }
.news-item:hover { background-color: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.news-item-image { width: 60px; height: 32px; object-fit: cover; border-radius: 3px; margin-right: 10px; flex-shrink: 0; }
.news-item-date { font-size: 12px; font-weight: 700; color: #AABBAA; margin-right: 8px; white-space: nowrap; }
.news-item-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-error { color: #ffcccc; font-weight: bold; padding: 15px; background: rgba(255, 0, 0, 0.2); border-radius: 6px; }
.card-content iframe { width: 100%; flex-grow: 1; border: none; }
.card-content bsky-embed { width: 100%; flex-grow: 1; box-sizing: border-box; background-color: #ffffff !important; border: none; border-radius: 6px; padding: 12px; font-size: 12px; line-height: 1.4; }
.instagram-wrapper { height: 150px; overflow: hidden; }
.instagram-wrapper .embedsocial-hashtag { transform: translateY(-72px); height: calc(100% + 72px); }

/* --- Scrollbar-Styling --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #4D735E; }
::-webkit-scrollbar-thumb { background: #CCDBBE; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #cda459; }
    
/* --- Ticker-Layout --- */
.ticker-container { display: flex; align-items: center; gap: 15px; background-color: rgba(0, 0, 0, 0.2); border-radius: 8px; margin-top: 20px; padding: 0 15px; height: 50px; box-sizing: border-box; }
.ticker-header { flex-shrink: 0; }
.ticker-header a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--link-color); font-size: 14px; font-weight: bold; transition: color 0.2s; }
.ticker-header a:hover { color: var(--link-hover-color); }
.ticker-header img { width: 24px; height: 24px; border-radius: 4px; }
.ticker-wrap { flex-grow: 1; overflow: hidden; position: relative; height: 100%; }
.ticker-wrap:before, .ticker-wrap:after { content: ''; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; background: linear-gradient(to right, rgba(44, 62, 80, 0.7), transparent); }
.ticker-wrap:after { right: 0; background: linear-gradient(to left, rgba(44, 62, 80, 0.7), transparent); }
.ticker-move { display: inline-flex; white-space: nowrap; animation: ticker-scroll 90s linear infinite; height: 100%; align-items: center; }
.ticker-move:hover { animation-play-state: paused; }
@keyframes ticker-scroll { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }
.ticker-item { display: inline-flex; align-items: center; color: var(--link-color); text-decoration: none; font-size: 14px; padding: 0 20px; transition: color 0.2s; }
.ticker-item:hover { color: var(--link-hover-color); }
.ticker-thumb { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; margin-right: 12px; border: 1px solid rgba(255, 255, 255, 0.2); }

/* --- Responsive Anpassungen --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .dashboard-header { flex-direction: column; gap: 15px; text-align: center; }
    .dashboard-header h1 { font-size: 28px; }
    .header-date a { font-size: 18px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .card-content { height: auto; min-height: 350px; }
    .ticker-container { flex-direction: column; height: auto; align-items: flex-start; padding: 10px; }
    .ticker-header { margin-bottom: 10px; }
    .ticker-item { font-size: 12px; }
}