/* Background overlays for section transitions */
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0;
  transition: none;
  will-change: opacity;
}

#bgOmOss {
  background-image: url('../img/backgrounds/om-oss-final.png');
}

#bgProjekt {
  background-image: url('../img/backgrounds/projekt-v2-darkteal.png');
}

/* Scrollytelling Layout - Convert popup sections to inline scroll */

/* Fixed logo - stays on top, text scrolls behind it */
.logo-container {
  position: fixed;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  margin-bottom: 0;
}

/* Hero section - first viewport */
.scrolly-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.scrolly-hero h1 {
  will-change: transform, opacity;
}

/* Scroll indicator */
.scroll-indicator {
  margin-top: 60px;
  opacity: 0.6;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 13px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Title sections - centered like the hero */
.scrolly-title-section {
  min-height: 15vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.scrolly-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 3rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  will-change: transform, opacity;
}

/* Override popup positioning for all sections */
.scrolly-section.projects-section,
.scrolly-section.about-me-section,
.scrolly-section.contact-section,
.scrolly-section.news-section {
  position: relative;
  bottom: auto;
  left: auto;
  width: 100%;
  height: auto;
  background-color: transparent;
  border-top: none;
  z-index: 1;
  overflow: visible;
  box-shadow: none;
  padding: 20px 20px 80px;
  display: block;
}

/* Projects carousel */
.projects-carousel-wrapper {
  position: relative;
  width: 100%;
  margin-top: -10vh;
}

.projects-carousel {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  padding-top: 0;
  box-sizing: border-box;
}

.projects-carousel .project-card {
  position: absolute;
  top: 30vh;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 750px;
  width: calc(100% - 60px);
  transform: none;
  opacity: 0;
  will-change: transform, opacity;
  overflow: visible;
  display: block;
  margin-bottom: 0;
}

.projects-carousel .project-card .project-image {
  display: none;
}

.projects-carousel .project-card .project-content {
  padding: 40px;
}

.projects-carousel .project-card.carousel-active {
  opacity: 1;
  transform: translateX(0);
}

/* Carousel counter */
.carousel-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant', serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

/* Individual scroll-animated items */
.scrolly-item {
  will-change: transform, opacity;
}

/* Hide close buttons */
.projects-section-close,
.about-me-close,
.contact-close,
.news-section-close {
  display: none !important;
}

/* Override sticky headers - make them static within flow */
.scrolly-section .projects-section-header,
.scrolly-section .about-me-header,
.scrolly-section .contact-header,
.scrolly-section .news-section-header {
  position: relative;
  background-color: transparent;
  border-bottom: none;
  box-shadow: none;
}

/* Section header underlines always visible */
.scrolly-section.visible .projects-section-header h2::after,
.scrolly-section.visible .about-me-header h2::after,
.scrolly-section.visible .news-section-header h2::after {
  width: 120px;
}

/* Center containers */
.scrolly-section .projects-container,
.scrolly-section .about-me-container,
.scrolly-section .news-articles {
  max-width: 900px;
  margin: 40px auto;
}

/* Extra space after contact so it can scroll away */
.scrolly-section.contact-section {
  margin-bottom: 60vh;
}

/* Footer spacing */
footer {
  position: relative !important;
  margin-top: 40px;
  padding: 40px 0;
}

/* Floating chat button */
.floating-chat-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  padding: 14px 24px;
  background-color: rgba(15, 43, 63, 0.9);
  color: #fff;
  border: 1px solid rgba(59, 193, 199, 0.5);
  border-radius: 30px;
  font-family: 'Cormorant', serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.floating-chat-btn:hover {
  background-color: rgba(59, 193, 199, 0.2);
  border-color: #3bc1c7;
  transform: translateY(-2px);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Responsive overrides */
@media (max-width: 1200px) {
  .scrolly-section.projects-section,
  .scrolly-section.about-me-section,
  .scrolly-section.contact-section,
  .scrolly-section.news-section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .scrolly-section.projects-section,
  .scrolly-section.about-me-section,
  .scrolly-section.contact-section,
  .scrolly-section.news-section {
    width: 100%;
    padding: 60px 15px;
  }

  .scrolly-hero {
    min-height: 100vh;
    padding: 20px;
  }
}
