/* ── ELEGANT ANIMATIONS SYSTEM ──
   Tailored for D Interior Designs & Fabrics Inc
   Contains premium, ultra-smooth, lightweight scroll reveals and micro-interactions.
*/

:root {
  --ease-lux: cubic-bezier(0.25, 1, 0.5, 1); /* Ultra smooth ease-out */
  --shadow-lux: 0 15px 35px rgba(0, 0, 0, 0.04), 0 5px 15px rgba(0, 0, 0, 0.01);
  --shadow-lux-hover: 0 30px 60px rgba(197, 160, 89, 0.14), 0 10px 25px rgba(0, 0, 0, 0.04);
}

/* ── ELGANT SCROLL REVEAL ENGINE ── */
.reveal {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.8s var(--ease-lux), 
              transform 0.8s var(--ease-lux);
}

/* Elegant, subtle reveal directions (micro-movements for premium feel) */
.reveal-fade {
  transform: translateY(0);
}

.reveal-up {
  transform: translateY(15px); /* Gentle, high-end vertical rise */
}

.reveal-down {
  transform: translateY(-15px);
}

.reveal-left {
  transform: translateX(15px);
}

.reveal-right {
  transform: translateX(-15px);
}

.reveal-scale {
  transform: scale(0.98);
}

.reveal-skew {
  transform: translateY(15px); /* Simplified skew to a standard high-end fade-up */
}

.reveal-blur {
  opacity: 0;
  transform: translateY(10px); /* Simplified blur to standard high-end fade-up */
}

/* ── ACTIVE STATE: TRIGGERED WHEN IN VIEWPORT ── */
.reveal.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* ── CINEMATIC HERO (KEN BURNS EFFECT) ── */
.hero-slider {
  overflow: hidden;
}

.hero-slide {
  transform: scale(1.05);
  transition: opacity 1.8s ease-in-out, transform 15s linear !important;
}

.hero-slide.slide-active {
  opacity: 1 !important;
  transform: scale(1.01);
}

/* ── LUXURY INTERACTION STYLES ── */

/* Card hover with micro-scale & soft gold focus */
.hover-lift {
  transition: transform 0.4s var(--ease-lux), 
              box-shadow 0.4s var(--ease-lux), 
              border-color 0.4s var(--ease-lux) !important;
  box-shadow: var(--shadow-lux);
}

.hover-lift:hover {
  transform: translateY(-6px) !important;
  box-shadow: var(--shadow-lux-hover) !important;
  border-color: #C5A059 !important;
}

/* Soft floating animation for badges and highlights */
.float-soft {
  animation: floatAnim 6s ease-in-out infinite;
}

@keyframes floatAnim {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Image zoom effect */
.img-zoom-hover {
  overflow: hidden;
}

.img-zoom-hover img {
  transition: transform 1s var(--ease-lux) !important;
}

.img-zoom-hover:hover img {
  transform: scale(1.04) !important;
}

/* Navigation Draw Underscore */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 1.5px;
  background: #C5A059;
  transition: width 0.4s var(--ease-lux), left 0.4s var(--ease-lux) !important;
}

.nav-links a:hover::after {
  width: 100%;
  left: 0;
}

/* ── INTERACTIVE FOOTER CREDITS TOOLTIP ── */
.credit-tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.credit-link {
  color: #C5A059 !important; /* Gold */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
  display: inline-block;
}

.credit-link:hover {
  color: #E5D5B7 !important; /* Gold light */
  text-shadow: 0 0 8px rgba(197, 160, 89, 0.4);
}

.credit-tooltip {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 280px;
  background: #1a1a1a;
  border: 1px solid #C5A059;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* Triangle pointer */
.credit-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: #1a1a1a transparent transparent transparent;
}

/* Triangle border highlight */
.credit-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px;
  border-style: solid;
  border-color: #C5A059 transparent transparent transparent;
  z-index: -1;
}

.credit-tooltip-wrapper:hover .credit-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto; /* Enable clicks inside the tooltip */
}

.tooltip-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.tooltip-text {
  font-size: 12px;
  line-height: 1.6;
  color: #ccc;
  display: block;
}

.tooltip-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  background: #C5A059;
  color: #1a1a1a !important;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border-radius: 4px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.tooltip-cta:hover {
  background: #E5D5B7;
  transform: translateY(-2px);
}

/* ── MOBILE RESPONSIVENESS & NAV DRAWER SYSTEM ── */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark, #1a1a1a);
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .mobile-toggle {
    display: flex !important;
  }

  nav .nav-inner {
    padding: 0 16px !important;
  }

  .nav-links {
    position: fixed !important;
    top: var(--nav-height, 70px) !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--nav-height, 70px)) !important;
    background: #ffffff !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 40px 24px !important;
    gap: 20px !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    display: flex !important;
  }

  .nav-links.active {
    transform: translateX(0) !important;
  }

  .nav-links li {
    width: 100% !important;
    text-align: center !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .nav-links a {
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 12px 0 !important;
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    color: #1a1a1a !important;
  }

  .nav-actions {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Global Layout Scaling for Mobile Devices */
  section {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }

  /* Universal Responsive Grid Overrides */
  .grid, 
  .steps, 
  .packages-grid, 
  .ba-grid, 
  .studio-gallery-grid, 
  .living-room-grid, 
  .form-grid, 
  .gallery-grid, 
  .product-grid, 
  .services-grid, 
  .contact-grid, 
  .showcase-inner,
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .study-card {
    flex-direction: column !important;
    gap: 30px !important;
  }

  .study-img {
    height: 280px !important;
    width: 100% !important;
    box-shadow: none !important;
  }

  .hero-content h1, .hero-title {
    font-size: 32px !important;
  }

  .showcase-title, .living-room-title, .section-title {
    font-size: 28px !important;
  }

  /* Form & Interactive elements responsiveness */
  input, select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
  }

  .lightbox-nav {
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
  }

  .lightbox-prev { left: 5px !important; }
  .lightbox-next { right: 5px !important; }
}

@media (max-width: 480px) {
  .btn-hero, .btn-primary, .btn-secondary, .btn-cta, .btn-dark {
    width: 100% !important;
    text-align: center !important;
    padding: 14px 20px !important;
  }

  .category-pills {
    gap: 8px !important;
  }

  .pill {
    padding: 8px 16px !important;
    font-size: 11px !important;
  }
}

