* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  /* Set Outfit as the primary font for the whole page */
  font-family: "Outfit", sans-serif;
}

p {
  font-size: 1.5em;
  text-align: justify;
}

a {
  text-decoration: none;
  color: inherit;
}

a:visited {
  color: inherit;
}
ul {
  list-style-type: none;
  font-size: 1.5em;
  text-align: justify;
}

/*  
 * FIXED UI LAYER
 * Stays on top. Logo and Gradient remain static.
 */
.ui-overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 100;
  pointer-events: none;
}

.ui-overlay-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #213d6c;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 35,0 25,100 0,100' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpolygon points='0,0 35,0 25,100 0,100' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

.logo-link {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 200px;
  height: 100px;
  background-image: url("../assets/images/logo_with_title_white.png");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: auto;
}

/* 
 * REUSABLE IMAGE SECTION
 * The opacity is set to 0.01 instead of 0 to keep the element "active" for some browsers.
 */
.image-section {
  position: relative;
  height: 100vh;
  width: 100%;
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;

  /* Initial state: hidden */
  opacity: 0;
  /* Smooth transition for the fade-in effect */
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

/* 
 * ANIMATION TRIGGER
 * Applied via JavaScript when the section enters the viewport.
 */
.image-section.is-visible {
  opacity: 1;
}

.section-yacht {
  background-image: url("../assets/images/sailing_yacht_strong_wind.png");
}

.section-steering {
  background-image: url("../assets/images/steering_wheel.png");
}

.section-logbook {
  background-image: url("../assets/images/logbook.png");
}

.section-sailing_crew{
  background-image: url("../assets/images/sailing_crew.png");
}

.section-map_with_tools{
  background-image: url("../assets/images/map_with_tools.png");
}

.section-platforms{
  background-image: url("../assets/images/platforms.png");
}

.section-behind_tafiya{
  background-image: url("../assets/images/behind_tafiya.png");
}

.section-try_sailing{
  background-image: url("../assets/images/try_sailing.png");
}

.section-partner{
  background-image: url("../assets/images/partner.png");
}

.section-docu{
  background-image: url("../assets/images/documentation.png");
}

/*  
 * CONTENT SECTION
 * White area that 'wipes' over the images.
 */
.white-section {
  position: relative;
  background-color: rgba(255, 255, 255, 0.88);
  min-height: 600px;
  margin-top: -150px;
  padding: 51px 50px 100px 37%;
  z-index: 10;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.white-section + .white-section {
  margin-top: 0;
}

.white-section h1 {
  font-family: sans-serif;
  color: #213d6c;
  font-size: 2.5rem;
  margin-top: 0;
}

/*
 * LOGIN FORM
 */
.login-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  margin-top: 20px;
}

.login-box input {
  width: 100%;
  padding: 12px 16px;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  border: 1px solid rgba(33, 61, 108, 0.3);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  text-align: left;
}

.login-box input:focus {
  border-color: #213d6c;
}

.login-box button[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: #213d6c;
  color: white;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-box button[type="submit"]:hover {
  opacity: 0.85;
}

.login-box button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: default;
}

.login-error {
  color: #c0392b;
  font-size: 0.9rem;
  min-height: 1.2em;
  text-align: right;
}

.logout-btn {
  margin-top: 20px;
  padding: 8px 20px;
  background: none;
  border: 1px solid #213d6c;
  color: #213d6c;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.logout-btn:hover {
  background: #213d6c;
  color: white;
}

.cancel-btn {
  margin-top: 20px;
  padding: 10px 24px;
  background: none;
  border: 1px solid #c0392b;
  color: #c0392b;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.cancel-btn:hover {
  background: #c0392b;
  color: white;
}

.cancel-info {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #c0392b;
}

.user-data-columns {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.user-data-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
  text-align: left;
}

.user-data-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #213d6c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-data-form input {
  padding: 10px 14px;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  color: #333;
  background: rgba(33, 61, 108, 0.04);
  border: 1px solid rgba(33, 61, 108, 0.2);
  border-radius: 6px;
}

.user-data-error {
  color: #c0392b;
  font-size: 0.9rem;
}

/*
 * PLAN SELECTION
 */
.plan-selection {
  width: 100%;
  max-width: 500px;
  margin-top: 32px;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(33, 61, 108, 0.2);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-family: "Outfit", sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-card:hover {
  border-color: #213d6c;
  box-shadow: 0 2px 10px rgba(33, 61, 108, 0.1);
}

.plan-card--selected {
  border: 2px solid #213d6c;
  background: rgba(33, 61, 108, 0.04);
}

.plan-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #213d6c;
}

.plan-card__desc {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.3;
}

.plan-card__price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #213d6c;
  margin-top: 6px;
}

/*
 * STRIPE PAYMENT SECTION
 */
.payment-section {
  position: relative;
  z-index: 101;
  width: 100%;
  max-width: 420px;
  margin-top: 32px;
}

.payment-heading {
  font-family: "Outfit", sans-serif;
  color: #213d6c;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px;
}

.payment-method-block {
  padding: 14px 16px;
  border: 1px solid rgba(33, 61, 108, 0.2);
  border-radius: 8px;
  background: rgba(33, 61, 108, 0.02);
  margin-bottom: 4px;
}

.payment-method-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #213d6c;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
  text-align: left;
}

.gpay-logo {
  height: 28px;
  width: auto;
  margin: 0 0 10px;
  display: block;
}

.gpay-unavailable {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
  text-align: left;
}

.payment-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #999;
  font-size: 0.85rem;
}

.payment-or::before,
.payment-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(33, 61, 108, 0.15);
}

.card-element-wrapper {
  padding: 12px 14px;
  border: 1px solid rgba(33, 61, 108, 0.2);
  border-radius: 6px;
  background: #fff;
  min-height: 44px;
}

.pay-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  background-color: #213d6c;
  color: white;
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pay-btn:hover {
  opacity: 0.85;
}

.pay-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.payment-success {
  color: #213d6c;
  font-weight: 600;
  font-size: 1.1rem;
}

/*
 * COOKIE CONSENT BANNER
 */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: #213d6c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

#cookie-banner.cookie-banner--visible {
  transform: translateY(0);
}

.cookie-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

.cookie-text a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-actions button {
  padding: 9px 20px;
  border-radius: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}

#cookie-accept {
  background: white;
  color: #213d6c;
}

#cookie-decline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.cookie-actions button:hover {
  opacity: 0.85;
}

/*
 * PARTNER PAGE
 */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-end;
  width: 100%;
  margin-top: 20px;
}

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 140px;
  padding: 16px;
  border: 1px solid rgba(33, 61, 108, 0.15);
  border-radius: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.partner-card:hover {
  box-shadow: 0 4px 16px rgba(33, 61, 108, 0.15);
  transform: translateY(-2px);
}

.partner-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.partner-card span {
  font-size: 0.9rem;
  color: #213d6c;
  text-align: center;
  font-weight: 600;
}

/*
 * IMPRESSUM PAGE
 * No image above → no negative margin; left-aligned legal text.
 */
.white-section.impressum-page {
  margin-top: 0;
  padding-top: 130px;
  min-height: 100vh;
  background-color: white;
  align-items: flex-start;
  text-align: left;
}

.impressum-content h2 {
  color: #213d6c;
  font-family: sans-serif;
  font-size: 1.1rem;
  margin: 2rem 0 0.4rem;
}

.impressum-content p,
.impressum-content address {
  font-style: normal;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 0.5rem;
}

.impressum-content a {
  color: #213d6c;
}

.impressum-content ul {
  font-size: 1rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

/* ==========================================
 * HAMBURGER BUTTON (nur auf Mobile sichtbar)
 * ========================================== */
.hamburger-btn {
  display: none;
}

/*
 * SIDE NAVIGATION
 * Positioned inside the fixed blue overlay, below the logo.
 */
.side-nav {
  position: absolute;
  top: 150px;
  left: 20px;
  max-width: calc(25% - 35px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}

.side-nav a {
  color: white;
  text-decoration: none;
  font-family: "Outfit", sans-serif;
  font-size: 1.2rem;
  line-height: 1.3;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.side-nav a:hover {
  opacity: 0.9;
}

.side-nav a.active {
  opacity: 1;
  font-weight: 700;
}

.side-nav a.nav-cta {
  opacity: 1;
  font-weight: normal;
  font-style: italic;
  color: white;
}

.side-nav a.nav-cta:hover {
  opacity: 0.85;
}

.side-nav a.nav-cta.active {
  font-weight: 700;
}

.side-nav .nav-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin: 4px 0;
}

/*
 * LANGUAGE SWITCHER
 * Child of .ui-overlay-container, so it sits in the fixed layer.
 * pointer-events: auto overrides the parent's none.
 */
.lang-switcher {
  position: absolute;
  top: 20px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  color: #213d6c;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.lang-switcher span {
  opacity: 0.5;
}

.lang-switcher button {
  background: none;
  border: none;
  color: #213d6c;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lang-switcher button:hover {
  opacity: 0.85;
}

.lang-switcher button.active {
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================
 * RESPONSIVE DESIGN – Mobile (max-width: 768px)
 * ========================================== */
@media (max-width: 768px) {
  /* -- Top bar -- */
  .ui-overlay-container {
    height: 64px;
    background-color: #213d6c;
  }

  /* Diagonales blaues Panel ausblenden */
  .ui-overlay-container::before {
    display: none;
  }

  /* Logo */
  .logo-link {
    top: 10px;
    left: 16px;
    width: 130px;
    height: 44px;
  }

  /* Sprachumschalter – weiß, links vom Hamburger */
  .lang-switcher {
    top: 20px;
    right: 64px;
    color: white;
  }

  .lang-switcher button,
  .lang-switcher span {
    color: white;
  }

  /* Hamburger-Button */
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    top: 22px;
    right: 20px;
    pointer-events: auto;
  }

  .hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
  }

  /* X-Animation wenn Menü offen */
  .nav-is-open .hamburger-btn span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .nav-is-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
  }

  .nav-is-open .hamburger-btn span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Seitennavigation – standardmäßig ausgeblendet, unterhalb der Top-Bar wenn offen */
  .side-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background-color: #213d6c;
    padding: 32px 32px 40px;
    max-width: 100%;
    z-index: 99;
    flex-direction: column;
    gap: 22px;
    overflow-y: auto;
  }

  .nav-is-open .side-nav {
    display: flex;
  }

  .side-nav a {
    font-size: 1.4rem;
    opacity: 0.85;
  }

  /* Bildsektionen – kein fixed-Attachment (iOS-Fix) */
  .image-section {
    background-attachment: scroll;
    height: 55vh;
  }

  /* Weißer Inhaltsbereich – volle Breite, linksbündig */
  .white-section {
    margin-top: 0;
    padding: 40px 24px 60px;
    text-align: left;
    align-items: flex-start;
  }

  .white-section h1 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1.1rem;
  }

  ul {
    font-size: 1.1rem;
    padding-left: 1.2rem;
  }

  /* Impressum / Datenschutz */
  .white-section.impressum-page {
    padding-top: 80px;
  }

  /* Cookie-Banner */
  #cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
  }

  /* Payment-Seite: Benutzerfelder untereinander */
  .user-data-columns {
    flex-direction: column;
  }

  /* Plan-Grid: eine Spalte auf Mobile */
  .plan-grid {
    grid-template-columns: 1fr;
  }
}
