/* =========================================================
   eckrich.de - Style 2.0
   Wetterstation Neustadt-Hambach
   Responsive Desktop / Tablet / Smartphone
   ========================================================= */

:root{
    --bg:#edf2f7;
    --card:#ffffff;
    --soft:#f8fafc;
    --line:#e5e7eb;
    --text:#1f2937;
    --muted:#64748b;
    --blue:#4f6488;
    --blue-dark:#30486f;
    --red:#dc2626;
    --green:#16a34a;
    --orange:#ea580c;
    --teal:#0f766e;
    --shadow:0 4px 18px rgba(0,0,0,.08);
    --radius:18px;
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
    margin:0;
    background:var(--bg);
    font-family:Segoe UI,Arial,sans-serif;
    color:var(--text);
}

img{ max-width:100%; }
a{ color:inherit; }

/* Layout */

.wrap,
.container{
    max-width:1400px;
    margin:0 auto;
}

.container{ padding:20px; }

.card{
    background:var(--card);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
}

.section-title{
    margin:40px 0 20px;
    padding-bottom:10px;
    font-size:28px;
    color:var(--blue);
    border-bottom:2px solid var(--line);
}

.red{ color:var(--red); }
.green{ color:var(--green); }

.unit{
    font-size:.55em;
    font-weight:400;
    margin-left:2px;
}

/* Header / Navigation */

.topbar{
    background:#fff;
    border-bottom:1px solid var(--line);
    box-shadow:0 1px 8px rgba(0,0,0,.04);
}

.topbar-inner{
    max-width:1400px;
    margin:0 auto;
    min-height:68px;
    padding:0 20px;
    display:flex;
    align-items:center;
    gap:40px;
}

.logo,
.logo:visited{
    color:var(--blue-dark);
    text-decoration:none;
    font-size:2rem;
    font-weight:750;
    letter-spacing:-1px;
    line-height:1;
    white-space:nowrap;
}

.logo:hover{
    color:var(--blue-dark);
    text-decoration:none;
}

.main-nav{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.main-nav a,
.main-nav a:visited{
    display:block;
    padding:9px 14px;
    color:var(--blue-dark);
    text-decoration:none;
    font-weight:600;
    border-radius:9px;
    transition:background .2s ease,color .2s ease;
}

.main-nav a:hover{
    background:#e8eef6;
    text-decoration:none;
}

.main-nav a.active{
    background:var(--blue);
    color:#fff;
}

.menu-toggle{
    display:none;
    margin-left:auto;
    width:42px;
    height:42px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    cursor:pointer;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
}

.menu-toggle span{
    display:block;
    width:22px;
    height:2px;
    background:var(--blue-dark);
    border-radius:999px;
    transition:.2s ease;
}

.menu-toggle.is-open span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2){
    opacity:0;
}

.menu-toggle.is-open span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
}

/* alte Header-Klassen neutralisieren */
.header,
.site-header{
    background:transparent;
    box-shadow:none;
}

.site-brand{ padding:0; }

/* Home */

.webcam{ margin-bottom:0; }

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

.datenstand{
    text-align:right;
    margin:6px 8px 8px 0;
    font-size:13px;
    color:#6b7280;
}

.datenstand strong{
    font-weight:600;
    color:#4b5563;
}

.info-card{
    margin:35px auto;
    padding:30px;
    max-width:1000px;
}

.info-card h3{
    color:#48638c;
    margin:0 0 18px;
}

.info-card p{
    margin:0 0 15px;
    line-height:1.7;
    color:#334155;
}

.info-card p:last-child{ margin-bottom:0; }

.update{
    padding:18px 0 8px;
    text-align:center;
    color:var(--muted);
    font-size:16px;
}

.summary{
    display:grid;
    grid-template-columns:repeat(8,1fr);
}

.item{
    padding:16px;
    text-align:center;
    border-right:1px solid var(--line);
}

.item:last-child{ border-right:none; }

.label{
    font-size:13px;
    color:var(--muted);
}

.value{
    font-size:34px;
    font-weight:800;
}

.sub{
    margin-top:4px;
    font-size:14px;
}

.solar-uv{
    margin-top:10px;
    font-size:20px;
    font-weight:700;
    color:var(--green);
}

.solar-uv small{
    font-size:15px;
    font-weight:500;
}

/* Wetterseite */

.weather-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:20px;
    margin-bottom:20px;
}

.weather-box{
    background:var(--soft);
    border:1px solid var(--line);
    border-radius:12px;
    padding:20px;
}

.weather-box h3{
    margin:0 0 14px;
    color:var(--blue);
}

.weather-box strong{ font-size:1.5rem; }

.weather-box p{
    line-height:1.6;
    margin:10px 0;
}

.weather-center{
    text-align:center;
    margin:10px 0 14px;
}

.taupunkt-box{
    margin:16px 0;
    padding:8px 12px;
    text-align:center;
    background:#f1f5f9;
    border-radius:10px;
    font-size:1rem;
}

.taupunkt-box strong{
    font-size:1.4rem;
    color:#0f172a;
}

.big-value{
    margin:10px 0 20px;
    text-align:center;
    font-size:2.8rem;
    font-weight:800;
    line-height:1;
    color:var(--text);
}

.statbar,
.trendbar{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:6px;
    margin:12px 0;
}

.statcell,
.trendcell{
    text-align:center;
    padding:14px 8px;
    border-radius:10px;
}

.statcell .title,
.trendcell .title{
    display:block;
    margin-bottom:4px;
    font-size:12px;
    color:var(--muted);
}

.statcell .value,
.trendcell .value{
    font-size:20px;
    font-weight:800;
    line-height:1.1;
}

.statcell .time{
    font-size:11px;
    color:var(--muted);
}

.minbox{ background:#dbeafe; }
.maxbox{ background:#fee2e2; }
.avgbox{ background:#fef3c7; }
.trendcell{ background:#f3f4f6; }

.trend-up{ color:var(--red); }
.trend-down{ color:#2563eb; }

/* Statistik */

.stats-hero{
    padding:32px;
    margin-bottom:30px;
}

.stats-hero h2{
    margin:0;
    color:#0f2748;
    font-size:3rem;
    font-weight:800;
}

.stats-hero p{
    margin:10px 0 0;
    font-size:1.25rem;
    color:#475569;
}

.stats-records{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    padding:20px;
    margin-bottom:35px;
}

.record{
    display:flex;
    align-items:center;
    gap:16px;
    padding:20px;
    border-radius:14px;
    transition:.2s ease;
}

.record:hover{
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.record-icon{
    font-size:42px;
    line-height:1;
}

.record-title{
    font-size:15px;
    color:var(--muted);
}

.record-value{
    font-size:2.3rem;
    font-weight:800;
    color:#0f2748;
    line-height:1.1;
}

.record-sub{
    margin-top:6px;
    font-size:15px;
    color:#475569;
    font-weight:500;
}

.cold{ background:#eef4ff; }
.hot{ background:#fff1f2; }
.sun{ background:#fffbe6; }
.rain{ background:#ecfeff; }

.stats-section{
    margin:40px 0 18px;
    font-size:2.4rem;
    font-weight:800;
}

.winter-title{ color:#2563eb; }
.summer-title{ color:var(--orange); }
.rain-title{ color:var(--teal); }

.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:40px;
}

.stats-year-card{
    height:100%;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    overflow:hidden;
    box-shadow:var(--shadow);
}

.winter-card{ border-top:5px solid #2563eb; }
.summer-card{ border-top:5px solid var(--orange); }
.rain-card{ border-top:5px solid var(--teal); }

.stats-year{
    padding:18px;
    background:var(--soft);
    border-bottom:1px solid var(--line);
    text-align:center;
    font-size:2.2rem;
    font-weight:800;
    color:#0f2748;
}

.stats-body{ padding:18px; }

.stats-line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:16px 0;
    font-size:15px;
}

.stats-line span{ color:#334155; }

.stats-line strong{
    font-size:1.8rem;
    font-weight:800;
}

.red-line strong{ color:var(--red); }
.teal-line strong{ color:var(--teal); }

.stats-extreme{
    margin-top:20px;
    padding-top:18px;
    border-top:2px solid var(--line);
    text-align:center;
}

.stats-extreme span{
    display:block;
    font-size:14px;
    color:var(--muted);
}

.stats-extreme strong{
    display:block;
    margin-top:6px;
    font-size:2.4rem;
    font-weight:800;
}

.stats-extreme small{
    display:block;
    margin-top:8px;
    color:#475569;
    font-size:14px;
}

.stats-extreme.blue strong{ color:#2563eb; }
.stats-extreme.red strong{ color:var(--red); }

.stats-info{
    display:flex;
    align-items:center;
    gap:18px;
    padding:24px;
    margin:20px 0;
}

.stats-info strong{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}

.stats-footer{
    margin-top:20px;
    padding:18px;
    text-align:center;
    color:var(--muted);
}

/* Webcam / Zeitraffer */

.page-header{ margin-bottom:25px; }

.page-header h2{
    margin:0 0 8px;
    font-size:2rem;
    color:#111827;
}

.page-header p{
    margin:0;
    color:#52627a;
}

.cam-grid{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-bottom:20px;
}

.cam-card{
    display:flex;
    align-items:center;
    gap:10px;
    background:#fff;
    color:#1f2937;
    text-decoration:none;
    padding:12px 18px;
    border:2px solid transparent;
    border-radius:999px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
    transition:.2s;
}

.cam-card:hover{
    transform:translateY(-2px);
    box-shadow:0 4px 14px rgba(0,0,0,.12);
}

.cam-card.active{
    border-color:var(--blue);
    background:#eef4fb;
}

.cam-name{
    font-size:1rem;
    font-weight:700;
    margin:0;
}

.cam-desc{ display:none; }

.webcam-card{
    background:#fff;
    border-radius:16px;
    padding:22px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.webcam-card h3{
    margin:0 0 18px;
    font-size:1.25rem;
    color:#111827;
}

.webcam-card a{ display:block; }

.webcam-image{
    width:100%;
    max-width:1024px;
    height:auto;
    display:block;
    margin:0 auto;
    border-radius:12px;
}

.webcam-footer{
    margin-top:16px;
    text-align:center;
    color:#52627a;
    font-size:.95rem;
}

.zeit-form{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
    align-items:flex-end;
    margin-bottom:20px;
}

.zeit-form label{
    display:flex;
    flex-direction:column;
    gap:5px;
    font-weight:600;
}

.zeit-form input,
.player select{
    padding:10px;
    border:1px solid #d1d5db;
    border-radius:8px;
    background:#fff;
}

.zeit-form button,
.player button{
    padding:10px 18px;
    border:none;
    border-radius:8px;
    background:var(--blue);
    color:#fff;
    cursor:pointer;
}

.zeit-form button:hover,
.player button:hover{
    background:#40567a;
}

.player{
    margin-top:20px;
    display:flex;
    gap:10px;
    justify-content:center;
    flex-wrap:wrap;
}

.player select{ cursor:pointer; }

.status{
    margin-top:15px;
    text-align:center;
    color:#6b7280;
}

progress{ accent-color:var(--blue); }

/* Footer */

.footer{
    text-align:center;
    padding:30px;
    color:var(--muted);
}

.footer a{
    color:var(--muted);
    text-decoration:none;
}

.footer a:hover{ text-decoration:underline; }

/* Responsive */

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

@media(max-width:1000px){
    .summary{
        grid-template-columns:repeat(3,1fr);
    }

    .topbar-inner{
        gap:20px;
    }
}

@media(max-width:760px){
    .topbar-inner{
        min-height:64px;
        justify-content:space-between;
        position:relative;
    }

    .menu-toggle{
        display:flex;
    }

    .main-nav{
        display:none;
        position:absolute;
        top:64px;
        left:14px;
        right:14px;
        z-index:1000;
        background:#fff;
        border:1px solid var(--line);
        border-radius:14px;
        box-shadow:0 10px 28px rgba(0,0,0,.12);
        padding:10px;
        flex-direction:column;
        align-items:stretch;
        gap:4px;
    }

    .main-nav.is-open{
        display:flex;
    }

    .main-nav a{
        padding:13px 14px;
        border-radius:10px;
        text-align:left;
    }

    .datenstand{
        text-align:center;
        margin:4px 0 8px;
        font-size:12px;
    }

    .cam-grid{
        gap:8px;
    }

    .cam-card{
        flex:1;
        justify-content:center;
        padding:12px;
    }

    .info-card{
        padding:22px;
    }
}

@media(max-width:700px){
    .summary{
        grid-template-columns:repeat(2,1fr);
        gap:0;
    }

    .item{
        padding:12px 8px;
        border-right:1px solid var(--line);
        border-bottom:1px solid var(--line);
    }

    .item:nth-child(2n){
        border-right:none;
    }

    .value{
        font-size:3rem;
        line-height:1;
    }

    .label{
        font-size:15px;
        margin-bottom:6px;
    }

    .sub{
        margin-top:4px;
        font-size:14px;
    }

    .stats-records,
    .stats-grid{
        grid-template-columns:1fr;
    }

    .stats-hero h2{
        font-size:2.2rem;
    }

    .stats-section{
        font-size:2rem;
    }

    .zeit-form{
        display:block;
    }

    .zeit-form label{
        margin-bottom:12px;
    }
}

@media(max-width:480px){
    .container{
        padding:14px;
    }

    .logo{
        font-size:1.8rem;
    }

    .value{
        font-size:44px;
    }

    .sub{
        font-size:15px;
    }

    .big-value{
        font-size:2.35rem;
    }

    .statcell .value,
    .trendcell .value{
        font-size:17px;
    }

    .stats-year{
        font-size:1.8rem;
    }

    .record-value{
        font-size:2rem;
    }

    .webcam-card{
        padding:14px;
        border-radius:12px;
    }

    .webcam-card h3{
        font-size:1.1rem;
    }
}
