/*
Theme Name: Johanniter Transportportal
Theme URI: https://example.invalid/
Author: Portalentwicklung
Description: Schlankes Portal-Theme für das WordPress-Plugin Patiententransport-Portal. Optimiert für Krankenhaus-, Pflegestations- und Dispositionszugänge.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: johanniter-transportportal
*/

:root {
  --jtp-red: #d10a11;
  --jtp-red-dark: #a60006;
  --jtp-red-soft: #fbe9ea;
  --jtp-ink: #262626;
  --jtp-muted: #686868;
  --jtp-line: #dedede;
  --jtp-bg: #f4f5f6;
  --jtp-white: #fff;
  --jtp-success: #18794e;
  --jtp-warning: #9a6700;
  --jtp-danger: #b42318;
  --jtp-radius: 3px;
  --jtp-shadow: 0 8px 28px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--jtp-bg);
  color: var(--jtp-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--jtp-red-dark); }
a:hover, a:focus { color: var(--jtp-red); }
img { max-width: 100%; height: auto; }

.jtp-site-header {
  background: var(--jtp-white);
  border-top: 7px solid var(--jtp-red);
  border-bottom: 1px solid var(--jtp-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-bar .jtp-site-header { top: 32px; }
.jtp-header-inner {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.jtp-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.jtp-brand .custom-logo-link { display: flex; align-items: center; }
.jtp-brand .custom-logo { max-height: 58px; width: auto; }
.jtp-brand-fallback {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--jtp-red);
  color: white;
  font-weight: 700;
  font-size: 20px;
}
.jtp-brand-text { min-width: 0; }
.jtp-site-title { margin: 0; font-size: 22px; line-height: 1.15; font-weight: 700; }
.jtp-site-description { margin: 4px 0 0; color: var(--jtp-muted); font-size: 14px; }
.jtp-user-area { display: flex; align-items: center; gap: 14px; }
.jtp-user-meta { text-align: right; font-size: 14px; line-height: 1.35; }
.jtp-user-meta strong { display: block; }

.jtp-button,
button,
input[type="submit"],
.wp-element-button,
.ptp-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  padding: 10px 18px !important;
  border: 1px solid var(--jtp-red) !important;
  border-radius: var(--jtp-radius) !important;
  background: var(--jtp-red) !important;
  color: #fff !important;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.jtp-button:hover,
button:hover,
input[type="submit"]:hover,
.ptp-button:hover {
  background: var(--jtp-red-dark) !important;
  border-color: var(--jtp-red-dark) !important;
  color: #fff !important;
}
.jtp-button--secondary {
  background: #fff !important;
  color: var(--jtp-red-dark) !important;
}

.jtp-page-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 60px;
}
.jtp-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}
.jtp-kicker { color: var(--jtp-red); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; }
.jtp-page-heading h1 { margin: 2px 0 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.08; }
.jtp-page-heading p { margin: 8px 0 0; color: var(--jtp-muted); }

.jtp-content-card,
.entry-content > .wp-block-group,
.ptp-card,
.ptp-wrap,
.ptp-portal {
  background: #fff;
  border: 1px solid var(--jtp-line);
  border-radius: var(--jtp-radius) !important;
  box-shadow: none !important;
}
.jtp-content-card { padding: clamp(20px, 3vw, 36px); }
.entry-content { min-width: 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

/* Plugin-Optimierungen */
.ptp-wrap, .ptp-portal { max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.ptp-card { padding: 22px !important; margin-bottom: 20px !important; }
.ptp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px !important; border-bottom: 2px solid var(--jtp-red-soft); padding-bottom: 10px; }
.ptp-tabs a { padding: 9px 14px; text-decoration: none; font-weight: 700; border-radius: var(--jtp-radius); }
.ptp-tabs a:hover, .ptp-tabs a.active { background: var(--jtp-red); color: white; }
.ptp-table-wrap { overflow-x: auto; border: 1px solid var(--jtp-line); }
.ptp-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.ptp-table th { background: #333; color: #fff; text-align: left; font-size: 13px; letter-spacing: .02em; }
.ptp-table th, .ptp-table td { padding: 12px 13px !important; border-bottom: 1px solid var(--jtp-line) !important; vertical-align: top; }
.ptp-table tbody tr:nth-child(even) { background: #fafafa; }
.ptp-table tbody tr:hover { background: var(--jtp-red-soft); }
.ptp-form label { color: var(--jtp-ink); font-weight: 700; }
.ptp-form input[type="text"],
.ptp-form input[type="email"],
.ptp-form input[type="password"],
.ptp-form input[type="date"],
.ptp-form input[type="time"],
.ptp-form input[type="number"],
.ptp-form select,
.ptp-form textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #aaa;
  border-radius: var(--jtp-radius);
  background: #fff;
  color: var(--jtp-ink);
  font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(209,10,17,.18); border-color: var(--jtp-red); }
.ptp-notice, .ptp-success, .ptp-error { padding: 14px 16px !important; border-radius: var(--jtp-radius) !important; border-left: 5px solid !important; }
.ptp-success { background: #edf8f2 !important; border-color: var(--jtp-success) !important; }
.ptp-error { background: #fff0f0 !important; border-color: var(--jtp-danger) !important; }
.ptp-muted { color: var(--jtp-muted) !important; }
.ptp-status { display: inline-block; padding: 4px 9px; border-radius: 2px !important; font-size: 12px; font-weight: 700; }
.ptp-status-neu { background: #eef3f8; color: #334e68; }
.ptp-status-bestaetigt { background: #e8f5ee; color: #146c43; }
.ptp-status-abgelehnt, .ptp-status-storniert { background: #fdebec; color: #a61b1f; }
.ptp-status-in_fahrt { background: #fff5db; color: #7a5300; }
.ptp-status-abgeschlossen { background: #ededed; color: #444; }

.jtp-login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 43%) 1fr; background: #fff; }
.jtp-login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 6vw, 90px); }
.jtp-login-panel .entry-content { max-width: 540px; width: 100%; }
.jtp-login-visual {
  position: relative;
  background:
    linear-gradient(140deg, rgba(115,0,4,.92), rgba(209,10,17,.75)),
    radial-gradient(circle at 20% 20%, #ed6266, transparent 42%),
    #d10a11;
  color: #fff;
  padding: clamp(40px, 7vw, 100px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.jtp-login-visual::before,
.jtp-login-visual::after { content:""; position:absolute; background:rgba(255,255,255,.12); transform:rotate(45deg); }
.jtp-login-visual::before { width:420px; height:84px; top:18%; right:-90px; }
.jtp-login-visual::after { width:84px; height:420px; top:2%; right:78px; }
.jtp-login-copy { position: relative; z-index: 1; max-width: 650px; }
.jtp-login-copy h1 { font-size: clamp(38px, 6vw, 72px); line-height: .98; margin: 0 0 20px; }
.jtp-login-copy p { font-size: clamp(18px, 2vw, 24px); max-width: 570px; }
.jtp-login-logo { margin-bottom: 44px; }
.jtp-login-logo .custom-logo { max-height: 72px; width: auto; filter: brightness(0) invert(1); }

.jtp-site-footer { border-top: 1px solid var(--jtp-line); background: #fff; }
.jtp-footer-inner { width: min(1440px, calc(100% - 40px)); margin: 0 auto; min-height: 82px; display:flex; align-items:center; justify-content:space-between; gap:20px; color:var(--jtp-muted); font-size:14px; }
.jtp-footer-links { display:flex; gap:16px; flex-wrap:wrap; }

@media (max-width: 900px) {
  .jtp-login-page { grid-template-columns: 1fr; }
  .jtp-login-visual { min-height: 320px; order: -1; }
  .jtp-user-meta { display: none; }
  .jtp-page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .admin-bar .jtp-site-header { top: 46px; }
  .jtp-header-inner, .jtp-page-shell, .jtp-footer-inner { width: min(100% - 24px, 1440px); }
  .jtp-header-inner { min-height: 70px; }
  .jtp-site-description { display:none; }
  .jtp-site-title { font-size: 17px; }
  .jtp-user-area .jtp-button { padding: 8px 10px !important; min-height: 38px; }
  .jtp-page-shell { padding-top: 22px; }
  .jtp-content-card { padding: 14px; }
  .jtp-login-panel, .jtp-login-visual { padding: 28px 22px; }
}

/* Portal-Startseite */
.jtp-home { background: #f5f5f5; min-height: calc(100vh - 160px); }
.jtp-home-hero { background: linear-gradient(120deg, #870008, #d10a11 68%, #e02b31); color: #fff; overflow: hidden; position: relative; }
.jtp-home-hero::after { content: "+"; position: absolute; right: 5vw; top: 50%; transform: translateY(-52%); font-size: min(38vw, 520px); line-height: .7; font-weight: 700; color: rgba(255,255,255,.09); }
.jtp-home-hero-inner { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: clamp(70px, 10vw, 145px) 0; position: relative; z-index: 1; }
.jtp-home-copy { max-width: 850px; }
.jtp-eyebrow { display: inline-block; font-size: 14px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.jtp-home-copy h1 { color: #fff; font-size: clamp(42px, 6vw, 78px); line-height: 1.02; margin: 0 0 24px; max-width: 950px; }
.jtp-home-copy p { font-size: clamp(18px, 2vw, 24px); line-height: 1.55; max-width: 760px; margin: 0; }
.jtp-home-section { width: min(1280px, calc(100% - 40px)); margin: -44px auto 0; position: relative; z-index: 3; padding-bottom: 64px; }
.jtp-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.jtp-home-card { background: #fff; border-top: 6px solid #d10a11; padding: 34px; box-shadow: 0 14px 40px rgba(0,0,0,.09); min-height: 330px; display: flex; flex-direction: column; align-items: flex-start; }
.jtp-home-card-muted { border-top-color: #555; }
.jtp-home-icon { width: 52px; height: 52px; display: grid; place-items: center; background: #d10a11; color: #fff; font-size: 31px; font-weight: 700; margin-bottom: 24px; }
.jtp-home-card-muted .jtp-home-icon { background: #444; }
.jtp-home-card h2 { font-size: 27px; line-height: 1.2; margin: 0 0 15px; }
.jtp-home-card p { color: #555; line-height: 1.65; margin: 0 0 28px; }
.jtp-home-card .jtp-button { margin-top: auto; }
.jtp-button-dark { background: #242424 !important; color: #fff !important; border-color: #242424 !important; }
.jtp-button-light { background: #fff !important; color: #222 !important; border: 2px solid #222 !important; }
.jtp-home-info { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 80px; display: grid; grid-template-columns: 2fr 1fr; gap: 46px; align-items: start; }
.jtp-home-info h2 { font-size: 34px; margin-top: 0; }
.jtp-home-info p, .jtp-home-support span { color: #555; line-height: 1.65; }
.jtp-home-support { background: #fff; border-left: 5px solid #d10a11; padding: 24px; display: grid; gap: 8px; }
@media (max-width: 920px) {
  .jtp-home-grid { grid-template-columns: 1fr; }
  .jtp-home-card { min-height: auto; }
  .jtp-home-info { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .jtp-home-hero-inner, .jtp-home-section, .jtp-home-info { width: min(100% - 24px, 1280px); }
  .jtp-home-section { margin-top: -24px; }
  .jtp-home-card { padding: 24px; }
}
