/*** VARIABLES ***/

:root {
  /* Colors */
  --color-text: #000;
  --color-link: #333;
  --color-link-hover: #666;
  --color-border: #666;
  --color-background: #fff;

  /* Typography variables set dynamically by font loader */
}

/*** RESET  ***/
/*-- https://andy-bell.co.uk/a-modern-css-reset/ --*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
}

/* Smooth scroll for anchor links - respects user motion preferences */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body);
  color: var(--color-body-text);
  font-size: var(--size-body-mobile);
  font-weight: var(--weight-body);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/*** TYPOGRAPHY ***/

/* Desktop body size */
@media (min-width: 768px) {
  body {
    font-size: var(--size-body);
  }
}

p {
  font-weight: 400;
  margin-bottom: 15px;
}

hr {
  border: none;
  border-top: 1px solid #e6e6e6;
  margin-bottom: 15px;
}

span {
}

li {
}

input {
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-headings);
  line-height: 1.2;
  font-weight: var(--weight-headings);
}

h1 {
  font-size: clamp(28px, 4vw, var(--size-h1));
}

h2 {
  font-size: clamp(24px, 3.5vw, var(--size-h2));
}

h3 {
  font-size: clamp(20px, 3vw, var(--size-h3));
}

h4 {
  font-size: clamp(18px, 2.5vw, var(--size-h4));
}

h5 {
  font-size: clamp(16px, 2vw, var(--size-h5));
}

h6 {
  font-size: clamp(14px, 1.5vw, var(--size-h6));
}

.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.left {
  text-align: left;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

/* Text Block Alignment (Element Positioning) */
.justify-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.justify-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.justify-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Font Utility Classes */
.font-body {
  font-family: var(--font-body);
}

.font-heading,
.font-headings {
  font-family: var(--font-heading);
}

.font-display {
  font-family: var(--font-display);
}

a {
  color: var(--color-link);
  font-weight: var(--weight-link);
  transition: all 0.3s ease-in-out;
  text-decoration: none;
}

:hover {
  transition: all 0.3s ease-in-out;
}

a:hover {
  color: var(--color-link-hover);
}

/*** BUTTONS ***/

/* Base Button Styles */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  text-align: center;
  text-decoration: none;
  border: 1px solid;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

/* Button 1 */
.btn-1 {
  background: var(--btn-1-bg);
  color: var(--btn-1-text);
  border-color: var(--btn-1-border);
}

.btn-1:hover {
  background: var(--btn-1-bg-hover);
  color: var(--btn-1-text-hover);
  border-color: var(--btn-1-border-hover);
}

/* Button 2 */
.btn-2 {
  background: var(--btn-2-bg);
  color: var(--btn-2-text);
  border-color: var(--btn-2-border);
}

.btn-2:hover {
  background: var(--btn-2-bg-hover);
  color: var(--btn-2-text-hover);
  border-color: var(--btn-2-border-hover);
}

/* Button 3 */
.btn-3 {
  background: var(--btn-3-bg);
  color: var(--btn-3-text);
  border-color: var(--btn-3-border);
}

.btn-3:hover {
  background: var(--btn-3-bg-hover);
  color: var(--btn-3-text-hover);
  border-color: var(--btn-3-border-hover);
}

/* Button 4 */
.btn-4 {
  background: var(--btn-4-bg);
  color: var(--btn-4-text);
  border-color: var(--btn-4-border);
}

.btn-4:hover {
  background: var(--btn-4-bg-hover);
  color: var(--btn-4-text-hover);
  border-color: var(--btn-4-border-hover);
}

/* Text Button */
.btn-text {
  background: transparent;
  color: var(--btn-text);
  border: none;
  padding: 8px 0;
  font-size: var(--btn-size);
  font-weight: var(--btn-weight);
  text-decoration: underline;
}

.btn-text:hover {
  color: var(--btn-text-hover);
}

/****** HEADER ******/

/*--- Site Header Core ---*/

.site-header {
  padding: 1em 0;
  background-color: var(--header-bg);
  transition: all 0.3s ease;
  z-index: 999;
}

/* Transparent Header */
.site-header.header-transparent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  z-index: 1000;
}

/* Fixed Header */
.site-header.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--header-bg);
  transition: background-color 0.3s ease;
}

/* Transparent + Fixed combination */
.site-header.header-transparent.header-fixed {
  position: absolute;
  background-color: transparent;
}

.site-header.header-transparent.header-fixed.is-scrolled {
  position: fixed;
  background-color: var(--header-bg);
}

/* Logo visibility controls */
.header-logo {
  position: relative;
}

.header-logo-default,
.header-logo-transparent {
  transition: opacity 0.3s ease;
}

/* Show transparent logo by default on transparent header */
.site-header.header-transparent .header-logo-transparent {
  opacity: 1;
}

.site-header.header-transparent .header-logo-default {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

/* Switch to default logo when scrolled */
.site-header.header-transparent.is-scrolled .header-logo-transparent {
  opacity: 0;
}

.site-header.header-transparent.is-scrolled .header-logo-default {
  opacity: 1;
}

/* Override transparent colors when scrolled */
.site-header.header-transparent.is-scrolled .menu-item > a {
  color: var(--menu-text-color);
}

.site-header.header-transparent.is-scrolled .menu-item > a:hover {
  color: var(--menu-text-color-hover);
}

.site-header.header-transparent.is-scrolled .submenu li a {
  color: var(--submenu-text-color);
}

.site-header.header-transparent.is-scrolled .submenu li a:hover {
  color: var(--submenu-text-color-hover);
  background-color: var(--submenu-bg-hover);
}

.has-transparent-header .content-area {
  margin-top: 0 !important;
}

.has-fixed-header .content-area {
  margin-top: 100px;
}

.header-content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-padding-mobile);
}

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

.has-secondary-menu .header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
}

.has-secondary-menu .site-nav {
  justify-self: center;
}

.has-secondary-menu .secondary-nav {
  justify-self: end;
}

.header-center {
  text-align: center;
}

/*--- Logo Styles ---*/

.header-logo img {
  width: var(--logo-width);
  height: auto;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .header-logo img {
    width: var(--logo-width-mobile);
  }
}

.logo-center .header-content {
  flex-direction: column;
  gap: 1rem;
}

/* --- Site Navigation --- */

.site-nav {
  position: relative;
}

.nav-toggle {
  display: block;
  cursor: pointer;
  background: none;
  border: none;
  padding: 1em;
  z-index: 1001;
}

.nav-toggle svg {
  width: 25px;
  height: 25px;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0; /* keep it at 0 */
  transform: translateX(-100%);
  height: 100vh;
  width: 80%;
  max-width: 320px;
  background: #fff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  z-index: 1000;
}

/* When menu is toggled */
.menu.show {
  display: flex;
  flex-direction: column;
}

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

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

.menu-item > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em;
  text-decoration: none;
  color: var(--menu-text-color);
  font-size: var(--menu-text-size-mobile);
  font-weight: var(--menu-text-weight);
  text-transform: var(--menu-text-case);
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

.menu-item > a:hover {
  color: var(--menu-text-color-hover);
}

/* Transparent header menu colors */
.header-transparent .menu-item > a {
  color: var(--menu-text-color-transparent);
}

.header-transparent .menu-item > a:hover {
  color: var(--menu-text-color-hover-transparent);
}

/* Secondary Menu */
.secondary-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
}

.secondary-menu-item a {
  text-decoration: none;
  color: var(--menu-text-color);
  font-size: var(--menu-text-size);
  font-weight: var(--menu-text-weight);
  text-transform: var(--menu-text-case);
  transition: color 0.3s ease;
}

.secondary-menu-item a:hover {
  color: var(--menu-text-color-hover);
}

.header-transparent .secondary-menu-item a {
  color: var(--menu-text-color-transparent);
}

.header-transparent .secondary-menu-item a:hover {
  color: var(--menu-text-color-hover-transparent);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.menu-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.menu-toggle-icon {
  margin-left: auto;
  font-weight: bold;
}

.submenu {
  max-height: 0;
  overflow: hidden;
  background: #f9f9f9;
  transition: max-height 0.3s ease;
  flex-direction: column;
}

.submenu--open {
  max-height: 500px;
}

.submenu li a {
  padding: 0.75em 1em;
  display: block;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  color: var(--submenu-text-color);
  font-size: var(--submenu-text-size-mobile);
  font-weight: var(--submenu-text-weight);
  text-transform: var(--submenu-text-case);
  transition: all 0.3s ease;
}

.submenu li a:hover {
  color: var(--submenu-text-color-hover);
  background-color: var(--submenu-bg-hover);
}

/* Transparent header submenu colors */
.header-transparent .submenu li a {
  color: var(--submenu-text-color-transparent);
}

.header-transparent .submenu li a:hover {
  color: var(--submenu-text-color-hover-transparent);
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900; /* less than .mobile-drawer (1000), more than page content */
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Desktop Layout */
@media (min-width: 769px) {
  .logo-center .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-drawer {
    position: static;
    transform: none;
    height: auto;
    width: auto;
    background: transparent;
    box-shadow: none;
    display: block !important;
  }

  .menu {
    flex-direction: row;
    display: flex;
    gap: 2rem;
  }

  .menu-item {
    position: relative;
  }

  .menu-item > a {
    border: none;
    padding: 0.5em 0;
    font-family: var(--menu-font);
    font-size: var(--menu-text-size);
    font-weight: var(--menu-text-weight);
    text-transform: var(--menu-text-case);
    color: var(--menu-text-color);
  }

  .menu-item > a:hover {
    color: var(--menu-text-color-hover);
  }

  /* Transparent header desktop menu colors */
  .header-transparent .menu-item > a {
    color: var(--menu-text-color-transparent);
  }

  .header-transparent .menu-item > a:hover {
    color: var(--menu-text-color-hover-transparent);
  }

  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    display: none;
    z-index: 1000;
    max-height: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
  }

  .submenu li a {
    font-family: var(--submenu-font);
    font-size: var(--submenu-text-size);
    font-weight: var(--submenu-text-weight);
    text-transform: var(--submenu-text-case);
    color: var(--submenu-text-color);
    border-bottom: 1px solid #eee;
  }

  .submenu li:last-child a {
    border-bottom: none;
  }

  .submenu li a:hover {
    color: var(--submenu-text-color-hover);
    background-color: var(--submenu-bg-hover);
  }

  /* Transparent header desktop submenu colors */
  .header-transparent .submenu li a {
    color: var(--submenu-text-color);
  }

  .header-transparent .submenu li a:hover {
    color: var(--submenu-text-color-hover);
    background-color: var(--submenu-bg-hover);
  }

  .menu-item:hover > .submenu {
    display: block;
  }

  .menu-item > .submenu--open {
    border-bottom: 1px solid #ccc;
  }

  .menu-toggle-icon {
    display: none;
  }
}

/**** FOOTER ****/

footer {
  margin-top: 60px;
  margin-bottom: 30px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #666;
  padding: 25px 0;
}

.footer-menu ul {
  margin: 0;
  line-height: 1;
  text-align: center;
  margin-bottom: 5px;
}

.footer-menu ul li {
  list-style: none;
}

.footer-menu li {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.footer-menu li:after {
  content: "/";
  padding: 0 10px;
}

.footer-menu li:last-child:after {
  content: "";
}

.footer-menu li a:link,
.footer-menu li a:visited {
  color: var(--color-link);
}

.footer-menu li a:hover,
.footer-menu li a:focus {
  color: var(--color-link-hover);
}

.footer-copyright {
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
}

@media screen and (min-width: 900px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-menu ul {
    text-align: right;
    margin-bottom: 0px;
  }

  .footer-copyright {
    text-align: left;
  }
}

@media screen and (min-width: 1140px) {
  .footer-content-wrap {
    padding: 0;
  }
}

/*--- GENERAL  ---*/

.content-area {
  margin-top: 100px;
  margin-bottom: 100px;
  /* padding: 0 15px; */
}

.home-page .content-area {
  margin-top: 80px;
}

/* Override content-area margins for transparent header */
.has-transparent-header .home-page .content-area {
  margin-top: 0;
}

.content-width {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-padding-mobile);
}

@media screen and (min-width: 700px) {
  .content-width {
    padding: 0;
  }
  .content-area {
    margin-top: 130px;
  }

  /* Override desktop content-area margins for transparent header */
  .has-transparent-header .content-area {
    margin-top: 0;
  }
}

@media screen and (min-width: 1140px) {
  .content-width {
    padding: 0;
  }
}

/*** LAYOUT ***/

/* Page Title Area */
.page-title-wrap {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.page-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-pretitle,
.page-number {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.7;
}

.page-title {
  font-size: var(--size-page-title);
  color: var(--color-page-title);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
}

.page-summary {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0;
  max-width: 800px;
}

/* Project Meta - Three Column Layout */
.project-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .project-meta {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-meta-label {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.7;
}

.project-meta-value {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .page-title {
    font-size: var(--size-page-title-mobile);
  }

  .page-summary {
    font-size: 1.125rem;
  }
}

.flexbox {
  display: flex;
  flex-wrap: wrap;
  gap: var(--grid-gap);
}

.columns-1 > .card,
.columns-2 > .card,
.columns-3 > .card,
.columns-4 > .card {
  flex: 0 0 100%;
}

@media screen and (min-width: 600px) {
  .columns-2 > .card,
  .columns-3 > .card,
  .columns-4 > .card {
    flex: 0 0 calc((100% - 2rem) / 2);
  }
}

@media screen and (min-width: 960px) {
  .columns-3 > .card {
    flex: 0 0 calc((100% - 2rem * 2) / 3);
  }

  .columns-4 > .card {
    flex: 0 0 calc((100% - 2rem * 3) / 4);
  }
}

.columns-top {
  align-content: flex-start;
}

.columns-center {
  align-content: center;
}

.columns-bottom {
  align-content: flex-end;
}

/*** SECTION BLOCKS ***/

.section-block-wrap {
  margin: var(--section-margin-top) auto var(--section-margin-bottom) auto;
}

.section-block-wrap.divider {
  padding-bottom: 15px;
}

.section-block-wrap.divider:after {
  content: "";
  display: block;
  border-bottom: 1px solid #666;
  max-width: 1140px;
  margin: 30px auto 0 auto;
}

.section-block-wrap.divider:last-child:after {
  border-bottom: none;
}

.section-block-content-wrap,
.section-intro-wrap {
  margin-left: auto;
  margin-right: auto;
  padding-top: var(--section-padding-top);
  padding-bottom: var(--section-padding-bottom);
}

@media screen and (min-width: 900px) {
  .section-block-content-wrap,
  .section-intro-wrap {
    padding-top: var(--section-padding-top);
    padding-bottom: var(--section-padding-bottom);
  }

  .section-block-wrap.divider:after {
    margin-left: auto;
    margin-right: auto;
  }
}

/*--- Swiper/Carousel Styles ---*/

/* Swiper Navigation Buttons */
.swiper-button-prev,
.swiper-button-next {
  color: var(--color-link);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  color: var(--color-link-hover);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  display: none;
}

/* Swiper Pagination */
.slider-pagination-wrap {
  margin-top: 5px;
}

/* Override Swiper's default absolute positioning for pagination */
.swiper .swiper-pagination {
  position: relative;
  bottom: auto;
  top: auto;
  left: auto;
  width: auto;
  margin-top: 10px;
}

.swiper-pagination-bullet-active {
  background: var(--color-link-hover);
}

/* Swiper Arrow Visibility Controls */
.swiper[data-hide-arrows-mobile="true"] .swiper-button-prev,
.swiper[data-hide-arrows-mobile="true"] .swiper-button-next {
  display: none;
}

@media screen and (min-width: 769px) {
  .swiper[data-hide-arrows-mobile="true"] .swiper-button-prev,
  .swiper[data-hide-arrows-mobile="true"] .swiper-button-next {
    display: block;
  }
}

.swiper[data-hover-only-arrows="true"] .swiper-button-prev,
.swiper[data-hover-only-arrows="true"] .swiper-button-next {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.swiper[data-hover-only-arrows="true"]:hover .swiper-button-prev,
.swiper[data-hover-only-arrows="true"]:hover .swiper-button-next {
  opacity: 1;
}

/* Swiper Slide Visibility */
.swiper-slide:not(.swiper-slide-visible) .block-text {
  display: none;
}

/*--- Overlay Positioning ---*/

/* Shared positioning styles for imageBlock, slideshowBlock, and infoCardBlock */
.imageBlock.text-location-overlay .block-text,
.slideshowBlock .text-location-overlay .block-text,
.infoCardBlock.text-location-overlay .block-text,
.infoCardBlock .card-overlay-content {
  position: absolute;
  z-index: 2;
  padding: 0 15px;
}

/* Simplified Overlay Positioning - Vertical Only */
.imageBlock .overlay-top,
.slideshowBlock .overlay-top,
.card-overlay-content.overlay-top {
  top: 10px;
  left: 0;
  right: 0;
}

.imageBlock .overlay-center,
.slideshowBlock .overlay-center,
.card-image-wrap .card-overlay-content.overlay-center {
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
}

.imageBlock .overlay-bottom,
.slideshowBlock .overlay-bottom,
.card-overlay-content.overlay-bottom {
  bottom: 10px;
  left: 0;
  right: 0;
}

/*--- SECTION BLOCKS - Image Block ---*/

.imageBlock .section-block-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.imageBlock .block-image {
  position: relative;
  z-index: 1;
}

.imageBlock .full-width .block-image {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
}

.imageBlock .full-width .block-image img {
  max-width: none;
  height: auto;
}

.imageBlock .text-location-overlay .block-text {
  position: absolute;
  z-index: 2;
}

.imageBlock .block-text.align-left {
  text-align: left;
  align-items: flex-start;
}
.imageBlock .block-text.align-center {
  text-align: center;
  align-items: center;
}
.imageBlock .block-text.align-right {
  text-align: right;
  align-items: flex-end;
}

/*--- SECTION BLOCKS - Text Block ---*/

.textBlock .section-block-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.textBlock .block-text.align-left {
  text-align: left;
  align-items: flex-start;
}
.textBlock .block-text.align-center {
  text-align: center;
  align-items: center;
}
.textBlock .block-text.align-right {
  text-align: right;
  align-items: flex-end;
}

.textBlock .block-headline {
  margin-bottom: 1rem;
}

/*--- SECTION BLOCKS - Slideshow Block ---*/

.slideshowBlock .text-location-overlay .block-text {
  position: absolute;
  z-index: 2;
}

.slideshowBlock .block-text.align-left {
  text-align: left;
  align-items: flex-start;
}
.slideshowBlock .block-text.align-center {
  text-align: center;
  align-items: center;
}
.slideshowBlock .block-text.align-right {
  text-align: right;
  align-items: flex-end;
}

/*--- SECTION BLOCKS - Info Card Block ---*/

.info-card-block-content-wrap {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.card-image-wrap {
  position: relative;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-image-wrap {
  position: relative;
  width: 100%;
  display: block;
}

.card-text-wrap {
  padding: 1em;
  text-align: center;
}

/*--- SECTION BLOCKS - Heading Block ---*/

/* Full-width Heading Block - add padding to contain text */
.section-block-content-wrap.full-width .heading-block-content {
  padding-left: var(--content-padding-mobile);
  padding-right: var(--content-padding-mobile);
}

@media screen and (min-width: 960px) {
  .section-block-content-wrap.full-width .heading-block-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.heading-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.heading-pretitle,
.heading-number {
  margin: 0;
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.7;
}

.block-heading {
  font-size: var(--size-page-title);
  color: var(--color-page-title);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  scroll-margin-top: 100px; /* Offset for fixed header when anchor linking */
}

.block-summary {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 768px) {
  .block-heading {
    font-size: var(--size-page-title-mobile);
  }

  .block-summary {
    font-size: 1.125rem;
  }
}

/*--- SECTION BLOCKS - Contact Block ---*/

.contact-block {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: var(--grid-gap);
  align-items: stretch;
}

.contact-block.layout-form-right {
  flex-direction: column-reverse;
}

.contact-block.layout-form-left {
  flex-direction: column;
}

.contact-block.layout-form-right.mobile-form-first {
  flex-direction: column;
}

/* Desktop layout */
@media screen and (min-width: 960px) {
  .contact-block {
    flex-direction: row;
  }

  .contact-block.layout-form-right {
    flex-direction: row-reverse;
  }

  .contact-block.layout-form-right.mobile-form-first {
    flex-direction: row-reverse;
  }

  .contact-block.layout-form-left {
    flex-direction: row;
  }

  .contact-block .col-100 {
    flex: 0 0 100%;
  }
  .contact-block .col-70 {
    flex: 0 0 calc(70% - 1em);
  }
  .contact-block .col-66 {
    flex: 0 0 calc(66.6667% - 1em);
  }
  .contact-block .col-60 {
    flex: 0 0 calc(60% - 1em);
  }
  .contact-block .col-50 {
    flex: 0 0 calc(50% - 1em);
  }
  .contact-block .col-40 {
    flex: 0 0 calc(40% - 1em);
  }
  .contact-block .col-33 {
    flex: 0 0 calc(33.3333% - 1em);
  }
  .contact-block .col-30 {
    flex: 0 0 calc(30% - 1em);
  }
  .contact-block .col-25 {
    flex: 0 0 calc(25% - 1em);
  }
}

/* Vertical Alignment - Content positioning inside columns */
.contact-block.columns-top .contact-text,
.contact-block.columns-top .contact-form {
  justify-content: flex-start;
}

.contact-block.columns-center .contact-text,
.contact-block.columns-center .contact-form {
  justify-content: center;
}

.contact-block.columns-bottom .contact-text,
.contact-block.columns-bottom .contact-form {
  justify-content: flex-end;
}

/* Text Column with Background */
.contact-text {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.contact-text.has-background {
  padding: 2rem;
}

/* Form Column with Background */
.contact-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.contact-form.has-background {
  padding: 2rem;
}

.form-heading {
  margin: 0 0 1.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Freeform button styling - Override aggressive Freeform defaults with higher specificity */
.contact-form form[data-freeform] [data-freeform-controls] {
  display: block;
}

.contact-form form[data-freeform] [data-freeform-controls] > div {
  display: block;
  width: 100%;
}

.contact-form form[data-freeform] [data-freeform-controls] > div:first-child {
  display: none;
}

.contact-form form[data-freeform] [data-freeform-controls] > div button {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

/* Full-width Contact Block - add padding to columns */
.section-block-content-wrap.full-width .contact-block {
  gap: 0;
}

.section-block-content-wrap.full-width .contact-text {
  width: 100%;
  flex: 0 0 100%;
  padding-left: var(--content-padding-mobile);
  padding-right: var(--content-padding-mobile);
}

.section-block-content-wrap.full-width .contact-form {
  width: 100%;
  flex: 0 0 100%;
  padding-left: var(--content-padding-mobile);
  padding-right: var(--content-padding-mobile);
}

@media screen and (min-width: 960px) {
  .section-block-content-wrap.full-width .contact-block {
    gap: 0;
  }

  .section-block-content-wrap.full-width .contact-text {
    flex: 0 0 50%;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .section-block-content-wrap.full-width .contact-form {
    flex: 0 0 50%;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/*--- SECTION BLOCKS - Column Block ---*/

.column-block {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: var(--grid-gap);
  align-items: center;
}

/* Full-width Column Block - Image bleeds, text contained */
.section-block-content-wrap.full-width .column-block {
  gap: 0;
}

.section-block-content-wrap.full-width .column-image {
  width: 100%;
  flex: 0 0 100%;
}

.section-block-content-wrap.full-width .column-text {
  width: 100%;
  flex: 0 0 100%;
  padding-left: var(--content-padding-mobile);
  padding-right: var(--content-padding-mobile);
}

@media screen and (min-width: 960px) {
  .section-block-content-wrap.full-width .column-block {
    gap: 0;
  }

  .section-block-content-wrap.full-width .column-image {
    flex: 0 0 50%;
  }

  .section-block-content-wrap.full-width .column-text {
    flex: 0 0 50%;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.column-block.layout-image-right {
  flex-direction: column-reverse;
}

.column-block.layout-image-left {
  flex-direction: column;
}

.column-block.layout-image-right.mobile-image-first {
  flex-direction: column;
}

/* Desktop layout — layout direction based on field */
@media screen and (min-width: 960px) {
  .column-block.layout-image-right {
    flex-direction: row-reverse;
  }

  .column-block.layout-image-right.mobile-image-first {
    flex-direction: row-reverse;
  }

  .column-block.layout-image-left {
    flex-direction: row;
  }

  .column-block > .col-100 {
    flex: 0 0 100%;
  }
  .column-block > .col-70 {
    flex: 0 0 calc(70% - 1em);
  }
  .column-block > .col-66 {
    flex: 0 0 calc(66.6667% - 1em);
  }
  .column-block > .col-60 {
    flex: 0 0 calc(60% - 1em);
  }
  .column-block > .col-50 {
    flex: 0 0 calc(50% - 1em);
  }
  .column-block > .col-40 {
    flex: 0 0 calc(40% - 1em);
  }
  .column-block > .col-33 {
    flex: 0 0 calc(33.3333% - 1em);
  }
  .column-block > .col-30 {
    flex: 0 0 calc(30% - 1em);
  }
}

/* Column Text with Number */
.column-block:has(.has-column-number) {
  align-items: stretch !important;
}

.column-text.has-column-number {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding-top: 30px;
  padding-bottom: 30px;
}

.column-number {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1rem;
}

.column-text-content {
  margin-top: auto;
}

@media (max-width: 959px) {
  .column-number {
    font-size: 3rem;
  }
}

/*--- SECTION BLOCKS - List Block ---*/

.list-block-content-wrap {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.list-block {
  margin: 0;
  padding: 0;
}

.list-item {
  position: relative;
}

/* Borders - only when enabled */
.list-borders .list-item {
  border-bottom: 1px solid #eee;
}

.list-borders .list-item:last-child {
  border-bottom: none;
}

/* List Styling - Numbers */
.list-style-numbers {
  counter-reset: list-counter;
}

.list-style-numbers .list-item {
  counter-increment: list-counter;
}

.list-style-numbers .list-item-standard .list-heading,
.list-style-numbers .list-item-header {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
}

.list-style-numbers .list-item-standard .list-heading::before,
.list-style-numbers .list-item-header::before {
  content: counter(list-counter) ".";
  font-weight: bold;
  color: var(--color-link);
  flex-shrink: 0;
  min-width: 1.5em;
}

/* List Styling - Bullets */
.list-style-bullets .list-item-standard .list-heading,
.list-style-bullets .list-item-header {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
}

.list-style-bullets .list-item-standard .list-heading::before,
.list-style-bullets .list-item-header::before {
  content: "•";
  font-weight: bold;
  color: var(--color-link);
  flex-shrink: 0;
  min-width: 1em;
}

/* List Styling - Dashes */
.list-style-dashes .list-item-standard .list-heading,
.list-style-dashes .list-item-header {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
}

.list-style-dashes .list-item-standard .list-heading::before,
.list-style-dashes .list-item-header::before {
  content: "—";
  color: var(--color-link);
  flex-shrink: 0;
  min-width: 1em;
}

/* Standard List Mode */
.list-item-standard {
  padding: 1.5em 0;
}

.list-item-standard .list-heading {
  margin: 0 0 1em 0;
  font-size: 1.2em;
  font-weight: bold;
}

.list-item-standard .list-content {
  margin: 0;
}

/* Accordion Mode */
.list-accordion .list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5em 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.list-accordion .list-item-header:hover {
  background-color: #f9f9f9;
}

.list-accordion .list-heading {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
  flex: 1;
}

.list-accordion .accordion-icon {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--color-link);
  transition: transform 0.3s ease;
  min-width: 30px;
  text-align: center;
}

.list-accordion .list-item-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.list-accordion .list-item.active .list-item-content {
  max-height: 500px;
  padding-bottom: 1.5em;
}

.list-accordion .list-item.active .accordion-icon {
  transform: rotate(45deg);
}

.list-accordion .list-content {
  margin: 0;
  padding-top: 1em;
}

/* List Display Modes */
/* Row (default) - existing flex layout with marker and content side by side */
.list-display-row .list-item-standard,
.list-display-row .list-item-header {
  /* Uses existing flex layout from list-style-* rules above */
}

/* Stacked - symbol above heading above content */
.list-display-stacked .list-item-standard .list-heading {
  display: block;
  text-align: center;
}

.list-display-stacked .list-item-standard .list-heading::before {
  display: block;
  margin-bottom: 0.5em;
  text-align: center;
}

.list-display-stacked .list-item-standard .list-heading {
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
}

.list-display-stacked .list-content {
  text-align: center;
}

/* Dynamic styling note: 
   Custom styles for individual list blocks are applied via template <style> blocks
   using .section-block-content-{block.id} selectors for proper specificity */

/*--- SECTION BLOCKS - Grid Block ---*/

.grid-block-content-wrap {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.grid-block {
  display: flex;
  flex-wrap: wrap;
  gap: var(--grid-gap);
  align-items: flex-start;
}

/* Custom spacing overrides default gap */
.grid-block.custom-spacing {
  gap: var(--grid-gap);
  /* Gap values are set dynamically via template CSS */
}

/* Grid Item Base */
.grid-item {
  position: relative;
  display: flex;
  flex-direction: column;
  /* overflow: hidden removed to allow creative offsets to extend beyond bounds */
}

/* Width Classes - Mobile First */
.grid-col-100 {
  flex: 0 0 100%;
}

.grid-col-75 {
  flex: 0 0 100%;
}

.grid-col-70 {
  flex: 0 0 100%;
}

.grid-col-66 {
  flex: 0 0 100%;
}

.grid-col-60 {
  flex: 0 0 100%;
}

.grid-col-50 {
  flex: 0 0 100%;
}

.grid-col-40 {
  flex: 0 0 100%;
}

.grid-col-33 {
  flex: 0 0 100%;
}

.grid-col-30 {
  flex: 0 0 100%;
}

.grid-col-25 {
  flex: 0 0 100%;
}

/* Desktop Width Classes - Account for gap */
@media screen and (min-width: 768px) {
  .grid-col-75 {
    flex: 0 0 calc(75% - (var(--grid-gap) * 0.25));
  }

  .grid-col-70 {
    flex: 0 0 calc(70% - (var(--grid-gap) * 0.3));
  }

  .grid-col-66 {
    flex: 0 0 calc(66.6667% - (var(--grid-gap) * 0.3333));
  }

  .grid-col-60 {
    flex: 0 0 calc(60% - (var(--grid-gap) * 0.4));
  }

  .grid-col-50 {
    flex: 0 0 calc(50% - (var(--grid-gap) * 0.5));
  }

  .grid-col-40 {
    flex: 0 0 calc(40% - (var(--grid-gap) * 0.6));
  }

  .grid-col-33 {
    flex: 0 0 calc(33.3333% - (var(--grid-gap) * 0.6667));
  }

  .grid-col-30 {
    flex: 0 0 calc(30% - (var(--grid-gap) * 0.7));
  }

  .grid-col-25 {
    flex: 0 0 calc(25% - (var(--grid-gap) * 0.75));
  }
}

/* Vertical Alignment */
.grid-align-top {
  align-self: flex-start;
}

.grid-align-center {
  align-self: center;
}

.grid-align-bottom {
  align-self: flex-end;
}

/* Universal Block Link Wrapper - used by Grid, Info Card, and Image blocks */
.grid-item-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
  height: 100%;
}

.grid-item-link:hover {
  opacity: 0.85;
  text-decoration: none;
}

.grid-item-link:focus {
  outline: 2px solid var(--color-link, #007cba);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ensure proper spacing in linked blocks */
.grid-item-link .grid-image-wrap,
.grid-item-link .card-image-wrap,
.grid-item-link .block-image {
  margin-bottom: 1em;
}

.grid-item-link .card-image-wrap:last-child,
.grid-item-link .block-image:last-child {
  margin-bottom: 0;
}

/* Grid Content */
.grid-image-wrap {
  position: relative;
  width: 100%;
  display: block;
  margin-bottom: 1em;
}

.grid-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.grid-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.grid-text-wrap.align-left {
  text-align: left;
  align-items: flex-start;
}

.grid-text-wrap.align-center {
  text-align: center;
  align-items: center;
}

.grid-text-wrap.align-right {
  text-align: right;
  align-items: flex-end;
}

.grid-heading {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
  font-family: var(--font-heading);
  color: var(--color-headings);
  line-height: 1.2;
}

.grid-text-content {
  margin: 0;
}

.grid-text-content p:last-child {
  margin-bottom: 0;
}

.grid-cta {
  margin-top: 0.5em;
}

/* Image & Text Combined Layout */
.grid-item[data-item-id] .grid-image-wrap + .grid-text-wrap {
  margin-top: 1em;
}

/*--- SECTION BLOCKS - Gallery Block ---*/

.gallery-block-content-wrap {
  width: 100%;
  margin: 0 auto;
  max-width: var(--content-width);
  padding: 0 var(--content-padding-mobile);
}

@media screen and (min-width: 700px) {
  .gallery-block-content-wrap {
    padding: 0;
  }
}

/* Gallery Slideshow Styles */
.gallery-slideshow {
  position: relative;
}

.gallery-slideshow .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Single image slideshow mode - full width like regular slideshow */
.gallery-slideshow:not(.gallery-carousel) .swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Carousel mode - constrained height */
.gallery-slideshow.gallery-carousel .swiper-slide img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

/* Single Slide Mode - let Swiper handle positioning with fade effect */

/* Carousel Mode - center focus with faded adjacent slides */
.gallery-carousel .swiper-slide {
  width: auto;
  max-width: 80%;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.gallery-carousel .swiper-slide-active {
  opacity: 1;
}

.gallery-carousel .swiper-slide img {
  width: 100%;
  height: 60vh;
  max-height: 60vh;
  object-fit: cover;
}

/* Gallery Grid Styles */
.gallery-grid {
  position: relative;
}

.gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.gallery-grid img:hover {
  opacity: 0.9;
}

/* Lightbox Trigger Styles */
.gallery-lightbox-trigger {
  display: block;
  cursor: pointer;
  text-decoration: none;
}

.gallery-lightbox-trigger:hover {
  text-decoration: none;
}

/* Gallery Arrow Styles */
.gallery-arrow-prev,
.gallery-arrow-next {
  color: var(--color-link);
  transition: color 0.3s ease;
}

.gallery-arrow-prev:hover,
.gallery-arrow-next:hover {
  color: var(--color-link-hover);
}

.gallery-arrow-prev::after,
.gallery-arrow-next::after {
  display: none;
}

/* Gallery Pagination */
.gallery-pagination {
  margin-top: 20px;
}

/* Override Swiper's default absolute positioning for gallery pagination */
.gallery-slideshow .swiper-pagination {
  position: relative;
  bottom: auto;
  top: auto;
  left: auto;
  width: auto;
  margin-top: 20px;
}
