/* style.css - Die zentrale Design-Schaltzentrale für msvb.de (Teil 1) */

/* GLOBAL & CORE BODY */
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    margin: 0; 
    padding: 0 0 75px 0 !important; 
    background: #f4f6f8; 
    color: #2c3e50; 
}

/* BANNER / HEADER (KÖNIGSBLAU MIT FLEX-AUSRICHTUNG) */
.hero-header { 
    background: linear-gradient(135deg, #004488, #1f4f80); 
    color: white; 
    padding: 25px 15px; 
    box-shadow: 0 3px 10px rgba(0,0,0,0.1); 
    position: relative; 
    display: flex;
    flex-direction: row;      
    align-items: center;
    justify-content: center;
    gap: 20px;                
    text-align: left;         
    box-sizing: border-box;
}

.club-logo {
    height: 70px;             
    width: auto;
    margin: 0; 
    border: 2px solid white;  
    border-radius: 8px;       
    background: white; 
    box-shadow: 0px 3px 8px rgba(0,0,0,0.3); 
    flex-shrink: 0;           
}

body > .club-logo {
    display: none !important;
}

.card-header {
    background: #004488 !important; 
}

.hero-header h1 { margin: 0; font-size: 1.6rem; letter-spacing: 0.5px; font-weight: 800; line-height: 1.2; }
.hero-header p { margin: 4px 0 0 0; font-size: 1.05rem; color: #d5dbdb; }
 
/* --- BASIS-EINSTELLUNG (PC-Ansicht) --- */
.mobile-only-sensor {
    display: none !important; /* Handy-Version am PC komplett ausblenden */
}
.pc-only-sensor {
    display: block !important; /* PC-Version am PC anzeigen */
}


@media (max-width: 768px) {
    .club-logo {
        height: 46px;         
    }
    .hero-header h1 { 
        font-size: 1.0rem !important;  
        font-weight: 700;
    }
    .hero-header p { 
        font-size: 0.75rem !important; 
    }
}

/* BURGER-MENÜ OBEN RECHTS */
.admin-burger-container { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 1000; 
}

body > .admin-burger-container { 
    position: fixed; 
    top: 15px; 
    right: 15px; 
}

.burger-icon { 
    background: rgba(0,0,0,0.25); 
    color: white; 
    border: 1px solid rgba(255,255,255,0.2); 
    padding: 8px 14px; 
    border-radius: 6px; 
    font-size: 1.4rem; 
    cursor: pointer; 
    font-weight: bold; 
    user-select: none; 
    display: inline-block;
    transition: background 0.2s, transform 0.1s;
}
.burger-icon:hover { background: rgba(0,0,0,0.45); }
.burger-icon:active { transform: scale(0.95); }

.burger-dropdown { 
    display: none; 
    position: absolute; 
    top: 100%; 
    right: 0; 
    margin-top: 8px; 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    border: 1px solid #ddd; 
    width: 230px; 
    overflow: hidden; 
}
.burger-dropdown a { 
    display: block; 
    padding: 12px 15px; 
    color: #2c3e50; 
    text-decoration: none; 
    font-size: 0.95rem; 
    border-bottom: 1px solid #eee; 
    font-weight: bold; 
    text-align: left; 
}
.burger-dropdown a:last-child { border-bottom: none; }
.burger-dropdown a:hover { background: #f4f6f8; color: #004488; }

/* LAYOUT GRIDS (STARTSEITE) */
.main-container { max-width: 1200px; margin: 25px auto; padding: 0 15px; display: grid; grid-template-columns: 2fr 1fr; gap: 25px; box-sizing: border-box; }
.content-section h2 { margin-top: 0; color: #2c3e50; border-bottom: 3px solid #004488; padding-bottom: 8px; font-size: 1.4rem; }

/* VEREINS-NEWS / MITTEILUNGEN CARDS */
.news-card { background: white; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid #ddd; position: relative; }
.news-card.pinned { border-left: 5px solid #e74c3c; background: #fdf2e9; }
.news-meta { font-size: 0.85rem; color: #7f8c8d; margin-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.news-text { line-height: 1.5; white-space: pre-line; font-size: 1rem; }

/* CLUBKALENDER / TERMIN BOXEN */
.termin-box { background: white; border-radius: 8px; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-left: 4px solid #004488; }
.termin-box.arbeit { border-left-color: #e67e22; }
.termin-box.regatta { border-left-color: #2980b9; }
.termin-box.feier { border-left-color: #9b59b6; }
.termin-box.jugend { border-left-color: #27ae60; }
.termin-date { font-weight: bold; color: #004488; font-size: 0.95rem; }
.termin-title { font-weight: bold; font-size: 1.05rem; margin: 4px 0; color: #2c3e50; }
.termin-meta { font-size: 0.8rem; color: #7f8c8d; }
/* BADGES */
.badge { color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge-allgemein { background: #7f8c8d; }
.badge-jugend { background: #27ae60; }
.badge-regatta { background: #2980b9; }
.badge-bootshaus { background: #d35400; }
.badge-pinned { background: #e74c3c; }

/* FORMULARE & BEHÄLTER */
.form-card, .content-card, .container { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border: 1px solid #ddd; max-width: 700px; margin: 20px auto; box-sizing: border-box; }
.card-header { background: #004488; color: white; margin: -20px -20px 20px -20px; padding: 15px; text-align: center; border-radius: 8px 8px 0 0; font-weight: bold; font-size: 1.3rem; }
.text-muted { color: #7f8c8d; font-size: 0.85rem; text-align: center; margin-bottom: 20px; }

/* REINE ADMIN-TABELLEN STYLES */
.table-responsive { width: 100%; overflow-x: auto; margin-top: 15px; border-radius: 6px; border: 1px solid #ddd; }
table { border-collapse: collapse; width: 100%; min-width: 550px; font-size: 0.95rem; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; vertical-align: middle; }
th { background: #2c3e50; color: white; font-weight: bold; }
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #f1f2f6; }
.btn-delete { background: #c0392b; color: white; padding: 6px 12px; text-decoration: none; border-radius: 4px; font-weight: bold; font-size: 0.85rem; display: inline-block; border: none; cursor: pointer; }
.btn-delete:hover { background: #a93226; }

/* CORE-BUTTONS */
.btn-submit { background: #27ae60; color: white; padding: 14px; border: none; border-radius: 6px; font-size: 1.1rem; font-weight: bold; width: 100%; cursor: pointer; margin-top: 20px; }
.btn-submit:hover { background: #219653; }
.btn-back { display: block; text-align: center; background: #2e4053; color: white; padding: 14px; border: none; border-radius: 6px; font-size: 1.1rem; font-weight: bold; width: 100%; cursor: pointer; text-decoration: none; box-sizing: border-box; margin-top: 15px; }
.btn-back:hover { background: #1f618d; }

/* HAFENMEISTER ÖFFENTLICH & ALLGEMEINE BUTTONS */
.hafenmeister-container { max-width: 600px; margin: 20px auto 30px auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border: 1px solid #ddd; box-sizing: border-box; }

.btn { display: block; width: 100%; padding: 12px; border: none; border-radius: 6px; font-size: 1rem; font-weight: bold; cursor: pointer; text-align: center; text-decoration: none; box-sizing: border-box; margin-bottom: 10px; }
.btn-primary { background: #2471a3; color: white; }
.btn-primary:hover { background: #1f618d; }
.btn-secondary { background: #7f8c8d; color: white; }
.btn-secondary:hover { background: #5d6d7e; }
.btn-dark { background: #2c3e50; color: white; }
.btn-dark:hover { background: #1a252f; }

.btn-home { display: inline-flex; align-items: center; justify-content: center; background: #2e4053; color: white; padding: 8px 14px; text-decoration: none; border-radius: 6px; font-size: 0.85rem; font-weight: bold; margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.btn-home:hover { background: #1f618d; }

form { background: #fafafa; padding: 15px; border-radius: 6px; border: 1px solid #eee; margin: 15px 0; }
input, select { width: 100%; padding: 12px; margin-bottom: 10px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }

.list-group { margin-top: 15px; }
.list-group-item { padding: 12px; border: 1px solid #ddd; margin-bottom: 6px; border-radius: 6px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; font-size: 0.95rem; gap: 15px; }
.list-group-item-success { background: #d4efdf; color: #196f3d; border-color: #a9dfbf; }
.list-group-item-danger { background: #f9ebeb; color: #c0392b; border-color: #f5b7b1; }
.kw-date-block { white-space: nowrap; flex-shrink: 0; color: #004488; }
.skipper-name-block { text-align: right; font-weight: bold; word-break: break-word; }

.flex-container { display: flex; gap: 10px; margin-top: 20px; }
.flex-container a, .flex-container button { flex: 1; margin-bottom: 0; }

/* CENTRAL VORSTAND CARDS */
.vorstand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; max-width: 1000px; margin: 25px auto; padding: 0 15px; box-sizing: border-box; }
.vorstand-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid #ddd; text-align: center; }
.vorstand-card h3 { margin: 0 0 5px 0; color: #004488; font-size: 1.15rem; } 
.vorstand-card p { margin: 0; color: #2c3e50; font-weight: bold; font-size: 1.05rem; }
.vorstand-card .phone { font-size: 0.9rem; color: #7f8c8d; margin-top: 8px; font-weight: normal; }
/* MARITIMES DAUMEN-MENÜ (UNIFORM FÜR PORTAL & ORDNER) */
.main-app-nav, .root-bottom-bar, .app-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: #2e4053; 
    height: 60px; 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    box-shadow: 0 -3px 10px rgba(0,0,0,0.15); 
    z-index: 9999; 
    box-sizing: border-box;
}

.main-app-nav-item, .root-bar-item, .app-nav-item { 
    color: #b2babb !important; 
    text-decoration: none !important; 
    text-align: center; 
    font-size: 0.72rem; 
    flex: 1; 
    padding: 5px 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    box-sizing: border-box;
    height: 100%;
    justify-content: center;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.main-app-nav-item span, .root-bar-item span, .app-nav-item span { 
    font-size: 1.25rem; 
    margin-bottom: 2px;
    display: block;
}

.main-app-nav-item.active, .root-bar-item.active, .app-nav-item.active,
.main-app-nav-item:hover, .root-bar-item:hover, .app-nav-item:hover { 
    background: #004488 !important; 
    color: white !important; 
    font-weight: bold;
}



@media (max-width: 360px) {
    .main-app-nav-item, .root-bar-item, .app-nav-item { 
        font-size: 0.65rem; 
    }
}


/* --- REVOLUTION: SMARTPHONE-ANSICHT --- */
@media (max-width: 768px) {
    .pc-only-sensor {
        display: none !important; /* PC-Version auf dem Handy komplett ausblenden */
    }
    .mobile-only-sensor {
        display: block !important; /* Handy-Version über den News anzeigen */
        width: 100% !important;
        margin-bottom: 20px !important;
    }
    
    /* Beibehaltung deiner restlichen Smartphone-Stile */
    .hero-header h1 { font-size: 1.7rem; padding-top: 20px; }
    .hero-header p { font-size: 0.95rem; }
    .admin-burger-container, body > .admin-burger-container { top: 10px; right: 10px; }
    .burger-icon { font-size: 1.1rem !important; padding: 6px 10px !important; }
}

@media (max-width: 400px) {
    .list-group-item { flex-direction: column; align-items: flex-start; gap: 4px; }
    .skipper-name-block { text-align: left; margin-left: 24px; }
}

/* BILD-ANPASSUNG IN DEN MITTEILUNGEN */
.news-text img {
    display: block;
    max-width: 100% !important; 
    width: auto;
    max-height: 450px;          
    height: auto !important;
    object-fit: contain;        
    border-radius: 8px;         
    margin: 15px auto;          
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    box-sizing: border-box;
}

/* Regelt die Anzeige direkt im visuellen Schreibfeld beim Tippen */
.custom-editor img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 250px;          
    border-radius: 6px;
    margin: 10px auto;
    display: block;
}

/* Erlaubt dem JavaScript, das !important für die geöffneten Boxen zu überschreiben */
.main-container .termin-box.msvb-offen {
    display: block !important;
}

