@font-face {
  font-family: "Poppins", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Space Mono", monospace;
  font-weight: 400;
  font-style: normal;
}

:root {
  --page-margin-default: 25px;
  --page-margin-mobile: 15px;

  --grey-95: #f2f2f2;
  --grey-90: #E6E6E6;
  --grey-85: #d9d9d9;
  --grey-80: #CCCCCC;
  --grey-75: #bfbfbf;
  --grey-60: #999999;
  --grey-50: #7F7F7F;
  --grey-40: #666666;
  --grey-30: #4d4d4d;
  --grey-20: #333333;
  --grey-10: #1A1A1A;
  --black: #000000;
  --white: #FFFFFF;

  --font-primary: "Space Mono", monospace;
  --font-secondary: "Poppins", sans-serif;
  --base-font-size: 14px;
  --base-line-height: 1.4em;
  --letter-spacing-default: 0.03em;

  --transition-fast: 0.1s ease;
  --transition-medium: 0.3s ease;

  --table-column-amount: 4;
  --header-height: 60px;
  --topbar-height: 30px;
  --sticky-top-offset: calc(var(--header-height) + var(--topbar-height) + 20px);


  --vh: 1vh;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  letter-spacing: var(--letter-spacing-default);
  line-height: var(--base-line-height);
  font-style: normal;
  background-color: var(--black);
  font-size: var(--base-font-size);
  color: var(--grey-90);
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.more-projects-links-container {
  margin: 50px var(--page-margin-default);
}

a {
  color: var(--grey-90);
  text-decoration: none;
  transition: color var(--transition-medium);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.site-content-wrapper,
.main {
  flex-grow: 1;
}

.wrapper{
  margin-top: 40px;
}

.contact-page-wrapper{
  text-align: center; max-width: 750px; margin: 50px auto

}


.main-content-area {
  padding-left: var(--page-margin-default);
  padding-right: var(--page-margin-default);
}


.grid {
  margin-top: 50px;
  overflow: hidden;
  margin-left: var(--page-margin-default);
  margin-right: var(--page-margin-default);
}

.grid:after {
  content: '';
  display: block;
  clear: both;
}

#filling-empty-space-childs {
  width: 205px;
  height: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--grey-90);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1em;
}

p {
  margin-bottom: 1em;
  font-family: var(--font-secondary);
}

div.text p {
  max-width: 750px;
  font-size: 28px;
  line-height: 1.1;
  margin-left: 0;
  margin-block-start: 0;
  margin-block-end: 0;
}

#aboutplus div.text p,
#element-item--full div.text p {
  font-size: var(--base-font-size);
  line-height: 1.21;
  padding-right: 20px;
  margin-block-end: 1em;
}

#aboutplus div.text p a,
#element-item--full div.text p a,
.projectDescription a {
  color: var(--grey-90);
  margin-right: 5px;
}

#element-item--full div.text p a:hover,
.projectDescription a:hover {
  color: var(--white);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 22 22' %3E%3Cpath d='M11,0.1C5,0.1,0.1,5,0.1,11S5,21.9,11,21.9S21.9,17,21.9,11S17,0.1,11,0.1z M17,14h-2V8.4l-9.3,9.3l-1.4-1.4L13.6,7H8V5h9V14z' fill='%2339ff14'/%3E%3C/svg%3E") 18 18, e-resize;
}

.button-group {
  position: fixed;
  z-index: 205;
  top: 0px;
  left: var(--page-margin-default);
  padding-top: 5px;
}

.button-group:after {
  content: '';
  display: block;
  clear: both;
}

.button {
  font-family: var(--font-primary);
  font-size: var(--base-font-size);
  font-weight: 400;
  color: var(--grey-60);
  background-color: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  text-transform: uppercase;
  height: 30px;
  line-height: 30px;
  transition: color var(--transition-medium);
  margin-right: 15px;
}

.button:last-child {
  margin-right: 0;
}

.button:hover {
  color: var(--grey-90);
}

.button.is-checked {
  color: var(--grey-90);
}

button#studioa {
  display: none;
}

/* Base style for filter/view buttons and dropdown triggers */
.filter-option,
.view-switch-button {
  font-family: var(--font-primary);
  font-size: 0.9em;
  color: var(--grey-75);
  background-color: transparent;
  border: 1px solid var(--grey-30);
  padding: 8px 15px;
  margin: 0; /* Margin will be handled by parent (.filter-controls.desktop-filters or .dropdown-wrapper) */
  cursor: pointer;
  border-radius: 17px;
  transition: background-color var(--transition-medium), color var(--transition-medium), border-color var(--transition-medium);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  position: relative;
}

.filter-count {
  color: var(--grey-60);
  font-size: 0.75em;
  vertical-align: super;
  margin-left: 6px;
}

.filter-option:hover,
.view-switch-button:hover {
  background-color: var(--grey-20);
  color: var(--white);
  border-color: var(--grey-30);
}

.filter-option.active,
.view-switch-button.active {
  background-color: var(--grey-20);
  color: var(--grey-75);
  border-color: var(--grey-40);
  width: fit-content;
}

/* Dropdown Specific Styles */
.dropdown-wrapper {
    position: relative;
    display: none; /* Hidden by default. Shown by media query on mobile. */
}
.dropdown-wrapper.filter-dropdown-wrapper {
    /* Mobile layout handled in media query */
}
.dropdown-wrapper.view-dropdown-wrapper {
    /* Mobile layout handled in media query */
}

.dropdown-trigger {
    /* Inherits .filter-option or .view-switch-button styles */
    justify-content: space-between;
    width: fit-content;
    min-width: 80px; /* Or adjust as needed */
    text-align: left;
    padding-right: 30px; /* Space for the arrow */
}
.dropdown-trigger-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.dropdown-arrow {
    width: 1em;
    height: 1em;
    margin-left: 8px;
    pointer-events: none;
    transition: transform 0.2s ease-in-out;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.dropdown-trigger[aria-expanded="true"] .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background-color: var(--black);
    border: 1px solid var(--grey-30);
    border-radius: 10px;
    padding: 5px;
    z-index: 10;
    min-width: 100%; /* Make menu at least as wide as its trigger */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.dropdown-wrapper.open .dropdown-menu {
    display: block;
}
.dropdown-menu .dropdown-option {
    display: block;
    width: 100%;
    text-align: left;
    margin: 0 0 2px 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: var(--font-primary);
    font-size: 0.9em;
    color: var(--grey-75);
    background-color: transparent;
    text-transform: uppercase;
}
.dropdown-menu .dropdown-option:last-child {
    margin-bottom: 0;
}
.dropdown-menu .dropdown-option:hover {
    background-color: var(--grey-30); /* Consistent hover */
    border-color: var(--grey-30);
    color: var(--white);
}
.dropdown-menu .dropdown-option.active {
    background-color: var(--grey-20); /* Consistent active */
    color: var(--white);
    border-color: var(--grey-50); /* Or var(--grey-40) to match button active */
}


button#info,
button#gallery,
button#close {
  font-family: var(--font-primary);
  font-size: var(--base-font-size);
  background-color: transparent;
  border: none;
  color: var(--grey-90);
  text-transform: uppercase;
  padding: 0;
  cursor: pointer;
  position: fixed;
  z-index: 300;
  transition: color var(--transition-medium);
}

button#info {
  bottom: 8px;
  left: var(--page-margin-default);
}

button#gallery {
  bottom: 8px;
  left: calc(var(--page-margin-default) + 60px);
}

button#close:hover {
  color: red;
}

button#imprint {
  font-family: var(--font-primary);
  font-size: var(--base-font-size);
  background: transparent;
  color: var(--grey-60);
  outline: none;
  border: none;
  padding: 0;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition-medium);
}
button#imprint:hover {
  color: var(--grey-90);
}

.site-header {
  padding: 10px var(--page-margin-default);
  color: var(--grey-90);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--grey-30);
  position: relative;
  font-size: 1em;
  text-transform: uppercase;
  height: 60px;
  flex-shrink: 0;
}

.site-branding .site-title {
  margin: 0;
  font-weight: 400;
}
.site-branding .site-title a {
  text-decoration: none;
  color: var(--grey-90);
}
.site-branding .site-title a:hover {
  color: var(--white);
}

.main-navigation .nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}

.main-navigation .nav-menu li {
  margin: 0 0 0 20px;
  position: relative;
}

.main-navigation .nav-menu li:first-child {
  margin-left: 0;
}

.main-navigation .nav-menu a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: var(--grey-75);
  transition: color var(--transition-medium);
}

.main-navigation .nav-menu a:hover,
.main-navigation .nav-menu a:focus {
  color: var(--white);
}

.main-navigation .nav-menu .current-menu-item > a,
.main-navigation .nav-menu .current-page-ancestor > a {
  color: var(--grey-90);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px 10px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  width: 40px;
  height: 40px;
}

.menu-toggle-icon {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1.5px;
  background-color: var(--grey-90);
  transform: translate(-50%, -50%);
  transition: background-color 0s 0.3s var(--transition-medium);
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--grey-90);
  transition: transform 0.3s var(--transition-medium), top 0.3s 0.3s var(--transition-medium);
}

.menu-toggle-icon::before {
  top: -6px;
}

.menu-toggle-icon::after {
  top: 6px;
}

.menu-toggle.toggled .menu-toggle-icon {
  background-color: transparent;
}

.menu-toggle.toggled .menu-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
  transition: top 0.3s var(--transition-medium), transform 0.3s 0.3s var(--transition-medium);
}

.menu-toggle.toggled .menu-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
  transition: top 0.3s var(--transition-medium), transform 0.3s 0.3s var(--transition-medium);
}

.row.single-page-hamburger {
    position: fixed;
    top: 15px;
    left: var(--page-margin-default);
    z-index: 1000;
}

#clickham {
  display: none;
  font-size: 28px;
  font-weight: 100;
  line-height: 1em;
  cursor: pointer;
  z-index: 1000;
  position: fixed;
  right: 0px;
  top: 6px;
  width: 40px;
  height: 40px;
}
input#hamburg[type="checkbox"] {
  display: none;
}
.line {
  position: absolute;
  right: 10px;
  height: 1px;
  width: 20px;
  background: var(--white);
  border-radius: 1px;
  display: block;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}
.line:nth-child(1) { top: 14px; }
.line:nth-child(2) { top: 18px; }
.line:nth-child(3) { top: 22px; }

#hamburg:checked ~ .hamburg .line:nth-child(1) { transform: translateY(4px) rotate(-45deg); }
#hamburg:checked ~ .hamburg .line:nth-child(2) { opacity: 0; }
#hamburg:checked ~ .hamburg .line:nth-child(3) { transform: translateY(-4px) rotate(45deg); }

.element-item {
  position: relative;
  float: left;
  padding: 10px;
  color: var(--grey-90);
  margin-bottom: 20px;
}

.element-item p {
  font-size: var(--base-font-size);
  line-height: var(--base-line-height);
}

#element-item--width2 {
  width: 100%;
  height: auto;
  padding-bottom: 30px;
}

#aboutplus {
  width: 50%;
  height: auto;
  padding-bottom: 30px;
}

#element-item--full {
  width: 100%;
  height: auto;
  padding-bottom: 10px;
  margin-bottom: 0;
}

.element-item#aboutplus.element-item--width2 {
  margin-top: -80px;
}

.element-item > * {
  margin: 0;
  padding: 0;
}

img.attachment-full.size-full.lazyloaded {
  width: 100%;
  height: auto;
  opacity: 1;
  transition: opacity var(--transition-fast);
  background-color: transparent;
}

img.attachment-full.size-full.lazyloaded:hover {
  opacity: 0.75;
}

.underImage {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5px;
  gap: 5px;
}

.underImage span {
  border: 1.2px solid var(--grey-40);
  border-radius: 17px;
  padding: 2px 10px;
  line-height: 1;
  color: var(--grey-40);
  font-size: 0.85em;
  display: inline-block;
}

.underImage span a {
  color: inherit;
  text-decoration: none;
}

.underImage span:hover,
.underImage span a:hover {
  color: var(--grey-90);
  border-color: var(--grey-75);
}

.underImage span:empty,
.underImage span a:empty {
  display: none;
}

div.element-item h2 a {
  color: var(--grey-90);
  font-weight: normal;
}

.attachment-post-thumbnail.size-post-thumbnail.wp-post-image.lazyloaded {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 var(--page-margin-default);
  margin-top: 50px;
  margin-bottom: 30px;
}

.filter-controls.desktop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.filter-controls.desktop-filters .filter-option { /* Ensure desktop buttons have their margin */
    margin: 0 5px 5px 0;
}

.view-controls.desktop-views {
  display: flex;
  gap: 5px;
}
.view-controls.desktop-views .view-switch-button { /* Ensure desktop buttons have their margin */
    margin: 0 5px 5px 0;
}


.project-table-container {
  width: calc(100% - (2 * var(--page-margin-default)));
  margin: 0 auto 40px auto;
}

.project-table-container.list-view .project-item-list-view { display: contents; }
.project-table-container.list-view .project-item-grid-view { display: none; }
.project-table-container.grid-view .project-item-list-view { display: none; }
.project-table-container.grid-view .project-item-grid-view { display: flex; }

.project-table-row-link.hide {
  display: none !important;
}

.project-table-container.list-view .project-table-header,
.project-table-container.list-view .project-item-list-view .project-table-row {
  display: flex;
  align-items: center;
  padding: 10px 5px;
  border-bottom: 1px solid var(--grey-30);
}

.project-table-container.list-view .project-table-header {
  color: var(--grey-60);
  text-transform: uppercase;
  font-size: 0.9em;
  font-weight: 400;
}

.project-table-container.list-view .project-item-list-view .project-table-row {
  color: var(--grey-85);
  transition: background-color var(--transition-medium), color var(--transition-medium);
}

.project-table-row-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-table-row-link:hover .project-item-list-view .project-table-row {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.project-table-container.list-view .project-col {
  box-sizing: border-box;
  line-height: 1.4;
  padding: 0 5px;
}
.project-table-container.list-view .project-col:first-child { padding-left: 0; }
.project-table-container.list-view .project-col:last-child { padding-right: 0; }


.project-table-container.list-view .project-col-year {
  width: 100px;
  flex-shrink: 0;
  color: var(--grey-50);
}
.project-table-container.list-view .project-col-project-title {
  width: calc((100% - 100px) / var(--table-column-amount) * 1.5);
  font-weight: 400;
  text-transform: uppercase;
}
.project-table-container.list-view .project-col-type {
  width: calc((100% - 100px) / var(--table-column-amount) * 0.8);
    color: var(--grey-50);
}
.project-table-container.list-view .project-col-client {
  width: calc((100% - 100px) / var(--table-column-amount) * 0.85);
    color: var(--grey-50);
}
.project-table-container.list-view .project-col-collab {
  width: calc((100% - 100px) / var(--table-column-amount) * 0.85);
    color: var(--grey-50);

}

.project-table-container.grid-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--page-margin-default);
  border-top: none;
}

.project-table-container.grid-view > .project-table-row-link:only-child {
  grid-column: 1 / -1;
}


.project-table-container.grid-view .project-table-header {
  display: none;
}

.project-table-container.grid-view .project-table-row-link {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 4px;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.project-table-container.grid-view .project-table-row-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-table-container.grid-view .project-item-grid-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-grid-item-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--grey-30);
  overflow: hidden;
}

.project-grid-item-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.project-table-container.grid-view .project-table-row-link:hover .project-grid-item-image-wrapper img {
  transform: scale(1.05);
}

.project-grid-item-content {
  padding: 15px;
  color: var(--grey-85);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-grid-item-title {
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--white);
  font-size: 1em;
  text-transform: uppercase;
}

.project-grid-item-title .project-grid-item-year {
  color: var(--grey-60);
  font-size: 0.9em;
  margin-left: 10px;
  font-weight: normal;
}

.project-table-container.grid-view .project-grid-item-type {
  font-size: 0.85em;
  color: var(--grey-75);
  background-color: var(--grey-20);
  width: fit-content;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s linear 0.2s;
}

.project-table-container.grid-view .project-table-row-link:hover .project-grid-item-type {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease-out 0.1s, transform 0.2s ease-out 0.1s, visibility 0s linear 0.1s;
}

.projectDescription {
  font-size: var(--base-font-size);
  line-height: 1.21;
  padding: 20px var(--page-margin-default);
}

.projectDescription h1 {
  font-size: 1.5em;
  line-height: 1.3;
  font-weight: 400;
  text-decoration: none;
  margin-bottom: 15px;
}


.front-page-intro-content {
  font-family: var(--font-secondary);
  font-size: 33px;
  line-height: 1.2;
  max-width: 750px;
  margin: 120px auto;
  padding-left: var(--page-margin-default);
  padding-right: var(--page-margin-default);
  text-align: center;
}

.show-all-projects-container {
  margin-left: auto;
  margin-right: auto;
  display: block;
  width: fit-content;
  border: 1px solid var(--grey-30);
  padding: 8px 15px;
  border-radius: 17px;
  text-align: center;
  transition: background-color var(--transition-medium), color var(--transition-medium), border-color var(--transition-medium);
}

.show-all-projects-container a {
  color: var(--grey-75);
  text-transform: uppercase;
  font-size: 0.9em;
}

.show-all-projects-container:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--grey-60);
}
.show-all-projects-container:hover a {
  color: var(--white);
}

.error-page-content,
.page-content-wrapper {
  padding: 50px var(--page-margin-default);
}

.page-title-heading {
  font-size: 2em;
  margin-bottom: 20px;
  color: var(--grey-90);
}

.error-page-content a,
.page-content-wrapper a {
  color: var(--grey-90);
  text-decoration: underline;
}
.error-page-content a:hover,
.page-content-wrapper a:hover {
  color: var(--white);
}

div#social {
  position: fixed;
  bottom: 10px;
  right: var(--page-margin-default);
  z-index: 100;
}

div#social a {
  color: var(--grey-75);
  text-decoration: none;
  padding-left: 10px;
}
div#social a:first-child {
  padding-left: 0;
}
div#social a:hover {
  color: var(--white);
}

#loadinggraphic {
  height: calc(var(--vh, 1vh) * 100);
  width: 100vw;
  background-color: var(--black);
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

#topbar {
  width: 100vw;
  height: 30px;
  position: fixed;
  top: 0;
  left: 0;
  padding: 6px var(--page-margin-default) 5px var(--page-margin-default);
  z-index: 200;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

div#imprinttitle {
  text-align: center;
  text-transform: uppercase;
  color: var(--grey-60);
  margin-bottom: 30px;
  font-size: 1.2em;
}


/* Styles for Single Post/Project Page (single.php) - Flickity Slider Version */
#singlewrapper {
    color: var(--white);
    width: 100%;
    padding-bottom: 50px;
}

.project-layout-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 var(--page-margin-default);
    position: relative;
}

.project-slider-column {
    width: 66.66%;
    padding-right: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.project-info-column {
    width: 33.33%;
    padding-left: 20px;
    box-sizing: border-box;
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--header-height) + var(--topbar-height) + 20px);
    height: 100%;
    overflow-y: auto;
    align-self: flex-start;
}

#carousel-box {
    width: 100%;
    overflow: hidden; /* Crucial for aspect-ratio to work with content */
    position: relative;
    background-color: var(--black); /* Fallback if images don't load */
    /* aspect-ratio is set via inline style from PHP (e.g., 3 / 2 or 16 / 9) */
}

.main-carousel { /* Flickity's initialized element */
    width: 100%;
    height: 100%; /* This will make it fill #carousel-box */
}

#carousel-box .flickity-viewport {
    width: 100%;
    height: 100% !important; /* Make viewport fill .main-carousel */
    position: static !important; /* Override Flickity's potential relative positioning if it causes issues */
    overflow: hidden; /* Ensure no overflow from viewport */
}

#carousel-box .carousel-cell {
    width: 100%;
    height: 100%; /* Make cells fill the viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Prevent content from spilling out of cell */
    margin-right: 0; /* Flickity handles cell spacing */
}

#carousel-box .carousel-cell picture,
#carousel-box .carousel-cell img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;   /* Allow image to scale based on its aspect ratio within cell bounds */
    height: auto;  /* Allow image to scale based on its aspect ratio within cell bounds */
    object-fit: contain; /* Ensures the entire image is visible within the cell, letterboxed if necessary */
}

.carousel-meta-container {
    font-family: var(--font-primary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 15px;
    padding: 5px 0;
    width: 100%;
}

.project-meta-info {
    color: var(--grey-60);
    text-transform: uppercase;
    margin-right: 15px;
    flex-grow: 1;
    text-align: left;
    font-size: 0.9em;
}

.custom-pagination-counter {
    color: var(--white);
    font-family: sans-serif;
    user-select: none;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
    font-size: 0.9em;
}

.flickity-page-dots {
    display: none !important;
}

.project-text {
    max-width: 100%;
}

.project-text .project-title-single {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-size: 1.5em;
    line-height: 1.3;
    color: var(--white);
    text-transform: uppercase;
}

#project-text-wrapper {
  color: var(--grey-85);
}

#project-text-wrapper p {
    margin-bottom: 1em;
    margin-top: 1em;
    line-height: var(--base-line-height);
    font-family: var(--font-secondary);
}

#project-text-wrapper a {
  color: lightblue;
  text-decoration: underline;
}
#project-text-wrapper a:hover {
  color: var(--white);
}

footer.site-footer {
  padding: 20px var(--page-margin-default);
  text-align: center;
  color: var(--grey-60);
  font-size: 0.9em;
  flex-shrink: 0;
  border-top: 1px solid var(--grey-30);
  margin-top: 40px;
}

a.footer-imprint-link.filter-option {
  margin-right: 10px;
}

.footer-content-left {
  width: fit-content;
  float: left;
}

.footer-content-right {
  width: fit-content;
  float: right;
  padding-top: 5px;
}

.site-footer-social-links{
  color: var(--grey-30)
}

.site-footer-social-links a{
  margin-right: 20px;
  text-transform: uppercase;
}

@media (max-width: 992px) {
    .project-slider-column,
    .project-info-column {
        width: 100%!important;
        padding-left: 0;
        padding-right: 0;
    }
    .project-slider-column {
        margin-bottom: 30px;
    }
    .project-info-column {
        position: static;
        height: auto;
        overflow-y: visible;
        margin-top: 0;
    }
}


@media (max-width: 950px) {
  .project-table-container.grid-view {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-table-container.grid-view > .project-table-row-link:only-child {
    grid-column: 1 / -1;
  }

  #aboutplus div.text p,
  #element-item--full div.text p {
    padding-right: 20px;
    max-width: none;
  }

  #aboutplus {
    width: 100%;
    max-width: none;
  }

}


@media (max-width: 768px) { /* Mobile Breakpoint */
  :root {
    --page-margin-default: 20px; /* Mobile page margin */
    --header-height: 50px; /* Mobile header height */
    --sticky-top-offset: calc(var(--header-height) + 10px); 
  }

  .site-header {
    padding: 10px var(--page-margin-default);
    height: var(--header-height);
  }

  .menu-toggle { 
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-navigation .nav-menu { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--black);
    border-top: 1px solid var(--grey-30);
    border-bottom: 1px solid var(--grey-30);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 0;
  }

  .main-navigation.toggled .nav-menu {
    display: block;
  }

  .main-navigation .nav-menu li {
    display: block;
    margin: 0;
    width: 100%;
  }

  .main-navigation .nav-menu li a {
    padding: 12px var(--page-margin-default);
    border-bottom: 1px solid var(--grey-30);
    color: var(--grey-90);
  }
  .main-navigation .nav-menu li:last-child a {
    border-bottom: none;
  }
  .main-navigation .nav-menu a:hover,
  .main-navigation .nav-menu a:focus {
    background-color: rgba(255,255,255,0.05);
  }

  /* Mobile Filter/View Controls */
  .top-controls-bar {
     align-items: center; 
  }

  .filter-controls.desktop-filters,
  .view-controls.desktop-views {
      display: none !important; 
  }
  
  .dropdown-wrapper.filter-dropdown-wrapper,
  .dropdown-wrapper.view-dropdown-wrapper {
      display: inline-flex; 
  }
  
  .dropdown-wrapper.filter-dropdown-wrapper {
      flex-grow: 1; 
      margin-right: 10px; 
  }
  .dropdown-wrapper.view-dropdown-wrapper {
      flex-shrink: 0; 
  }

  .dropdown-trigger {
    font-size: 0.85em;
    padding: 6px 12px;
    padding-right: 28px; 
  }
  .dropdown-arrow {
    width: 0.8em;
    height: 0.8em;
  }
  .dropdown-menu {
    min-width: 100%; 
  }


  .project-table-container.list-view {
    width: calc(100% - (2 * var(--page-margin-default)));
  }
  .project-table-container.list-view .project-table-row {
    padding: 10px 0;
  }
  .project-table-container.list-view .project-col {
    padding: 5px;
  }
  .project-table-container.list-view .project-col-year {
    width: 25% !important;
    padding-left: 0;
  }
  .project-table-container.list-view .project-col-project-title {
    width: 75% !important;
    padding-right: 0;
  }
  .project-table-container.list-view .project-col-type,
  .project-table-container.list-view .project-col-client,
  .project-table-container.list-view .project-col-collab {
    display: none !important;
  }

  .front-page-intro-content {
    font-size: 28px;
    margin: 80px auto;
  }

  #singlewrapper {
    padding-bottom: 30px;
  }
  .project-text .project-title-single {
    font-size: 1.3em;
  }

   /* #carousel-box .flickity-viewport height for mobile was here, but now relying on aspect-ratio */

}

@media (max-width: 600px) {
  .project-table-container.grid-view {
    grid-template-columns: 1fr;
    gap: var(--page-margin-default);
  }
  .project-table-container.grid-view > .project-table-row-link:only-child {
    grid-column: auto;
  }

  div.text p {
    font-size: 22px;
    line-height: 1.2;
  }
}


@media (max-width: 480px) {
    .carousel-meta-container {
        display: flex;
    }
    .project-meta-info {
        margin-right: 0;
        margin-bottom: 5px;
        text-align: left; /* Changed from center for consistency */
        width: calc(100% - 40px);
    }
    .custom-pagination-counter {
        text-align: right; /* Changed from center */
        width: 30px;
        margin-bottom: 10px;
    }
}


@media (max-width: 500px) {
  :root {
    --page-margin-default: var(--page-margin-mobile);
    --base-font-size: 12px;
  }

  body {
    font-size: var(--base-font-size);
  }

  .site-header {
    padding: 15px var(--page-margin-default);
  }

  .filter-option.active, .view-switch-button.active{
    background-color: var(--grey-10);
    border-color: var(--grey-20)
  }

  /* #carousel-box .flickity-viewport height for very small mobile was here, relying on aspect-ratio now */


  .grid {
    margin-top: 30px;
    margin-left: var(--page-margin-default);
    margin-right: var(--page-margin-default);
  }

  .element-item {
    width: 100%;
    padding: 5px;
  }

  .element-item--width2,
  #element-item--full,
  #aboutplus {
    width: 100% !important;
    height: auto;
    padding-bottom: 20px;
  }
  #element-item--full {
    padding-bottom: 10px;
  }

  .element-item#aboutplus.element-item--width2 {
    margin-top: -61px;
  }

  div.text p {
    font-size: 20px;
    line-height: 1.25;
  }

  .footer-content-left,
  .footer-content-right{
    text-align: center;
    width: 100%;
  }

  .footer-content-right{
      padding-top: 15px;
  }

  #aboutplus div.text p,
  #element-item--full div.text p {
    font-size: var(--base-font-size);
    line-height: 1.3;
    padding-right: 10px;
  }

  .button-group {
    left: var(--page-margin-default);
  }
  .button {
    font-size: var(--base-font-size);
    height: 28px;
    line-height: 28px;
    margin-right: 10px;
  }

  #clickham {
    visibility: visible;
    display: block;
    right: var(--page-margin-default);
    top: 5px;
  }

 

  .page-title-heading {
    font-size: 1.5em;
    margin-left: 0;
    margin-top: 30px;
  }
  .error-page-content,
  .page-content-wrapper {
    padding-top: 30px;
  }

  div#social {
    right: var(--page-margin-default);
    bottom: 5px;
  }
  div#social a {
    padding-left: 8px;
  }

  .front-page-intro-content {
    font-size: 22px;
    margin: 60px auto;
  }

  .show-all-projects-container {
    padding: 6px 12px;
  }
  .show-all-projects-container a {
    font-size: 0.9em;
  }

  .projectDescription {
    padding-left: var(--page-margin-mobile);
    padding-right: var(--page-margin-mobile);
  }

  .top-controls-bar {
      align-items: center;
  }
  .dropdown-wrapper.filter-dropdown-wrapper {
      flex-grow: 1;
      margin-right: 5px;
  }
   .dropdown-wrapper.view-dropdown-wrapper {
      flex-shrink: 0;
  }
  .dropdown-trigger {
    font-size: 0.8em;
    padding: 10px 15px; /* Increased padding from 5px 10px */
    padding-right: 25px;
  }

}

@media only screen and (min-width: 500px) {
  .element-item {
    width: 50%;
  }

  #element-item--width2 {
    width: 100%;
    height: auto;
    padding-bottom: 25px;
  }

  #element-item--full {
    width: 100%;
    height: auto;
    padding-bottom: 10px;
  }

  .projectDescription {
    font-size: var(--base-font-size);
    line-height: 1.21;
  }

  .projectDescription h1 {
    font-size: var(--base-font-size);
    line-height: 1.21;
    font-weight: 400;
    text-decoration: underline;
  }

}

/* Desktop Styles for Top Controls */
@media only screen and (min-width: 769px) { 
    .filter-controls.desktop-filters,
    .view-controls.desktop-views {
        display: flex; 
    }
    .dropdown-wrapper.filter-dropdown-wrapper,
    .dropdown-wrapper.view-dropdown-wrapper {
        display: none !important; 
    }
    .top-controls-bar {
        flex-direction: row; 
        align-items: flex-start; 
    }
    .filter-controls.desktop-filters {
        margin-bottom: 0;
        width: auto;
        justify-content: flex-start;
        flex-grow: 0;
        margin-right: 0;
    }
    .view-controls.desktop-views {
        align-self: flex-start;
        width: auto;
        justify-content: flex-end;
    }
}


@media only screen and (min-width: 950px) {
  #aboutplus div.text p,
  #element-item--full div.text p {
    padding-right: 50px;
    max-width: 500px;
  }

  #aboutplus {
    width: 50%;
    max-width: 500px;
  }

  .flickCaption {
    display: inline;
  }
  .flickCaption span {
    display: inline;
  }

  .grid {
    margin-top: 60px;
  }
}



/* Styles for the Cookie Consent Banner */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--grey-10); /* Dark background from your theme */
  color: var(--grey-70); /* Light text from your theme */
  padding: var(--page-margin-mobile); /* Use mobile margin for padding */
  z-index: 9999; /* High z-index to appear above other content */
  transform: translateY(100%); /* Initially hidden below screen */
  transition: transform 0.5s ease-in-out;
  font-family: var(--font-secondary); /* Poppins for banner text */
  font-size: 13px; /* Slightly smaller for banner text */
  line-height: 1.5;
  border-top: 1px solid var(--grey-30);
}

.cookie-consent-banner.is-visible {
  transform: translateY(0); /* Slide in from bottom */
}

.cookie-consent-content {
  max-width: 900px; /* Adjust max-width as desired */
  margin: 0 auto;
  display: flex;
  flex-direction: column; /* Stack main panel and preferences panel */
}

.cookie-consent-main {
  /* Styles for the initially visible part of the banner */
}

.cookie-consent-title {
  font-family: var(--font-secondary); /* Space Mono for title */
  font-size: 1.2em; /* Relative to banner's base font size */
  color: var(--white);
  margin-top: 0;
  margin-bottom: 0.75em;
}

.cookie-consent-text {
  margin-bottom: 1em;
  color: var(--grey-85);
}

.cookie-consent-text .cookie-consent-link {
  color: var(--grey-75); /* Link color within banner text */
  text-decoration: underline;
  transition: color var(--transition-medium);
}
.cookie-consent-text .cookie-consent-link:hover {
  color: var(--white);
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on small screens */
  gap: 10px; /* Space between buttons */
  margin-top: 15px;
}

/* Base style for all buttons in the cookie banner */
.cookie-consent-button {
  font-family: var(--font-primary); /* Space Mono */
  font-size: 0.9em; /* Consistent with your .filter-option */
  color: var(--grey-75);
  background-color: transparent;
  border: 1px solid var(--grey-30);
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 17px; /* Consistent with your .filter-option */
  transition: background-color var(--transition-medium), color var(--transition-medium), border-color var(--transition-medium);
  line-height: 1.2;
  text-transform: uppercase;
  margin: 0; /* Reset any inherited margin */
  text-decoration: none; /* Ensure no underline if used as <a> */
  display: inline-block; /* Or inline-flex if aligning items inside */
  text-align: center;
}

.cookie-consent-button:hover {
  background-color: rgba(255, 255, 255, 0.1); /* Subtle hover */
  color: var(--white);
  border-color: var(--grey-60);
}

/* Primary action button style (e.g., Accept All, Save Preferences) */
.cookie-consent-button.primary,
#cookieAcceptAll, 
#cookieAcceptAllFromPrefs, 
#cookieSavePrefs {
  background-color: var(--grey-30); /* A slightly more prominent background */
  color: var(--white);
  border-color: var(--grey-40); /* Slightly darker border for primary */
}
#cookieAcceptAll:hover, 
#cookieAcceptAllFromPrefs:hover, 
#cookieSavePrefs:hover {
   background-color: var(--grey-40); /* Darken on hover */
   border-color: var(--grey-50);
}

/* Secondary button style (e.g., Cookie Settings) */
.cookie-consent-button.secondary,
#cookieShowPrefs {
  /* Uses the default .cookie-consent-button style which matches .filter-option */
}

/* Tertiary button style (e.g., Reject Non-Essential) */
.cookie-consent-button.tertiary,
#cookieRejectNonEssential {
  background-color: transparent;
  border: 1px solid var(--grey-40); /* Slightly more visible border than default */
  color: var(--grey-75);
}
#cookieRejectNonEssential:hover {
  background-color: rgba(255, 255, 255, 0.05); /* Very subtle hover */
  border-color: var(--grey-60);
  color: var(--white);
}


/* Preferences Panel Styles */
.cookie-consent-preferences {
  border-top: 1px solid var(--grey-30);
  margin-top: var(--page-margin-mobile);
  padding-top: var(--page-margin-mobile);
  /* display: none; /* Initially hidden, JS will show it */
}

#cookieConsentBannerTitle{
  font-family: var(--font-secondary);
  text-transform: uppercase;
}

.cookie-preferences-title {
  font-family: var(--font-secondary);
  text-transform: uppercase;
  font-size: 1em;
  color: var(--white);
  margin-top: 0;
  margin-bottom: 0.5em;
}
.cookie-preferences-text {
  font-size: 0.9em;
  margin-bottom: 1em;
  color: var(--grey-80);
}

.cookie-preference-category {
  margin-bottom: 1em;
  padding: 10px;
  background-color: rgba(0,0,0,0.1); /* Slightly different background for category boxes */
  border: 1px solid var(--grey-30);
  border-radius: 8px;
}
.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  cursor: pointer; /* If you want to make the header clickable to toggle description */
  font-family: var(--font-secondary);
  text-transform: uppercase;
}
.cookie-category-label {
  font-family: var(--font-primary);
  color: var(--grey-90);
  font-size: 1em;
  flex-grow: 1;
}
.cookie-category-description {
  color: var(--grey-75);
  margin-bottom: 0;
  margin-top: 5px;
}

/* Toggle Switch Styles */
.cookie-category-toggle {
  opacity: 0; /* Hide actual checkbox */
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-switch-display {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  background-color: var(--grey-40); /* Off state */
  border-radius: 10px;
  transition: background-color 0.3s;
  cursor: pointer;
  flex-shrink: 0; /* Prevent shrinking in flex layout */
}
.toggle-switch-display::before { /* The slider knob */
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}
.cookie-category-toggle:checked + .toggle-switch-display {
  background-color: var(--grey-60); /* Active color - can be a brand color */
}
.cookie-category-toggle:checked + .toggle-switch-display::before {
  transform: translateX(20px);
}
.cookie-category-toggle:disabled + .toggle-switch-display { /* Style for disabled (Necessary) */
  background-color: var(--grey-30); /* Dimmer background */
  cursor: not-allowed;
}
.cookie-category-toggle:disabled + .toggle-switch-display::before {
  background-color: var(--grey-50); /* Dimmer knob */
}

.cookie-preferences-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Responsive adjustments for banner buttons */
@media (max-width: 768px) {
  .cookie-consent-actions, 
  .cookie-preferences-actions {
      flex-direction: column; /* Stack buttons on smaller mobile */
  }
  .cookie-consent-actions .cookie-consent-button,
  .cookie-preferences-actions .cookie-consent-button {
      width: 100%; /* Full width buttons */
  }
  .cookie-consent-content {
      padding-bottom: 15px; /* Extra padding at bottom if buttons stack */
  }
}
