/* Heidelberg Corporate Design - Barrierefreies CSS */

/* ===== Variablen ===== */
:root {
    --hd-rot: #a50050;
    --hd-gelb: #ffc845;
    --hd-blau: #236192;
    --hd-grau1: #75787b;
    --hd-grau2: #a7a8aa;
    --hd-grau3: #c8c9c7;
    --hd-hellblau: #71b2c9;
    --hd-orange: #e87722;
    --hd-gruen: #b7bf10;
    --hd-dunkel: #3B3736;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: var(--hd-dunkel);
    background-color: #f5f5f5;
}

/* ===== Skip Link (Barrierefreiheit) ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--hd-blau);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* ===== Header ===== */
.header-bar {
    background-color: var(--hd-rot);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-section {
    flex: 1;
}

.header-title {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    margin: 0;
}

.header-subtitle {
    font-size: 1em;
    color: white;
    margin-top: 5px;
    opacity: 0.95;
}

.logo-section img {
    height: 45px;
    filter: brightness(0) invert(1);
}

/* ===== Hero Image ===== */
.hero-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 150px;
    object-fit: cover;
}

/* ===== Main Content ===== */
main {
    min-height: 50vh;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ===== Content Boxen ===== */
.content-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.intro-box h2 {
    color: var(--hd-rot);
    font-size: 1.6em;
    margin-bottom: 15px;
}

.intro-box p {
    font-size: 1.1em;
    color: var(--hd-grau1);
    line-height: 1.7;
}

/* ===== Section Titles ===== */
.section-title {
    color: var(--hd-rot);
    font-size: 1.8em;
    margin: 40px 0 20px 0;
    padding-left: 15px;
    border-left: 5px solid var(--hd-rot);
}

/* ===== Info Box ===== */
.info-box h3 {
    color: var(--hd-blau);
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hd-grau3);
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box ul li {
    padding: 15px 0;
    border-bottom: 1px solid var(--hd-grau3);
    line-height: 1.8;
}

.info-box ul li:last-child {
    border-bottom: none;
}

/* ===== Kacheln ===== */
.kachel {
    display: inline-block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    margin: 10px;
    min-width: 250px;
    vertical-align: top;
}

.kachel:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.kachel:focus {
    outline: 3px solid var(--hd-blau);
    outline-offset: 3px;
}

.kachel-header {
    background-color: var(--hd-grau2);
    color: white;
    padding: 20px;
    font-weight: 700;
}

.kachel-header.accent {
    background-color: var(--hd-blau);
}

.kachel-title {
    font-size: 1.2em;
    margin: 0;
}

/* ===== Links ===== */
a {
    color: var(--hd-blau);
    text-decoration: none;
}

a:hover {
    color: var(--hd-rot);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--hd-blau);
    outline-offset: 2px;
}

/* ===== Footer ===== */
.footer-bar {
    background-color: var(--hd-dunkel);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-link {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--hd-gelb);
    text-decoration: underline;
}

.footer-link:focus {
    outline: 2px solid var(--hd-gelb);
    outline-offset: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 4px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-title {
        font-size: 1.5em;
    }
    
    .section-title {
        font-size: 1.4em;
    }
    
    .kachel {
        display: block;
        margin: 10px 0;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .content-box {
        padding: 20px 15px;
    }
    
    .header-title {
        font-size: 1.3em;
    }
    
    .header-subtitle {
        font-size: 0.9em;
    }
}

/* ===== Druckversion ===== */
@media print {
    .skip-link,
    .footer-bar {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Mobile-Optimierung für Header */
@media (max-width: 600px) {

    /* Header enger machen */
    .header-bar {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .header-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Titel links */
        text-align: left;
        gap: 6px;
        position: relative;
    }

    /* Logo rechts oben und über dem Titel */
    .logo-section {
        order: -1; /* Logo über Titel */
        width: 100%;
        display: flex;
        justify-content: flex-end; /* rechts ausrichten */
        margin-bottom: 4px;
    }

    /* Logo deutlich kleiner */
    .logo-section img {
        height: 20px; /* sehr klein */
    }

    /* Titel größer */
    .header-title {
        font-size: 1.7rem; /* größer als vorher */
        line-height: 1.2;
        margin: 0;
    }

    .header-subtitle {
        font-size: 0.9rem;
        line-height: 1.2;
        margin: 0;
    }

    /* Banner entfernen */
    .hero-image {
        display: none;
    }
}

/* Ribbon ohne Text-Überlappung:
   - Ribbon sitzt oben rechts im Header-Bereich
   - wir geben dem Titel rechts Platz (padding-right), damit nichts drunter liegt
*/

.kachel-header {
  position: relative;
}

/* Platz schaffen, damit der Titel nicht vom Ribbon überdeckt wird */
.kachel--soon .kachel-title {
  padding-right: 90px; /* ggf. anpassen je nach Kachelbreite */
}

/* Optional: Coming-soon-Kacheln etwas deaktiviert wirken lassen */
.kachel--soon {
  cursor: default;
}

/* Ribbon-Container (bleibt innerhalb) */
.ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 86px;   /* bestimmt die "Ecke" */
  height: 86px;
  overflow: hidden;
  pointer-events: none;
}

/* Das Band selbst */
.ribbon__text {
  position: absolute;
  top: 18px;
  right: -28px;
  transform: rotate(45deg);

  display: block;
  width: 120px;
  padding: 6px 0;

  background: rgba(107,114,128,0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;

  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* kleine Band-Enden */
.ribbon__text::before,
.ribbon__text::after {
  content: "";
  position: absolute;
  top: 100%;
  border-top: 6px solid rgba(75,85,99,0.95);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.ribbon__text::before { left: 10px; }
.ribbon__text::after  { right: 10px; }