/* ====================================================================
   COMPONENTS.CSS – OpenSovereign Shared Components
   Navigation, section headings, buttons, cards, contact, footer
   ==================================================================== */

/* ====== NAVIGATION ====== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(17, 17, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-white);
}

.nav-logo svg {
  width: 36px;
  height: 36px;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-gray);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-white);
}

.nav-links a.active {
  color: var(--text-white);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: var(--text-white) !important;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Extra space between the last nav link and the CTA */
.nav-links .nav-cta {
  margin-left: 16px;
}

/* Language switcher, right of the CTA */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-gray);
}

.nav-lang .active {
  color: var(--text-white);
  font-weight: 600;
}

/* Language switcher + social links; the social icons only show in the mobile menu */
.nav-meta {
  display: flex;
  align-items: center;
}

.nav-social {
  display: none;
}

/* Burger button: only shown below the mobile-menu breakpoint */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-white);
}

.nav-toggle__bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s, opacity 0.2s;
}

.nav-toggle__bar:nth-child(1) { top: 15px; }
.nav-toggle__bar:nth-child(2) { top: 21px; }
.nav-toggle__bar:nth-child(3) { top: 27px; }

.nav.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ====== SECTION HEADINGS ====== */

.section-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--text-white);
}

.section-title span {
  color: var(--color-accent);
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-gray);
  max-width: 700px;
  line-height: 1.7;
  margin-bottom: 56px;
}

/* ====== SHARED BUTTON STYLES ====== */

.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: var(--text-white);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ====== SHARED CARD BASE ====== */

.card {
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
}

/* ====== CONTACT SECTION ====== */

.contact {
  padding: 120px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 49, 49, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.contact-title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 32px;
  line-height: 1.1;
}

/* Red highlight inside headings, e.g. "Bereit für <span>Unabhängigkeit?</span>" */
.text-accent {
  color: var(--color-accent);
}

.contact-email {
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 48px;
  transition: opacity 0.2s;
}

.contact-email:hover {
  opacity: 0.8;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-accent);
  color: var(--text-white);
  padding: 18px 48px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 18px;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.contact-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ====== FOOTER ====== */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-dark);
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  font-size: 13px;
  color: var(--text-gray);
}

.footer-center {
  font-size: 12px;
  color: var(--text-gray);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-right a {
  font-size: 13px;
  color: var(--text-gray);
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--text-white);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
}

.footer-lang {
  font-size: 13px;
  color: var(--text-gray);
  margin-top: 12px;
  text-align: center;
}

.footer-lang a {
  color: var(--text-gray);
  transition: color 0.2s;
}

.footer-lang a:hover {
  color: var(--text-white);
}

.footer-lang .active {
  color: var(--text-white);
  font-weight: 600;
}

/* ====== RESPONSIVE – NAVIGATION ====== */

@media (max-width: 1200px) {
  .nav-links { gap: 20px; }
  .nav-links .nav-cta { margin-left: 8px; }
}

@media (max-width: 1024px) {
  .nav-inner { padding: 0 32px; }
}

/* Mobile menu: below this width the desktop links no longer fit on one line */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    /* .nav's backdrop-filter makes it the containing block, so hang the
       panel below the 72px bar with an explicit viewport height */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 32px 40px;
    background: var(--bg-dark);
    overflow-y: auto;
  }

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

  .nav-links > a:not(.nav-cta) {
    padding: 16px 0;
    font-size: 18px;
    border-bottom: 1px solid var(--border-dark);
  }

  .nav-links .nav-cta {
    align-self: flex-start;
    margin: 32px 0 0;
    padding: 14px 28px;
    font-size: 16px;
  }

  .nav-meta {
    margin: 20px 0 0 -12px; /* offset the 44px tap area so "DE" lines up with the button */
    gap: 16px;
  }

  .nav-lang {
    font-size: 18px;
    gap: 6px;
  }

  .nav-social {
    display: flex;
    align-items: center;
    padding-left: 16px;
    border-left: 1px solid var(--border-dark);
  }

  .nav-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  /* Comfortable tap targets (at least 44px high) */
  .nav-lang > a,
  .nav-lang > .active {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
  }

  .nav-lang > a {
    font-size: 18px;
  }

  /* Keep the page behind the open menu from scrolling */
  body.nav-open { overflow: hidden; }
}

@media (max-width: 768px) {
  /* Footer: stack the three parts instead of overflowing sideways */
  .footer-content {
    flex-direction: column;
    gap: 12px;
  }

  .footer-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .nav-inner { padding: 0 16px; }
  .nav-logo img { height: 24px; }
  .nav-links { padding: 8px 16px 32px; }
}
