/* ===========================================================================
   EasyRes PWA – C.03
   styles.css  –  gemeinsames Stylesheet für alle Seiten
   ---------------------------------------------------------------------------
   Enthält keine mandantenspezifischen Werte. Die Markenfarben werden von
   app.js aus config.js als CSS-Variablen gesetzt; die Werte hier sind nur
   Vorgabewerte, damit die Seite auch ohne JavaScript korrekt aussieht.
   ===========================================================================*/

/* --- 1. Designtoken -------------------------------------------------------*/
:root{
  /* Markenfarben – werden von app.js überschrieben */
  --navy:#0d0939;
  --blue:#0f5fbd;
  --orange:#f47a20;
  --yellow:#ffc72c;
  --red:#e8322d;

  /* Flächen und Text */
  --bg:#eef1f6;
  --paper:#ffffff;
  --text:#16203a;
  --muted:#6b7488;
  --line:#e2e7f0;

  --radius-lg:22px;
  --radius-md:16px;
  --radius-sm:12px;
  --shadow-card:0 6px 20px rgba(13,9,57,.07);
  --shadow-raised:0 12px 30px rgba(13,9,57,.14);

  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --nav-h:64px;
  --page-w:760px;
}

/* --- 2. Grundlagen --------------------------------------------------------*/
*,*::before,*::after{box-sizing:border-box}
html{background:var(--bg);-webkit-text-size-adjust:100%;overflow-x:hidden}
body{
  margin:0;min-height:100vh;overflow-x:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color:var(--text);background:var(--bg);
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
img{display:block;max-width:100%}
button,input,select{font:inherit;color:inherit}
h1,h2,h3,p{margin:0}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px;border-radius:6px}

.app{
  width:min(100%,var(--page-w));margin:0 auto;
  padding:14px 16px calc(var(--nav-h) + 18px + var(--safe-bottom));
}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* --- 3. Kopfzeile ---------------------------------------------------------*/
.topbar{
  position:sticky;top:0;z-index:30;
  /* .topbar liegt neben .app, nicht darin: kein negativer Rand, sonst
     sitzt das Logo 16px weiter links als die Kacheln darunter. */
  margin:0 0 14px;padding:calc(10px + var(--safe-top)) 16px 10px;
  display:flex;align-items:center;gap:12px;
  background:rgba(255,255,255,.94);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--line);
}
.topbar .brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand-mark{
  width:44px;height:44px;flex:none;padding:5px;
  object-fit:contain;border-radius:12px;background:var(--navy);
}
.brand-text{min-width:0}
.brand-text h1{font-size:1.02rem;font-weight:800;color:var(--navy);letter-spacing:.01em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-text p{font-size:.74rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-spacer{flex:1 1 auto}

.icon-btn{
  width:42px;height:42px;flex:none;display:grid;place-items:center;
  border:1px solid var(--line);border-radius:12px;background:#fff;
  color:var(--navy);cursor:pointer;
}
.icon-btn:active{background:#f2f5fa}
.back-link{
  display:inline-flex;align-items:center;gap:6px;
  margin:2px 0 12px;font-weight:700;font-size:.9rem;color:var(--navy);
}

/* --- 4. Hero --------------------------------------------------------------*/
/* Vorgesehen für spätere Reisefotos: in config.js/CSS lässt sich
   background-image ergänzen, ohne die Struktur zu ändern.               */
/* Zweispaltig: links Text, rechts das vollstaendige EasyRes-Logo.
   Frueher stand hier nur die farbige Schwinge als CSS-Grafik – auf
   Kundenwunsch steht dort jetzt das echte Logo mit Schriftzug.        */
.hero{
  position:relative;overflow:hidden;
  min-height:190px;padding:22px 20px 24px;
  display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-items:center;gap:14px;
  border-radius:var(--radius-lg);color:#fff;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(244,122,32,.34), transparent 62%),
    linear-gradient(150deg,var(--navy) 0%, #14275c 48%, #0f6aa8 100%);
  box-shadow:var(--shadow-raised);
}
.hero > *{position:relative;z-index:1}
.hero-text{min-width:0}
.hero h2{font-size:clamp(1.5rem,6.4vw,2.1rem);line-height:1.08;font-weight:800}
.hero p{margin-top:8px;color:rgba(255,255,255,.85);font-size:.94rem}

.hero-logo{
  width:clamp(92px,24vw,200px);height:auto;justify-self:end;
  border-radius:10px;
  box-shadow:0 8px 22px rgba(0,0,0,.28);
}
.hero--compact{min-height:132px}
.hero--photo-slot{background-size:cover;background-position:center}

/* --- 5. Abschnittstitel ---------------------------------------------------*/
.section-title{
  margin:22px 2px 10px;font-size:.74rem;font-weight:800;
  letter-spacing:.09em;text-transform:uppercase;color:var(--muted);
}

/* --- 6. Aktionszeilen (Startseite) ---------------------------------------*/
.actions{display:grid;gap:12px}
.action{
  display:grid;grid-template-columns:52px 1fr 18px;align-items:center;gap:14px;
  padding:16px;border-radius:var(--radius-lg);
  background:var(--paper);border:1px solid var(--line);
  box-shadow:var(--shadow-card);color:var(--text);
  transition:transform .12s ease;
}
.action:active{transform:scale(.99)}
.action .icon-wrap{
  width:52px;height:52px;display:grid;place-items:center;
  border-radius:15px;background:#eaf1fb;color:var(--blue);
}
.action-title{display:block;font-size:1.06rem;font-weight:800;line-height:1.25}
.action-sub{display:block;margin-top:3px;font-size:.82rem;color:var(--muted);line-height:1.35}
.action .chev{color:#b6becd}

.action--blue{background:linear-gradient(135deg,#1465c8,#0c4796);border-color:transparent;color:#fff}
.action--orange{background:linear-gradient(135deg,#f6893a,#e2621a);border-color:transparent;color:#fff}
.action--yellow{background:linear-gradient(135deg,#ffd24a,#f6b81d);border-color:transparent;color:#3a2c05}
.action--blue .icon-wrap,.action--orange .icon-wrap{background:rgba(255,255,255,.18);color:#fff}
.action--yellow .icon-wrap{background:rgba(58,44,5,.12);color:#3a2c05}
.action--blue .action-sub,.action--orange .action-sub{color:rgba(255,255,255,.82)}
.action--yellow .action-sub{color:rgba(58,44,5,.7)}
.action--blue .chev,.action--orange .chev{color:rgba(255,255,255,.7)}
.action--yellow .chev{color:rgba(58,44,5,.5)}

/* --- 7. Kacheln (Services) ------------------------------------------------*/
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.tile{
  display:flex;flex-direction:column;min-height:142px;padding:15px;
  border:1px solid var(--line);border-radius:var(--radius-lg);
  background:var(--paper);box-shadow:var(--shadow-card);
}
.tile:active{transform:scale(.99)}
.tile .icon-wrap{width:42px;height:42px;display:grid;place-items:center;
  border-radius:13px;background:#eaf1fb;color:var(--navy)}
.tile-title{display:block;margin-top:auto;padding-top:16px;font-size:.97rem;font-weight:800}
.tile-sub{display:block;margin-top:4px;font-size:.78rem;color:var(--muted);line-height:1.35}
.external-note{display:block;margin-top:6px;font-size:.68rem;color:#98a1b2}

/* --- 8. Karten und Listen -------------------------------------------------*/
.card{
  margin-top:14px;padding:18px;background:var(--paper);
  border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
}
.card h2{font-size:1.18rem;font-weight:800;color:var(--navy)}
.card h3{font-size:1rem;font-weight:800;color:var(--navy)}
.card p{margin-top:8px;color:var(--muted);font-size:.9rem}
.card p:first-child{margin-top:0}
.card .icon-wrap{width:46px;height:46px;display:grid;place-items:center;
  border-radius:14px;background:#eaf1fb;color:var(--navy);margin-bottom:12px}

.list{display:grid;gap:0;margin-top:6px}
.list-item{
  display:grid;grid-template-columns:38px 1fr 16px;align-items:center;gap:12px;
  padding:14px 2px;border-bottom:1px solid var(--line);
}
.list-item:last-child{border-bottom:0}
.list-item .icon-wrap{width:38px;height:38px;border-radius:11px;background:#eef2f8;
  display:grid;place-items:center;color:var(--navy);margin:0}
.list-label{display:block;font-weight:700;font-size:.95rem;line-height:1.3}
.list-sub{display:block;font-size:.78rem;color:var(--muted);margin-top:2px;line-height:1.35}
.list-item .chev{color:#b6becd}

/* --- 9. Formular ----------------------------------------------------------*/
.segmented{
  display:flex;gap:6px;padding:5px;margin-bottom:14px;
  background:#e7ecf4;border-radius:999px;
}
.segmented button{
  flex:1;padding:10px 4px;border:0;border-radius:999px;background:transparent;
  font-size:.78rem;font-weight:700;color:var(--muted);cursor:pointer;
  white-space:nowrap;
}
.segmented button.is-active{background:#fff;color:var(--navy);box-shadow:0 2px 6px rgba(13,9,57,.12)}

.field{
  display:block;padding:12px 14px;margin-bottom:10px;
  background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-md);
}
.field > span{display:block;font-size:.72rem;font-weight:800;letter-spacing:.05em;
  text-transform:uppercase;color:var(--muted)}
.field input,.field select{
  width:100%;margin-top:4px;padding:0;border:0;background:transparent;
  font-size:1rem;font-weight:600;
}
.field input::placeholder{color:#aeb6c4;font-weight:500}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.field-row .field{margin-bottom:0}
.form-note{margin-top:10px;font-size:.78rem;color:var(--muted)}

.btn{
  display:block;width:100%;margin-top:14px;padding:15px 16px;
  border:0;border-radius:var(--radius-md);
  font-size:1rem;font-weight:800;text-align:center;cursor:pointer;
}
.btn--primary{color:#fff;background:linear-gradient(135deg,#1465c8,#0c4796)}
.btn--accent{color:#fff;background:linear-gradient(135deg,#f6893a,#e2621a)}
.btn--ghost{color:var(--navy);background:#eaeff7}
.btn:active{filter:brightness(.96)}

.divider{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--muted);font-size:.8rem}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}

/* --- 10. Installationsschritte -------------------------------------------*/
.steps{display:grid;gap:10px;margin-top:12px}
.step{display:grid;grid-template-columns:28px 1fr;gap:10px;align-items:start;font-size:.9rem}
.step-num{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;
  background:var(--navy);color:#fff;font-weight:800;font-size:.76rem}
.checklist{display:grid;gap:9px;margin-top:12px}
.check{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start;font-size:.9rem}
.check svg{width:20px;height:20px;color:var(--blue);stroke:currentColor;fill:none;stroke-width:2.4;
  stroke-linecap:round;stroke-linejoin:round}

/* --- 11. FAQ --------------------------------------------------------------*/
.faq{display:grid;gap:10px;margin-top:14px}
.faq details{border:1px solid var(--line);border-radius:var(--radius-md);background:#fff;padding:12px 14px}
.faq summary{cursor:pointer;font-weight:800;color:var(--navy);font-size:.92rem}
.faq details p{padding-top:8px}

/* --- 12. Symbole ----------------------------------------------------------*/
.icon{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round}
.icon-sm{width:19px;height:19px}
.chev{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.4;
  stroke-linecap:round;stroke-linejoin:round}

/* --- 13. Fußzeile ---------------------------------------------------------*/
.footer{
  display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;
  padding:20px 3px 4px;color:#8d96a7;font-size:.73rem;
}
.footer a{text-decoration:underline}

/* --- 14. Untere Navigation ------------------------------------------------*/
.bottom-nav{
  position:fixed;z-index:25;left:50%;bottom:0;transform:translateX(-50%);
  width:min(100%,var(--page-w));
  display:grid;grid-template-columns:repeat(4,1fr);
  padding:6px 8px calc(6px + var(--safe-bottom));
  background:rgba(255,255,255,.96);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-top:1px solid var(--line);
}
.bottom-nav a{
  min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  color:#8b94a5;font-size:.68rem;font-weight:700;
}
.bottom-nav .icon{width:22px;height:22px}
.bottom-nav a.is-active{color:var(--navy)}

/* --- 15. Menü-Schublade ---------------------------------------------------*/
.drawer-overlay{position:fixed;inset:0;z-index:40;background:rgba(13,9,57,.45)}
.drawer{
  position:fixed;z-index:41;top:0;right:0;bottom:0;
  width:min(86vw,340px);
  padding:calc(14px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  background:#fff;box-shadow:-14px 0 40px rgba(13,9,57,.22);
  transform:translateX(100%);transition:transform .22s ease,visibility .22s;
  visibility:hidden;overflow-y:auto;overscroll-behavior:contain;
}
.drawer.is-open{transform:translateX(0);visibility:visible}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding-bottom:12px;border-bottom:1px solid var(--line)}
.drawer-head h2{font-size:1.05rem;font-weight:800;color:var(--navy)}
.drawer .list-item{padding:13px 2px}
.drawer .group-title{margin:16px 2px 4px;font-size:.7rem;font-weight:800;
  letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
@media(prefers-reduced-motion:reduce){.drawer{transition:none}}

/* --- 16. Größere Bildschirme (Tablet / PC) --------------------------------*/
@media(min-width:680px){
  :root{--page-w:900px}
  .app{padding-left:24px;padding-right:24px;padding-bottom:40px}
  .topbar{
    width:min(100%,var(--page-w));margin:0 auto;
    padding-left:24px;padding-right:24px;
    background:rgba(255,255,255,.9);
  }
  .hero{min-height:230px;padding:30px;gap:28px}
  .hero-logo{width:clamp(180px,20vw,260px)}
  .actions{grid-template-columns:repeat(3,minmax(0,1fr))}
  .action{display:flex;flex-direction:column;align-items:flex-start;gap:14px;
    min-height:172px;padding:18px}
  .action > span:last-of-type{margin-top:auto}
  .action .chev{display:none}
  .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
  .btn{width:auto;min-width:260px;margin-left:auto;margin-right:auto}

  /* Untere Leiste wird zur oberen Navigation.
     Die Reihenfolge wird per Flexbox gedreht, damit die HTML-Struktur
     auf Mobilgeraeten unveraendert bleibt. */
  body{display:flex;flex-direction:column;min-height:100vh}
  .topbar{order:1}
  .bottom-nav{order:2}
  .app{order:3}

  .bottom-nav{
    position:static;transform:none;
    width:min(100%,var(--page-w));margin:0 auto;
    padding:8px 24px 0;
    display:flex;gap:6px;border-top:0;border-bottom:1px solid var(--line);
    background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  .bottom-nav a{
    min-height:auto;flex-direction:row;gap:8px;padding:11px 16px;
    font-size:.88rem;border-radius:12px 12px 0 0;
  }
  .bottom-nav a.is-active{background:#fff;box-shadow:var(--shadow-card);color:var(--navy)}
}
@media(min-width:1000px){
  :root{--page-w:1040px}
  .app{padding-top:22px}
}

/* --- 17. Sehr kleine Bildschirme -----------------------------------------*/
@media(max-width:360px){
  .hero{grid-template-columns:1fr;gap:14px}
  .hero-logo{justify-self:start;width:132px}
  .brand-text h1{font-size:.94rem}
  .action{grid-template-columns:46px 1fr 16px;gap:11px;padding:14px}
  .action .icon-wrap{width:46px;height:46px}
  .action-title{font-size:.98rem}
  .tile{min-height:132px}
}
/* --- 18. Hover-Zustaende (nur Maus/Trackpad) ------------------------------
   In @media(hover:hover) gekapselt: auf Touchgeraeten wuerde der Hover-
   Zustand sonst nach dem Antippen "kleben" bleiben.                        */
@media (hover:hover) and (pointer:fine){

  /* Uebergaenge nur dort, wo auch etwas passiert */
  .action,.tile,.list-item,.bottom-nav a,.btn,.icon-btn,.back-link,
  .faq summary,.topbar .brand{
    transition:background-color .15s ease,border-color .15s ease,
               box-shadow .15s ease,transform .12s ease,filter .15s ease,
               color .15s ease;
  }

  /* Menueeintraege: Schublade, menu.html, mehr.html, hilfe.html */
  .list-item:hover{
    background:#eef3fa;border-radius:12px;
  }
  .list-item:hover .icon-wrap{background:#dfe9f8}
  .list-item:hover .chev{color:var(--blue)}

  /* Untere Navigation (mobil) bzw. obere Navigation (PC) */
  .bottom-nav a:hover{background:#eef3fa;color:var(--navy);border-radius:12px}
  .bottom-nav a.is-active:hover{background:#e4ecf8}

  /* Farbige Aktionszeilen: dunkler */
  .action:hover{
    filter:brightness(.93);
    box-shadow:0 12px 28px rgba(13,9,57,.18);
    transform:translateY(-1px);
  }

  /* Weisse Service-Kacheln: dunkler und leicht angehoben */
  .tile:hover{
    background:#f2f6fc;border-color:#cbd6e8;
    box-shadow:0 12px 28px rgba(13,9,57,.13);
    transform:translateY(-1px);
  }
  .tile:hover .icon-wrap{background:#dfe9f8}

  /* Schaltflaechen */
  .btn--primary:hover,.btn--accent:hover{filter:brightness(.92)}
  .btn--ghost:hover{background:#dde5f2}
  .icon-btn:hover{background:#eef3fa;border-color:#cbd6e8}

  /* Kleinteiliges */
  .back-link:hover{color:var(--blue)}
  .topbar .brand:hover .brand-text h1{color:var(--blue)}
  .faq summary:hover{color:var(--blue)}
  .footer a:hover{color:var(--navy)}

  /* Beim Klicken wieder flach */
  .action:active,.tile:active{transform:translateY(0) scale(.995)}
}

@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
