/* =====================================================================
   Freitag Expert IT Solutions SLU - Clean-Minimal-Corporate Theme (v4)
   Light corporate layout, navy/petrol accent, photographic mountain hero.
   All text content is English (HTML source) so the site renders correctly
   even if the Ollama translation pipeline is unavailable.
   ===================================================================== */

/* ---------- Design tokens ------------------------------------------- */
:root {
    --navy:        #16324f;   /* deep navy - primary brand           */
    --navy-2:      #1d4364;   /* lighter navy for gradients           */
    --petrol:      #1f6f8b;   /* petrol blue accent                  */
    --accent:      #3a8fb7;   /* light blue links/hovers             */
    --accent-soft: #e8f1f6;   /* very light blue background tint     */
    --ink:         #1a2433;   /* main text                           */
    --muted:       #5b6b7b;   /* secondary text                      */
    --bg:          #ffffff;
    --bg-soft:     #f4f7f9;   /* section background                  */
    --border:      #e2e8ee;
    --white:       #ffffff;
    --shadow-sm:   0 1px 3px rgba(22,50,79,.08);
    --shadow-md:   0 6px 24px rgba(22,50,79,.10);
    --shadow-lg:   0 14px 40px rgba(22,50,79,.16);
    --radius:      10px;
    --radius-lg:   16px;
    --maxw:        1200px;
    --header-h:    80px;
    --font-sans:   "Inter","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",Arial,sans-serif;
    --font-mono:   "JetBrains Mono","Fira Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

/* ---------- Reset / base ------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent); }
h1,h2,h3,h4 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }
ul,ol { margin: 0 0 1em 1.25em; padding: 0; }
li { margin: .25em 0; }

/* ---------- Layout helpers ----------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #d7e6ef; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow {
    display: inline-block; font-size: .78rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--petrol); font-weight: 600;
    margin-bottom: 10px;
}

/* =====================================================================
   HEADER (sticky)
   ===================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header__inner {
    display: flex; align-items: flex-end; justify-content: space-between;
    height: var(--header-h); padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand__logo { width: 38px; height: 38px; flex: 0 0 38px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-size: 1.53rem; font-weight: 800; letter-spacing: -.01em; }
.brand__text span { font-size: 1.08rem; color: var(--petrol); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: var(--ink); font-weight: 500; font-size: .95rem;
    padding: 8px 14px; border-radius: 8px; position: relative;
}
.main-nav a:hover { color: var(--petrol); background: var(--accent-soft); }
.main-nav a.is-active { color: var(--navy); font-weight: 600; }
.main-nav a.is-active::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
    height: 2px; background: var(--petrol); border-radius: 2px;
}

/* Language dropdown */
.lang-switch { position: relative; margin-left: 8px; }
.lang-switch__btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-soft); color: var(--navy);
    border: 1px solid var(--border); border-radius: 999px;
    padding: 7px 14px; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.lang-switch__btn:hover { background: #dceaf2; }
.lang-switch__menu {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-md); padding: 6px; min-width: 180px;
    columns: 2; column-gap: 0;
}
.lang-switch.is-open .lang-switch__menu { display: block; }
.lang-switch__menu a {
    display: block; padding: 7px 12px; border-radius: 6px;
    color: var(--ink); font-size: .9rem; break-inside: avoid;
}
.lang-switch__menu a:hover { background: var(--accent-soft); color: var(--petrol); }
.lang-switch__menu a.is-active { color: var(--navy); font-weight: 700; }

/* Mobile nav toggle */
.nav-toggle {
    display: none; background: none; border: 0; cursor: pointer;
    padding: 8px; color: var(--navy);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* =====================================================================
   HERO (photographic mountain background + slideshow)
   ===================================================================== */
.hero {
    position: relative; overflow: hidden;
    color: #fff; background: var(--navy);
}
.hero__bg {
    position: absolute; inset: 0; z-index: 0;
    background: url("../pictures/hero_mountains.jpg") center 35%/cover no-repeat;
}
.hero__overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(
        100deg,
        rgba(15,32,54,.82) 0%,
        rgba(15,32,54,.55) 45%,
        rgba(15,32,54,.25) 75%,
        rgba(15,32,54,.45) 100%
    );
}
.hero__inner {
    position: relative; z-index: 2;
    max-width: var(--maxw); margin: 0 auto; padding: 96px 24px 112px;
}
.hero__slides { position: relative; min-height: 280px; }
.hero__slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity .6s ease, visibility .6s;
    max-width: 720px;
}
.hero__slide.is-active { opacity: 1; visibility: visible; position: relative; }
.hero__slide .eyebrow { color: #9fd0e6; }
.hero__slide h1 { color: #fff; margin-bottom: .35em; }
.hero__slide p { color: #e3eef4; font-size: 1.12rem; max-width: 600px; }

/* Hero controls */
.hero__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.hero__arrow:hover { background: rgba(255,255,255,.32); }
.hero__arrow svg { width: 22px; height: 22px; }
.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }

.hero__cta {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
    background: var(--petrol); color: #fff; font-weight: 600;
    padding: 13px 26px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
    box-shadow: var(--shadow-md); transition: background .15s ease, transform .15s ease;
}
.hero__cta:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.hero__cta svg { width: 18px; height: 18px; }

.hero__dots { position: relative; z-index: 3; display: flex; gap: 8px; margin-top: 30px; }
.hero__dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,.4); border: 0; cursor: pointer; padding: 0;
    transition: background .15s ease, width .2s ease;
}
.hero__dot.is-active { background: #fff; width: 26px; border-radius: 6px; }

/* =====================================================================
   FEATURE CARDS (Linux / Networks / Project Management)
   ===================================================================== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 32px 28px; box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #cfe0ea; }
.feature-card__icon {
    width: 54px; height: 54px; border-radius: 12px;
    background: var(--accent-soft); color: var(--petrol);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.feature-card__icon svg { width: 30px; height: 30px; }
.feature-card h3 { margin-bottom: .35em; }
.feature-card p { color: var(--muted); font-size: .98rem; margin-bottom: 18px; }
.feature-card__link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--petrol); font-weight: 600; font-size: .92rem;
}
.feature-card__link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.feature-card__link:hover svg { transform: translateX(3px); }

/* =====================================================================
   TRUST / STATS section
   ===================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat__num { font-size: clamp(1.8rem, 1.2rem + 1.5vw, 2.6rem); font-weight: 800; color: #fff; line-height: 1; }
.stat__label { color: #b9d2d8; font-size: .9rem; margin-top: 6px; }

/* =====================================================================
   PAGE HERO (compact header band for sub-pages)
   ===================================================================== */
.page-hero {
    position: relative; color: #fff; background: var(--navy);
    padding: 56px 0 48px; overflow: hidden;
}
.page-hero__bg {
    position: absolute; inset: 0; z-index: 0;
    background: url("../pictures/hero_mountains.jpg") center 30%/cover no-repeat;
    opacity: .35;
}
.page-hero__overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(15,32,54,.9), rgba(15,32,54,.6)); }
.page-hero__inner { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { color: #d7e6ef; max-width: 640px; margin: 0; }
.breadcrumb { font-size: .85rem; color: #9fd0e6; margin-bottom: 10px; }
.breadcrumb a { color: #cfe6f1; }
.breadcrumb a:hover { color: #fff; }

/* =====================================================================
   PAGE CONTENT wrapper (sub-pages)
   ===================================================================== */
.page-content { padding: 48px 0 72px; }
.page-content__inner { max-width: 880px; margin: 0 auto; }
.page-content__inner--wide { max-width: var(--maxw); }
.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 1.6em; }
.prose img.align-left { float: left; margin: 6px 24px 12px 0; }
.prose .profile-photo-original {
    max-width: 360px; width: auto; height: auto; border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.prose table th, .prose table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.prose table th { background: var(--bg-soft); color: var(--navy); font-weight: 700; }
.prose table tr:nth-child(even) td { background: #fafcfd; }

/* =====================================================================
   SERVICES GRID (8 service tiles)
   ===================================================================== */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-tile {
    display: flex; flex-direction: column; align-items: flex-start;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px 22px; box-shadow: var(--shadow-sm); color: var(--ink);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfe0ea; color: var(--ink); }
.service-tile__icon { width: 46px; height: 46px; color: var(--petrol); margin-bottom: 14px; }
.service-tile__icon svg { width: 100%; height: 100%; }
.service-tile h3 { font-size: 1.02rem; margin-bottom: .25em; }
.service-tile p { font-size: .88rem; color: var(--muted); margin: 0; }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-weight: 600; font-size: .95rem; padding: 12px 24px; border-radius: 999px;
    border: 1px solid transparent; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn--primary { background: var(--petrol); color: #fff; }
.btn--primary:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--border); }
.btn--outline:hover { border-color: var(--petrol); color: var(--petrol); }

/* =====================================================================
   AI Salesperson (Ollama) themed form
   ===================================================================== */
.aisalesman { max-width: 760px; }
.aisalesman__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--petrol); }
.aisalesman__form { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.aisalesman__field { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.aisalesman__field:focus { outline: 2px solid var(--petrol); outline-offset: -1px; border-color: var(--petrol); }
.aisalesman__submit { align-self: flex-start; }
.aisalesman__disclaimer { font-size: .82rem; color: var(--muted); margin-top: 12px; }
.aisalesman__log { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 16px; min-height: 120px; font-family: var(--font-mono); font-size: .9rem; white-space: pre-wrap; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--navy); color: #c9dce6; padding: 56px 0 28px; }
.site-footer a { color: #e3eef4; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 6px 0; font-size: .92rem; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; padding-top: 22px; font-size: .85rem; color: #9fc0d0; }

/* =====================================================================
   Language options page
   ===================================================================== */
#lang_options { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(140px,1fr)); gap: 12px; max-width: 640px; }
#lang_options li a { display: block; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; color: var(--ink); background: #fff; }
#lang_options li.active a { border-color: var(--petrol); color: var(--navy); font-weight: 700; background: var(--accent-soft); }
#lang_options li a:hover { border-color: var(--petrol); color: var(--petrol); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 960px) {
    .features { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md); padding: 8px 16px 16px;
        transform: translateY(-130%); transition: transform .25s ease; z-index: 99;
    }
    .main-nav.is-open { transform: translateY(0); }
    .main-nav a { padding: 12px 8px; border-radius: 6px; }
    .main-nav a.is-active::after { display: none; }
    .lang-switch { margin: 8px 0 0; }
    .hero__inner { padding: 64px 20px 80px; }
    .hero__arrow { width: 40px; height: 40px; }
    .hero__arrow--prev { left: 8px; }
    .hero__arrow--next { right: 8px; }
    .prose img.align-left { float: none; margin: 0 0 16px; }
    .prose .profile-photo-original { max-width: 100%; }
}
@media (max-width: 480px) {
    .service-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    #lang_options { grid-template-columns: repeat(2, 1fr); }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
