/* Added custom Google Fonts */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.font-serif {
  font-family: "Playfair Display", Georgia, serif;
}

/* Cookie popup with modern rounded style */
.cookie-popup {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  max-width: 500px;
  width: 90%;
  transition: bottom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.cookie-popup.show {
  bottom: 30px;
}

.cookie-content {
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .cookie-content {
    align-items: center;
  }
}

/* Section fade-in animations with modern timing */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Form validation error states */
input.border-red-500,
textarea.border-red-500 {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.text-red-500 {
  color: #ef4444;
}

/* Modern focus states for inputs */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Mobile menu animation */
@media (max-width: 1023px) {
  #mobileMenu {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* New floating animation for stakeholder badges */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.stakeholder-badge {
  animation-iteration-count: infinite;
}

/* Card hover effects with smooth transitions */
.service-card,
.case-card,
.team-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover,
.case-card:hover,
.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Interactive card flip styles */
[data-flip-card] {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

[data-flip-card]:active {
  transform: rotateY(10deg);
}

/* Image hover effects */
.team-card img {
  transition: transform 0.3s ease;
}

/* Gradient backgrounds with smooth transitions */
.bg-gradient-to-br,
.bg-gradient-to-b,
.bg-gradient-to-r {
  background-size: 200% 200%;
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Button hover effects with scale */
button,
a[class*="bg-"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover,
a[class*="bg-"]:hover {
  transform: translateY(-2px);
}

button:active,
a[class*="bg-"]:active {
  transform: translateY(0);
}

/* Scrollbar styling for modern browsers */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c084fc;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
}

/* Selection styling */
::selection {
  background-color: #c084fc;
  color: white;
}

::-moz-selection {
  background-color: #c084fc;
  color: white;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

img:not([src]) {
  opacity: 0;
}

/* Link underline animation */
a {
  position: relative;
}

a:not([class*="bg-"])::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transition: width 0.3s ease;
}

a:not([class*="bg-"]):hover::after {
  width: 100%;
}

/* Card content max-height for expandable cards */
.case-card p {
  max-height: 4.5rem;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
