#three-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

#hero-3d {
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero .hero-content {
  position: relative;
  z-index: 2;
}

/* ========== FLOATING LAYER — общий эффект "парения" ========== */
.room-card,
.gallery-grid .gallery-item,
.service-card,
.banner-card,
.review-card,
.glass-card,
.calc-event-result {
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              z-index 0s;
}

/* Тень "над фоном" — имитация парения 24/7, не только при hover */
.room-card,
.gallery-grid .gallery-item,
.service-card,
.banner-card,
.review-card {
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* Hover — ещё выше, ещё глубже тень */
.room-card:hover,
.gallery-grid .gallery-item:hover,
.service-card:hover,
.banner-card:hover,
.review-card:hover {
  z-index: 10;
  box-shadow:
    0 8px 12px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 40px 80px rgba(0, 0, 0, 0.08),
    0 2px 0 rgba(201, 162, 39, 0.08);
}

/* ========== GALLERY ========== */
.gallery-grid .gallery-item {
  perspective: 900px;
  transform-style: preserve-3d;
}
.gallery-grid .gallery-item img {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
  transform: translateZ(0);
  will-change: transform;
  border-radius: 12px;
}
.gallery-grid .gallery-item:hover img {
  transform: translateZ(25px) scale(1.03);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.2),
    0 30px 60px rgba(0, 0, 0, 0.12);
}
.gallery-grid .gallery-item:hover {
  transform: translateY(-6px);
}

/* ========== ROOM CARDS ========== */
.room-card {
  perspective: 1000px;
  transform-style: preserve-3d;
}
.room-card .room-image {
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s ease;
  will-change: transform;
}
.room-card:hover .room-image {
  transform: translateZ(18px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.room-card:hover {
  transform: translateY(-6px);
}

/* ========== SERVICE CARDS ========== */
.service-card {
  perspective: 800px;
}
.service-card:hover {
  transform: translateY(-8px) rotateX(-2deg);
  box-shadow:
    0 12px 20px rgba(0, 0, 0, 0.08),
    0 25px 50px rgba(0, 0, 0, 0.1),
    0 50px 80px rgba(0, 0, 0, 0.06);
}

/* ========== BANNER CARDS ========== */
.banner-card {
  perspective: 800px;
  transform-style: preserve-3d;
}
.banner-card:hover {
  transform: translateY(-6px) rotateX(-2deg);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.15),
    0 30px 60px rgba(0, 0, 0, 0.1);
}

/* ========== REVIEW CARDS ========== */
.review-card {
  perspective: 800px;
}
.review-card:hover {
  transform: translateY(-5px) rotateX(-1deg);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 40px 70px rgba(0, 0, 0, 0.05);
}

/* ========== GLASS CARD ========== */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  transform-style: preserve-3d;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.06);
}
.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(201, 162, 39, 0.15);
  transform: translateY(-5px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 40px 60px rgba(0, 0, 0, 0.06);
}

/* ========== ABOUT IMAGES ========== */
.about-img-main, .about-img-secondary {
  will-change: transform;
  box-shadow:
    0 6px 12px rgba(0, 0, 0, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.08);
}
.about-images:hover .about-img-main {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.08),
    0 25px 50px rgba(0, 0, 0, 0.12),
    0 50px 80px rgba(0, 0, 0, 0.06);
}
.about-images:hover .about-img-secondary {
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.08),
    0 25px 50px rgba(0, 0, 0, 0.12),
    0 50px 80px rgba(0, 0, 0, 0.06);
}

/* ========== CALCULATOR RESULT ========== */
.calc-event-result {
  perspective: 900px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.06);
}
.calc-event-result:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 40px 60px rgba(0, 0, 0, 0.06);
}

/* ========== FLOATING LAYER — мягкая анимация парения (опционально) ========== */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.gallery-grid .gallery-item,
.room-card,
.service-card,
.banner-card {
  animation: gentleFloat 6s ease-in-out infinite;
}
.gallery-grid .gallery-item:nth-child(2n) { animation-delay: -1.5s; }
.gallery-grid .gallery-item:nth-child(3n) { animation-delay: -3s; }
.room-card:nth-child(2n) { animation-delay: -2s; }
.service-card:nth-child(2) { animation-delay: -1s; }
.service-card:nth-child(3) { animation-delay: -2s; }
.banner-card:nth-child(2) { animation-delay: -1s; }
.banner-card:nth-child(3) { animation-delay: -2s; }
.banner-card:nth-child(4) { animation-delay: -3s; }
.banner-card:nth-child(5) { animation-delay: -4s; }

/* При hover анимация парения стопорится, элемент фиксируется */
.gallery-grid .gallery-item:hover,
.room-card:hover,
.service-card:hover,
.banner-card:hover {
  animation-play-state: paused;
}

/* ========== FLOATING SHAPES (фоновые декорации) ========== */
.floating-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.03;
  animation: floatShape 20s ease-in-out infinite;
}
.floating-shape:nth-child(1) {
  width: 300px; height: 300px;
  background: linear-gradient(135deg, #1a5c3a, #c9a227);
  top: -50px; left: -80px;
  animation-delay: 0s;
  animation-duration: 25s;
}
.floating-shape:nth-child(2) {
  width: 200px; height: 200px;
  background: linear-gradient(135deg, #c9a227, #1a5c3a);
  bottom: 10%; right: -40px;
  animation-delay: -5s;
  animation-duration: 20s;
}
.floating-shape:nth-child(3) {
  width: 150px; height: 150px;
  border: 2px solid rgba(201, 162, 39, 0.05);
  background: none;
  bottom: 30%; left: 20%;
  animation-delay: -10s;
  animation-duration: 18s;
}
@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(30px, -40px) rotate(90deg) scale(1.05); }
  50% { transform: translate(-20px, 20px) rotate(180deg) scale(0.95); }
  75% { transform: translate(40px, 30px) rotate(270deg) scale(1.02); }
}

/* ========== TEXT GRADIENT ========== */
.text-gradient {
  background: linear-gradient(135deg, #c9a227 0%, #e0c158 50%, #c9a227 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== SHIMMER ========== */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ========== HERO PARTICLES ========== */
.hero-particle {
  position: absolute;
  background: rgba(201, 162, 39, 0.15);
  border-radius: 50%;
  animation: floatParticle linear infinite;
  pointer-events: none;
}
@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ========== SECTION HEADERS ========== */
.section-label {
  transition: transform 0.4s ease;
}
.section-label:hover {
  transform: translateY(-2px);
}

/* ========== CONTACT MAP ========== */
.map-container {
  perspective: 1200px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.06);
}
.map-container:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ========== MOUSE GLOW ========== */
.mouse-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 92, 58, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  #hero-3d { display: none; }
  .floating-shape { opacity: 0.01; }
  .gallery-grid .gallery-item:hover img,
  .room-card:hover .room-image,
  .about-images:hover .about-img-main,
  .about-images:hover .about-img-secondary {
    transform: none;
  }
  .gallery-grid .gallery-item,
  .room-card,
  .service-card,
  .banner-card {
    animation: none;
  }
}

/* ========== TILT JS TARGET ========== */
.tilt-target {
  transform-style: preserve-3d;
  will-change: transform;
}
