/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
  background-color: #f8f9fa;
  color: #212529;
  position: relative; /* For scroll progress bar */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
}

.page {
  display: block;
  width: 100%;
  min-height: 100vh;
}

/* Login Page Styles */
#login-page {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

/* Animated Background */
.animated-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(-45deg, #f0e6e0, #e0c2d0, #c2d5e0, #d5e0c2);
  background-size: 400% 400%;
  animation: gradient 25s ease infinite; /* Slowed down animation */
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.particles::before,
.particles::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: transparent;
}

.particles::before {
  background-image: radial-gradient(white, rgba(255, 255, 255, 0.2) 25%, transparent 50%);
  background-size: 4px 4px;
  animation: particles 30s linear infinite; /* Slowed down */
}

.particles::after {
  background-image: radial-gradient(white, rgba(255, 255, 255, 0.1) 25%, transparent 50%);
  background-size: 5px 5px;
  animation: particles 40s linear infinite; /* Slowed down */
  animation-delay: -10s;
}

@keyframes particles {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 100% 100%;
  }
}

.login-container {
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  text-align: center;
}

.login-title {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #e73c7e;
  font-weight: 600;
}

.login-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #6c757d;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.btn-primary {
  background-color: #e73c7e;
  border-color: #e73c7e;
  padding: 12px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #d62e6e;
  border-color: #d62e6e;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 60, 126, 0.3);
}

/* Landing Page Styles */
#landing-page {
  padding-top: 70px; /* For fixed navbar */
}

/* Navbar Styles */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Shrink navbar on scroll */
.navbar.scrolled {
  padding: 8px 0;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  color: #e73c7e;
}

.navbar-light .navbar-nav .nav-link {
  color: #212529;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: #e73c7e;
}

/* Section Styles */
.section {
  padding: 100px 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background-position 0.5s ease;
}

.section:nth-child(odd) {
  background-color: #fff;
}

.section:nth-child(even) {
  background-color: #f8f9fa;
}

/* Section highlight animation when navigating to it */
.section-highlight {
  animation: section-highlight 1.5s ease;
}

@keyframes section-highlight {
  0% {
    background-color: rgba(231, 60, 126, 0.1);
  }
  50% {
    background-color: rgba(231, 60, 126, 0.2);
  }
  100% {
    background-color: inherit;
  }
}

.section-title {
  font-size: 3rem;
  margin-bottom: 50px;
  color: #e73c7e;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #e73c7e;
}

/* Photo Card Styles */
.photo-card {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.photo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.photo-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo-card:hover img {
  transform: scale(1.05);
}

/* Carousel Styles */
.carousel-container {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel-item img {
  height: 500px;
  object-fit: cover;
}

/* Masonry Gallery */
.masonry-gallery {
  margin-top: 20px;
}

/* Polaroid Card Styles */
.polaroid-card {
  background-color: white;
  padding: 15px 15px 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
}

.polaroid-card:nth-child(odd) {
  --rotation: -3deg;
}

.polaroid-card:nth-child(even) {
  --rotation: 3deg;
}

.polaroid-card:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.polaroid-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 2px;
}

.polaroid-caption {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  color: #333;
  margin-top: 10px;
}

/* Fade Gallery Styles */
.fade-gallery {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 500px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* .fade-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
  overflow: hidden;
}

.fade-item.active {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.6s;
} */
 .fade-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.fade-item.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* .fade-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
} */
 /* Ensure images are responsive */
.fade-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* .fade-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  font-size: 1.5rem;
  font-family: "Playfair Display", serif;
} */
 .fade-caption {
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
}

/* Add styles for the alert messages */
.alert {
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Footer */
.footer {
  background-color: #212529;
  color: white;
  text-align: center;
  padding: 30px 0;
}

/* Scroll Progress Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, #e73c7e, #23a6d5);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
  transition: transform 0.5s ease;
}

.heart {
  width: 20px;
  height: 20px;
  background-color: rgba(231, 60, 126, 0.3);
  transform: rotate(45deg);
  animation: float 6s ease-in-out infinite;
}

.heart:before,
.heart:after {
  content: "";
  width: 20px;
  height: 20px;
  background-color: rgba(231, 60, 126, 0.3);
  border-radius: 50%;
  position: absolute;
}

.heart:before {
  top: -10px;
  left: 0;
}

.heart:after {
  top: 0;
  left: -10px;
}

.circle {
  width: 15px;
  height: 15px;
  background-color: rgba(35, 166, 213, 0.3);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.star {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid rgba(255, 193, 7, 0.3);
  position: absolute;
  transition: transform 0.3s ease;
}

.star:after {
  content: "";
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 20px solid rgba(255, 193, 7, 0.3);
  position: absolute;
  top: 6px;
  left: -10px;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .login-card {
    padding: 30px;
  }

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

  .section {
    padding: 80px 0;
  }

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

  .carousel-item img {
    height: 350px;
  }

  .fade-gallery {
    height: 350px;
  }

  /* Hide floating elements on mobile for better performance */
  .floating-element {
    display: none; 
  }

  /*NEW*/
  .fade-item {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: opacity;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 20px;
  }

  .login-title {
    font-size: 1.8rem;
  }

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

  .carousel-item img {
    height: 250px;
  }

  .fade-gallery {
    height: 250px;
  }
}
