/* Минимальные кастомные стили поверх Tailwind */
:root {
  --accent: #0081af; /* cerulean */
  /* New palette */
  --col-900: #242f40; /* gunmetal - dark */
  --col-800: #363636; /* jet - darker */
  --col-100: #e5e5e5; /* platinum - light */
  --col-50: #ffffff; /* white */
  --col-cerulean: #0081af; /* cerulean */
  --col-saffron: #f3ca40; /* saffron */
  --col-teal: #242f40; /* gunmetal as accent */
  --accent: var(--col-cerulean);
}

html,
body {
  height: 100%;
}
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial;
  background-color: var(--col-100);
  color: var(--col-900);
}

/* Утилита для теней похожих на Apple */
.shadow-apple {
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
}

/* Glassmorphism utility - Apple-like */
.glass {
  /* translucent glass with subtle gradient */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0.1)
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Variant for light backgrounds */
.glass--light {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.7),
    rgba(255, 255, 255, 0.5)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Variant for dark backgrounds */
.glass--dark {
  background: linear-gradient(
    135deg,
    rgba(36, 47, 64, 0.2),
    rgba(36, 47, 64, 0.1)
  );
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Ultra glass for headers */
.glass--ultra {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* accent translucent helpers (for Tailwind-like bg-accent/10 usage) */
.bg-accent-10 {
  background-color: rgba(0, 129, 175, 0.1) !important;
}
.bg-accent-20 {
  background-color: rgba(0, 129, 175, 0.2) !important;
}
.bg-accent-30 {
  background-color: rgba(0, 129, 175, 0.3) !important;
}

/* Плавные переходы для интерактивных элементов */
.transition-soft {
  transition: all 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* Скрытые элементы (используется для мобильного меню) */
.hidden {
  display: none;
}

/* SR-ONLY (screen-reader only) helper */
.sr-only {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.sr-only.focus\:not-sr-only:focus {
  position: static !important;
  height: auto;
  width: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  background: #242f40;
  color: #e5e5e5;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 60;
  transform: translateY(-120%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: translateY(0%);
}

/* Active language highlight */
.lang-active {
  font-weight: 700;
  color: var(--accent);
}

/* Button subtle enhancements */
.btn-soft {
  border-radius: 12px;
  padding: 10px 18px;
}

/* Icon helper for external SVGs */
.icon {
  display: inline-block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* Simple partners carousel */
.carousel {
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 1.25rem;
  transition: transform 0.45s ease;
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 auto;
  width: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: transparent;
  border-radius: 12px;
}
.carousel-slide.glass {
  padding: 0.75rem;
}
.carousel-slide img {
  max-width: 100%;
  height: 3.5rem;
  object-fit: contain;
  opacity: 0.95;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.carousel-btn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.06);
}
.carousel-indicators {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}
.carousel-indicators button {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #e5e7eb;
  border: none;
}
.carousel-indicators button.active {
  background: #0081af;
}

@media (max-width: 768px) {
  .carousel-slide {
    width: 9rem;
  }
  .carousel-slide img {
    height: 2.5rem;
  }
}

/* Accent utilities to ensure palette applies even if Tailwind classes missing */
.bg-accent {
  background-color: #0081af !important;
  color: #e5e5e5;
}
.bg-brandAmber {
  background-color: #f3ca40 !important;
  color: #242f40;
}
.text-accent {
  color: #0081af !important;
}
.border-accent {
  border-color: #0081af !important;
}
.btn-accent {
  background-color: #0081af;
  color: #e5e5e5;
  border-radius: 8px;
  padding: 0.6rem 1rem;
}
.bg-brandLight {
  background-color: #e5e5e5 !important;
}
.text-brandDark {
  color: #242f40 !important;
}

/* Fallback utility: ensure desktop nav shows even if Tailwind responsive classes are missing */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex !important;
    align-items: center;
    gap: 2rem;
  }
}

/* Fallback for language switcher on desktop */
@media (min-width: 768px) {
  .lang-desktop {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
  }
}

/* Continuous partners carousel: smooth infinite scroll */
@-webkit-keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-200px * 6));
  }
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-200px * 6));
  }
}

.slider {
  background: #0081af;
  height: 80px;
  margin: auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slider::before,
.slider::after {
  background: linear-gradient(to right, #0081af 0%, rgba(0, 129, 175, 0) 100%);
  content: "";
  height: 80px;
  position: absolute;
  width: 200px;
  z-index: 2;
}

.slider::after {
  right: 0;
  top: 0;
  transform: rotateZ(180deg);
}

.slider::before {
  left: 0;
  top: 0;
}

.slider .slide-track {
  -webkit-animation: scroll 40s linear infinite;
  animation: scroll 40s linear infinite;
  display: flex;
  width: calc(200px * 12);
}

.slider .slide {
  height: 80px;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider .slide img {
  max-height: 60px;
  max-width: 180px;
  object-fit: contain;
}

/* Mobile optimizations */
.transition-soft {
  transition: all 0.3s ease;
}

/* Fix for mobile scroll issues */
body {
  -webkit-overflow-scrolling: touch;
}

/* Ensure proper touch behavior */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Language link highlighting */
.lang-active {
  color: #0081af !important;
  font-weight: 600;
}

/* Enhanced mobile menu */
#mobile-menu {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  touch-action: manipulation;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Header improvements */
header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.hamburger-icon {
  font-size: 18px;
  font-weight: 400;
}

/* Better mobile header spacing */
@media (max-width: 1024px) {
  header .max-w-6xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Mobile header adjustments */
  header {
    min-height: 56px;
    max-height: 64px;
  }

  /* Better mobile menu animation */
  #mobile-menu.menu-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  .carousel-track {
    gap: 20px;
  }

  /* Ensure text is readable on mobile */
  body {
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }

  html {
    height: -webkit-fill-available;
  }

  /* Fix for iOS viewport issues */
  .ios-height-fix {
    min-height: calc(
      100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
  }
}

/* Prevent horizontal scroll while allowing vertical scroll */
html {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

/* ===== ANIMATIONS ===== */

/* Keyframe animations */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoomInRotate {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    transform: translate3d(0,-15px,0);
  }
  70% {
    transform: translate3d(0,-7px,0);
  }
  90% {
    transform: translate3d(0,-2px,0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes floatSlow {
  0% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.02);
  }
  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes floatSlower {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-15px) rotate(1deg);
  }
  66% {
    transform: translateY(-5px) rotate(-1deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
    box-shadow: 0 0 20px rgba(0, 129, 175, 0.3);
  }
  50% {
    transform: rotate(180deg);
    box-shadow: 0 0 30px rgba(0, 129, 175, 0.5);
  }
  100% {
    transform: rotate(360deg);
    box-shadow: 0 0 20px rgba(0, 129, 175, 0.3);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.1);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.1);
  }
  70% {
    transform: scale(1);
  }
}

@keyframes wiggle {
  0%, 7% {
    transform: rotateZ(0);
  }
  15% {
    transform: rotateZ(-15deg);
  }
  20% {
    transform: rotateZ(10deg);
  }
  25% {
    transform: rotateZ(-10deg);
  }
  30% {
    transform: rotateZ(6deg);
  }
  35% {
    transform: rotateZ(-4deg);
  }
  40%, 100% {
    transform: rotateZ(0);
  }
}

/* Animation utility classes */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 1s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 1s ease-out forwards;
}

.animate-zoom-in {
  animation: zoomIn 0.6s ease-out forwards;
}

.animate-zoom-in-rotate {
  animation: zoomInRotate 0.8s ease-out forwards;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-float-slower {
  animation: floatSlower 12s ease-in-out infinite;
}

.animate-rotate-glow {
  animation: rotateGlow 4s linear infinite;
}

.animate-shimmer {
  /* background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); */
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.animate-heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

.animate-wiggle {
  animation: wiggle 1s ease-in-out;
}

/* Delayed animations */
.animate-fade-in-up-delayed {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-fade-in-up-delayed-more {
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.animate-fade-in-up-delayed-most {
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
  opacity: 0;
}

.animate-slide-in-left-delayed {
  animation: slideInLeft 1s ease-out 0.3s forwards;
  opacity: 0;
}

.animate-slide-in-right-delayed {
  animation: slideInRight 1s ease-out 0.3s forwards;
  opacity: 0;
}

/* Hover animations */
.animate-bounce-on-hover:hover {
  animation: bounce 1s;
}

.animate-pulse-on-hover:hover {
  animation: pulse 0.5s;
}

.animate-wiggle-on-hover:hover {
  animation: wiggle 0.8s;
}

.animate-heartbeat-on-hover:hover {
  animation: heartbeat 1s;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.animate-on-scroll-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.animate-on-scroll-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.animate-on-scroll-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.animate-on-scroll-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.animate-on-scroll-scale.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Enhanced button animations */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.btn-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-enhanced:hover::before {
  left: 100%;
}

.btn-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-enhanced:active {
  transform: translateY(0);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Card hover animations */
.card-hover {
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Image hover effects */
.image-hover-zoom {
  overflow: hidden;
  border-radius: 1.5rem;
}

.image-hover-zoom img {
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.image-hover-zoom:hover img {
  transform: scale(1.1);
}

/* Text reveal animation */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  animation: fadeInUp 0.8s ease-out forwards;
}

.text-reveal span:nth-child(1) { animation-delay: 0s; }
.text-reveal span:nth-child(2) { animation-delay: 0.1s; }
.text-reveal span:nth-child(3) { animation-delay: 0.2s; }
.text-reveal span:nth-child(4) { animation-delay: 0.3s; }
.text-reveal span:nth-child(5) { animation-delay: 0.4s; }

/* Gradient animation backgrounds */
.bg-gradient-animate {
  background: linear-gradient(-45deg, #0081af, #242f40, #0081af, #f3ca40);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Staggered animations */
.stagger-animation > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 129, 175, 0.1);
  border-top: 4px solid #0081af;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
