/* styles.css
   Externe CSS-Datei für index.html
*/

/* ===========================
   STYLESHEET - mit Crete Round & Slogan-Timing
   =========================== */

:root{
  --max-width:1200px;
  --bg: #f6f8fa;
  --surface:#ffffff;
  --primary: #0b7df0;
  --muted: #6b7280;
  --accent: #e9f6ff;
  --text-gap: 10%;
  --header-h: 1cm;
  --radius: 10px;
  --box-shadow: 0 6px 18px rgba(16,24,40,0.06);

  /* Slogan sizing & timing */
  --slogan-base: clamp(1.6rem, 4vw, 3rem);
  --slogan-increase: 2px;             /* +2px größer */
  --slogan-fade-duration: 1s;         /* 1s Ein-/Ausfaden */
  --slogan-total: 6s;                 /* gesamter Sichtbarkeitszyklus */
  --slogan-visible-before-fade: 4s;    /* sichtbare Zeit bevor Ausfaden (voll sichtbar) */
}

/* Basis */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:#111;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

/* Skip link */
.skip-link{position:absolute;left:-999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:1rem;top:1rem;width:auto;height:auto;padding:.5rem .75rem;background:#000;color:#fff;border-radius:6px;z-index:9999}

/* Header */
.header{
  position:sticky;top:0;z-index:100;background:rgba(255,255,255,0.96);
  backdrop-filter: blur(4px);
  border-bottom:1px solid rgba(0,0,0,0.04);
  height:var(--header-h);
}
.header .wrap{
  max-width:var(--max-width);margin:0 auto;padding:0 calc(var(--text-gap));display:flex;align-items:center;justify-content:space-between;height:100%;
}
.brand{
  display:flex;align-items:baseline;gap:.4rem;color:var(--primary);font-weight:700;font-size:1.05rem;text-decoration:none;
  font-family: 'Crete Round', Georgia, serif;
}
.brand .title{font-weight:800;letter-spacing:0.03em}
.brand .nav-mini{font-size:.82rem;color:var(--muted);margin-left:.2rem}

/* Header navigation */
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;gap:.6rem;align-items:center}
.main-nav a{
  text-decoration:none;color:var(--muted);padding:.25rem .6rem;border-radius:6px;font-size:0.98rem;display:inline-flex;align-items:center;
  font-family: 'Crete Round', Georgia, serif;
}
.main-nav a:focus, .main-nav a:hover{background:#eee;color:#000;outline:none}

/* Hero */
.hero{position:relative;height:calc(100vh - var(--header-h));overflow:hidden;display:block}
.hero picture, .hero img{width:100%;height:100%;display:block;object-fit:cover}
.hero .overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}

/* Slogans */
.slogan{
  position:absolute;
  left:50%; top:50%;
  transform:translate(-50%,-50%) translateY(.6rem);
  font-family: 'Crete Round', Georgia, serif;
  font-weight:700;
  font-size: calc(var(--slogan-base) + var(--slogan-increase));
  color: #ffffff;
  margin:0;
  opacity:0;
  transition: opacity var(--slogan-fade-duration) ease, transform var(--slogan-fade-duration) ease;
  pointer-events:none;
  text-align:center;
  padding:0 .5rem;
  line-height:1.05;
}
.slogan.show{ opacity:1; transform:translate(-50%,-50%) translateY(0); }

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Sections */
.section{ padding:3rem 0; max-width:var(--max-width); margin:0 auto; padding-left:calc(var(--text-gap)); padding-right:calc(var(--text-gap)); }
.section h2{
  font-size:1.5rem; font-weight:700; margin:0 0 .6rem 0; color:#0b3d66;
  letter-spacing:-0.01em; font-family: 'Crete Round', Georgia, serif;
}

/* boxed text */
.box{ background:var(--surface); border-radius:10px; padding:1rem; border:1px solid rgba(11,61,102,0.06); box-shadow:var(--box-shadow); margin-top:.75rem; }

/* thumbnails: 4 per row (adjusted) */
.thumbs{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.75rem;justify-content:center}
.thumb{
  width:calc((100% - 3 * 0.6rem)/4); max-width:180px; border-radius:8px; padding:.35rem; display:flex; align-items:center; justify-content:center; cursor:pointer; border:1px solid rgba(0,0,0,0.04);
  background: var(--accent);
  /* layout for image + caption */
  flex-direction: column;
  gap: .4rem;
  align-items: center;
  text-align: center;
}
.thumb img{display:block;max-width:100%;height:100px;object-fit:cover;border-radius:6px;margin:0 auto}

/* Caption styling for thumbnails (verschoben aus inline-style) */
.thumb .caption{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: .88rem;
  color: #0b3d66;
  text-align:center;
  max-width:100%;
  line-height:1.2;
  padding: 0 .25rem;
}

/* optional: make longer captions wrap and small devices slightly smaller */
@media (max-width:520px){
  .thumb{width:calc(50% - .6rem);max-width:none}
  .thumb img{height:88px}
  .thumb .caption{font-size:.82rem}
}

/* back-to-top */
.back-top{display:flex;justify-content:flex-end;margin-top:.6rem}
.back-top a{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:var(--muted);font-size:1rem;padding:.25rem .4rem;border-radius:6px}
.back-top a:hover{background:#f0f0f0;color:#000}

/* Lightbox */
.lightbox{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(2,6,23,0.75);z-index:2000;padding:1rem}
.lightbox.show{display:flex}
.lightbox-content{max-width:95%;max-height:95%;width:90%;height:auto;background:#fff;border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.lightbox-content img{max-width:100%;max-height:100%;object-fit:contain}
.lightbox .close-hint{position:absolute;top:1rem;right:1rem;color:#fff;font-size:1rem;cursor:pointer;padding:.4rem .6rem;background:rgba(0,0,0,0.18);border-radius:6px}

/* Footer & legal */
.footer{background:var(--surface);padding:1rem;border-top:1px solid rgba(0,0,0,0.04)}
.footer .wrap{max-width:var(--max-width);margin:0 auto;padding:0 calc(var(--text-gap));display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between}
.legal{display:none;background:var(--surface);padding:1.25rem;border-top:1px solid rgba(0,0,0,0.03)}
.legal.show{display:block}
