/* =========================
   Header Separation
   ========================= */
header {
  box-shadow: 0 4px 24px 0 rgba(80, 80, 120, 0.07), 0 1px 0 0 rgba(120,120,140,0.10);
  border-bottom: 1.5px solid rgba(180, 180, 200, 0.18);
  transition: box-shadow 0.3s, border-bottom 0.3s;
  z-index: 1000;
  position: relative; /* Add position relative for underline effect */
  height: 70px; /* Increase header height */
  padding: 10px 0; /* Add more padding for a larger header */
}
header::after {
  content: '';
  position: absolute;
  bottom: -2px; /* Position underline just below the header */
  left: 0;
  width: 100%;
  height: 1px; /* Thickness of the underline */
  background: linear-gradient(90deg, #a259c6, #726a6a); /* Gradient underline */
}
/* =========================
   Header Content Centering & Alignment
   ========================= */
header .container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 4rem;
  padding-right: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 900px) {
  header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
/* =========================
   Header Glassmorphism & Separation
   ========================= */
header {
  background: none;
  box-shadow: none;
  border-bottom: 1.5px solid rgba(180, 180, 200, 0.18);
  backdrop-filter: blur(26px) saturate(6.2);
   -webkit-backdrop-filter: blur(20px);
  color: #fff; /* White text for better contrast */
  text-shadow: none;
  transition: background 0.3s, box-shadow 0.3s;
  z-index: 1000;
}
/* =========================
  Premium Dot Pulse Effect (80 BPM, Interior Design)
  ========================= */
.premium-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a259c6 0%, #e66465 100%);
  box-shadow: 0 0 0 0 rgba(162,89,198,0.7);
  position: relative;
  margin-right: 0.75rem;
  animation: dot-pulse 0.75s infinite cubic-bezier(.4,0,.2,1), dot-color 6s infinite ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Interior design: white center and subtle ring */
.premium-dot::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent; /* change color */
  box-shadow: 0 0 8px 2px rgba(162,89,198,0.18);
  z-index: 2;
  position: relative;
}

.premium-dot::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  z-index: 1;
  pointer-events: none;
}

/* 80 BPM = 0.75s per beat */
@keyframes dot-pulse {
  0% {
   box-shadow: 0 0 0 0 rgba(162,89,198,0.7);
   transform: scale(1);
  }
  70% {
   box-shadow: 0 0 0 12px rgba(162,89,198,0);
   transform: scale(1.12);
  }
  100% {
   box-shadow: 0 0 0 0 rgba(162,89,198,0);
   transform: scale(1);
  }
}

@keyframes dot-color {
  0%   { background: #a259c6; }
  10%  { background: #e66465; }
  20%  { background: #facc15; }
  30%  { background: #3b82f6; }
  40%  { background: #6b21a8; }
  50%  { background: #10b981; }
  60%  { background: #ec4899; }
  70%  { background: #f97316; }
  80%  { background: #a259c6; }
  90%  { background: #fff; }
  100% { background: #a259c6; }
}
/* =========================
   Typography & Base Styles
   ========================= */
body {
  font-family: 'rubik', system-ui, sans-serif;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  padding-top: 0px; /* Add this line to make room for fixed header */
  background: linear-gradient(90deg, #e5e5e9 0%, #bdbdc3 50%, #888888 100%);
}
h1, h2, h3, .font-display {
  
  font-weight: 700;
  letter-spacing: 0.02em;
}
h1 { font-size: 2.5rem; letter-spacing: 0.04em; }
h2 { font-size: 2rem; letter-spacing: 0.03em; }
h3 { font-size: 1.5rem; letter-spacing: 0.02em; }
a, button { font-weight: 500; letter-spacing: 0.02em; }


/* =========================
   Button Styles
   ========================= */
a.button-premium {
  display: inline-block;
  font-weight: 600;
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #9669bb, #807e8f);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
  text-align: center;
  text-decoration: none;
}
a.button-premium:hover,
a.button-premium:focus {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  background: linear-gradient(90deg, #7516ce, #7B6BA7);
  color: #fff;
}

/* =========================
   "Aurora Shard" Social Icons
   ========================= */
footer .social-premium {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

footer .social-premium a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

footer .social-premium a::before { /* Glint effect */
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-25deg);
  transition: left 0.4s ease;
}

footer .social-premium a:hover::before {
  left: 150%;
}

footer .social-premium a:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(123, 107, 167, 0.3), inset 0 1px 1px rgba(255,255,255,0.1);
}

footer .social-premium svg {
  width: 28px;
  height: 28px;
  color: #e0d8ff;
  transition: color 0.2s, filter 0.2s;
}

footer .social-premium a:hover svg {
  color: #fff;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.7));
}

/* =========================
   Gallery Card Styles
   ========================= */
.gallery-card {
  /* Make the card visually transparent so only the image shows */
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0; /* Image carries the visual radius */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  max-width: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
  margin-left: 0;
  margin-right: 0;
  display: inline-block; /* Works well with column layout */
  width: 100%;
}
.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-3px) scale(1.02);
  z-index: 2;
}
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(236,72,153,0.10) 0%, rgba(96,165,250,0.10) 100%);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1);
  border-radius: 1rem;
}
.gallery-card:hover::after,
.gallery-card:focus-visible::after {
  opacity: 1;
}
/* Gallery images grayscale by default, colored on hover */
.gallery-card img {
  border-radius: 0.75rem;
  object-position: center;
  object-fit: cover;
  filter: grayscale(1) brightness(0.98) contrast(1.05);
  transition: filter 0.3s;
  width: 100%;
  display: block;
  max-width: 100%;
  height: auto;
}
.gallery-card:hover img,
.gallery-card:focus-visible img {
  filter: grayscale(0) brightness(1.05) saturate(1.1);
  transform: scale(1.05);
  box-shadow: 0 8px 32px 0 rgba(123, 107, 167, 0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
  z-index: 2;
}
.gallery-card .font-bold {

  font-size: 1.25rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
/* Overlay: center and scale content so images fit the viewport (no page scroll to view image) */
#gallery-overlay {
  display: flex;
  align-items: center; /* vertical center */
  justify-content: center; /* horizontal center */
  min-height: 100vh;
  padding: 18px; /* small safe padding around content */
  z-index: 2000 !important;
  background: rgba(18, 16, 32, 0.88);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 8px 40px 0 rgba(80, 0, 120, 0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
  border-radius: 0;
  transition: background 0.4s cubic-bezier(.4,0,.2,1);
  width: 100%;
  overflow: hidden; /* hide page scroll; content will scale instead */
}

/* Inner overlay container: center content and limit to viewport */
#gallery-overlay > .relative {
  margin: 0; /* remove large top margin so content centers vertically */
  background: rgba(255,255,255,0.04);
  border-radius: 1rem;
  box-shadow: 0 8px 32px 0 rgba(31,38,135,0.12);
  padding: 12px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 40px);
  width: auto;
  max-height: calc(100vh - 40px); /* ensure container never exceeds viewport */
  overflow: hidden; /* keep image contained and scaled */
  animation: fade-in-up 0.28s cubic-bezier(.4,0,.2,1);
  box-sizing: border-box;
}

/* Image inside overlay: scale to fit viewport while preserving aspect ratio */
#gallery-overlay img {
  border-radius: 0.75rem;
  box-shadow: 0 6px 36px 0 rgba(0,0,0,0.28);
  background: transparent;
  transition: box-shadow 0.3s, filter 0.3s, transform 0.25s;
  filter: brightness(1.02) saturate(1.06);
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 160px); /* leave room for controls and caption */
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

@media (max-width: 900px) {
  #gallery-overlay > .relative {
    max-width: calc(100vw - 24px);
    padding: 10px;
  }
  #gallery-overlay img {
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 140px);
  }
}
@media (max-width: 600px) {
  #gallery-overlay {
    padding: 8px;
    border-radius: 0.4rem;
  }
  #gallery-overlay > .relative {
    padding: 8px;
    border-radius: 0.5rem;
  }
  #gallery-overlay img {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
  }
}


/* =========================
   Masonry Gallery Layout
   ========================= */
.masonry-gallery {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  columns: 4;
  column-gap: 0.75rem;
}
.masonry-gallery > .gallery-card {
  margin-bottom: 0.5rem;
  break-inside: avoid;
  display: inline-block; /* ensure cards behave correctly inside CSS columns */
  width: 100%;
}
@media (max-width: 1024px) {
  .masonry-gallery {
    columns: 2 !important;
    max-width: 700px;
  }
}
@media (max-width: 640px) {
  .masonry-gallery {
    columns: 1 !important;
    max-width: 95vw;
  }
 .gallery-card {
    max-width: 100%;
    margin: 0 auto;
}
}


/* =========================
   Microinteractions & Animations
   ========================= */
button svg, a svg {
  transition: transform 0.18s cubic-bezier(.4,0,.2,1), color 0.18s;
}
button:hover svg, button:focus svg,
a:hover svg, a:focus svg {
  transform: translateY(-2px) scale(1.13);
  color: #a248e6;
}
button:hover, button:focus,
a.button-cta:hover, a.button-cta:focus {
  box-shadow: 0 8px 32px 0 rgba(155, 156, 88, 0.18), 0 1.5px 8px 0 rgba(0,0,0,0.10);
  transform: translateY(-2px) scale(1.04);
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(155, 50, 236, 0.4);}
  50% { box-shadow: 0 0 0 12px rgba(236, 72, 153, 0);}
}
.animate-cta-pulse {
  animation: cta-pulse 1.5s infinite;
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(40px);}
  to { opacity: 1; transform: translateY(0);}
}
.animate-fade-in-up {
  animation: fade-in-up 1s cubic-bezier(.4,0,.2,1) both;
}

/* =========================
   Mobile Menu Styles
   ========================= */
#mobile-menu {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  min-width: 220px;
  max-width: 90vw;
  background: rgba(255,255,255,0.75);
  box-shadow: 0 12px 48px 0 rgba(80,80,120,0.38), 0 1.5px 8px 0 rgba(0,0,0,0.10);
  border: 1.5px solid rgba(180, 180, 200, 0.18);
  padding: 1.5rem 1.25rem 2rem 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.4s cubic-bezier(.4,0,.2,1), transform 0.4s cubic-bezier(.4,0,.2,1);
  opacity: 1;
  transform: translateY(0) scale(1);
  backdrop-filter: blur(1px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  overflow: hidden;
  border-radius: 1.25rem;
}

/* CSS-ONLY FIX: Temporarily remove header clip-path when menu is open */
header:has(#mobile-menu:not(.hidden)) {
  clip-path: none !important;
}

#mobile-menu::before { /* Inherit aurora background */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(123, 107, 167, 0.5) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 30%, rgba(122, 127, 140, 0.4) 0%, transparent 70%);
  background-size: 300% 300%;
  animation: aurora-flow 20s ease-in-out infinite reverse;
}

#mobile-menu.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-32px) scale(0.95);
}

#mobile-menu a {
  position: relative; /* Required for ::after positioning */
  color: #574d6c;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: transparent;
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  position: relative;
}
#mobile-menu a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  width: 100%;
  height: 18px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0.7) scaleY(0.8) rotate(-2deg);
  transition: opacity 0.4s cubic-bezier(.4,0,.2,1), transform 0.4s cubic-bezier(.4,0,.2,1);
  z-index: -1;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 8px rgba(123,107,167,0.10));
}

#mobile-menu a:hover::after,
#mobile-menu a:focus::after {
  opacity: 1;
  transform: scaleX(1.58) scaleY(1.25) rotate(40deg);
  animation: brush-flick 0.22s cubic-bezier(.4,0,.2,1);
}

/* Example brush stroke for mobile menu links */
#mobile-menu a:nth-child(1)::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 18' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3 15 Q30 3 97 10 Q80 17 3 15 Z' fill='%237B2FF2' fill-opacity='0.65'/></svg>");
}
#mobile-menu a:nth-child(2)::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 18' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3 13 Q50 2 97 8 Q80 16 3 13 Z' fill='%23EC4899' fill-opacity='0.55'/></svg>");
}
#mobile-menu a:nth-child(3)::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 18' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3 14 Q60 1 97 12 Q80 17 3 14 Z' fill='%23FACC15' fill-opacity='0.55'/></svg>");
}
#mobile-menu a:nth-child(4)::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 18' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M3 16 Q70 2 97 14 Q80 17 3 16 Z' fill='%233B82F6' fill-opacity='0.55'/></svg>");
}

/* =========================
   Sticky Footer Setup
   ========================= */
html, body {
  height: 100%; /* Ensure the body and html take up full height */
  display: flex;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1; /* Allow the main content to grow and push the footer down */
}

footer {
  position: relative; /* Remove fixed positioning */
  bottom: auto;
  left: 0;
  width: 100%;
  background: transparent; /* Fully transparent background */
  border-top: 1.5px solid rgba(180, 180, 200, 0.18); /* Line similar to header */
  box-shadow: none; /* Remove shadow for full transparency */
  z-index: 1000;
  /* backdrop-filter: blur(16px) saturate(6.2);
  -webkit-backdrop-filter: blur(16px) saturate(6.2);*/
  padding: 1rem 0;
  text-align: center;
}
/* Upgraded Filter Button Styles with Calmer Colors, No Gradient */
.filter-btn {
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 1rem;
  background: rgba(245, 245, 250, 0.7);
  color: #444;
  box-shadow: 0 2px 8px rgba(123,107,167,0.08), 0 1px 0 rgba(0,0,0,0.04);
  border: 1.5px solid rgba(180, 180, 200, 0.18);
  outline: none;
  cursor: pointer;
  margin: 0 0.25rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(2px) saturate(1.1);
}

.filter-btn:hover,
.filter-btn:focus {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(123,107,167,0.13), 0 1.5px 8px rgba(0,0,0,0.08);
  background: rgba(235, 235, 245, 0.95);
  color: #222;
}

.filter-btn.active {
  background: #e6e6f7;
  color: #3b2f4a;
  box-shadow: 0 8px 24px rgba(123,107,167,0.18);
  border-color: #b8a7d6;
}

/* Calmer color themes for each button */
.filter-btn.filter-btn-all.active,
.filter-btn.filter-btn-all:hover {
  background: #e6e6f7;
  color: #3b2f4a;
  border-color: #b8a7d6;
}

.filter-btn.filter-btn-blue.active,
.filter-btn.filter-btn-blue:hover {
  background: #e3f0fa;
  color: #1e3a8a;
  border-color: #a3c7e7;
}

.filter-btn.filter-btn-purple.active,
.filter-btn.filter-btn-purple:hover {
  background: #f3e8fd;
  color: #6b21a8;
  border-color: #d1b3ea;
}

.filter-btn.filter-btn-magenta.active,
.filter-btn.filter-btn-magenta:hover {
  background: #fbeaf3;
  color: #be185d;
  border-color: #e9b6d0;
}

.filter-btn.filter-btn-other.active,
.filter-btn.filter-btn-other:hover {
  background: #f7f7e6;
  color: #7a7a4d;
  border-color: #d6d6b8;
}
header nav a {
  font-size: 1.1rem !important; /* Ensure the font size is applied */
}

/* Premium Responsive Brush Stroke Nav Underline */
.nav-link {
  position: relative;
  padding-bottom: 0.5em;
  font-weight: 300;
  font-family: 'Montserrat', 'Inter', Arial, sans-serif;
  letter-spacing: 0.03em;
  transition: color 0.22s cubic-bezier(.4,0,.2,1);
  z-index: 1;
  outline: none;
  display: inline-block;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  width: 100%;
  height: 22px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0.7) scaleY(0.8) rotate(-2deg);
  transition:
    opacity 0.4s cubic-bezier(.4,0,.2,1),
    transform 0.4s cubic-bezier(.4,0,.2,1);
  z-index: -1;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 8px rgba(123,107,167,0.10));
}

/* Animate brush stroke in */
.nav-link:hover::after,
.nav-link:focus::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1.45) scaleY(1.18) rotate(0deg);
  animation: brush-flick-real 0.32s cubic-bezier(.4,0,.2,1);
}

/* Home: Premium intense purple brush stroke (realistic SVG) */
.nav-home::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 22' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M5 18 Q30 2 60 10 Q90 22 95 12 Q80 20 5 18 Z' fill='%237B2FF2' fill-opacity='0.85'/><path d='M10 17 Q35 7 65 13 Q90 19 92 14' stroke='%237B2FF2' stroke-width='2' stroke-linecap='round' opacity='0.5'/></svg>");
}

/* Gallery: Premium pink brush stroke (realistic SVG) */
.nav-gallery::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 22' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M7 16 Q50 3 80 12 Q97 20 93 14 Q80 19 7 16 Z' fill='%23EC4899' fill-opacity='0.75'/><path d='M12 15 Q55 8 85 16 Q97 18 90 15' stroke='%23EC4899' stroke-width='2' stroke-linecap='round' opacity='0.4'/></svg>");
}

/* About: Premium yellow brush stroke (realistic SVG) */
.nav-about::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 22' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M6 17 Q60 2 97 16 Q80 21 6 17 Z' fill='%23FACC15' fill-opacity='0.75'/><path d='M15 16 Q65 7 95 17 Q80 19 15 16' stroke='%23FACC15' stroke-width='2' stroke-linecap='round' opacity='0.4'/></svg>");
}

/* Contact: Premium blue brush stroke (realistic SVG) */
.nav-contact::after {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 100 22' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M8 19 Q70 2 97 18 Q80 22 8 19 Z' fill='%233B82F6' fill-opacity='0.75'/><path d='M18 18 Q75 8 95 19 Q80 21 18 18' stroke='%233B82F6' stroke-width='2' stroke-linecap='round' opacity='0.4'/></svg>");
}

/* Brush flick animation - more natural, smooth and clean */
@keyframes brush-flick-real {
  0% {
    opacity: 0;
    transform: scaleX(0.4) scaleY(0.7) rotate(-8deg);
    filter: blur(2px) brightness(0.9);
  }
  60% {
    opacity: 1;
    transform: scaleX(1.1) scaleY(1.05) rotate(2deg);
    filter: blur(0.5px) brightness(1.05);
  }
  100% {
    opacity: 1;
    transform: scaleX(1.08) scaleY(1.05) rotate(0deg);
    filter: blur(0px) brightness(1.1);
  }
}

/* =========================
   Hero Slideshow Styles
   ========================= */
#hero-slideshow {
  position: relative;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 0rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
#hero-slideshow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52)); /* Slightly stronger dark overlay */
  z-index: 1;
}

#hero-slideshow h1, #hero-slideshow p {
  /* Force white text early to prevent flash-of-unstyled-text on refresh */
  color: #fff !important; /* Bright text */
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9) !important; /* Stronger shadow for readability */
}

@media (max-width: 900px) {
  #hero-slideshow h1 {
    font-size: 2rem; /* Adjust font size for mobile */
  }
  #hero-slideshow p {
    font-size: 1rem;
  }
}

/* =========================
   Mobile Styles
   ========================= */
@media (max-width: 900px) {
  header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  #gallery-overlay > .relative {
    max-width: 98vw;
    padding: 0.7rem 0.2rem 0.7rem 0.2rem;
  }
  #gallery-overlay img {
    max-height: 55vh;
  }
  #mobile-menu {
    top: 5rem;
    right: 0.5rem;
    padding: 1rem;
    border-radius: 1rem;
  }
  #mobile-menu a {
    font-size: 1rem;
    padding: 1rem 1rem;
  }
  #hero-slideshow {
    max-height: 70vh;
  }
  #hero-slideshow .slide h2 {
    font-size: 2rem;
  }
  #hero-slideshow .slide p {
    font-size: 1rem;
  }
  #hero-slideshow .slide a.button {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* =========================
   Contrast Filter for Hero Slideshow
   ========================= */
#hero-slideshow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52));
  opacity: 1;
  transition: opacity 2.2s ease-in-out, transform 2.2s cubic-bezier(.22,.8,.22,1);
  transform: scale(1);
  pointer-events: none;
  filter: grayscale(1) contrast(1.12);
}

/* Improve contrast in the hero section */
#hero-slideshow .relative::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5)); /* Darker gradient overlay */
}

#hero-slideshow h1 {
  text-shadow: 0 8px 16px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 255, 255, 0.3); /* Stronger shadow and subtle glow */
}

#hero-slideshow p {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8), 0 0 4px rgba(255, 255, 255, 0.2); /* Enhanced shadow and glow for paragraph */
}
