/* Custom overrides for sub-buttons only (in .section.main) */
.section.main .button {
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

/* ==== Sticky Footer Layout ==== */
body.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.section.main .button:hover {
  border-color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.section.main .button.button-primary {
  border-color: rgba(0, 0, 0, 0.5);
}

.section.main .button.button-primary:hover {
  border-color: rgba(0, 0, 0, 0.7);
}

/* Thumbnail Gallery Styles */
.thumb {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Override margin for gallery items (grid handles spacing) */
#gallery .thumb {
  margin-bottom: 0;
}

.thumb > a {
  display: block;
  text-decoration: none;
  cursor: pointer;
  line-height: 0;
}

.thumb > a:focus {
  outline: 2px solid rgba(0, 0, 0, 0.3);
  outline-offset: 2px;
}

.thumbnail {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.thumb:hover .thumbnail {
  opacity: 0.9;
}

#gallery .thumb:hover .thumbnail {
  opacity: 0.9;
  transform: scale(1.01);
}

/* Gallery masonry layout using CSS Grid */
#gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  grid-auto-rows: 10px;
}

#gallery .thumb {
  display: block;
  width: 100%;
  margin: 0;
  transition: box-shadow 0.3s ease, opacity 0.3s ease;
  grid-row-end: span var(--row-span, 20);
}

#gallery .thumb:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#gallery .thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Responsive single column */
@media (max-width: 549px) {
  #gallery {
      grid-template-columns: 1fr;
  }
}

/* ==== Footer Size Fix ==== */
.section.footer.dark .container {
min-height: auto !important;
padding: 0.75rem 0 !important;
}

@media (min-width: 550px) {
.section.footer.dark .container {
  min-height: 14vh !important;
  padding: 1rem 0 !important;
}
}

@media (min-width: 1000px) {
.section.footer.dark .container {
  min-height: 12vh !important;
}
}

.section.footer.dark img {
max-height: 40px;
margin-bottom: 0.5rem;
}

.section.footer.dark .social i {
font-size: 1.6rem;
margin: 0.25rem 0.75rem !important;
}

.section.footer.dark p {
margin: 0.25rem 0 !important;
}

/* ==== Language Selection ==== */
.lang-switch {
position: fixed;
top: 1rem;
right: 1rem;
z-index: 100;
font-size: 1rem;
padding: 0;
}

.lang-switch a {
color: #333;
text-decoration: none;
padding: 0.5rem 1rem;
border: 1px solid #333;
border-radius: 4px;
display: inline-block;
background-color: rgba(255, 255, 255, 0.95);
transition: all 0.3s ease;
font-weight: 500;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-switch a:hover {
background-color: #333;
color: #fff;
border-color: #333;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section.header.hero .lang-switch a {
color: #fff;
border-color: #fff;
background-color: rgba(0, 0, 0, 0.6);
}

.section.header.hero .lang-switch a:hover {
background-color: rgba(255, 255, 255, 0.95);
color: #333;
border-color: #fff;
}

.section.header {
position: relative;
}

.section.header.compact {
padding: 2.5rem 0 1.5rem !important;
}

.section.header.compact .container {
min-height: auto !important;
padding-bottom: 0 !important;
}

.section.header.compact .section-description {
margin-bottom: 1rem !important;
}

/* ==== Enhanced Zoom ==== */
.lg-outer .lg-item.lg-current .lg-image {
cursor: zoom-in;
transition: transform 0.3s ease-out;
}

.lg-outer.lg-zoomed .lg-item.lg-current .lg-image {
cursor: zoom-out;
transition: transform 0.3s ease-out;
}

.lg-outer .lg-item.lg-current .lg-img-wrap {
cursor: zoom-in;
}

.lg-outer.lg-zoomed .lg-item.lg-current .lg-img-wrap {
overflow: visible;
cursor: zoom-out;
}

.lg-outer .lg-item.lg-current .lg-image {
will-change: transform;
backface-visibility: hidden;
}

.lg-outer.lg-zoomed .lg-item.lg-current {
touch-action: none;
-webkit-user-select: none;
user-select: none;
}

/* ==== Tighten spacing between gallery and CTA ==== */
.section.main.gallery {
padding-bottom: 1rem !important;
}

.section.cta {
padding-top: 8rem !important;     /* FIX: Removes large gap above CTA */
padding-bottom: 1.5rem !important;
}

@media (min-width: 550px) {
.section.cta {
  padding-bottom: 2rem !important;
}
}

@media (min-width: 1000px) {
.section.cta {
  padding-bottom: 2.5rem !important;
}
}