/* ===============================
   Farb- & Typo-Variablen
   =============================== */
:root{
  --brand:#0b2a3a;           /* Markenblau */
  --accent:#0077b6;          /* Primär-CTA */
  --accent-dark:#005a85;     /* Hover-CTA */
  --bg:#f7f8fa;              /* Seitenhintergrund */
  --text:#222;               /* Standardtext */
}

/* ===============================
   Basis / Reset
   =============================== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
}

/* Links global NICHT unterstreichen — außer wir wollen es explizit */
a{color:inherit;text-decoration:none}
a.link{color:var(--accent)}             /* „Textlink“-Optik */
a.link:hover{text-decoration:underline} /* Unterstreichung nur bei Hover */

/* ===============================
   Layout-Helfer
   =============================== */
.container{max-width:960px;margin:0 auto;padding:24px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media(max-width:880px){.grid-2{grid-template-columns:1fr}}

/* ===============================
   Markenbalken
   =============================== */
.brandbar{background:var(--brand);color:#fff;font-size:.95rem}
.brandbar .container{display:flex;align-items:center;gap:12px;padding:8px 24px}
.brandbar img{border-radius:50%}
.brandbar a{color:#fff}
.brandbar a:hover{text-decoration:underline}

/* ===============================
   Hero (technischer Hintergrund)
   =============================== */
header.hero{
  position:relative;
  color:#fff;
  text-align:center;
  padding:80px 24px;
  background:var(--brand) url("/src/img/java-schulung.jpg") center/cover no-repeat; /* <-- technisches Bild */
}
.hero::after{
  content:"";
  position:absolute;inset:0;
  background:rgba(0,0,0,.45); /* abdunkeln für bessere Lesbarkeit */
}
.hero-text{position:relative;z-index:1;max-width:820px;margin:0 auto}
.hero h1{font-size:2.4rem;margin:0 0 12px}
.hero p{font-size:1.1rem;margin:0 0 14px}
.hero .meta{opacity:.9;font-size:.95rem}

/* ===============================
   CTA-Buttons
   =============================== */
.cta-row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:14px}
.btn{
  display:inline-block;padding:12px 20px;border-radius:6px;
  font-weight:700;line-height:1;transition:background .2s ease
}
.btn-primary{background:var(--accent);color:#fff}
.btn-primary:hover{background:var(--accent-dark)}

/* ===============================
   Sektionen / Karten
   =============================== */
section{
  background:#fff;margin:28px auto;padding:28px;border-radius:10px;
  box-shadow:0 3px 8px rgba(0,0,0,.05);
  opacity:0;transform:translateY(28px);transition:all .6s ease-out; /* Scroll-Reveal Startzustand */
}
section.visible{opacity:1;transform:translateY(0)}
h2{margin:0 0 10px;color:var(--brand)}
h3{margin:14px 0 8px}

/* Checkliste */
ul.check{list-style:none;padding:0;margin:0}
ul.check li{position:relative;margin:0 0 10px;padding-left:24px}
ul.check li::before {
  content: "\f00c";               /* Häkchen in Font Awesome */
  font-family: "Font Awesome 6 Free"; 
  font-weight: 900;               /* wichtig für Solid-Stil */
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

/* Info-Boxen */
.card{
  background:#fff;border:1px solid #e8edf2;border-radius:10px;padding:16px;
  transition:transform .15s ease, box-shadow .15s ease
}
.card:hover{transform:translateY(-3px);box-shadow:0 8px 22px rgba(0,0,0,.06)}

/* ===============================
   Footer
   =============================== */
footer{
  background:#2c3e50;color:#fff;padding:20px;text-align:center;margin-top:32px;font-size:.95rem
}
footer a{color:#fff}
footer a:hover{text-decoration:underline}

/* Elemente mit data-reveal bekommen Reveal-Startzustand */
[data-reveal]{
  opacity:0;
  transform: translateY(28px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}

/* Wird per JS gesetzt, wenn Element im Viewport ist */
.is-visible{
  opacity:1;
  transform: translateY(0);
}

/* Wird per JS gesetzt, wenn Element im Viewport ist */
.is-visible{
  opacity:1;
  transform: translateY(0);
}

/* Fallback, falls JS aus ist */
html.no-js [data-reveal]{
  opacity:1;
  transform:none;
}
/* Fallback, falls JS aus ist */
html.no-js [data-reveal]{
  opacity:1;
  transform:none;
}

/* --- Wird per JS gesetzt, wenn Element im Viewport --- */
.is-visible{
  opacity:1;
  transform: translateY(0);
}

/* ===== Codeblock mit Copy-Fähnchen ===== */
.codebox{ position:relative; }
.codebox pre{
  margin:0;
  padding:1rem 2.75rem 1rem 1rem; /* rechts Platz für Button */
  background:#0f172a;
  color:#eaeaea;
  border-radius:.6rem;
  overflow:auto;
}
.codebox .btn-copy{
  position:absolute;
  top:.5rem; right:.5rem;
  padding:.3rem .6rem;
  font-size:.8rem;
  background:#fff;
  border:1px solid #cfd6de;
  border-radius:.4rem;
  cursor:pointer;
  opacity:.85;
  transition:opacity .2s, background .2s, border-color .2s;
}
.codebox .btn-copy:hover{ opacity:1; }
.codebox .btn-copy.copied{
  background:#e7f8ed;
  border-color:#b5e2c5;
}

/* (Optional) Variante: Button unten rechts, wenn du der .codebox zusätzlich die Klasse codebox--br gibst */
.codebox.codebox--br .btn-copy{ top:auto; bottom:.5rem; }

/* ===============================
   Standorte / Vor-Ort-Sektion (Ergänzung)
   =============================== */

/* Sektion-Feinschliff (optional) */
.standorte .meta{
  opacity:.9;
  font-size:.95rem;
}

/* Zweitstil für Buttons (wird in den Kacheln genutzt) */
.btn-secondary{
  background:#fff;
  color:var(--accent);
  border:1px solid #cfd6de;
}
.btn-secondary:hover{
  background:#f5f8fb;
  border-color:#b9c6d3;
}

/* Kachel-Grid für 12 Orte */
.location-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px,1fr));
  gap:16px;
  margin-top:12px;
}

/* Kartenlayout für Standort-Kacheln */
.card.location{
  padding:0;
  overflow:hidden;
}
.location__link{
  display:block;
  color:inherit;
  text-decoration:none;
}
.location__media{ margin:0; } /* figure-Reset */
.location__media img{
  width:100%;
  height:auto;
  display:block;
  object-fit:cover;
  aspect-ratio:4/3; /* verhindert Layout-Shift */
}

/* Typografie & Abstände in der Kachel */
.location__title{ margin:12px 16px 4px; }
.card.location .meta{ margin:0 16px 12px; }
.location__cta{ display:inline-block; margin:0 16px 16px; }

/* Hover/Focus – zugänglich und dezent */
.location__link:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; }
.card.location:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 22px rgba(0,0,0,.06);
}

/* Responsives Feintuning */
@media (max-width:600px){
  .location-grid{ gap:12px; }
  .location__title{ margin:10px 12px 4px; }
  .card.location .meta{ margin:0 12px 12px; }
  .location__cta{ margin:0 12px 12px; }
}

/* final einmalige Fassungen */
[data-reveal]{ opacity:0; transform:translateY(28px); transition:opacity .6s ease-out, transform .6s ease-out; }
.is-visible{ opacity:1; transform:translateY(0); }
html.no-js [data-reveal]{ opacity:1; transform:none; }

/* Sekundär-Buttons wie Primär-Buttons einfärben */
.btn-secondary{
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}
.btn-secondary:hover{
  background: var(--accent-dark);
}

.location__cta i {
  margin-right: 0.5em;
}

.location__cta i {
  margin-right: 0.6em; /* Abstand Icon zu Text */
  font-size: 1.1em;   /* optional etwas größer für bessere Sichtbarkeit */
  vertical-align: middle; /* mittig zum Text ausrichten */
}

.location__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem; /* Abstand zwischen Icon und Text */
  padding: 0.75rem 1rem;
}

.location__cta i {
  font-size: 1.4rem;   /* Icon etwas größer */
  line-height: 1;
}

.location__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100px;       /* alle gleich hoch */
  padding: 0.75rem 1rem;
  gap: 0.5rem;         /* Abstand Icon ↔ Text */
}

.location__cta i {
  font-size: 1.4rem;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  align-items: stretch;   /* sorgt für gleiche Höhe */
}

.location__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
  height: 100%;           /* Button füllt die gesamte Kartenhöhe */
}

/* Karte als Spalte: Bild – Text – CTA */
.location {
  display: flex;
  flex-direction: column;
  height: 100%;                 /* wichtig in Grid */
}

.location__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Bild mit einheitlichem Format */
.location__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;          /* 480x320 Gefühl, sorgt für gleiche Bildhöhen */
  object-fit: cover;
  border-radius: 10px 10px 0 0; /* optional, falls Karten abgerundet sind */
}

/* Textteil wächst, Footer bleibt unten */
.location__body { padding: 14px 16px; }
.location__title { margin: 0 0 6px; }
.location__footer {
  margin-top: auto;             /* drückt CTA nach unten */
  padding: 12px 16px 16px;
}

/* CTA: Icon über Text, gleiche Buttonhöhe */
.location__cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 88px;             /* gleiche Höhe für alle Buttons */
  text-align: center;
  gap: .55rem;                  /* Abstand Icon ↔ Text */
}

/* Icon-Größe & Mikroabstand */
.location__cta i {
  font-size: 1.35rem;
  line-height: 1;
}

/* Optional: gleiche Kartenhöhe im Grid erzwingen */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: stretch;         /* alle Karten gleich hoch */
}

/* Grid: gleiche Kartenhöhe */
.location-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px,1fr));
  gap:20px;
  align-items:stretch;                 /* Karten auf gleiche Höhe */
}

/* Karte & Link als Spalte */
.location{
  height:100%;
  display:flex;
}
.location__link{
  display:flex;
  flex-direction:column;
  height:100%;
}

/* Bild einheitlich */
.location__media{
  margin:0;
}
.location__media img{
  width:100%;
  height:auto;
  aspect-ratio:3/2;                    /* gleiche Bildhöhe */
  object-fit:cover;
  display:block;
  border-radius:10px 10px 0 0;         /* falls Cards gerundet sind */
}

/* Titel + Teaser */
.location__title{ margin:14px 16px 6px; }
.location .meta{ margin:0 16px 0; }

/* Footer/CTA immer unten & einheitliche Buttonhöhe */
.location__cta{
  margin: auto 16px 16px;              /* drückt Button nach unten (auto oben) */
  display:inline-flex;
  flex-direction:column;               /* Icon über Text */
  align-items:center;
  justify-content:center;
  width:calc(100% - 32px);             /* gleiche Seitenabstände wie Text */
  text-align:center;
  gap:.6rem;                           /* mehr Abstand Icon ↔ Text */
  min-height:96px;                     /* gleiche Höhe für alle Buttons */
  padding:14px 16px;
  line-height:1.25;
}

/* Icon etwas größer, zentriert */
.location__cta i{
  font-size:1.5rem;
  line-height:1;
}

/* kleine Screens: etwas kompakter */
@media (max-width: 520px){
  .location__cta{ min-height:88px; padding:12px 14px; gap:.5rem; }
}

.location__cta{
  margin: auto 16px 16px;
  display: inline-flex;
  flex-direction: column;      /* Icon über Text */
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  text-align: center;
  gap: 0.4rem;                 /* weniger Abstand */
  min-height: 64px;            /* schlanker Button */
  padding: 10px 14px;          /* kompakter */
  line-height: 1.2;
}

.location__cta i{
  font-size: 1.2rem;           /* kleineres Icon */
  line-height: 1;
}

.location__cta {
  margin: auto 16px 16px;
  display: flex;
  flex-direction: column;     
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  text-align: center;
  gap: 0.3rem;
  min-height: 80px;           /* gleiche Höhe für alle */
  padding: 8px 12px;
  line-height: 1.3;
  white-space: normal;        /* erlaubt Umbruch */
}

.location__cta i {
  font-size: 1.2rem;
  line-height: 1;
}
.location__cta {
  margin: auto 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  text-align: center;
  gap: 0.3rem;
  height: 70px;              /* feste Höhe für ALLE */
  overflow: hidden;          /* Überlänge abgeschnitten */
  padding: 6px 10px;
}

.location__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  padding: 0.6rem 0.8rem;

  background-color: #f0f4f8;  /* hellgrau statt knallblau */
  color: #004080;             /* dezentes Blau für Text */
  border: 1px solid #d0d7de;  /* feine Umrandung */
  border-radius: 6px;         /* etwas weicher */
  font-size: 0.9rem;          /* kleinerer Text */
  font-weight: 600;
  min-height: 60px;           /* gleiche Höhe */
}

.location__cta i {
  font-size: 1.2rem;          /* Icon kleiner */
  color: #0060a0;             /* dezentes Blau */
}

.location__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.25rem;
  padding: 0.6rem 0.8rem;

  background-color: #f0f4f8;   /* hellgrau/blau */
  color: #004080;              /* dezentes Blau */
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 60px;
  transition: all 0.2s ease-in-out;
}

.location__cta i {
  font-size: 1.2rem;
  color: #0060a0;              /* Icon in Blau */
  transition: color 0.2s ease-in-out;
}

/* Hover-Effekt */
.location__cta:hover {
  background-color: #00548c;   /* kräftiges Blau */
  color: #ffffff;              /* Text weiß */
  border-color: #004070;
}

.location__cta:hover i {
  color: #ffffff;              /* Icon auch weiß */
}
.parallax {
  background-image: url('/src/img/java-schulung.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  height: 300px; /* Desktop */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.parallax__overlay {
  background: rgba(0,0,0,0.4); /* halbtransparentes Schwarz */
  padding: 20px 30px;
  border-radius: 6px;
  color: #fff; /* Schriftfarbe erzwingen */
}

.parallax__overlay h2,
.parallax__overlay p {
  color: #fff !important; /* sicherstellen, dass es nicht überschrieben wird */
}

.parallax h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 700;
}

.parallax p {
  margin: 0;
  font-size: 1.2rem;
}

/* Mobile */
@media(max-width: 768px) {
  .parallax {
    height: 180px;
    padding: 0 10px;
  }
  .parallax h2 { font-size: 1.4rem; }
  .parallax p { font-size: 1rem; }
}

/* ===============================
   FAQ Accordion (Aufklappboxen)
   =============================== */

.faq {
  background: #fff;
  margin: 28px auto;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,.05);
}

.faq h2 {
  font-size: 1.8rem;
  color: var(--brand);
  margin-bottom: 1.8rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Basis-Stil der FAQ-Boxen */
.faq-item {
  border: 1px solid #e4e8ec;
  border-radius: 6px;
  overflow: hidden;
  background-color: #fdfdfd;
  transition: all 0.25s ease;
}

/* Fragezeile */
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-weight: 600;
  color: var(--brand);
  position: relative;
  font-size: 1.05rem;
}

/* Pfeil-Icon (CSS-only) */
.faq-item summary::after {
  content: "\f078"; /* Font Awesome 'chevron-down' */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 1rem;
  top: 1rem;
  transition: transform 0.3s ease;
  color: var(--accent);
}

/* geöffneter Zustand */
.faq-item[open] summary::after {
  transform: rotate(180deg);
}

/* Antworttext */
.faq-answer {
  padding: 0 1.2rem 1rem;
  animation: accordion-fade 0.3s ease;
}

@keyframes accordion-fade {
  from {opacity: 0; transform: translateY(-4px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Hover-/Open-Effekte */
.faq-item:hover,
.faq-item[open] {
  border-color: var(--accent);
  background-color: #f9fbfd;
}

/* responsive Anpassung */
@media (max-width: 600px) {
  .faq {
    padding: 20px;
  }
  .faq h2 {
    font-size: 1.4rem;
  }
  .faq-item summary {
    font-size: 1rem;
  }
}

/* ================================
   Related Courses (mit Bildern)
   ================================ */
.related-courses {
  margin-top: 3rem;
  text-align: center;
}
.related-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #222;
  font-weight: 600;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}
.related-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.related-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.related-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.related-img-wrapper {
  overflow: hidden;
}
.related-img-wrapper img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}
.related-card figcaption {
  padding: 0.9rem;
  font-weight: 500;
  font-size: 1.05rem;
  color: #222;
  background-color: #f8f9fa;
}
.related-link:hover .related-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}
.related-link:hover img {
  transform: scale(1.05);
}
.related-meta {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #555;
}
.related-meta a {
  color: #0056b3;
  text-decoration: underline;
}
.related-meta a:hover {
  color: #003d82;
}

//* ===================================
   Java Themen-Rondell / Karussell (mobiloptimiert)
   =================================== */
.java-carousel {
  margin: 3rem auto;
  max-width: 1200px;
  text-align: center;
  overflow: hidden;
}

.java-carousel h3 {
  font-size: 1.5rem;
  color: var(--brand, #0056a3);
  margin-bottom: 1rem;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 1rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-item {
  flex: 0 0 200px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 1.25rem;
  text-align: center;
  color: #333;
  text-decoration: none;
  scroll-snap-align: start;
  transition: transform .25s ease, box-shadow .25s ease;
}

.carousel-item i {
  font-size: 2rem;
  color: #0056a3;
  margin-bottom: .5rem;
}

.carousel-item span {
  display: block;
  font-weight: 600;
  font-size: .95rem;
}

.carousel-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Navigation */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0056a3;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 2;
  transition: background-color .2s ease;
}

.carousel-btn:hover {
  background: #004494;
}

.carousel-btn.prev { left: -12px; }
.carousel-btn.next { right: -12px; }

/* Mobile Anpassungen */
@media (max-width: 640px) {
  .carousel-btn { display: none; }
  .carousel-track {
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  .carousel-item {
    flex: 0 0 75%;
    max-width: 85%;
    margin-right: 0.5rem;
  }
  .carousel-item i {
    font-size: 1.6rem;
  }
  .carousel-item span {
    font-size: 0.9rem;
  }
}