/* Lernwichtel – additional site styles (extends WordPress theme extract) */

/* Footer navigation for legal pages */
.lw-footer-nav {
    margin-top: 6px;
    font-size: 13px;
}
.lw-footer-nav a {
    color: rgba(255,255,255,.85);
    margin: 0 2px;
}
.lw-footer-nav a:hover { color: #fff; text-decoration: underline; }

/* ── Animierte Schmetterlinge im Kopfbereich ─────────────────────────────────
   Die drei Falter wurden aus top-bg.png freigestellt (butterfly-1..3.png);
   top-bg-static.png ist dasselbe Bild ohne sie. Die Bühne bildet die Platzierung
   des Hintergrundbildes nach (no-repeat center bottom, Originalgröße 2000x512),
   deshalb sind die Startpositionen die Originalkoordinaten aus dem PNG. */
.section.home {
    background-image: url(../img/top-bg-static.png);
    position: relative;
    overflow: hidden;              /* verhindert horizontales Scrollen durch die 2000px-Bühne */
}
.section.home > .container {
    position: relative;
    z-index: 2;                    /* Hero-Text bleibt immer über den Faltern */
}
.lw-butterflies {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 512px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.lw-butterflies-stage {
    position: absolute;
    left: 50%; bottom: 0;
    width: 2000px; height: 512px;
    margin-left: -1000px;          /* zentriert wie background-position: center */
}
.lw-bf {
    position: absolute;
    will-change: transform;
}
.lw-bf > img { display: block; }

/* Startpunkte = Originalposition im PNG */
.lw-bf-1 { left: 711px;  top: 237px; animation: lw-fly-1 19s ease-in-out -3s infinite; }
.lw-bf-2 { left: 828px;  top: 349px; animation: lw-fly-2 23s ease-in-out -11s infinite; }
.lw-bf-3 { left: 1102px; top: 310px; animation: lw-fly-3 17s ease-in-out -7s infinite; }

/* Flügelschlag: seitliches Stauchen liest sich in der Aufsicht als Flattern */
.lw-bf-1 > img { animation: lw-flap 0.32s ease-in-out infinite; }
.lw-bf-2 > img { animation: lw-flap 0.38s ease-in-out infinite; }
.lw-bf-3 > img { animation: lw-flap 0.29s ease-in-out infinite; }

@keyframes lw-flap {
    0%, 100% { transform: scaleX(1); }
    50%      { transform: scaleX(0.55); }
}

@keyframes lw-fly-1 {
    0%   { transform: translate(0, 0)          rotate(0deg); }
    15%  { transform: translate(60px, -45px)   rotate(8deg); }
    30%  { transform: translate(140px, -20px)  rotate(-6deg); }
    45%  { transform: translate(190px, 40px)   rotate(4deg); }
    60%  { transform: translate(120px, 80px)   rotate(-8deg); }
    75%  { transform: translate(40px, 50px)    rotate(6deg); }
    90%  { transform: translate(-25px, 15px)   rotate(-4deg); }
    100% { transform: translate(0, 0)          rotate(0deg); }
}
@keyframes lw-fly-2 {
    0%   { transform: translate(0, 0)          rotate(0deg); }
    12%  { transform: translate(-55px, -60px)  rotate(-7deg); }
    26%  { transform: translate(20px, -130px)  rotate(6deg); }
    40%  { transform: translate(110px, -90px)  rotate(-5deg); }
    55%  { transform: translate(160px, -160px) rotate(8deg); }
    70%  { transform: translate(90px, -60px)   rotate(-6deg); }
    85%  { transform: translate(10px, -15px)   rotate(4deg); }
    100% { transform: translate(0, 0)          rotate(0deg); }
}
@keyframes lw-fly-3 {
    0%   { transform: translate(0, 0)          rotate(0deg); }
    14%  { transform: translate(-70px, -50px)  rotate(-6deg); }
    28%  { transform: translate(-140px, -15px) rotate(5deg); }
    42%  { transform: translate(-95px, 40px)   rotate(-4deg); }
    58%  { transform: translate(-20px, 30px)   rotate(7deg); }
    72%  { transform: translate(55px, -25px)   rotate(-5deg); }
    86%  { transform: translate(30px, 10px)    rotate(3deg); }
    100% { transform: translate(0, 0)          rotate(0deg); }
}

/* Nutzer, die reduzierte Bewegung eingestellt haben, sehen das Bild wie zuvor:
   Falter an ihrer ursprünglichen Stelle, ohne Animation. */
@media (prefers-reduced-motion: reduce) {
    .lw-bf, .lw-bf > img { animation: none; }
}

/* Form spacing & sizing — uniform 42px height across all text fields */
.lw-contact-form input[type="text"],
.lw-contact-form input[type="email"],
.lw-contact-form textarea {
    box-sizing: border-box;
    width: 100%;
    height: 42px;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    margin: 0 0 8px 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    /* Feldfarben wie im Theme (style.css): dunkelblaues Feld, helle Schrift.
       Das Theme setzt den Hintergrund mit !important — hier nur zur Klarheit
       nochmals notiert, damit die Textfarbe nicht versehentlich dunkel wird. */
    background: #195d9a;
    color: #90c6f6;
    -webkit-appearance: none;
    appearance: none;
}
/* Eingegebener Text im Fokus rein weiß — entspricht dem Theme-Verhalten */
.lw-contact-form input[type="text"]:focus,
.lw-contact-form input[type="email"]:focus,
.lw-contact-form textarea:focus { color: #fff; }
/* Standard-Placeholder-Regel: das Theme kennt nur die alten Prefix-Varianten,
   die u. a. in aktuellen Firefox-Versionen nicht mehr greifen. */
.lw-contact-form input::placeholder,
.lw-contact-form textarea::placeholder { color: rgba(255,255,255,.75); opacity: 1; }
/* Chrome-Autofill überschreibt sonst Feld- und Schriftfarbe */
.lw-contact-form input:-webkit-autofill,
.lw-contact-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #195d9a inset;
}
.lw-contact-form textarea {
    height: auto;
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}
.lw-contact-form input:focus,
.lw-contact-form textarea:focus { outline: none; border-color: #1e73be; }

/* Kontaktdaten links neben dem Formular rechtsbündig ausrichten */
.section.contact .contact .info,
.section.contact .contact .info address { text-align: right; }

/* Das Theme pinnt die Icons absolut auf left:5px und gleicht das mit
   padding-left:30px aus. Bei .phone und .mail funktioniert das auch rechtsbündig,
   weil beide Inline-Boxen auf ihren Inhalt schrumpfen und samt Icon nach rechts
   rücken. .adr ist dagegen ein Block über die volle Breite — das Icon bliebe
   allein am linken Rand zurück. inline-block lässt ihn ebenso schrumpfen. */
@media (min-width: 768px) {
    .section.contact .contact .info .adr { display: inline-block; }
}

/* Die <address>-Elemente sind im Theme float:left und werden vom .info-Block
   nicht eingeschlossen. In der Mobilansicht steht das Formular darunter, und
   der überstehende Float schob die erste Feldzeile (Name/E-Mail) — als
   Flex-Container ein eigener Formatierungskontext — auf Breite 0 an den rechten
   Rand. flow-root schließt die Floats ein und stellt die Bündigkeit her. */
.section.contact .contact .info { display: flow-root; }
@media (max-width: 767px) {
    /* Mobil stehen Info-Block und Formular untereinander — dort linksbündig lassen */
    .section.contact .contact .info,
    .section.contact .contact .info address { text-align: left; }
}

/* Field row — Name + E-Mail side-by-side via flex; one child = full width */
.lw-contact-form .lw-field-row {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}
.lw-contact-form .lw-field-row > input { flex: 1 1 0; min-width: 0; }
@media (max-width: 600px) {
    .lw-contact-form .lw-field-row { flex-direction: column; gap: 0; }
}

/* Senden-Button: blassrot bei ungültigem Formular, kräftig-rot wenn alle
   Pflichtfelder + Checkbox erfüllt sind (CSS-only via :valid/:invalid). */
.lw-contact-form .lw-submit {
    display: inline-block;
    background: #e8a8a8; /* blassrot — Standard, solange Pflichtfelder/Checkbox unvollständig */
    color: #fff;
    border: 0;
    padding: 10px 28px;
    margin: 0;
    border-radius: 4px;
    cursor: not-allowed;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    vertical-align: middle;
    box-sizing: content-box;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: background-color .2s ease, box-shadow .2s ease;
}
.lw-contact-form .lw-submit::before,
.lw-contact-form .lw-submit::after { content: none; }
.lw-contact-form:valid .lw-submit {
    background: #c0392b; /* kräftiges Rot — alle Pflichtfelder + Checkbox erfüllt */
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.30);
}
.lw-contact-form:valid .lw-submit:hover  { background: #a3301f; }
.lw-contact-form:valid .lw-submit:active { background: #8e2818; }
.lw-contact-form .lw-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Trainerin: Doris-Block horizontal mittig */
.section.about .team .thumbnails {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.section.about .team .thumbnails > li.span6.personal {
    float: none;
    margin: 0 auto;
}
.lw-contact-form .lw-recaptcha-notice {
    margin-top: 8px;
    font-size: 11px;
    color: #888;
}
.lw-form-status { margin-top: 12px; font-size: 14px; }
.lw-form-status.lw-success { color: #1f8a48; font-weight: bold; }
.lw-form-status.lw-error   { color: #b53c3c; font-weight: bold; }

/* Legal pages – simple readable layout */
.lw-legal-page {
    background: #fff;
    color: #333;
    padding: 100px 0 60px;
    line-height: 1.6;
}
.lw-legal-page .container { max-width: 800px; }
.lw-legal-page h1 { color: #1e73be; margin-bottom: 24px; }
.lw-legal-page h2 { margin-top: 32px; color: #1e73be; }
.lw-legal-page h3 { margin-top: 22px; }
.lw-legal-page p, .lw-legal-page li { font-size: 15px; }
.lw-legal-page a { color: #1e73be; }

/* Cookie banner */
.lw-cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(20, 30, 50, 0.96);
    color: #fff;
    padding: 16px 20px;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,.25);
    font-size: 13px;
}
.lw-cookie-banner[hidden] { display: none !important; }
.lw-cookie-banner a { color: #8ec8ff; text-decoration: underline; }
.lw-cookie-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.lw-cookie-inner p { flex: 1 1 320px; margin: 0; }
.lw-cookie-actions { display: flex; gap: 10px; align-items: center; }
.lw-cookie-actions .btn {
    background: transparent;
    color: #fff;
    border: 1px solid #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}
.lw-cookie-actions .btn-primary {
    background: #1e73be;
    border-color: #1e73be;
}
.lw-cookie-actions .btn-primary:hover { background: #155a96; }
.lw-cookie-actions .btn:hover { background: rgba(255,255,255,.1); }
