/* ============================================================
   Anrik 2026 – Crew-Website
   Maritimes Design: Tiefblau + Weiß + Adria-Türkis
   Mobile-First: Basisstile gelten fürs Handy, danach größere Screens
   ============================================================ */

:root {
  --color-navy: #0a3d62;
  --color-navy-dark: #062845;
  --color-blue: #1e88a8;
  --color-turquoise: #2fc9c0;
  --color-turquoise-light: #dff3f1;
  --color-white: #ffffff;
  --color-sand: #f7f9f9;
  --color-ink: #16303d;
  --color-muted: #5b7481;
  --color-danger: #c0392b;
  --color-success: #1f9e6d;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(10, 61, 98, 0.12);
  --container-width: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--color-sand);
  color: var(--color-ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

img { max-width: 100%; display: block; }

a { color: var(--color-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--color-navy); line-height: 1.25; margin-top: 0; }

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--color-navy);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-white);
}
.brand:hover { text-decoration: none; }
.brand__logo { height: 36px; width: auto; border-radius: 6px; }
.brand__text { font-weight: 700; font-size: 1.1rem; letter-spacing: 0.02em; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  display: block;
}

.site-nav {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.75rem;
}
.site-nav.open { display: flex; }

.site-nav a {
  color: var(--color-white);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  opacity: 0.85;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,0.12);
  opacity: 1;
  text-decoration: none;
}
.site-nav a.nav-logout { opacity: 0.7; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    flex-direction: row;
    flex-basis: auto;
    padding-top: 0;
    gap: 0.25rem;
    align-items: center;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--color-turquoise);
  color: var(--color-navy-dark);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn--small { padding: 0.45rem 1rem; font-size: 0.9rem; }
.btn--secondary { background: var(--color-white); color: var(--color-navy); border: 1px solid var(--color-navy); }
.btn--danger { background: var(--color-danger); color: var(--color-white); }
.btn--full { width: 100%; text-align: center; }

/* ---------- Cards / Sections ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.section { padding: 2.5rem 0; }
.section--alt { background: var(--color-turquoise-light); }

.badge {
  display: inline-block;
  background: var(--color-turquoise-light);
  color: var(--color-navy);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.placeholder-note {
  border: 2px dashed var(--color-blue);
  background: var(--color-turquoise-light);
  color: var(--color-navy);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* ---------- Hero / Countdown ---------- */
.hero {
  position: relative;
  color: var(--color-white);
  background: linear-gradient(180deg, rgba(6,40,69,0.55), rgba(10,61,98,0.75)), url("../img/placeholders/hero-placeholder.svg") center/cover no-repeat;
  padding: 3rem 0 3.5rem;
  text-align: center;
}
.hero__logo { height: 56px; margin: 0 auto 1rem; }
.hero h1 { color: var(--color-white); font-size: 2rem; margin-bottom: 0.25rem; }
.hero p.subtitle { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.countdown__box {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 0.75rem 0.25rem;
  backdrop-filter: blur(2px);
}
.countdown__value {
  font-size: 1.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--color-turquoise);
}
.countdown__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.countdown--done {
  font-size: 1.3rem;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 1rem;
}

@media (min-width: 600px) {
  .hero h1 { font-size: 2.6rem; }
  .countdown__value { font-size: 2.6rem; }
}

/* ---------- Info box ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 5;
}
@media (min-width: 700px) {
  .info-grid { grid-template-columns: repeat(4, 1fr); }
}
.info-grid .card {
  text-align: center;
}
.info-grid .card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}
.info-grid .card__value {
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1.05rem;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-navy);
}
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], input[type="file"], textarea, select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid #c7d6db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-white);
  color: var(--color-ink);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-turquoise);
  outline-offset: 1px;
  border-color: var(--color-blue);
}

.auth-shell {
  max-width: 420px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.alert--error { background: #fdecea; color: var(--color-danger); border: 1px solid #f5c6c0; }
.alert--success { background: #e8f8f1; color: var(--color-success); border: 1px solid #b9e6d1; }
.alert--info { background: var(--color-turquoise-light); color: var(--color-navy); border: 1px solid #b9e6e2; }

/* ---------- Page header (crew pages) ---------- */
.page-head {
  padding: 2rem 0 1rem;
}
.page-head h1 { margin-bottom: 0.25rem; }
.page-head p { color: var(--color-muted); margin: 0; }

/* ---------- Tab bar (z.B. Packliste Gruppe/Privat) ---------- */
.tab-bar {
  display: flex;
  flex-direction: row;
  gap: 0.3rem;
  background: var(--color-white);
  border-radius: 999px;
  padding: 0.3rem;
  box-shadow: var(--shadow);
  max-width: 480px;
  margin-bottom: 1.5rem;
}
.tab-bar .btn { flex: 1; border-radius: 999px; }

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e7eef0;
  font-size: 0.95rem;
}
th { background: var(--color-turquoise-light); color: var(--color-navy); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Grid utilities ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Map ---------- */
#routeMap {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Checklist (Packliste) ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid #eef3f4;
}
.checklist li:last-child { border-bottom: none; }
.checklist input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; }
.checklist .item-name { flex: 1; }
.checklist .checked-by { font-size: 0.8rem; color: var(--color-muted); }
.checklist li.is-checked .item-name { text-decoration: line-through; color: var(--color-muted); }

/* ---------- Poll bars ---------- */
.poll-option { margin-bottom: 0.85rem; }
.poll-option__label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.poll-bar {
  background: #e7eef0;
  border-radius: 999px;
  overflow: hidden;
  height: 14px;
}
.poll-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-turquoise));
}

/* ---------- Logbook / Blog entries ---------- */
.entry { border-bottom: 1px solid #e7eef0; padding: 1.5rem 0; }
.entry:first-child { padding-top: 0; }
.entry:last-child { border-bottom: none; }
.entry__meta { color: var(--color-muted); font-size: 0.85rem; margin-bottom: 0.4rem; }
.entry__photos { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.entry__photos img { width: 130px; height: 100px; object-fit: cover; border-radius: 8px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-grid a { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 8px; box-shadow: var(--shadow); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; background: rgba(6,20,32,0.9);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 8px; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.25rem; color: #fff; font-size: 2rem;
  background: none; border: none; cursor: pointer; line-height: 1;
}

/* ---------- Crew profiles ---------- */
.crew-card { text-align: center; }
.crew-card img { width: 110px; height: 110px; object-fit: cover; border-radius: 50%; margin: 0 auto 0.75rem; border: 3px solid var(--color-turquoise-light); }
.crew-card h3 { margin-bottom: 0.15rem; }
.crew-card .role { color: var(--color-blue); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.crew-card .fun-fact { font-size: 0.85rem; color: var(--color-muted); }
.crew-card .admin-tag { display: inline-block; margin-top: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 0.4rem; align-items: center; text-align: center; }
.site-footer a { color: rgba(255,255,255,0.85); }
@media (min-width: 700px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

.text-muted { color: var(--color-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
