@import url("line.awesome.min.css");

/* ==========================================================================
   0. TYPOGRAPHY & FONTS
   ========================================================================== */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-200.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 200;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-200italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-300.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-300italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-500italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-600italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/new/poppins-v24-latin-700italic.woff2") format("woff2");
}

/* ==========================================================================
   1. MODERN ARCHITECTURE & VARIABLES
   ========================================================================== */
:root {
  /* Layout & Spacing */
  --chassis-max: 1440px;
  --gutter: clamp(1.2rem, 4vw, 2.5rem);
  --section-gap: clamp(4rem, 8vw, 7rem);

  /* Fluid Typography Scale */
  --font-base: clamp(18px, 1vw + 12px, 18px);
  --text-xxs: clamp(0.6rem, 0.65vw + 0.5rem, 0.7rem);
  --text-xs: clamp(0.75rem, 0.8vw + 0.5rem, 0.85rem);
  --text-sm: clamp(0.9rem, 1vw + 0.5rem, 1rem);
  --text-md: var(--font-base);
  --text-lg: clamp(1.1rem, 1.5vw + 0.8rem, 1.3rem);
  --text-xl: clamp(1.5rem, 2vw + 1rem, 1.9rem);
  --text-xxl: clamp(2rem, 3vw + 1rem, 2.5rem);

  --text-bold: 500;
  --text-fat: 700;

  /* Colors */
  --clr-bg: #ffffff;
  --clr-surface: #f7f7f7;
  --clr-text: #111111;
  --clr-text-light: #666666;
  --clr-border: #a0a0a0;
  --clr-brand: #222222;

  /* Badge Colors */
  --clr-badge-green: #7d9e82;
  --clr-badge-yellow: #fbe09e;
  --clr-badge-red: #d86f71;
  --clr-row-bg: #f5f5f5;

  /* Overlays */
  --overlay-white: rgba(255, 255, 255, 0.6);
  --overlay-dark: rgba(0, 0, 0, 0.75);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- DEBUGGING --- */
.debug {
  & * {
    background-color: hsla(0, 0%, 0%, 0.05) !important;
  }
  &.-outline * {
    outline: 1px solid hsla(0, 100%, 50%, 0.6) !important;
    outline-offset: -1px !important;
  }
}

/* ==========================================================================
   2. MODERN CSS RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 100px;
}

.section-target {
  padding-top: 100px;
  margin-top: -100px;
  display: block;
}

body {
  font-family: "Poppins", sans-serif;
  font-size: var(--text-md);
  font-weight: 300;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

strong {
  font-weight: var(--text-bold);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  text-wrap: balance;
  font-weight: 500;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

input,
button,
textarea,
select {
  font: inherit;
}

section {
  margin-block: var(--section-gap);
  &:first-of-type {
    margin-top: 0 !important;
  }
}
p {
    margin-bottom: 1.5em; /* This creates the visual empty line */
}

/* Optional: remove it from the very last paragraph so the box doesn't look uneven */
p:last-child {
    margin-bottom: 0;
}
/* ==========================================================================
   3. LAYOUT UTILITIES
   ========================================================================== */
.container {
  width: min(100% - (var(--gutter) * 2), var(--chassis-max));
  margin-inline: auto;
}

.text-content {
  max-width: 80ch;
  margin-inline: auto;
  text-align: center;

  h2 {
    font-size: var(--text-xl);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 100px;
  }

  h3 {
    font-size: var(--text-md);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 20px 0;
  }

  p {
    color: var(--clr-text);
  }

  .divider {
    width: 100%;
    max-width: 120px;
    height: 3px;
    background-color: var(--clr-border);
    border: none;
    margin: 1rem auto;
  }

  .intro-text {
    font-weight: 300;
    color: var(--clr-text);
    margin-bottom: 2rem;
  }

  .text-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--clr-text);
    &:hover {
      color: var(--clr-text-light);
      text-decoration: underline;
    }
  }
}

.text-content-left {
  text-align: left;

  p {
    margin-bottom: 1.2rem;
    font-size: var(--text-sm);
    &:last-child {
      margin-bottom: 0;
    }
  }
}

.pull-quote {
  font-size: var(--text-lg);
  font-style: italic;
  font-weight: var(--text-bold);
  line-height: 1.6;
  color: var(--clr-text-light);
  margin-bottom: 2rem;
}

/* --- Flexible Grids --- */
.smart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap, clamp(2rem, 5vw, 4rem));
  align-items: start;
  /*overflow-wrap: break-word;
  word-break: break-all;*/

  @media (min-width: 900px) {
    grid-template-columns: var(--cols, 1fr 1fr);
  }
}

.structural-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(0.6rem, 1vw, 1.2rem);
  margin-top: 3rem;

  --max-cols: 4;
  --current-items: var(--max-cols);
  max-width: calc(
    (var(--max-w, 100%) / var(--max-cols)) * var(--current-items)
  );
  margin-inline: auto;

  /* Dynamic grid width multipliers */
  &:has(> :last-child:nth-child(1)) {
    --current-items: 1;
  }
  &:has(> :last-child:nth-child(2)) {
    --current-items: 2;
  }
  &:has(> :last-child:nth-child(3)) {
    --current-items: 3;
  }
}

/* ==========================================================================
   4. ALIGNMENT MATRIX (V8 - GOLD MASTER)
   ========================================================================== */
/* --- X-AXIS --- */
.align-left {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    text-align: left;
    justify-self: start;
    margin-inline-end: auto;
  }
  &.-self {
    text-align: inherit;
  }
}

.align-center {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    text-align: center;
    justify-self: center;
    margin-inline: auto;
  }
  &.-self {
    text-align: inherit;
  }
}

.align-right {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    text-align: right;
    justify-self: end;
    margin-inline-start: auto;
  }
  &.-self {
    text-align: inherit;
  }
}

.align-justify {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    text-align: justify;
    justify-self: stretch;
  }
  &.-self {
    text-align: inherit;
  }
}

/* --- Y-AXIS --- */
.valign-top {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    align-self: start;
    vertical-align: top;
  }
  &.-self {
    vertical-align: baseline;
  }
}

.valign-middle {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    align-self: center;
    vertical-align: middle;
  }
  &.-self {
    vertical-align: baseline;
  }
}

.valign-bottom {
  &,
  &.-first > :first-child,
  &.-children > *,
  &.-all * {
    align-self: end;
    vertical-align: bottom;
  }
  &.-self {
    vertical-align: baseline;
  }
}

/* ==========================================================================
   5. IMAGE UTILITIES
   ========================================================================== */
.responsive-portrait {
  width: 100%;
  border-radius: 2px;
  object-fit: cover;
  aspect-ratio: 1 / 1;

  @media (min-width: 900px) {
    aspect-ratio: 4 / 5;
  }
}

.image-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-content: start;
  position: sticky;
  top: 120px;
  z-index: 1;

  img {
    width: 100%;
    height: auto;
    border-radius: 2px;
  }

  &:has(> img:nth-child(3)) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (max-width: 900px) {
    &,
    &:has(> img:nth-child(3)) {
      grid-template-columns: 1fr;
      position: relative;
      top: 0;
    }
  }
}

/* ==========================================================================
   6. GLOBAL COMPONENTS
   ========================================================================== */
/* --- Header & Nav --- */
header {
  background-color: var(--clr-bg);
  border-bottom: 0px solid var(--clr-border);
  padding-block: 1.2rem;
  position: static;

  .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: var(--text-xxl);
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--clr-brand);
    img {
      height: 60px;
    }
  }

  /* Mobile Nav Dynamics */
  .mobile-menu-toggle {
    display: none;
  }

  .hamburger {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    background: var(--clr-bg);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;

    span {
      height: 2px;
      width: 22px;
      background-color: var(--clr-brand);
      transition: transform 0.4s ease, opacity 0.4s ease;
      transform-origin: center;
    }
  }

  .mobile-menu-toggle:checked ~ .hamburger span {
    &:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }
    &:nth-child(2) {
      opacity: 0;
    }
    &:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background-color: var(--clr-bg);
    z-index: 10000;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    max-height: 100vh;
    will-change: transform, opacity;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem 3rem 2rem;
    gap: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s,
      visibility 0.5s;

    a {
      font-size: var(--text-md);
      font-weight: 400;
      text-transform: uppercase;
      letter-spacing: 1px;
      position: relative;
      transition: text-shadow var(--transition-smooth);
/*
      &:hover,
      &.selected {
        text-shadow: 0 0 1px currentColor, 0 0 1px currentColor;
        filter: drop-shadow(1px 1px 0 currentColor);
      }

      &::after {
        content: "";
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--clr-brand);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform var(--transition-smooth);
      }

      &:hover::after {
        transform: scaleX(1);
        transform-origin: left;
      }
      */
    }

    .search-trigger i {
      font-size: 1.8rem;
      cursor: pointer;
    }
  }

  .mobile-menu-toggle:checked ~ nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Desktop Override */
  @media (min-width: 900px) {
    position: sticky;
    top: 0;
    z-index: 1000;

    .hamburger {
      display: none;
    }

    nav {
      position: static;
      width: auto;
      height: auto;
      flex-direction: row;
      justify-content: flex-end;
      padding: 0;
      gap: 1.5rem;
      background: transparent;
      box-shadow: none;
      transform: none !important;
      opacity: 1 !important;
      visibility: visible !important;
      overflow: visible;

      a {
        font-size: var(--text-sm);
        padding-block: 0.5rem;
      }

      .search-trigger {
        &::after {
          display: none;
        }
        &:hover {
          filter: none;
          text-shadow: none;
          color: var(--clr-brand);
        }
        i {
          font-size: 1.2rem;
        }
      }
    }

    .menu-backdrop {
      display: none;
    }
  }
}

/* Nav Sub-Elements that live outside or span the screen */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu-toggle:checked ~ .menu-backdrop {
  opacity: 1;
  visibility: visible;
}

.hamburger,
.menu-backdrop,
nav a {
  touch-action: manipulation;
}

.nav-actions-wrapper {
  position: relative;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  width: 100vw;
  height: 60vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block: 0 var(--section-gap);
  container-type: size;

  img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
  }

  .hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 20;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    transition: background var(--transition-fast);

    &:hover {
      background: rgba(0, 0, 0, 0.6);
    }
    &.prev {
      left: 0;
    }
    &.next {
      right: 0;
    }
  }

  .hero-overlay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    align-items: center;
    width: min(95%, 1440px);
    margin: 0 auto;
    z-index: 10;
  }

  .hero-card {
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: white;
    max-width: 250px;
    padding: 2.5rem 1rem;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;

    &:hover {
      background: var(--overlay-dark);
      transform: translateY(-5px);
    }

    &.full-height {
      grid-row: span 1;
      height: calc(100cqh - 200px);
      align-self: start;
    }
  }
}

/* --- Team / Content Cards --- */
.team-banner img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  border-radius: 4px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 2px;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
  }

  .overlay {
    position: absolute;
    inset: 0;
    background: var(--overlay-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-smooth);
  }

  .title {
    color: var(--clr-brand);
    font-weight: 600;
    font-size: var(--text-lg);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    padding: 0.8rem 1.4rem;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    max-width: 270px;
    hyphens: manual;
    -webkit-hyphens: manual;
    -ms-hyphens: manual;

    .info {
      color: var(--clr-brand);
      font-weight: 400;
      font-size: var(--text-md);
      letter-spacing: 2px;
      text-transform: uppercase;
      text-align: center;
      transition: var(--transition-smooth);
      border: 2px solid transparent;
      margin-top: 10px;
    }
  }

  &:hover {
    img {
      transform: scale(1.05);
    }
    .overlay {
      background: rgba(0, 0, 0, 0);
    }
    .title {
      color: #fff;
      text-shadow: 2px 2px 2px black;
      background: rgba(255, 255, 255, 0);
      border: 2px solid transparent;
      .info {
        color: #fff;
      }
    }
  }
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, max-content));
  justify-content: center;
  gap: 1.6rem;
  margin-top: 4rem;

  .person-card {
    text-align: center;

    img {
      width: 100%;
      max-width: 320px;
      aspect-ratio: 2 / 3;
      object-fit: cover;
      margin-bottom: 1.5rem;
      border-radius: 2px;
    }

    .title {
      font-size: var(--text-xxs);
      color: var(--clr-text-light);
      margin-bottom: 0.5rem;
      font-weight: 300;
      text-transform: uppercase;
      letter-spacing: 1px;
    }
    h3 {
      font-size: var(--text-lg);
      margin-bottom: 0.3rem;
      text-transform: uppercase;
    }
    .role {
      font-size: var(--text-xs);
      color: var(--clr-text-light);
      margin-bottom: 1rem;
      font-weight: 300;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    a {
      display: block;
      font-weight: 500;
      font-size: var(--text-sm);
      margin-bottom: 0.3rem;
      color: var(--clr-text);
      &:hover {
        color: var(--clr-text-light);
        text-decoration: underline;
      }
    }
  }
}

/* --- Map / Split Breakout Section --- */
.map-section {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(
      0,
      calc(var(--chassis-max) * 0.2)
    ) 1rem minmax(0, calc(var(--chassis-max) * 0.79)) minmax(var(--gutter), 1fr);
  margin-top: var(--section-gap);

  .map-left {
    grid-column: 1 / 3;
    background: var(--clr-surface);
    display: flex;
    justify-content: flex-end;
    padding-block: 4rem;

    .content {
      width: 100%;
      max-width: calc(var(--chassis-max) * 0.2);
      padding-right: clamp(1rem, 3vw, 3rem);
      display: flex;
      flex-direction: column;
      gap: 2.5rem;
    }
  }

  .map-right {
    grid-column: 4 / 6;
    position: relative;
    min-height: 400px;
    img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  @media (max-width: 900px) {
    grid-template-columns: 1fr;
    .map-left,
    .map-right {
      grid-column: 1 / -1;
    }
    .map-left {
      justify-content: center;
      padding-inline: var(--gutter);
    }
    .map-left .content {
      max-width: 100%;
      padding-right: 0;
    }
  }
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  i {
    font-size: 2.5rem;
    color: var(--clr-brand);
  }
  span {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  a,
  p {
    font-size: var(--text-sm);
    color: var(--clr-text-light);
  }
  a:hover {
    color: var(--clr-brand);
    text-decoration: underline;
  }
}

/* --- Footer --- */
footer {
  padding-block: 4rem 0.5rem;
  background-color: #f8f8f8;
  font-size: var(--text-xs);

  .top-logo {
    display: flex;
    justify-content: center;
    padding-block: 1rem 6rem;
    img {
      max-width: 200px;
    }
  }

  .top {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 3rem;
  }

  .brand {
    flex: 0 0 250px;
    img {
      max-width: 160px;
      margin-bottom: 1.5rem;
    }
    p {
      line-height: 1.6;
      strong {
        font-weight: var(--text-fat);
      }
    }
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(6rem, 8vw, 8rem);
  }

  .col {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    h4 {
      color: #333;
      font-weight: 600;
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.5rem;
    }
    a {
      color: #666;
      text-decoration: none;
      transition: color var(--transition-fast);
      &:hover {
        color: #000;
      }
    }
  }

  .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    font-weight: var(--text-bold);
    color: var(--clr-text-light);
  }

  .legal-links {
    display: flex;
    gap: 2rem;
    a:hover {
      color: #000;
    }
  }

  @media (max-width: 900px) {
    .top,
    .bottom {
      flex-direction: column;
      align-items: flex-start;
    }
  }
}

/* ==========================================================================
   7. PAGE SPECIFIC COMPONENTS & VIEWS
   ========================================================================== */
/* --- Contextual Related Content Footer --- */
.context-footer {
  margin-block: var(--section-gap);

  .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 1.25rem;
    align-items: start;
  }

  .category-group {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;

    .group-header {
      text-align: center;
      .label {
        font-size: var(--text-xs);
        color: var(--clr-text-light);
        text-transform: uppercase;
        letter-spacing: 0.15em;
        font-weight: 400;
      }
      .indicator {
        width: 35px;
        height: 2px;
        background-color: var(--clr-brand);
        border: none;
        margin: 0.7rem auto 0;
      }
    }
  }
/*
  .structural-matrix {
    margin-top: 0;
    max-width: 100%;
  }
  */
  .gallery-card .title small {
    display: block;
    font-size: 0.65em;
    font-weight: 300;
    margin-top: 0.4rem;
    text-transform: none;
    letter-spacing: 0.05em;
  }
}

/* --- Subpage Details: Properties & Galleries --- */
.gallery-wrapper {
  display: grid;
  grid-template-columns: 5fr 1fr;
  gap: 10px;
  width: 100%;
  aspect-ratio: 5 / 2;
}

.property-header {
  margin-bottom: 3rem;

  h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
  }
  p {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  i {
    color: var(--clr-brand);
    font-size: 1.2rem;
  }
}

.icon-banner {
  background-color: var(--clr-surface);
  padding-block: 3rem;
  margin-block: var(--section-gap);

  .smart-grid {
    gap: 2rem;
  }

  .icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    i {
      font-size: 4rem;
      margin-bottom: 1.5rem;
      color: var(--clr-brand);
    }
    p {
      font-size: var(--text-sm);
      line-height: 1.4;
      font-weight: 500;
    }
  }
}

.dynamic-lage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;

  /* THE FIX: 3-Row Matrix
     Row 1 wraps the shorter verkehr-text. 
     Row 2 absorbs the excess length of lage-text.
     map spans Rows 2 & 3, pulling it flush under verkehr-text.
  */
  grid-template-rows: max-content max-content 1fr;
  grid-template-areas:
    "lage verkehr"
    "lage map"
    "picto map";

  .lage-text { grid-area: lage; }
  
  .lage-picto { 
    grid-area: picto; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin: 0 2rem;
    
    img {
      width: 100%; 
    }
  }
  
  .verkehr-text { grid-area: verkehr; 
    .la-list-item{
      display: flex; align-items: flex-start; margin-bottom: 0.5rem;
    }}
  
  .verkehr-map { 
    grid-area: map; 
    img { 
      width: 100%;  
      border-radius: 4px; 
    } 
  }

  h3 { 
    font-size: 1.2rem; 
    font-weight: 500; 
    margin-bottom: 1rem; 
  }

  ul {
    list-style: none; 
    padding: 0;
    
    li {
      position: relative; 
      padding-left: 25px; 
      margin-bottom: 0.8rem; 
      font-size: 0.9rem;
      
      i { 
        position: absolute; 
        left: 0; 
        top: 4px; 
        color: var(--clr-brand); 
        font-size: 1.1rem; 
      }
    }
  }

  /* 
     THE MAGIC TRIGGER:
     Reset the rows back to default auto when restructuring 
  */
  &:not(:has(.lage-picto img)) {
    grid-template-rows: auto auto;
    grid-template-areas:
      "lage map"
      "verkehr map";
  }

  @media (max-width: 900px) {
    &, &:not(:has(.lage-picto img)) {
      grid-template-columns: 1fr;
      grid-template-rows: auto; /* Force natural flow */
      grid-template-areas:
        "lage"
        "picto"
        "verkehr"
        "map";
    }
    
  .lage-picto { 
    margin: 0;
  }
    
    .verkehr-map { 
      min-height: 300px; 
    }
  }
}

/* --- Accordions (Wohnungen / News) --- */
.accordion {
  --acc-gap: 1rem;
  --acc-bg: var(--clr-surface);
  --acc-open-bg: var(--clr-surface);
  --acc-padding: 1rem 1.5rem;
  --acc-radius: 0px;
  --acc-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);

  display: grid;
  grid-template-columns: 1fr;
  gap: var(--acc-gap);
  background-color: #fff;
  margin-bottom: 50px;
  padding-bottom: 10px;

  .accordion-item {
    background-color: var(--acc-bg);
    border-radius: var(--acc-radius);
    overflow: hidden;
    transition: all var(--transition-smooth);
    margin: 0 10px;

    .accordion-header {
      cursor: pointer;
      padding: var(--acc-padding);
      transition: background 0.2s ease;

      .icon-arrow {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: var(--text-xl);
        font-weight: bold;
        line-height: var(--text-xl);
        vertical-align: middle;
      }
      .name {
        font-weight: 500;
        font-size: 1rem;
      }
      .size,
      .col-floor,
      .col-rooms,
      .col-building {
        color: #333;
      }

      .status-badge {
        text-align: center;
        padding: 6px 0;
        font-size: 0.75rem;
        font-weight: 500;
        border-radius: 2px;
        letter-spacing: 1px;
        text-transform: uppercase;
        width: 100%;
        display: block;
      }
      .bg-green {
        background-color: var(--clr-badge-green);
        color: white;
      }
      .bg-yellow {
        background-color: var(--clr-badge-yellow);
        color: #4a3e1b;
      }
      .bg-red {
        background-color: var(--clr-badge-red);
        color: white;
      }

      &:hover {
        background-color: rgba(0, 0, 0, 0.02);
      }
      &.active .icon-arrow {
        transform: rotate(90deg);
      }
    }

    .accordion-content {
      display: none;
      padding: 24px;
      margin: 0 24px 24px 24px;
      background-color: #fff;

      .room-table {
        width: 100%;
        border-collapse: collapse;
        font-size: var(--text-sm);
        td {
          padding: 12px;
        }
        tr td:nth-child(2) {
          text-align: right;
        }
        tr:nth-child(even) {
          background-color: var(--acc-open-bg);
        }
      }

      .download-link {
        display: block;
        width: fit-content;
        margin-inline: auto;
        font-size: var(--text-xs);
        font-weight: var(--text-fat);
        text-transform: uppercase;
        margin: 2rem auto 4rem auto;
        padding-bottom: 2px;
        text-decoration: underline;
      }

      .content-split img {
        width: 100%;
        height: auto;
        max-height: 500px;
        object-fit: contain;
        object-position: top;
      }
    }

    &:has(.accordion-header.active) {
      background-color: var(--acc-open-bg);
      box-shadow: var(--acc-shadow);
    }
  }

  &.page-praject {
    --acc-gap: 0;
    --acc-bg: transparent;
    --acc-padding: 2rem 0;
    --acc-shadow: none;
    .accordion-item {
      border-bottom: 1px solid var(--clr-border, #eee);
      border-radius: 0;
    }
    .accordion-content {
      padding: 0 0 2rem 0;
    }
  }

  @media (max-width: 900px) {
    .accordion-header {
      grid-template-columns: 1fr 1fr ;
      padding: 1rem;
      align-items: flex-start;
      
      & > :last-child {
        grid-column: 1 / -1; /* Start at the first grid line, end at the very last one */
      }
    }
    .col-name {
      grid-column: 2;
      grid-row: 1;
      margin-bottom: 4px;
    }
    .col-badge {
      grid-column: 3;
      grid-row: 1;
    }
    .col-building,
    .col-size,
    .col-floor,
    .col-rooms {
      grid-column: 2 / 4;
      display: inline-block;
      font-size: 0.8rem;
      color: var(--clr-text-light);
      margin-right: 4px;
    }
    .col-building {
      grid-row: 2;
    }
    .col-building::after,
    .col-size::after,
    .col-floor::after {
      content: "•";
      margin-left: 8px;
      color: #ccc;
    }
    .col-rooms::after {
      content: "";
    }
    .accordion-content {
      padding: 0 1rem 1.5rem 1rem;
    }
    .content-split {
      grid-template-columns: 1fr;
      gap: 2rem;
    }
    .room-table {
      max-width: 100%;
    }
  }
}

/* --- Contact Section & Universal Buttons --- */
.contact-section {
  background-color: var(--clr-surface);
  padding: 4rem 2rem;
  margin: 4rem 0 2rem 0 !important;

  .contact-box {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 4rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;

    h3 {
      font-size: 1.5rem;
      font-weight: 300;
      margin-bottom: 1rem;
    }
    .name {
      font-size: 1.1rem;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 0.2rem;
    }
    .role {
      font-size: 0.7rem;
      text-transform: uppercase;
      color: var(--clr-text-light);
      margin-bottom: 2rem;
    }
  }

  @media (max-width: 700px) {
    .contact-box {
      grid-template-columns: 1fr;
      text-align: center;
    }
    .portrait {
      margin: 0 auto;
    }
    .btn-group {
      justify-content: center;
    }
  }
}

/* Buttons & Partner UI (reused logic) */
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--clr-border);
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: var(--transition-fast);
  &:hover {
    background: var(--clr-brand);
    color: white;
    border-color: var(--clr-brand);
  }
}

.portrait {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
}



/*
.partner-section {
  background-color: var(--clr-surface);
  padding: 2rem;
  margin: 0 0 4rem 0 !important;
  .partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;           
    max-width: 1200px;      
    margin: 0 auto;        
    gap: 2rem;             
    gap: 6rem;
    flex-wrap: wrap;
  }
  .role {
    margin-top: 10px;
    color: var(--clr-text-light);
    font-size: var(--text-xs);
    font-weight: var(--text-bold);
  }

  img {
    max-height: 40px;
    opacity: 0.8;
    filter: grayscale(100%); 
    transition: all 0.3s ease; 
    margin: 0 auto;

    &:hover {
      opacity: 1; 
      filter: grayscale(0%); 
    }
  }
}
*/











.partner-section {
  background-color: var(--clr-surface);
  padding: 2rem;
  margin: 0 0 4rem 0 !important;
  
  .partner-logos {
    display: flex;
    /* Removed justify-content: space-between */
    align-items: flex-start; /* Aligns the tops of the columns if logos vary in height */
    text-align: center;
    
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    gap: 2rem;
    flex-wrap: wrap;

    /* ADDED: Target the direct children (the div/a wrapping the img + .role) */
    > * {
      flex: 1 1 0; /* The '1' forces them to divide the full width equally */
      min-width: 140px; /* Ensures they wrap gracefully on small mobile screens instead of squishing */
      
      /* Centers the image and text perfectly inside their dedicated column */
      display: flex;
      flex-direction: column;
      align-items: center; 
      justify-content: flex-start; 
    }

    .role {
      margin-top: 10px;
      color: var(--clr-text-light);
      font-size: var(--text-xs);
      font-weight: var(--text-bold);
    }

    img {
      max-height: 40px;
      opacity: 0.8;
      filter: grayscale(100%);
      transition: all 0.3s ease;
      /* margin: 0 auto; no longer needed because the parent flex wrapper centers it */

      &:hover {
        opacity: 1;
        filter: grayscale(0%);
      }
    }
  }
}
/* ==========================================================================
   8. UTILITIES & THIRD-PARTY OVERRIDES
   ========================================================================== */
/* GDPR iFrames */
gdpr-frame {
  display: block;
  width: 100%;
  height: 100%;
}

.iframeBlock {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-position: center center;
  background-size: cover;
  box-sizing: border-box;
  padding: 20px;

  &.maps,
  &.youtube {
    color: #fff;
  }
  &.misc {
    color: #000;
  }
  a {
    color: inherit;
    text-decoration: underline;
  }
}

.transparentButton {
  padding: 10px 22px;
  border: 1px solid currentColor;
  color: currentColor;
  background-color: transparent;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: Verdana, Helvetica, Arial, sans-serif;
  cursor: pointer;
  font-size: 14px;

  &:hover {
    background-color: #576474;
    color: #fff;
    border-color: #576474;
  }
  &:active {
    background-color: #000;
    color: #fff;
    border-color: #000;
  }
}

/* Splide Grid Fixes */
.splide,
.splide__track {
  height: 100%;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
}
.splide li {
  padding-left: 0 !important;
}
.splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#thumb-slider .splide__slide {
  border: none !important;
  opacity: 0.5;
}
#thumb-slider .splide__slide.is-active {
  opacity: 1;
}

/* Interactive Overrides */
.map-marker-main {
  cursor: pointer;
  transition: filter 0.3s ease;
  will-change: filter;
  backface-visibility: hidden;
  &:hover {
    filter: grayscale(100%);
  }
}

/* --- Search Drawer --- */
.search-drawer {
  --sd-bg: #ffffff;
  --sd-text: #2d3748;
  --sd-accent: #4a5568;
  --sd-muted: #a0aec0;
  --sd-icon: #cbd5e0;
  --sd-border: #edf2f7;
  --sd-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  --sd-transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  visibility: hidden;
  transform: translateY(-100%);
  transition: transform var(--sd-transition), visibility 0.4s;

  &.is-active {
    visibility: visible;
    transform: translateY(0);
    .input-underline {
      width: 100%;
    }
  }

  .drawer-card {
    background: var(--sd-bg);
    width: 100%;
    padding: 60px 20px 40px 20px;
    box-shadow: var(--sd-shadow);
    border-bottom: 1px solid var(--sd-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  .focal-icon {
    font-size: 3.5rem;
    color: var(--sd-icon);
    margin-bottom: 20px;
    animation: drawerFadeInDown 0.5s ease backwards;
  }

  .drawer-content {
    width: 100%;
    max-width: 600px;
    text-align: center;

    input {
      width: 100%;
      border: none;
      background: transparent;
      font-size: 1.75rem;
      text-align: center;
      color: var(--sd-text);
      padding: 10px 0;
      font-weight: 500;
      &:focus {
        outline: none;
      }
    }
  }

  .input-underline {
    height: 2px;
    width: 0;
    background: var(--sd-accent);
    margin: 0 auto;
    transition: width 0.4s ease;
  }

  .drawer-hint {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--sd-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .drawer-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    font-size: 3rem;
    color: var(--sd-muted);
    cursor: pointer;
    line-height: 1;
    &:hover {
      color: var(--sd-text);
    }
  }

  @media (max-width: 768px) {
    .drawer-card {
      padding: 40px 15px 30px 15px;
    }
    .drawer-content input {
      font-size: 1.4rem;
    }
    .focal-icon {
      font-size: 2.5rem;
    }
  }
}

@keyframes drawerFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}





#gdpr-manager {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#gdpr-manager.active {
  opacity: 1;
  pointer-events: auto;
}

.gdpr-manager-content {
  background: #fff;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  border-radius: 8px;
  text-align: left;
  color: #000;
}

.gdpr-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.gdpr-item button {
  background: #ff4444;
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.close-btn {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  background: #576474;
  color: #fff;
  border: none;
  cursor: pointer;

}


.splide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center; /* Vertically centers the whole grid in the slide */
  padding: 4% 6%;
  z-index: 2;
  pointer-events: none;

  .smart-grid {
    display: grid;
    width: 100%;
    gap: var(--gap, 1rem);
    
    /* MOBILE: 3 Columns */
    grid-template-columns: repeat(3, 1fr);
    /* No height: 100% here to prevent squashing; let content or box height define it */

    @media (min-width: 900px) {
      /* DESKTOP: 4 Columns */
      grid-template-columns: repeat(4, 1fr);
      height: 100%; 
      align-items: stretch;
    }

    .box {
      pointer-events: auto;
      border: 1px solid #fff;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      text-transform: uppercase;
      font-weight: var(--text-fat);
      background: rgba(255, 255, 255, 0.2);
      transition: background 0.3s ease;
      font-size: 14px; /* Default mobile size */
text-shadow: 
  -1px -1px 0 rgba(0,0,0,0.2),  
   1px -1px 0 rgba(0,0,0,0.2),
  -1px  1px 0 rgba(0,0,0,0.2),
   1px  1px 0 rgba(0,0,0,0.2),
   0 4px 12px rgba(0,0,0,0.5);


      &:hover { background: rgba(255, 255, 255, 0.5); }

      /* MOBILE SPECIFIC LOGIC */
      @media (max-width: 899px) {
         /* Ensures boxes have presence */
        padding: 0.7rem 0.5rem;
        min-height: 5rem;
        font-size: 0.6rem;
        
        &:first-child {
          grid-column: span 3; /* Forces first box to take full top row */
          padding: 0.3rem;
          min-height: unset;
        }
      }

      /* DESKTOP SPECIFIC LOGIC */
      @media (min-width: 900px) {
        border: 2px solid #fff;
        font-size: 1.6vw;
        
        &.short {
          height: 20%;
          align-self: center;
        }
        
        &.tall {
          height: 100%;
        }
      }
    }
    @media (max-width: 899px) {
    gap: var(--gap, 0.5rem);
  }
  }
  
      @media (max-width: 899px) {
      margin: 1% 8%;
    }
}

.planView {
  cursor: zoom-in;
  transition: opacity 0.2s;
}
.planView:hover {
  opacity: 0.8;


.presse-quellen-outer {
  margin-top: 70px;
}
.presse-quellen-outer hr {
  width: 94%;
  margin: 0px auto 20px auto;
}
a.presse-quelle {
  display: block;
  margin-top: 10px;
}
a.presse-quelle strong {
  font-weight: 500;
}}