:root {
  --warm-dark: #3a3226;
  --gold: #c4a86f;
  --dusty-rose: #d8b4a0;
  --beige: #f5f0e6;
  --text-light: #f8f8f8;
}

.unique-gallery-section {
  position: relative;
  padding: 6rem 1.5rem;
  background: var(--warm-dark);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.unique-gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  width: 100%;
}

/* Header Styles */
.unique-gallery-header {
  text-align: center;
  margin-bottom: 4rem;
  transform: translateY(20px);
  opacity: 0;
  animation: unique-gallery-fadeInUp 0.8s ease forwards 0.3s;
}

.unique-gallery-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-family: "Dancing Script", cursive;
  text-shadow: 0 2px 10px rgba(196, 168, 111, 0.2);
}

.unique-gallery-header p {
  color: var(--text-light);
  opacity: 0.8;
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-family: "Montserrat", sans-serif;
}

/* Gallery Grid Styles */
.unique-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
  transform: translateY(20px);
  opacity: 0;
  animation: unique-gallery-fadeInUp 0.8s ease forwards 0.5s;
}

.unique-gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1/1;
}

.unique-gallery-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 5px solid transparent;
  background-clip: padding-box;
  background-image: linear-gradient(var(--warm-dark), var(--warm-dark)),
    linear-gradient(
      135deg,
      var(--gold) 0%,
      var(--dusty-rose) 50%,
      var(--gold) 100%
    );
  background-origin: border-box;
  background-size: 200% 200%;
  animation: unique-gallery-gradientBorder 8s ease infinite;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.unique-gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.unique-gallery-item:hover .unique-gallery-frame {
  transform: scale(1.05);
}

.unique-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.unique-gallery-item:hover .unique-zoom-overlay {
  opacity: 1;
}

.unique-zoom-overlay i {
  color: var(--gold);
  font-size: 1.8rem;
}

/* Modal Styles */
.unique-gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.unique-modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  animation: unique-gallery-zoomIn 0.6s ease;
}

.unique-modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: var(--gold);
  font-size: 40px;
  font-weight: bold;
  transition: color 0.3s ease;
  cursor: pointer;
}

.unique-modal-close:hover,
.unique-modal-close:focus {
  color: var(--beige);
}

/* Decorative Elements */
.unique-gallery-watercolor {
  position: absolute;
  top: -50px;
  left: -50px;
  width: 300px;
  height: 300px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="%23d8b4a0" opacity="0.08" d="M45,5c25,15,40,50,60,80s45,65,70,70s45-30,20-80S90,10,45,5z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  animation: unique-gallery-float 12s ease-in-out infinite;
}

.unique-gallery-flourish {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="%23c4a86f" opacity="0.1" d="M30,30c10,5,25-5,40,15s35,45,60,30s35-40,15-60S60,10,30,30z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 1;
  animation: unique-gallery-float 8s ease-in-out infinite reverse;
}

/* Animations */
@keyframes unique-gallery-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes unique-gallery-float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(10px, 10px) rotate(2deg);
  }
}

@keyframes unique-gallery-gradientBorder {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes unique-gallery-zoomIn {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .unique-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .unique-gallery-section {
    padding: 4rem 1rem;
  }

  .unique-gallery-header h1 {
    font-size: 3rem;
  }

  .unique-gallery-watercolor,
  .unique-gallery-flourish {
    width: 200px;
    height: 200px;
  }

  .unique-modal-content {
    width: 90%;
  }
}

@media (max-width: 576px) {
  .unique-gallery-grid {
    grid-template-columns: 1fr;
  }

  .unique-gallery-header h1 {
    font-size: 2.5rem;
  }

  .unique-gallery-header p {
    font-size: 1rem;
  }

  .unique-gallery-frame {
    border-width: 3px;
  }

  .unique-zoom-overlay i {
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .unique-gallery-container {
    max-width: 1300px;
  }

  .unique-gallery-header h1 {
    font-size: 4.5rem;
  }
}

/* Motion Sensitivity Preference */
@media (prefers-reduced-motion) {
  .unique-gallery-frame {
    animation: none;
    background: var(--warm-dark);
    border: 1px solid var(--gold);
  }

  .unique-gallery-watercolor,
  .unique-gallery-flourish {
    animation: none;
  }

  .unique-modal-content {
    animation: none;
  }

  .unique-gallery-item:hover .unique-gallery-frame {
    transform: none;
  }
}
