/* Fonts */


@font-face {
  font-family: 'Bacalisties';
  src: url('../assets/alex-brush/AlexBrush-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

/* Prevent horizontal scrolling globally */
html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* General body */
body {
  font-family: 'Bacalisties', Arial, sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: rgb(240,230,229);
  max-width: 100vw;
  box-sizing: border-box;
  position: relative;
}

/* Background layers created by JavaScript */
.bg-layer-flower,
.bg-layer-svg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 100vw auto;
  background-color: rgb(240,230,229);
  pointer-events: none;
}

.bg-layer-flower {
  z-index: -2;
}

.bg-layer-svg {
  z-index: -1;
}

body.home-page {
  font-family: 'Bacalisties', Arial, sans-serif;
}

/* Header bar and navigation */
.header-bar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: 10;
  text-align: center;
  pointer-events: none;
  background: rgba(0,0,0,0.10); /* semi-transparent dark background */
}

.header-bar img[alt="AS Monogram"] {
  display: block;
  margin: 0px auto 0px auto;
  max-width: 120px;
  width: 100%;
  filter: brightness(0) invert(1);
}

.header-bar-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  gap: 0;
  pointer-events: auto;
  flex-wrap: wrap; /* allow wrapping */
}

.header-bar-logo {
  display: block;
  margin: 0 32px;
  padding-bottom: 12px;
  max-width: 120px;
  width: 120px;
  height: auto;
  padding-top: 0;
  filter: brightness(0) invert(1);
}

.header-date {
  font-family: 'Great Vibes', cursive;
  font-size: 3.5em;
  text-align: center;
  color: white;
}

nav {
  text-align: center;
  margin-bottom: 16px;
  color: white;
  pointer-events: auto;
  font-size: 1.4em
}

nav a {
  margin: 0 4px;
  text-decoration: none;
  color: white;
  font-size: 1.05em;
  width: 10vw; /* match "Meghívó visszajelzés" length for symmetry */
  display: inline-block;
  text-align: center;
}

nav a:hover {
  color: rgb(202, 202, 202);
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-left {
  justify-content: flex-end;
  flex: 1 1 0;
}

.nav-right {
  justify-content: flex-start;
  flex: 1 1 0;
}

/* Responsive header navigation stacking */
@media (max-width: 700px) {
  .header-bar-flex {
    flex-direction: column;
    gap: 0;
  }
  .nav-left {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    gap: 4px;
  }
  .nav-left a {
    width: auto;
    margin: 2px 0;
  }
  .nav-right {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0px;
    gap: 4px;
  }
  .nav-right a {
    width: auto;
    margin: 2px 0;
  }
  .header-bar-logo {
    margin: 12px auto 12px auto;
  }
}

/* Carousel gallery */
.carousel-gallery {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(240,230,229);
  overflow: hidden;
  z-index: 0;
  touch-action: pan-y;
  will-change: transform;
}

.carousel-gallery img {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 16px 2px rgba(0,0,0,0.07);
  background: rgb(240,230,229);
  transition: opacity 0.5s;
  will-change: transform;
}

.carousel-arrow {
  position: absolute;
  bottom: 32px;
  background: rgb(240,230,229, 0);
  border: none;
  font-size: 1.8rem;
  color: rgb(240,230,229);
  padding: 0 10px;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  transition: color 0.2s;
  user-select: none;
  opacity: 0.85;
}

.carousel-arrow.left {
  left: 24px;
}

.carousel-arrow.right {
  right: 24px;
}

.carousel-arrow:hover {
  color: #ffd700;
  opacity: 1;
}

.carousel-image-wrapper {
  position: relative;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  background: rgb(240,230,229);
}

.carousel-image {
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
  transition: opacity 1s, transform 0.5s ease;
  opacity: 0;
  background: rgb(240,230,229);
  object-fit: cover;
  object-position: center;
}

.carousel-image.sliding {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  will-change: transform;
}

/* About section common styles */
section {
  padding: 40px 20px;
  text-align: center;
  background: rgb(240,230,229);
}

.about-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  max-width: 60vw;
  margin: 0 auto;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.about-img {
  width: 340px;
  max-width: 90vw;
  border-radius: 18px;
  box-shadow: 0 4px 24px 4px rgba(0,0,0,0.10);
  object-fit: cover;
  flex-shrink: 0;
  position: relative;
  background: rgb(240,230,229);
  will-change: transform;
  /* Images load normally without animation */
  opacity: 1;
}

.about-text {
  flex: 1;
  min-width: 220px;
  text-align: left;
  font-size: 1.6em;
  /* Text should be visible by default - GSAP will handle the animation */
  opacity: 1;
}

.about-flex.reverse {
  flex-direction: row-reverse;
}

.about-flex.reverse .about-text {
  text-align: right;
}

/* Map container */
.map-container {
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto 32px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.map-container iframe {
  width: 100vw;
  max-width: 900px;
  height: 420px;
  border: none;
  display: block;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
}

/* Responsive base styles */
@media (max-width: 988px) {
  section {
    padding: 20px 10px;
  }
  .about-flex {
    flex-direction: column;
    gap: 18px;
    align-items: center;
    max-width: 95vw;
  }
  .about-text {
    text-align: center;
    font-size: 1.4em;
    padding: 0 10px;
  }
  .about-img {
    max-width: 85vw;
  }
  .about-flex.reverse {
    flex-direction: column;
  }
  .about-flex.reverse .about-text {
    text-align: center;
  }
}

/* Responsive countdown layout for small screens */
@media (max-width: 700px) {
  .cd-group {
    display: none !important;
  }
}


.header-bar-flex-col {
  flex-direction: column;
  align-items: center;
}
.header-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 70vw;
  width: 100vw;
  margin-top: 10px;
}
.header-bar-flex-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  font-size: 1.2em;
}

.header-date {
  font-family: 'Great Vibes', cursive;
  font-size: 3.5em;
  text-align: center;
  color: white;
}

h2 {
  font-size: 2em !important;
  font-weight: normal;
}

/* Back-to-top sticky button (top-left) */
.back-to-top {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px));
  width: 72px;
  height: 72px;
  border: none;
  background: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  z-index: 100;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition:
    transform .36s cubic-bezier(.4,1.4,.4,1),
    color .2s,
    outline .2s,
    opacity 0.6s ease-in-out,
    visibility 0.6s;
  text-shadow:
    0 4px 18px rgba(0,0,0,0.65),
    0 0 2px rgba(0,0,0,0.4),
    0 0 0 #ffd700,
    0 0 10px #ffd70099;
  outline: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  color: #ffd700;
  box-shadow:
    0 8px 36px 0 rgba(60, 30, 10, 0.32),
    0 0 0 8px #ffd70055,
    0 0 32px 0 #ffd700cc;
  transform: translateY(-3px) scale(1.09);
  text-shadow:
    0 6px 24px rgba(0,0,0,0.75),
    0 0 3px rgba(0,0,0,0.5),
    0 0 0 #ffd700,
    0 0 16px #ffd700cc;
  transition:
    transform .24s cubic-bezier(.4,1.4,.4,1),
    box-shadow .24s cubic-bezier(.4,1.4,.4,1),
    color .2s,
    outline .2s;
  outline: 2px solid #ffd700; /* Show outline only on hover */
  outline-offset: 2px;
}

.back-to-top:focus {
  outline: none; /* Remove outline on focus/click */
}

.back-to-top:active {
  transform: translateY(0) scale(0.98);
  outline: none; /* Remove outline when clicking */
}

@media (max-width: 700px) {
  .back-to-top {
    width: 54px;
    height: 54px;
    font-size: 30px;
    top: calc(10px + env(safe-area-inset-top, 0px));
    left: calc(10px + env(safe-area-inset-left, 0px));
  }
}

/* Footer */
.site-footer {
  width: 100vw;
  background: #e7d1d1;
  text-align: center;
  padding: 32px 0 24px 0;
  margin-top: 32px;
  font-size: 1.3em;
  color: #5a4747;
}

.footer-message {
  margin-bottom: 18px;
  font-size: 1.1em;
  letter-spacing: 0.01em;
}

.footer-contact-btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 22px;
  background: linear-gradient(90deg, #e7d1d1 0%, #fff8dc 100%);
  color: #5a4747;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 8px 0 rgba(180,160,150,0.10);
  border: none;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  margin-top: 8px;
  cursor: pointer;
}

.footer-contact-btn:hover,
.footer-contact-btn:focus {
  background: linear-gradient(90deg, #e7d1d1 0%, #fff8dc 100%);
  color: #a67c52;
  box-shadow: 0 4px 16px 0 rgba(180,160,150,0.18);
}
