/* (c) 2026 by Ing. F. Weijers, weijers@cyberprofis.de
   Phi-Fit Portal CSS — Wiki-Style, Mobile-First */

:root {
  --pf-blue:    #2c8ac5;
  --pf-dark:    #1a5a87;
  --pf-light:   #e8f4fd;
  --pf-accent:  #5bb8f5;
  --pf-green:   #28a745;
  --pf-warn:    #ffc107;
  --pf-text:    #222;
  --pf-muted:   #6c757d;
  --pf-bg:      #f5f9fd;
  --pf-card:    #ffffff;
  --pf-border:  #d0e8f5;
  --pf-radius:  10px;
  --pf-shadow:  0 2px 12px rgba(44,138,197,.13);
  --nav-h:      56px;
  --bottom-h:   64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pf-text);
  background: var(--pf-bg);
  min-height: 100dvh;
  padding-bottom: var(--bottom-h);
}

/* ── TOP NAV ── */
.pf-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--pf-blue);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: .75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.pf-nav img { height: 36px; border-radius: 6px; }
.pf-nav-title {
  flex: 1;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-nav-badge {
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.pf-nav-logout {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .85rem;
  padding: .35rem .7rem;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px;
  white-space: nowrap;
  transition: background .2s;
}
.pf-nav-logout:hover { background: rgba(255,255,255,.15); }

/* ── BOTTOM NAV (mobile) ── */
.pf-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  background: #fff;
  border-top: 2px solid var(--pf-border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.pf-bottom a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--pf-muted);
  font-size: .68rem;
  font-weight: 500;
  transition: color .15s, background .15s;
  padding: .3rem .1rem;
}
.pf-bottom a i { font-size: 1.3rem; }
.pf-bottom a.active, .pf-bottom a:hover { color: var(--pf-blue); background: var(--pf-light); }
.pf-bottom a.active { border-top: 3px solid var(--pf-blue); margin-top: -2px; }

/* ── PAGE LAYOUT ── */
.pf-page { max-width: 760px; margin: 0 auto; padding: 1rem; }

/* ── HERO STRIP ── */
.pf-hero {
  background: linear-gradient(135deg, var(--pf-blue), var(--pf-dark));
  color: #fff;
  border-radius: var(--pf-radius);
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.pf-hero-icon {
  font-size: 2.4rem;
  opacity: .9;
  flex-shrink: 0;
}
.pf-hero h1 { font-size: 1.3rem; font-weight: 700; margin-bottom: .2rem; }
.pf-hero p  { font-size: .88rem; opacity: .9; margin: 0; }
.pf-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
}
.pf-chip {
  background: rgba(255,255,255,.2);
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

/* ── WIKI SECTION ── */
.pf-section {
  background: var(--pf-card);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--pf-shadow);
  scroll-margin-top: calc(var(--nav-h) + .5rem);
}
.pf-section-head {
  background: var(--pf-light);
  border-bottom: 1px solid var(--pf-border);
  padding: .8rem 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  user-select: none;
}
.pf-section-head i:first-child {
  color: var(--pf-blue);
  font-size: 1.1rem;
  width: 1.4rem;
  text-align: center;
}
.pf-section-head h2 {
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pf-dark);
}
.pf-chevron { color: var(--pf-muted); font-size: .85rem; transition: transform .25s; }
.pf-section.collapsed .pf-chevron { transform: rotate(-90deg); }
.pf-section.collapsed .pf-section-body { display: none; }
.pf-section-body { padding: 1rem; }

/* ── ÜBUNG CARD ── */
.pf-exercise {
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  padding: .85rem;
  margin-bottom: .75rem;
  background: #fafcff;
}
.pf-exercise:last-child { margin-bottom: 0; }
.pf-exercise-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
}
.pf-exercise-num {
  background: var(--pf-blue);
  color: #fff;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pf-exercise h3 { font-size: .95rem; font-weight: 700; color: var(--pf-dark); }
.pf-exercise p  { font-size: .88rem; color: var(--pf-text); margin: 0; }
.pf-exercise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .5rem;
}
.pf-tag {
  background: var(--pf-light);
  color: var(--pf-dark);
  border-radius: 4px;
  padding: .1rem .45rem;
  font-size: .72rem;
  font-weight: 600;
}

/* ── TERMINE ── */
.pf-date-item {
  display: flex;
  gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--pf-border);
  align-items: flex-start;
}
.pf-date-item:last-child { border-bottom: none; }
.pf-date-box {
  background: var(--pf-blue);
  color: #fff;
  border-radius: 7px;
  text-align: center;
  padding: .3rem .6rem;
  min-width: 52px;
  flex-shrink: 0;
}
.pf-date-box .day { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.pf-date-box .mon { font-size: .65rem; font-weight: 600; text-transform: uppercase; }
.pf-date-info h4 { font-size: .92rem; font-weight: 700; margin-bottom: .15rem; }
.pf-date-info p  { font-size: .82rem; color: var(--pf-muted); margin: 0; }

/* ── BEZAHLUNG ── */
.pf-pay-box {
  background: var(--pf-light);
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  padding: .9rem;
  margin-bottom: .75rem;
}
.pf-pay-box h3 { font-size: .95rem; font-weight: 700; color: var(--pf-dark); margin-bottom: .5rem; }
.pf-pay-box code {
  background: #fff;
  border: 1px solid var(--pf-border);
  border-radius: 5px;
  padding: .2rem .5rem;
  font-size: .85rem;
  word-break: break-all;
  display: inline-block;
}
.pf-iban { font-size: .9rem !important; letter-spacing: 1px; }
.pf-price-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pf-price-table td { padding: .45rem .2rem; border-bottom: 1px solid var(--pf-border); }
.pf-price-table td:last-child { text-align: right; font-weight: 700; color: var(--pf-dark); }
.pf-price-table tr:last-child td { border-bottom: none; }
.pf-price-highlight { background: #fff8e1; }
.pf-price-highlight td { font-weight: 700 !important; color: #856404 !important; }

/* ── DOWNLOAD LIST ── */
.pf-dl-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .5rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--pf-text);
  font-size: .9rem;
  transition: background .15s;
  border-bottom: 1px solid var(--pf-border);
}
.pf-dl-item:last-child { border-bottom: none; }
.pf-dl-item:hover { background: var(--pf-light); color: var(--pf-dark); }
.pf-dl-item i { color: var(--pf-blue); font-size: 1.1rem; flex-shrink: 0; }
.pf-dl-item span { flex: 1; }
.pf-dl-badge { font-size: .7rem; color: var(--pf-muted); }

/* ── VIDEO GRID ── */
.pf-video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pf-video-card {
  background: var(--pf-light);
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  padding: .75rem;
  text-decoration: none;
  color: var(--pf-dark);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  transition: background .15s;
}
.pf-video-card:hover { background: #d0e8f5; }
.pf-video-card i { font-size: 1.4rem; color: #c00; }
.pf-video-card span { font-size: .8rem; font-weight: 600; }
.pf-video-card small { font-size: .72rem; color: var(--pf-muted); }

/* ── CONTACT CARD ── */
.pf-contact-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--pf-border);
  font-size: .88rem;
}
.pf-contact-item:last-child { border-bottom: none; }
.pf-contact-item i { color: var(--pf-blue); font-size: 1rem; width: 1.3rem; text-align: center; flex-shrink: 0; }
.pf-contact-item a { color: var(--pf-blue); text-decoration: none; }
.pf-contact-item a:hover { text-decoration: underline; }

/* ── ALERT BOXES ── */
.pf-alert {
  border-radius: 8px;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: .88rem;
}
.pf-alert i { font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }
.pf-alert-info    { background: #e8f4fd; border: 1px solid #b8d9f0; color: #1a5a87; }
.pf-alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.pf-alert-warn    { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }

/* ── LOGIN PAGE ── */
.pf-login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(160deg, #1a5a87 0%, #2c8ac5 60%, #5bb8f5 100%);
}
.pf-login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  width: 100%;
  max-width: 380px;
  padding: 2rem 1.75rem;
}
.pf-login-logo {
  text-align: center;
  margin-bottom: 1.25rem;
}
.pf-login-logo img { height: 60px; border-radius: 10px; margin-bottom: .75rem; }
.pf-login-logo h1 { font-size: 1.25rem; font-weight: 800; color: var(--pf-dark); }
.pf-login-logo p  { font-size: .83rem; color: var(--pf-muted); margin-top: .2rem; }
.pf-form-group { margin-bottom: 1rem; }
.pf-form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--pf-muted);
  margin-bottom: .35rem;
}
.pf-form-group input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--pf-border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--pf-text);
  outline: none;
  transition: border-color .2s;
}
.pf-form-group input:focus { border-color: var(--pf-blue); }
.pf-btn {
  display: block;
  width: 100%;
  padding: .85rem;
  background: var(--pf-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  margin-top: .25rem;
}
.pf-btn:hover { background: var(--pf-dark); }
.pf-login-error {
  background: #fde8e8;
  border: 1px solid #f5c6cb;
  color: #721c24;
  border-radius: 7px;
  padding: .65rem .9rem;
  font-size: .86rem;
  margin-bottom: 1rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}
.pf-login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .75rem;
  color: rgba(255,255,255,.7);
}

/* ── KURS SELECT (Login) ── */
.pf-kurs-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin: 1rem 0;
}
.pf-kurs-btn {
  background: var(--pf-light);
  border: 2px solid var(--pf-border);
  border-radius: 10px;
  padding: .75rem .5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.pf-kurs-btn:hover, .pf-kurs-btn.selected { border-color: var(--pf-blue); background: #d0e8f5; }
.pf-kurs-btn i { display: block; font-size: 1.6rem; color: var(--pf-blue); margin-bottom: .35rem; }
.pf-kurs-btn span { font-size: .82rem; font-weight: 700; color: var(--pf-dark); }

/* ── DIVIDER ── */
.pf-divider {
  text-align: center;
  margin: 1.25rem 0 .75rem;
  position: relative;
  color: var(--pf-muted);
  font-size: .78rem;
}
.pf-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--pf-border);
}
.pf-divider span { background: #fff; position: relative; padding: 0 .75rem; }

/* ── RESPONSIVE ── */
@media (min-width: 600px) {
  .pf-page { padding: 1.5rem; }
  .pf-video-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-bottom { display: none; }
  body { padding-bottom: 0; }
}
