/* ============================================
   MODERN ANIMATIONS & POPUP ELEMENTS
   ============================================ */

/* Fade in animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 20, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 20, 0, 0.8);
  }
}

/* Page load animations */
.brands-item {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.brands-item:nth-child(1) {
  animation-delay: 0.1s;
}

.brands-item:nth-child(2) {
  animation-delay: 0.2s;
}

.brands-item:nth-child(3) {
  animation-delay: 0.3s;
}

.brands-item:nth-child(4) {
  animation-delay: 0.4s;
}

.brands-item:nth-child(5) {
  animation-delay: 0.5s;
}

/* Hover effects for brand cards */
.brands-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  /* Ensure overflow is hidden to prevent image from overlapping text */
  overflow: hidden;
}

.brands-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(255, 20, 0, 0.5), 0 0 60px rgba(255, 20, 0, 0.3), inset 0 0 40px rgba(255, 20, 0, 0.2);
  border-color: rgba(255, 20, 0, 0.8) !important;
}

.brands-item .bandImg {
  transition: transform 0.5s ease;
  /* Prevent image from overlapping text */
  pointer-events: none;
  /* Ensure image stays within bounds */
  will-change: transform;
}

.brands-item:hover .bandImg {
  transform: translateY(-30%) scale(1.05) rotate(3deg);
  /* Movement limited to prevent overlapping text */
  /* Image will be clipped by parent's overflow: hidden */
}

.brands-item .bandBack svg {
  transition: transform 0.5s ease;
}

.brands-item:hover .bandBack svg {
  transform: scale(1.1);
}

/* Button animations */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  color: #1A1A1A;
}

.btn .btn__inner {
  color: inherit;
  z-index: 10;
  position: relative;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 20, 0, 0.4);
  color: #fff !important;
}

.btn:hover .btn__inner {
  color: #fff !important;
}

.btn:active {
  transform: translateY(0);
}

/* Pulse effect for CTA buttons */
.btn--secondary {
  animation: brightPulse 2s infinite;
  color: #fff !important;
  background: linear-gradient(90deg, #FF0000 0%, #FF1400 3%, #FF2800 31%, #FF3C00 57%, #FF5000 81%, #FF6400 100%) !important;
  box-shadow: 0 4px 20px rgba(255, 20, 0, 0.6), 0 0 30px rgba(255, 20, 0, 0.4) !important;
}

.btn--secondary .btn__inner {
  color: #fff !important;
  z-index: 10;
  position: relative;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn--secondary:hover {
  animation: none;
  color: #fff !important;
  background: linear-gradient(90deg, #FF1400 0%, #FF2800 3%, #FF3C00 31%, #FF5000 57%, #FF6400 81%, #FF7800 100%) !important;
  box-shadow: 0 6px 30px rgba(255, 20, 0, 0.8), 0 0 50px rgba(255, 20, 0, 0.6) !important;
}

.btn--secondary:hover .btn__inner {
  color: #fff !important;
}

@keyframes brightPulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(255, 20, 0, 0.6), 0 0 30px rgba(255, 20, 0, 0.4);
  }
  50% {
    box-shadow: 0 6px 30px rgba(255, 20, 0, 0.9), 0 0 50px rgba(255, 20, 0, 0.7);
  }
}

/* Image animations */
.brands-item__top img {
  transition: transform 0.3s ease;
}

.brands-item:hover .brands-item__top img {
  transform: scale(1.1) rotate(5deg);
}

/* Text animations */
.brands-item__row {
  transition: transform 0.3s ease, color 0.3s ease;
}

.brands-item:hover .brands-item__row {
  transform: translateX(10px);
}

/* Title animation */
.terms__title {
  animation: fadeInUp 0.8s ease-out;
}

/* ============================================
   MODAL / POPUP STYLES
   ============================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c2b2b 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 20, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 20, 0, 0.8);
  transform: rotate(90deg);
}

.modal-close::before,
.modal-close::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.modal-title {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.modal-body {
  color: #fff;
  line-height: 1.6;
}

/* ============================================
   TOOLTIP STYLES
   ============================================ */

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 10px;
  position: absolute;
  z-index: 10000;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   NOTIFICATION / TOAST STYLES
   ============================================ */

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.notification {
  background: linear-gradient(135deg, #FF1400 0%, #AA002D 100%);
  color: #fff;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.5s ease;
  max-width: 400px;
  display: none;
  margin-bottom: 10px;
  pointer-events: auto;
}

.notification.active {
  display: block;
}

.notification.success {
  background: linear-gradient(135deg, #4ad315 0%, #2a8a0a 100%);
}

.notification.error {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

/* ============================================
   FLOATING ACTION BUTTON
   ============================================ */

.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #FF1400 0%, #AA002D 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 20, 0, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(255, 20, 0, 0.6);
}

.fab svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loader {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FF1400;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
  .modal-content {
    padding: 20px;
    max-width: 95%;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
  
  .fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .brands-item:hover {
    transform: translateY(-5px) scale(1.01);
  }
}

/* ============================================
   PARALLAX EFFECTS
   ============================================ */

.parallax-element {
  transition: transform 0.3s ease-out;
}

/* ============================================
   GLOW EFFECTS
   ============================================ */

.glow-on-hover {
  transition: box-shadow 0.3s ease;
}

.glow-on-hover:hover {
  box-shadow: 0 0 30px rgba(255, 20, 0, 0.6);
}

/* ============================================
   RIPPLE EFFECT
   ============================================ */

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

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

