:root {
  --primary-color: #000;
  --hover-color: #222;
  --bg-color: #fff;
  --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nav-width: 25%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  /* Bootstrap 3 default */
  background-color: var(--bg-color);
  color: var(--primary-color);
  font-weight: 400;
  /* Original body inherits 400, giotheme only overwrites specific children to 300 */
  line-height: 1.42857143;
  /* Bootstrap 3 default */
  overflow-x: hidden;
  padding-top: 66px;
  /* Prevents overlap with fixed header, allows mobile-nav to push correctly */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:active {
  color: var(--hover-color);
}

p {
  font-weight: 300;
  margin-bottom: 1rem;
}

/* Typography styles matching original */
strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

/* ====== LAYOUT ARCHITECTURE ====== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 50px;
  /* Bootstrap navbar base */
  z-index: 200;
  padding: 0;
  /* Container fluid handles padding natively */
  align-items: center;
  display: flex !important;
  justify-content: space-between;
}

/* Added to perfectly track the original .container-fluid logic */
.site-header-container {
  padding-left: 0px;
  padding-right: 0px;
}

.navbar-brand {
  display: block;
  float: left;
  font-size: 1.75em;
  /* from giotheme */
  font-weight: 400;
  /* inherits natively, rendering bolder than nav */
  letter-spacing: 0.08em;
  /* HN all-caps title needs tracking to breathe */
  /*margin: 15px 0 0 0;*/
  /* From giotheme */
  padding: 15px 15px;
  /* From Bootstrap */
  line-height: 20px;
  /* From Bootstrap */
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  /*position: fixed;*/
  top: 26px;
  /* Original giotheme measurement */
  right: 1px;
  /* Original giotheme measurement - note that this may cause bounds to escape on small widths as noted by the user */
  background: transparent;
  border: none;
  border-radius: 10px;
  color: black;
  cursor: pointer;
  z-index: 1000;
  padding-right: 15px;
}


.mobile-toggle svg {
  width: 14px;
  height: 14px;
}

.mobile-toggle:hover {
  color: #666;
}

/* Main Container Layout */
.site-content {
  display: flex;
  margin-top: 0;
  /* Replaced margin with body padding so mobile-nav can push the document flow */
  min-height: calc(100vh - 66px);
}

/* Sidebar Navigation */
.sidenav-container {
  width: var(--nav-width);
  position: fixed;
  top: 66px;
  left: 0;
  height: calc(100vh - 50px);
  background: var(--bg-color);
  z-index: 100;
  padding-top: 20px;
  /* From giotheme.css */
  padding-left: 20px;
  /* From Bootstrap col-sm-2 */
  padding-right: 15px;
  /* From Bootstrap col-sm-2 */
}

.sidenav {
  list-style: none;
}

.sidenav li {
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  /* HN uppercase needs tracking — without it letterforms feel compressed */
  padding-bottom: 2px;
  padding-left: 20px;
  /* Giotheme.css explicitly set this on .sidenav > li */
}


/* Mobile Full-Screen Overlay Nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  /* top/right/bottom/left: 0 */
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.mobile-nav li {
  padding: 14px 0;
  list-style: none;
}

.mobile-nav li a {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.mobile-nav li a:hover {
  opacity: 0.5;
}

/* Close button — top-right corner */
.mobile-nav-close {
  position: absolute;
  top: 22px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--primary-color);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: opacity 0.2s ease;
}

.mobile-nav-close:hover {
  opacity: 0.5;
}

/* Main Content Area */
.main-content {
  margin-left: var(--nav-width);
  width: calc(100% - var(--nav-width));
  padding: 20px 15px 15px 15px;
  /* Top padding 20px aligns with side-nav padding-top 20px */
}

/* ====== EXHIBITIONS PAGE SPECIFIC ====== */
.exhibitions-list {
  list-style: none;
  padding-left: 0;
  /* Matches Bootstrap list-unstyled */
}

.exLink {
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 0.1em;
  /* Slightly less than nav — body context, not chrome context */
  display: inline-block;
  /* Required for transform on inline elements */
}

.sub-info {
  padding-bottom: 4px;
  margin: -4px 0 2px 8px !important;
  font-size: 12px;
  font-weight: 400;
}

/* ====== PRESS PAGE SPECIFIC ====== */
.press-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.press-thumb {
  width: 50%;
  padding: 0 15px;
  margin-bottom: 20px;
}

.press-thumb img {
  max-width: 100%;
  /* Changed from width: 100% to match native Giotheme logic */
  height: auto;
  padding: 10px;
  padding-bottom: 20px;
  transition: filter ease 0.6s, -webkit-filter ease 0.5s;
}

.press-thumb img:hover {
  filter: opacity(60%);
  -webkit-filter: opacity(60%);
}

/* ====== RESPONSIVE ====== */

/* Desktop & Tablet Extends */
@media (min-width: 768px) {
  .site-header-container {
    padding-left: 20px;
    padding-top: 15px;
  }

  .sidenav li {
    padding-left: 15px;
  }

  .mobile-nav {
    display: none !important;
  }
}

/* Mobile Extends */
@media (max-width: 768px) {
  .site-header {
    padding-top: 15px;
    background: linear-gradient(to bottom, #fff 80%, transparent);
    /* Padding is inside the element so gradient now covers the full header area */
  }
}

@media (max-width: 767px) {
  body {
    font-size: 70%;
    /* Scale all text down proportionally on mobile */
  }

  .sidenav-container {
    display: none;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 20px 15px;
    /* Restored the 15px left/right margins to match original Bootstrap container-fluid */
  }


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

  /* Specific mobile homepage behavior */
  body.home .sidenav-container {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    padding-top: 10px;
    padding-left: 0px;
  }

  body.home .mobile-toggle,
  body.home .mobile-nav {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .navbar-header {
    padding-left: 0px;
  }
}

/* Press Grid fix for tablet landscape to match Bootstrap col-md */
@media (max-width: 991px) and (min-width: 768px) {
  /* Kept 2 columns, but could adjust if original did */
}

/* ====== GALLERY SLIDER CAPTIONS ====== */
.slide-content-wrapper {
  display: inline-flex;
  max-height: 70vh;
  max-width: 90%;
}

.slide-content-wrapper img {
  max-height: 70vh;
  max-width: 100%;
  object-fit: contain;
}

.item-caption {
  position: absolute;
  right: 25px;
  /* Align with counter right */
  bottom: 45px;
  /* Slightly above the counter */
  z-index: 999;
  font-weight: 300;
  font-family: var(--font-family);
  font-size: 13px;
  color: #999;
  text-align: right;
}

/* ====== ANIMATIONS ====== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 1. Page content fade-in on load */
.main-content {
  animation: fadeIn 0.8s ease both;
}

/* 2. Sidenav items stagger in on load */
.sidenav li {
  animation: fadeInUp 0.5s ease both;
}

.sidenav li:nth-child(1) {
  animation-delay: 0.08s;
}

.sidenav li:nth-child(2) {
  animation-delay: 0.18s;
}

.sidenav li:nth-child(3) {
  animation-delay: 0.28s;
}

.sidenav li:nth-child(4) {
  animation-delay: 0.38s;
}

.sidenav li:nth-child(5) {
  animation-delay: 0.48s;
}

/* 5. Nav link underline slides in from left on hover */
.sidenav li a,
.mobile-nav li a {
  position: relative;
  display: inline-block;
}

.sidenav li a::after,
.mobile-nav li a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.sidenav li a:hover::after,
.mobile-nav li a:hover::after {
  transform: scaleX(1);
}

/* Active / current page: strikethrough, no hover underline */
.sidenav li.current-nav-item a,
.mobile-nav li.current-nav-item a {
  text-decoration: line-through;
  text-decoration-color: #222;
  pointer-events: none;
  /* Disable clicking the page you're already on */
}

.sidenav li.current-nav-item a::after,
.mobile-nav li.current-nav-item a::after {
  display: none;
  /* Suppress the hover underline animation entirely */
}

/* 6. Exhibition list links nudge right on hover */
.exLink {
  transition: transform 0.2s ease, color 0.2s ease;
}

.exLink:hover {
  transform: translateX(4px);
}