/* Base styles for the header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--text-link-orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-height);
}

.sitename {
  font-size: 1.5rem;
  font-weight: bold;
  color: #000000 !important; /* Always black regardless of theme */
  text-decoration: none;
  transition: color 0.3s ease;
}

.sitename:hover {
  color: #ffffff !important; /* Always white on hover in both themes */
}

/* Apply padding to body to prevent content from sitting behind header */
body {
  padding-top: var(--header-height);
  min-height: 100vh;
  position: relative;
}

/* Desktop Navigation */
.desktop-nav {
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: black;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}

/* Remove right padding from last navigation item */
.nav-links li:last-child a {
  padding-right: 1rem;
}

/* Adjust the underline for the last item to match the padding */
.nav-links li:last-child a::after {
  right: 1rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: black;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-links a.active {
  background-color: transparent;
  color: black;
  font-weight: 600;
  margin-left: 0;
}

/* Keep the underline animation for active items */
.nav-links a.active::after {
  transform: scaleX(1); /* Show underline by default for active items */
}

/* Mobile Navigation */
.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
  width: 32px;
  height: 32px;
  position: relative;
  margin-left: 1rem;
  padding: 0;
}

.burger-bar {
  display: block;
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: black;
  left: 5px;
  transition: 0.3s ease;
}

.burger-bar:nth-child(1) { top: 10px; }
.burger-bar:nth-child(2) { top: 15px; }
.burger-bar:nth-child(3) { top: 20px; }

.mobile-nav {
  position: fixed;
  top: 0;
  right: -110vw;
  width: 100%;
  height: 100vh;
  background-color: var(--text-link-orange);
  padding: 0;
  transition: all 0.3s ease-in-out;
  z-index: 1001;
  visibility: hidden;
  overflow: hidden;
}

.mobile-nav nav {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding: 0 2rem;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(30px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.mobile-nav li {
  margin: 0;
}

/* Mobile Navigation Links */
.mobile-nav a {
  display: inline-block;
  color: black;
  text-decoration: none;
  font-size: 1.75rem;
  padding: 0.35rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background-color: black;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

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

.mobile-nav a.active {
  background-color: transparent;
  color: black;
  font-weight: 600;
}

.mobile-nav a.active::after {
  transform: scaleX(1);
}

/* Animation for burger menu */
.burger-menu.active .burger-bar:nth-child(1) {
  transform: rotate(45deg);
  top: 15px;
}

.burger-menu.active .burger-bar:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-bar:nth-child(3) {
  transform: rotate(-45deg);
  top: 15px;
}

/* Media Queries */
@media screen and (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }

  .burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-left: 1rem;
  }

  .burger-menu:hover,
  .burger-menu:active {
    background: none;
    box-shadow: none;
    transform: none;
  }

  .header-container {
    padding: 0.75rem 1rem;
  }

  .site-header .header-container .burger-menu {
    display: block !important;
    position: relative !important;
    width: 32px !important;
    height: 32px !important;
    margin-left: 1rem !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    z-index: 1002 !important;
  }

  .site-header .header-container .burger-menu .burger-bar {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background-color: black !important;
  }
}

@media (max-width: 600px) {
  .header-container {
    padding: 0.5rem 1rem;
  }

  .sitename {
    font-size: 1.2rem;
  }
}

/* WRAPPER */
.wrapper {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1140px) 1fr;
  gap: 20px;
  padding-top: calc(var(--header-height) + 20px); /* Keep top padding for header */
  margin-top: 0;
  transition: transform 0.3s ease-in-out;
  transform: translateX(0);
}

.wrapper > * {
  grid-column: 2;
}

/* MAIN CONTENT */
main {
  margin-bottom: 50px; /* Keep bottom margin for footer space */
  width: 100%;
}

/* Remove padding from main on homepage */
.homepageBg main {
  padding: 0;
}

.alignCenter {
  text-align: center;
}

/* HOMEPAGE GRID */
.intro {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 20px;
}

.div1 { grid-area: 1 / 1 / 2 / 6; }
.div2 { grid-area: 2 / 1 / 6 / 4; }
.div3 { grid-area: 2 / 4 / 4 / 6; }

.intro img, .gallery img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.intro p:first-child {
  margin-top: 0;
}

.intro p:first-of-type::first-letter {
  font-size: 3rem;
  float: left;
  margin-right: 0.2em;
  line-height: 1;
}

/* GALLERY GRID */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 1fr;
  gap: 20px;
}

.gallery-div1 { grid-area: 1 / 1 / 2 / 2; }
.gallery-div2 { grid-area: 1 / 2 / 2 / 3; }
.gallery-div3 { grid-area: 1 / 3 / 2 / 4; }
.gallery-div4 { grid-area: 1 / 4 / 2 / 5; }
.gallery-div5 { grid-area: 1 / 5 / 2 / 6; }

/* Grid layouts for events, blog, and shop */
.events-grid,
.shop-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column by default */
  gap: 2rem;
  margin-top: 2rem;
  padding: 1rem;
}

/* Common item styles */
.events-item,
.shop-item {
  padding: 1rem;
  text-align: center;
}

/* Image containers */
.events-image {
  width: 100%;
  max-width: 400px;
  height: 250px;
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.events-image img,
.shop-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.shop-item img {
  max-width: 400px;
  height: 300px;
  margin: 0 auto;
  display: block;
}

/* Tablet and up (≥ 768px) */
@media screen and (min-width: 768px) {
  .events-grid,
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    padding: 1.5rem;
  }

  .events-image {
    width: 400px;
  }
}

/* Desktop (≥ 1024px) */
@media screen and (min-width: 1024px) {
  .events-grid,
  .shop-grid {
    padding: 2rem;
  }
}

/* FOOTER */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--background-color-transparent);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

/* Footer Navigation */
footer nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

footer nav a {
  color: var(--font-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}

/* Add specific style for email link */
footer nav a.wowLink {
  color: var(--text-link-orange);
}

footer nav a.wowLink i {
  color: var(--text-link-orange);
}

footer nav a.wowLink:hover {
  color: var(--text-link-hover);
}

footer nav a.wowLink:hover i {
  color: var(--text-link-hover);
}

footer nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background-color: var(--font-color);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

footer nav a:hover::after {
  transform: scaleX(1);
}

/* Footer Navigation */
footer nav a i {
  margin-right: 0.5rem;
}

/* Media Queries */
@media (max-width: 600px) {
  footer {
    padding: 0.5rem 1rem;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  footer span {
    font-size: 0.875rem;
  }

  footer nav a {
    font-size: 0.875rem;
    padding: 0.35rem 0.75rem;
  }

  footer nav ul {
    gap: 1rem;
  }

  footer nav i {
    font-size: 0.875rem;
    margin-right: 0.35rem;
  }
}

/* Content transition styles */
.wrapper.slide-out {
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}

/* Open state */
.mobile-nav.open {
  right: 0;
  visibility: visible;
}

.mobile-nav.open ul {
  transform: translateX(0);
  opacity: 1;
}

/* Footer Navigation Icons */
.fa-brands,
.fa-solid {
  font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free" !important;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.fa-linkedin:before {
  content: "\f08c";
}

.fa-envelope:before {
  content: "\f0e0";
}

/* Image containment for events and blog posts */
.wrapper img {
  width: 100%;
  height: auto;
  display: block;
  margin: 2rem 0;
  border-radius: 8px;
}

/* Special handling for grid images */
.events-grid img,
.blog-grid img,
.work-grid img {
  margin: 0;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Mobile controls container */
.mobile-controls {
  display: none;
  align-items: center;
}

@media (max-width: 1024px) {
  .mobile-controls {
    display: flex;
  }
  
  .desktop-nav {
    display: none;
  }
}

/* Main content container */
.content-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Ensure consistent content width for articles */
article {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Ensure markdown content has consistent width */
.markdown-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Comment out blog and events specific CSS */
/*
.blog-grid {
  // CSS for blog grid
}

.events-grid {
  // CSS for events grid
}
*/