/* ========================================
   FLUIDITY ENHANCEMENTS - PROFESSIONAL ANIMATIONS & TRANSITIONS
   For Client Review - Perfect Polish
   ======================================== */

/* ========================================
   1. GLOBAL SMOOTH TRANSITIONS
   ======================================== */

* {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

/* Scrollbar styles moved to typography-system.css for unified design */

/* ========================================
   2. ENHANCED NAVIGATION EFFECTS
   ======================================== */

.navbar {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #D4AF37, #4E102F);
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 80%;
}

.nav-link:hover {
  transform: translateY(-2px);
  color: #4E102F !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Logo hover effect */
.logo {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 20px rgba(78, 16, 47, 0.2);
}

/* Mobile menu animation */
.mobile-menu {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   3. BUTTON HOVER ANIMATIONS
   ======================================== */

button,
.btn,
[class*="btn-"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button::before,
.btn::before,
[class*="btn-"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

button:hover::before,
.btn:hover::before,
[class*="btn-"]:hover::before {
  width: 300px;
  height: 300px;
}

button:hover,
.btn:hover,
[class*="btn-"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(78, 16, 47, 0.3);
}

button:active,
.btn:active,
[class*="btn-"]:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(78, 16, 47, 0.2);
}

/* Primary button specific */
.btn-primary,
.btn-animated-primary {
  background: linear-gradient(135deg, #4E102F 0%, #892f55 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover,
.btn-animated-primary:hover {
  background: linear-gradient(135deg, #892f55 0%, #4E102F 100%);
  box-shadow: 0 12px 35px rgba(78, 16, 47, 0.4);
}

/* ========================================
   4. CARD HOVER EFFECTS
   ======================================== */

.card,
[class*="card-"],
.team-card,
.service-card,
.blog-card,
.insight-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card::after,
[class*="card-"]::after,
.team-card::after,
.service-card::after,
.blog-card::after,
.insight-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 20px 50px rgba(78, 16, 47, 0.15);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: -1;
}

.card:hover,
[class*="card-"]:hover,
.team-card:hover,
.service-card:hover,
.blog-card:hover,
.insight-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.card:hover::after,
[class*="card-"]:hover::after,
.team-card:hover::after,
.service-card:hover::after,
.blog-card:hover::after,
.insight-card:hover::after {
  opacity: 1;
}

/* Card image zoom effect */
.card img,
[class*="card-"] img,
.team-card img,
.service-card img,
.blog-card img,
.insight-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover img,
[class*="card-"]:hover img,
.team-card:hover img,
.service-card:hover img,
.blog-card:hover img,
.insight-card:hover img {
  transform: scale(1.1);
}

/* ========================================
   5. LINK HOVER EFFECTS
   ======================================== */

a:not(.btn):not(.nav-link):not(.logo) {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:not(.btn):not(.nav-link):not(.logo):hover {
  color: #4E102F;
  transform: translateX(3px);
}

/* Underline animation for text links */
.text-link,
a[href^="mailto"],
a[href^="tel"] {
  position: relative;
  display: inline-block;
}

.text-link::after,
a[href^="mailto"]::after,
a[href^="tel"]::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #4E102F, #D4AF37);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-link:hover::after,
a[href^="mailto"]:hover::after,
a[href^="tel"]:hover::after {
  width: 100%;
}

/* ========================================
   6. FORM INPUT ANIMATIONS
   ======================================== */

input,
textarea,
select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
textarea:focus,
select:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(78, 16, 47, 0.15);
  border-color: #4E102F !important;
}

/* Floating label animation */
.form-group {
  position: relative;
}

.form-label {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus + .form-label,
textarea:focus + .form-label,
input:not(:placeholder-shown) + .form-label,
textarea:not(:placeholder-shown) + .form-label {
  transform: translateY(-1.5rem) scale(0.85);
  color: #4E102F;
}

/* ========================================
   7. ICON ANIMATIONS
   ======================================== */

i,
.icon,
[class*="fa-"],
svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover i,
a:hover .icon,
a:hover [class*="fa-"],
a:hover svg,
button:hover i,
button:hover .icon,
button:hover [class*="fa-"],
button:hover svg {
  transform: scale(1.2) rotate(5deg);
}

/* Specific icon animations */
.fa-arrow-right {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover .fa-arrow-right,
button:hover .fa-arrow-right {
  transform: translateX(5px);
}

.fa-phone,
.fa-envelope {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover .fa-phone {
  transform: rotate(15deg) scale(1.1);
}

a:hover .fa-envelope {
  transform: translateY(-3px) scale(1.1);
}

/* ========================================
   8. SECTION FADE-IN ANIMATIONS
   ======================================== */

section {
  animation: section-fade-in 0.8s ease-out;
}

@keyframes section-fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for child elements */
section > * {
  animation: stagger-fade-in 0.6s ease-out backwards;
}

section > *:nth-child(1) { animation-delay: 0.1s; }
section > *:nth-child(2) { animation-delay: 0.2s; }
section > *:nth-child(3) { animation-delay: 0.3s; }
section > *:nth-child(4) { animation-delay: 0.4s; }
section > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes stagger-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   9. IMAGE HOVER EFFECTS
   ======================================== */

img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

a img:hover,
.image-container:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Image overlay effect */
.image-wrapper {
  position: relative;
  overflow: hidden;
}

.image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(78, 16, 47, 0.7), rgba(212, 175, 55, 0.7));
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.image-wrapper:hover::before {
  opacity: 1;
}

/* ========================================
   10. CAROUSEL ENHANCEMENTS
   ======================================== */

.carousel-card,
.professional-carousel .carousel-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card:hover,
.professional-carousel .carousel-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 50px rgba(78, 16, 47, 0.25);
}

.carousel-nav,
.carousel-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-nav:hover,
.carousel-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 25px rgba(78, 16, 47, 0.3);
}

.carousel-dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot:hover {
  transform: scale(1.3);
}

/* ========================================
   11. MODAL ANIMATIONS
   ======================================== */

.modal {
  animation: modal-fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content {
  animation: modal-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   12. DROPDOWN ANIMATIONS
   ======================================== */

.dropdown-menu,
.nav-dropdown-content {
  animation: dropdown-fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top;
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.dropdown-item {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
  transform: translateX(5px);
  background: linear-gradient(90deg, rgba(78, 16, 47, 0.05), transparent);
}

/* ========================================
   13. BADGE & TAG ANIMATIONS
   ======================================== */

.badge,
.tag,
[class*="badge-"],
[class*="tag-"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge:hover,
.tag:hover,
[class*="badge-"]:hover,
[class*="tag-"]:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 5px 15px rgba(78, 16, 47, 0.2);
}

/* ========================================
   14. ACCORDION ANIMATIONS
   ======================================== */

.accordion-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-button:hover {
  background: linear-gradient(90deg, rgba(78, 16, 47, 0.05), transparent);
  transform: translateX(5px);
}

.accordion-collapse {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   15. PROGRESS BAR ANIMATIONS
   ======================================== */

.progress-bar {
  animation: progress-fill 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes progress-fill {
  from {
    width: 0;
  }
}

/* ========================================
   16. SOCIAL MEDIA ICON EFFECTS
   ======================================== */

.social-icon,
[class*="social-"] a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.social-icon::before,
[class*="social-"] a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(78, 16, 47, 0.1);
  transform: translate(-50%, -50%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.social-icon:hover::before,
[class*="social-"] a:hover::before {
  width: 150%;
  height: 150%;
}

.social-icon:hover,
[class*="social-"] a:hover {
  transform: translateY(-5px) rotate(5deg);
  color: #4E102F;
}

/* ========================================
   17. TABLE ROW HOVER EFFECTS
   ======================================== */

table tr {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

table tbody tr:hover {
  background: linear-gradient(90deg, rgba(78, 16, 47, 0.03), transparent);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(78, 16, 47, 0.1);
}

/* ========================================
   18. SCROLL INDICATOR ANIMATIONS
   ======================================== */

.scroll-indicator {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

/* ========================================
   19. LOADING STATES
   ======================================== */

.loading,
[class*="loading-"] {
  animation: pulse-loading 1.5s ease-in-out infinite;
}

@keyframes pulse-loading {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Skeleton loading animation */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ========================================
   20. PARALLAX EFFECT
   ======================================== */

.parallax {
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   21. TOOLTIP ANIMATIONS
   ======================================== */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
  padding: 0.5rem 1rem;
  background: rgba(78, 16, 47, 0.95);
  color: white;
  border-radius: 6px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* ========================================
   22. FOCUS STATES
   ======================================== */

*:focus {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
  transition: outline-offset 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   23. REDUCED MOTION SUPPORT
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   24. PRINT OPTIMIZATIONS
   ======================================== */

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
