/*
Theme Name: RSW 2026
Theme URI: https://example.com/rsw-2026
Author: Chris Donker
Author URI: https://www.chrisdonker.nl
Description: New RSW look of 2026.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rsw2026
*/

:root {
  --rsw-content-max-width: 1440px;
  --rsw-header-height: 60px;
}

/* Basic layout reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #0f172a;
  background-color: #0b1120;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

.site-layout {
  padding-top: var(--rsw-header-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #e5e7eb;
}

.site-main {
  flex: 1 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  max-width: var(--rsw-content-max-width, 1440px);
  margin: 0 auto;
  width: 100%;
}

.home .site-main,
.page-template-default .site-main {
  max-width: none;
  padding: 0 0 3rem;
}

.home .site-main > *:first-child,
.page-template-default .site-main > *:first-child {
  margin-top: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  align-self: flex-start;
  flex-shrink: 0;
  background: #166534;
  backdrop-filter: blur(16px);
  transform: translateY(0);
  transition: transform 0.25s ease;
}

.site-header.header-hidden {
  transform: translateY(-100%);
}

/* Mega menu positioning context - header is the containing block */
.primary-nav-item {
  position: static;
}

body.admin-bar .site-header {
  padding-top: 32px;
}

body.admin-bar .site-layout {
  padding-top: calc(var(--rsw-header-height) + 32px);
}


@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 0;
    padding-top: 46px;
  }

  body.admin-bar .site-layout {
    padding-top: calc(var(--rsw-header-height) + 46px);
  }
}

.site-header-inner {
  max-width: var(--rsw-content-max-width, 1440px);
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.site-nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.site-logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.site-logo-img {
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Desktop nav - hidden on mobile */
.primary-nav {
  display: none;
}

.primary-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  align-items: center;
}

.primary-nav-item {
  margin: 0;
  padding: 0;
}

.primary-nav-link {
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.primary-nav-link:hover,
.primary-nav-link:focus {
  border-bottom-color: #fff;
  text-decoration: none;
}

.primary-nav-arrow {
  font-size: 0.6em;
  opacity: 0.8;
}

/* Mega menu panel - directly under header, no overlap */
.mega-menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0;
  background: #166534;
  padding: 0;
  padding-left: max(1.25rem, calc((100vw - var(--rsw-content-max-width, 1440px)) / 2));
  padding-right: max(1.25rem, calc((100vw - var(--rsw-content-max-width, 1440px)) / 2));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 98;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.primary-nav-item.has-children:hover .mega-menu-panel,
.primary-nav-item.has-children.mega-menu-open .mega-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-menu-inner {
  max-width: var(--rsw-content-max-width, 1440px);
  margin: 0 auto;
  padding: 1rem 1.5rem 1.5rem;
}

.mega-menu-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  min-height: 200px;
}

.mega-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  align-self: stretch;
}

.mega-menu-links li {
  margin: 0;
  padding: 0;
}

.mega-menu-image {
  flex: 0 0 33.333%;
  width: 33.333%;
  min-height: 180px;
  align-self: flex-start;
  background-color: #94a3b8;
  background-size: cover;
  background-position: center;
  border-radius: 0.5rem;
  opacity: 1;
  transition: opacity 0.3s, background-image 0.3s;
}

.mega-menu-links a {
  color: #fff;
  padding: 0.5rem 0;
  font-size: 1rem;
  border-bottom: none;
}

.mega-menu-links a:hover {
  color: #bfdbfe;
}


/* Hamburger - hidden on desktop */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 -7px 0 currentColor;
}

/* Mobile drawer - rendered at body end for proper stacking */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  visibility: hidden;
  isolation: isolate;
}

.mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

body.drawer-open {
  overflow: hidden;
  touch-action: none;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.mobile-drawer.is-open .mobile-drawer-backdrop {
  opacity: 1;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  max-width: 100%;
  background: #166534;
  padding: 2rem 1.5rem;
  padding-top: 3rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-nav {
  overflow-y: auto;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-close:hover,
.mobile-drawer-close:focus {
  opacity: 0.9;
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-top: 3rem;
}

.mobile-nav-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  width: 100%;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-nav-toggle {
  font-family: inherit;
  color: #fff;
}

.mobile-nav-arrow {
  font-size: 1.25rem;
}

.mobile-sub-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #14532d;
  padding: 1rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 100000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.mobile-sub-drawer.is-open {
  transform: translateX(0);
}


.mobile-sub-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.mobile-sub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-sub-list a {
  display: block;
  padding: 0.75rem 0;
  color: #fff;
}

.mobile-sub-list a:hover {
  color: #bfdbfe;
}

/* Tablet/mobile: show hamburger, hide desktop nav */
@media (max-width: 1023px) {
  .primary-nav {
    display: none !important;
  }

  .hamburger-btn {
    display: block;
  }
}

/* Desktop: show mega menu, hide hamburger */
@media (min-width: 1024px) {
  .primary-nav {
    display: flex !important;
    align-items: center;
  }

  .primary-nav-list {
    display: flex;
    align-items: center;
  }

  .primary-nav-item {
    display: flex;
    align-items: center;
  }

  .hamburger-btn {
    display: none;
  }
}

.hero {
  border-radius: 1.5rem;
  padding: 2.75rem 2.25rem;
  background: radial-gradient(circle at top left, #1d4ed8, #0f172a 55%, #020617 100%);
  color: #e5e7eb;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.2rem, 3vw + 1.4rem, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.9rem;
}

.hero-description {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: #cbd5f5;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.7);
  font-size: 0.9rem;
}

.hero-cta span:last-child {
  color: #38bdf8;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #bfdbfe;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.hero-badge span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
}

.hero-media {
  border-radius: 1.25rem;
  padding: 1.5rem;
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.3);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.hero-media-placeholder-emoji {
  font-size: 1.6rem;
}

.three-columns {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.three-column-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.25);
  min-height: 160px;
  display: flex;
  align-items: flex-end;
  padding: 1.1rem 1.1rem 1.2rem;
}

.three-column-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, transparent 60%);
  z-index: 0;
}

.three-column-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.three-column-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
}

.three-column-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.three-column-pill {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.three-column-pill svg {
  width: 0.8rem;
  height: 0.8rem;
}

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: #166534;
  padding: 2.25rem 1.25rem 2.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer-inner {
  max-width: var(--rsw-content-max-width, 1440px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-logo-link {
  display: inline-block;
  line-height: 0;
}

.footer-logo-img {
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.footer-brand-title {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #fff;
  margin: 0;
}

.footer-brand-text {
  font-size: 0.9rem;
  max-width: 20rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.footer-columns {
  display: grid;
  gap: 1.5rem;
}

.footer-columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer-column-title {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d4a574;
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.footer-links li + li {
  margin-top: 0.25rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover,
.footer-links a:focus {
  color: #fff;
  text-decoration: none;
}

.site-footer-bottom {
  max-width: var(--rsw-content-max-width, 1440px);
  margin: 1.75rem auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.25rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    order: -1;
  }

  .site-main {
    padding-inline: 1rem;
  }

  .three-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    padding-inline: 1rem;
  }

  .three-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer-inner {
    flex-direction: column;
    justify-content: flex-start;
  }

  .footer-columns-2,
  .footer-columns-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Back to top button */
.rsw-back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #166534;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.2s;
}

.rsw-back-to-top:hover {
  background: #15803d;
}

.rsw-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

