/*
Theme Name: yousail-we.work
Theme URI: https://yousail-we.work
Author: yousail-we.work
Author URI: https://yousail-we.work
Description: Individuelles WordPress-Theme für den offiziellen SAILART Händler yousail-we.work. Zeigt die SAILART Bootsmodelle (17 / 17.5 / 18 / 19 / 20), den typenoffenen Service sowie Kontakt- und Impressumsseiten. Inhalte, Bilder und Menüs werden vollständig über das WordPress-Backend gepflegt.
Version: 2.3.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: yousail-wework
*/

/* =========================================================
   0. DESIGN TOKENS
   ========================================================= */
:root {
  --color-navy: #122457;
  --color-navy-soft: #1c3168;
  --color-navy-dark: #0c1a40;
  --color-orange: #E3492D;
  --color-orange-dark: #c23e26;
  --color-white: #ffffff;
  --color-off-white: #f5f6f8;
  --color-gray: #6b7280;
  --color-border: #e3e5ea;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container-width: 1400px;
  --gutter: 40px;

  --header-row-height: 64px;
}

/* =========================================================
   1. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-navy);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: footer sticks to the bottom of the viewport even when
     the page content is shorter than the viewport. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  flex: 1 0 auto;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-orange); text-decoration: none; }
a:hover { color: var(--color-orange-dark); }

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0 0 20px; line-height: 1.2; color: var(--color-navy); }
p { margin: 0 0 20px; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =========================================================
   2. HEADER / NAVIGATION
   ========================================================= */
.site-header {
  background: var(--color-navy);
  position: relative;
  z-index: 50;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-row-height);
  gap: 24px;
}

.header-row--utility {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-row--models {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-navy);
  max-height: 0;
  min-height: 0;
  overflow: hidden;
  border-top: none;
  transition: max-height .3s ease;
  z-index: 40;
  box-shadow: 0 16px 24px -8px rgba(6,12,32,0.35);
}
.header-row--models.is-open {
  max-height: 120px;
  min-height: var(--header-row-height);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--color-orange);
  font-size: 17px;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
}
.header-badge:hover { opacity: 0.85; }
.header-badge strong { font-weight: 700; }
.header-badge[aria-expanded="true"] { color: var(--color-white); }
.header-badge__chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
  margin-top: -3px;
  flex: 0 0 auto;
}
.header-badge[aria-expanded="true"] .header-badge__chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  background: var(--color-white);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

.menu-utility,
.menu-models {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.menu-utility { margin-left: 44px; }

.menu-utility a {
  color: var(--color-orange);
  font-weight: 700;
  font-size: 16px;
}
.menu-utility li.current-menu-item > a {
  color: var(--color-white);
}

.menu-models a {
  color: var(--color-orange);
  font-weight: 700;
  font-size: 16px;
  padding-bottom: 6px;
  border-bottom: 3px solid transparent;
  display: inline-block;
}
.menu-models li.current-menu-item > a {
  color: var(--color-white);
  border-bottom-color: var(--color-white);
}

.site-branding-small {
  display: flex;
  align-items: center;
  padding: 10px 0;
  flex: 0 0 auto;
}
.site-branding-small img { height: 46px; width: 68px; display: block; }

/* =========================================================
   3. HERO — Homepage
   ========================================================= */
.hero-home {
  position: relative;
  height: calc(100vh - var(--header-height, 67px));
  min-height: calc(100vh - var(--header-height, 67px));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-navy-dark);
}
/*
 * Hintergrundfoto und Graustufen-Filter laufen bewusst über ::before statt
 * direkt über .hero-home: ein CSS-"filter" wirkt immer auf das gesamte
 * gerenderte Element inklusive aller Kind-Elemente – ein filter:none am
 * Kind-Element kann das NICHT rückgängig machen. Darum liegt das Foto in
 * einer eigenen Ebene, und Logo/Schriftzug bleiben als echte Geschwister-
 * Elemente unbeeinflusst in Farbe.
 */
.hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-bg-url);
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
  z-index: 0;
}
.hero-home__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,20,50,0.35), rgba(10,20,50,0));
}
.hero-home__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 60px;
  width: 100%;
}
.hero-home__mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 300px;
  height: auto;
  margin: 0;
}
.hero-home__wordmark {
  font-size: clamp(40px, 6vw, 92px);
  color: var(--color-orange);
  font-weight: 400;
  letter-spacing: 1px;
  margin: 0;
}

/* =========================================================
   4. HERO — Innenseiten
   ========================================================= */
.hero-page {
  position: relative;
  height: calc(100vh - var(--header-height, 67px));
  background-size: cover;
  background-position: center;
  background-color: var(--color-navy-dark);
}

.hero-page--none { height: 0; }

/* Bilder-Slider auf den SAILART-Modellseiten */
.model-slider {
  position: relative;
  height: calc(100vh - var(--header-height, 67px));
  overflow: hidden;
  background-color: var(--color-navy-dark);
}
.model-slider__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .5s ease;
}
.model-slider__slide {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.model-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(18,36,87,0.55);
  color: var(--color-white);
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.model-slider__arrow:hover { background: rgba(18,36,87,0.8); }
.model-slider__arrow--prev { left: 24px; }
.model-slider__arrow--next { right: 24px; }

.model-slider__dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.model-slider__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: transparent;
  padding: 0;
}
.model-slider__dot.is-active { background: var(--color-white); }

@media (max-width: 782px) {
  /* Vollbild-Slider im Mobile-View: jedes Bild füllt den Bildschirm,
     manuelles Wischen bleibt über die Touch-Events in slider.js aktiv. */
  .model-slider {
    height: calc(100vh - var(--header-height, 67px));
    height: calc(100dvh - var(--header-height, 67px));
  }
  .model-slider__arrow { width: 38px; height: 38px; font-size: 22px; }
  .model-slider__arrow--prev { left: 12px; }
  .model-slider__arrow--next { right: 12px; }
  .model-slider__dots { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .model-slider__track { transition: none; }
}

/* =========================================================
   5. CONTENT SECTIONS
   ========================================================= */
.page-content {
  padding: 70px 0 90px;
}

.model-intro {
  margin-bottom: 60px;
}

.model-intro__eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-navy);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 10px;
}

.model-intro__heading {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  max-width: 900px;
}

.model-intro__text {
  max-width: 780px;
  font-size: 17px;
}

.section-block { margin-bottom: 56px; }
.section-block h2 { font-size: 26px; font-weight: 700; margin-bottom: 18px; }
.section-block p { font-size: 16px; max-width: 900px; }

.tech-table {
  width: 100%;
  max-width: 700px;
  border-collapse: collapse;
}
.tech-table tr { border-bottom: 1px solid var(--color-border); }
.tech-table th,
.tech-table td {
  text-align: left;
  padding: 12px 16px 12px 0;
  font-size: 16px;
  font-weight: 400;
  vertical-align: top;
}
.tech-table th {
  width: 45%;
  font-weight: 700;
  color: var(--color-navy);
}
.tech-table td { color: var(--color-navy); }

.equipment-list { max-width: 900px; }
.equipment-list li {
  position: relative;
  padding-left: 26px;
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid var(--color-border);
  font-size: 16px;
}
.equipment-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 17px;
  width: 8px; height: 8px;
  background: var(--color-orange);
  border-radius: 50%;
}

/* Generic page (Service / Kontakt / Impressum) */
.entry-eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-navy);
  margin-bottom: 10px;
}
.entry-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  max-width: 900px;
}
.entry-content { max-width: 780px; font-size: 17px; }
.entry-content p:last-child { margin-bottom: 0; }

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
  margin-top: 50px;
}
.partner-logos img { max-height: 46px; width: auto; }

/* =========================================================
   6. FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.8);
  padding: 40px 0;
  font-size: 14px;
  flex-shrink: 0;
}
.site-footer .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--color-white); }
.footer-menu { display: flex; gap: 24px; flex-wrap: wrap; }

/* =========================================================
   7. 404 / FALLBACK
   ========================================================= */
.not-found {
  padding: 120px 0;
  text-align: center;
}
.not-found h1 { font-size: 40px; }

/* =========================================================
   8. RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .tech-table th { width: 55%; }
}

@media (max-width: 782px) {
  .nav-toggle { display: block; }

  .header-row--utility { min-height: 56px; }

  .header-badge { font-size: 14px; }

  .menu-utility {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--color-navy-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .menu-utility.is-open { max-height: 480px; }
  .menu-utility { margin-left: 0; }

  .menu-utility li {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .menu-utility a {
    display: block;
    padding: 14px var(--gutter);
  }

  .header-row--models.is-open { max-height: 400px; }
  .header-row--models .menu-models {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  .menu-models li {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .menu-models a {
    display: block;
    padding: 14px var(--gutter);
  }

  .site-branding-small img { height: 36px; width: 53px; }

  .hero-home__wordmark { font-size: 44px; }

  .page-content { padding: 44px 0 60px; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .header-row { flex-wrap: wrap; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
