/* :root {
  --color-light: #ba6c65;
  --color-accent: #f2be8d;
  --color-mid: #124e66;
  --color-brown: #394359;
  --color-dark: #303242;
  --color-white: #ffffff;
} */

:root {
  --color-light: #d9d9d9;
  --color-accent: #a6a6a6;
  --color-mid: #7d7d7d;
  --color-brown: #4d4d4d;
  --color-dark: #1f1f1f;
  --color-white: #f7f7f7;
  --color-liner: #ba6c65;
}

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

body {
  background-color: var(--color-light);
  color: var(--color-dark);
  font-family: "Lato", sans-serif;
  line-height: 1.6;
}

.heading,
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--color-mid);
  font-style: italic;
}

a {
  color: var(--color-liner);
  text-decoration: none; /* removes default underline */
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

/* Apply only for QR pages */
body.qr-page {
  display: flex;
  flex-direction: column;
  align-items: center; /* horizontal centering */
  justify-content: flex-start; /* start from top, change to center if you want vertical centering */
  min-height: 100vh; /* full viewport height */
  padding: 2vh 1rem; /* optional spacing from edges */
  box-sizing: border-box;
}

body.qr-page .footer {
  align-self: stretch; /* makes it take full width */
  width: 100%;
}

body.qr-page h1,
body.qr-page h2,
body.qr-page h3 {
  font-size: clamp(1.5rem, 6vw, 2.25rem);
}

body.qr-page p {
  font-size: clamp(1rem, 4vw, 1.2rem);
}

/* Navbar */
.navbar {
  background-color: var(--color-brown);
  padding: 1rem 2rem;
}

.navbar-brand {
  color: var(--color-accent);
  font-weight: bold;
  font-size: 1.4rem;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--color-white);
  margin-left: 1rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--color-accent);
}

.fixed-top-custom {
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

@media (max-width: 991.98px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  .navbar > .container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .navbar-brand {
    font-size: 0.9rem !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    margin-right: 1rem !important;
    white-space: nowrap;
    overflow: hidden;
  }

  .navbar-toggler {
    flex-shrink: 0 !important;
    border: none !important;
    padding: 0.25rem 0.5rem !important;
    order: 2 !important;
    z-index: 1035 !important;
  }

  .navbar-collapse {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
    background-color: var(--color-brown) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  }

  .navbar-nav {
    background-color: var(--color-brown);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem !important;
    z-index: 1040;
    width: 100%;
  }

  .dropdown-menu {
    z-index: 1050;
  }

  .dropdown-submenu .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    z-index: 1060;
  }

  .dropdown-submenu:hover .dropdown-menu,
  .dropdown-submenu .dropdown-menu.show {
    display: block;
  }
}

/* Optional: to make dropdowns look better */
.dropdown-menu {
  z-index: 1000;
}

.submenu-arrow {
  cursor: pointer;
  margin-left: 8px;
  user-select: none;
  font-size: 0.75rem;
}

@media (max-width: 991px) {
  .dropdown-submenu .dropdown-menu {
    display: none;
    position: static;
  }
  .dropdown-submenu .dropdown-menu.show {
    display: block;
  }
}

/* Optional: Show submenu on hover (desktop only) */
@media (min-width: 992px) {
  .dropdown-submenu:hover .dropdown-menu {
    display: block;
  }
}

.hero-carousel .carousel-item {
  height: 100vh;
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  object-position: 50% 50%;
  display: block;
}

/* Section Title */
.section-title {
  font-size: 2rem;
  color: var(--color-mid);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background-color: var(--color-liner);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.page-title::after {
  content: "";
  display: block;
  width: 160px;
  height: 4px;
  background-color: var(--color-liner);
  margin: 0.5rem 0 0 0.25rem;
  border-radius: 2px;
}

/* Sections */
.about-section {
  background-color: var(--color-white);
  padding: 4rem 2rem;
  color: var(--color-dark);
}

.events-section {
  background-color: var(--color-white);
  padding: 4rem 2rem;
  color: var(--color-dark);
}

.contact-section {
  background-color: var(--color-light);
  padding: 4rem 2rem;
  color: var(--color-dark);
}

/* Feature Box */
.feature-box {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* or flex-start */
  background-color: var(--color-light);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(18, 78, 102, 0.2);
  text-align: center;
  color: var(--color-deep);
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Feature Icon */
.feature-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(18, 78, 102, 0.3);
}

.feature-box:hover .feature-icon {
  transform: scale(1.2);
  color: var(--color-brown); /* You can change to another matching color */
}

/* Contact Item */
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-brown);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.contact-item i {
  color: var(--color-mid);
  font-size: 1.2rem;
}

/* Footer */
.footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  text-align: center;
  padding: 2rem;
  border-top: 2px solid var(--color-mid);
}

/* Primary Button */
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-brown);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-primary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: var(--color-accent);
  color: var(--color-brown); /* Or white if you want contrast */
}

.btn-primary:hover {
  background-color: var(--color-mid);
  border-color: var(--color-mid);
  color: var(--color-white);
}

.btn-primary:focus,
.btn-outline-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 50%, transparent);
}

.btn-glow {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-glow:hover {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 0 10px var(--color-accent);
}

.button-glow-margin {
  margin-bottom: 16px;
}

.row-items {
  display: grid !important;
  gap: 1rem;
  grid-template-columns: repeat(1, 1fr); /* Mobile: 1 column */
}

@media (min-width: 768px) {
  .row-items {
    grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
  }
}

@media (min-width: 992px) {
  .row-items {
    grid-template-columns: repeat(4, 1fr); /* Desktop: 4 columns */
  }
}

.grid-item {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  height: 100%;
  box-sizing: border-box;
  /* Optional: fixed min-height */
  min-height: 250px;
}

.dropdown-menu {
  min-width: 240px;
}

.dropdown-menu a {
  white-space: normal;
  word-break: break-word;
  padding: 0.5rem 1rem;
}

.navbar .dropdown-menu .dropdown-item:focus,
.navbar .dropdown-menu .dropdown-item:active,
.navbar .nav-link:focus,
.navbar .nav-link:active {
  background-color: transparent !important;
  color: inherit !important;
  outline: none !important;
  box-shadow: none !important;
}

.gallery-img {
  width: 100%;
  height: 500px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  display: block;
  /*background-color: #f8f8f8; * Optional, for blank space fill */
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.text-block p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Image styling for column layouts */
.image-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.image-block img {
  width: 100%;
  max-width: 350px;
  height: 300px;
  object-fit: contain;
  border-radius: 10px;
  /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); */
  transition: transform 0.3s ease;
}

.image-block img:hover {
  transform: translateY(-5px);
}

.image-block:has(img:nth-child(2)) img {
  max-width: 500px;
  height: 380px;
}

.image-block:has(img:nth-child(3)) img {
  max-width: 450px;
  height: 350px;
}

/* Text styling */
.content-text {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

/* Gallery row styling */
.gallery-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 30px 0;
}

.gallery-row figure {
  margin: 0; /* remove browser default margins */
  padding: 0;
  text-align: center; /* optional: centers captions */
  flex: 0 1 350px; /* each figure ~350px wide, wraps nicely */
}

.gallery-row img {
  width: 350px;
  height: 300px;
  object-fit: contain;
  border-radius: 6px;
  /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); */
  display: block;
}

.gallery-row img:hover {
  transform: scale(1.05);
}

.gallery-row img.zoomed {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.8);
  z-index: 9999;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
  background: white;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Styling for the figure and figcaption */
.gallery-item {
  max-width: 100%; /* Ensure each item fits within the row */
  text-align: center;
}

/* Style for the figure with multiple images */
.multi-image {
  display: inline-block;
  gap: 10px; /* Space between images */
  flex-wrap: wrap; /* Allow images to wrap to the next line if needed */
  justify-content: center; /* Center images horizontally */
}

.multi-image img {
  width: 100%; /* Make each image responsive */
  max-width: 300px; /* Limit image size */
  height: auto; /* Maintain aspect ratio */
  object-fit: contain; /* Ensure images fit within the container */
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  display: inline-block; /* Remove extra spacing below images */
}

figcaption {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  height: 40px;
}

/* Optional: Wider layout on larger screens */
@media (min-width: 992px) {
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid > *:nth-child(4n + 1),
  .content-grid > *:nth-child(4n + 2) {
    grid-column: span 2; /* Make full width for alternating blocks */
  }
}

.zoomable-img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
  z-index: 1;
}

.zoomable-img.zoomed {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 700px; /* Set a fixed zoom size */
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 9999;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
  background: white;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
  .carousel-caption h1 {
    font-size: 2.5rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .focus-left {
    object-position: 80% 50% !important;
  }
}

body.no-scroll {
  overflow: hidden;
}

/* Feature Icon */
.feature-icon {
  font-size: 2rem;
  width: 60px; /* adjust size as needed */
  height: 60px;
  color: var(--color-accent);
  object-fit: contain; /* keeps aspect ratio, avoids distortion */
  display: block;
  margin: 0 auto 10px auto; /* center horizontally and add spacing below */
}

.service-card {
  position: relative;
  min-height: 230px;
  border: 1px solid #dee2e6;
  overflow: hidden;
  border-radius: 3px;
}

.service-card .body {
  padding: 10px;
}

.service-card .body img.icon {
  margin-top: 40px;
  width: 55px;
  margin-bottom: 25px;
  -webkit-transition: all, 0.3s;
  transition: all, 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .service-card .body img.icon {
    -webkit-transition: none;
    transition: none;
  }
}

.service-card .body .subtitle {
  position: absolute;
  bottom: -100%;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: all, 0.3s;
  transition: all, 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .service-card .body .subtitle {
    -webkit-transition: none;
    transition: none;
  }
}

.service-card:hover .body img.icon {
  margin-top: 5px;
  width: 45px;
  margin-bottom: 15px;
}

.service-card:hover .body .subtitle {
  bottom: 7px;
  opacity: 1;
  visibility: visible;
}

#backToTopBtn {
  display: none; /* Initially hidden */
}

#backToTopBtn.show {
  display: flex !important; /* Use !important to override */
  justify-content: center;
  align-items: center;
}

#btnToUp .btn {
  background-color: var(--color-mid);
  color: white;
}

#btnToUp .btn:hover {
  background-color: var(--color-liner);
}

.lang-buttons button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px;
  padding: 0.5rem 1rem;
  background-color: var(--color-mid);
  color: var(--color-brown);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  float: right;
  margin-bottom: 2vh;
}
.lang-buttons button:hover {
  background-color: var(--color-mid);
}
.fi {
  font-size: 1.2em;
}

#audio-player-container {
  --seek-before-width: 0%;
  --buffered-width: 0%;
  position: relative;
  width: 90%; /* responsive width */
  max-width: 500px; /* desktop max */
  min-height: 20vh;
  background: color-mix(in srgb, var(--color-light) 90%, var(--color-accent));
  border-radius: 20px;
  padding: 20px;
  box-sizing: border-box; /* include padding in width */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2vh auto; /* vertical spacing + horizontal centering */
}

/* Mobile adjustments */
@media (max-width: 480px) {
  #audio-player-container {
    padding: 15px;
    width: 95%;
    margin: 2vh auto;
  }
}

#audio-player-container::before {
  position: absolute;
  content: "";
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  left: -2px;
  top: -2px;
  background: linear-gradient(120deg, var(--color-mid), var(--color-accent));
  opacity: 0.5;
  z-index: -1;
  border-radius: 20px;
}

#mute-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 0;
}

#play-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 30px;
  background-color: transparent;
  border: 0;
}

path {
  stroke: var(--color-liner);
}

.progress-container {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time {
  font-size: 14px;
  color: #333;
  min-width: 45px;
  text-align: center;
  /* border: 1px solid var(--color-dark);
  border-radius: 10px; */
}

#seek-slider {
  flex: 1;
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: transparent;
  outline: none;
  margin: 0;
}

#seek-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--color-liner) 100%, transparent)
      var(--buffered-width),
    color-mix(in srgb, var(--color-liner) 30%, transparent)
      var(--buffered-width)
  );
  border-radius: 3px;
}

#seek-slider::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  width: var(--seek-before-width);
  height: 6px;
  background-color: var(--color-liner);
  cursor: pointer;
  border-radius: 3px;
  z-index: 1;
}

#seek-slider::-webkit-slider-thumb {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-liner);
  cursor: pointer;
  border: 3px solid var(--color-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
  margin-top: -7px;
}

#seek-slider:active::-webkit-slider-thumb {
  transform: scale(1.3);
}

#seek-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--color-liner) 100%, transparent)
      var(--buffered-width),
    color-mix(in srgb, var(--color-liner) 30%, transparent)
      var(--buffered-width)
  );
  background: black;
  border-radius: 3px;
}

#seek-slider::-moz-range-progress {
  background-color: var(--color-liner);
  height: 6px;
  border-radius: 3px;
}

#seek-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--color-liner);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#seek-slider:active::-moz-range-thumb {
  transform: scale(1.3);
}

#volume-output {
  display: none;
}

#volume-slider {
  display: none;
}

.event-card img {
  object-fit: cover;
  height: 200px; /* consistent image height */
}
