/* Custom Styles for TradeClub KZ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--color-text);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Focus States */
input:focus,
textarea:focus,
button:focus {
  outline: none;
  ring: 2px;
  ring-color: #1e293b;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f5f5f4;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0f172a;
}

/* Image Hover Effects */
img {
  transition: transform 0.5s ease;
  max-width: 100%;
  height: auto;
}

img:hover {
  transform: scale(1.05);
}

/* Button Hover Effects */
button,
a {
  transition: all 0.3s ease;
}

/* Form Input Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: inherit;
}

input[type="checkbox"] {
  cursor: pointer;
}

/* Cookie Popup Animation */
#cookiePopup {
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

/* Mobile Menu Animation */
#mobileMenu {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Hover Effects */
.bg-white:hover,
.bg-slate-900:hover,
.bg-stone-50:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

/* Link Underline Animation */
a {
  position: relative;
}

/* Gradient Background Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Text Selection Color */
::selection {
  background-color: #1e293b;
  color: #ffffff;
}

::-moz-selection {
  background-color: #1e293b;
  color: #ffffff;
}

/* Responsive Typography */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

/* Print Styles */
@media print {
  #cookiePopup,
  #burgerBtn,
  header,
  footer {
    display: none;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.6;
  filter: grayscale(50%);
}

/* Error State for Form Inputs */
.border-red-500 {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success Message */
.success-message {
  background-color: #10b981;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Error Message */
.error-message {
  background-color: #ef4444;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* Updated color scheme to match reference design - navy blues, beiges, clean serif typography */

/* Design System Colors */
:root {
  --color-primary: #1e293b; /* slate-900 */
  --color-secondary: #f5f5f4; /* stone-50 */
  --color-accent: #d6d3d1; /* stone-300 */
  --color-text: #0f172a; /* slate-900 */
  --color-text-light: #57534e; /* stone-600 */
}

/* Flip Card Effect */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  height: 100%;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.5rem;
  overflow: hidden;
}

.flip-card-front {
  background-color: white;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Expandable Cards */
.expandable-card {
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.expandable-card.expanded {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Smooth Hover Effects */
.group:hover img {
  transform: scale(1.05);
}

/* Text Balance for Better Typography */
.text-balance {
  text-wrap: balance;
}

/* Overlay Effects */
.overlay-dark {
  position: relative;
}

.overlay-dark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

/* Parallax Background */
.parallax-bg {
  transition: transform 0.1s ease-out;
}

/* Refined Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Button Transitions */
button,
a {
  transition: all 0.3s ease;
}

/* Link Underline Animation */
a[class*="border-b"] {
  position: relative;
  transition: all 0.3s ease;
}

a[class*="border-b"]:hover {
  padding-bottom: 2px;
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Stagger Animation for Lists */
.stagger-item {
  animation: fadeInUp 0.6s ease-out backwards;
}

.stagger-item:nth-child(1) {
  animation-delay: 0.1s;
}
.stagger-item:nth-child(2) {
  animation-delay: 0.2s;
}
.stagger-item:nth-child(3) {
  animation-delay: 0.3s;
}
.stagger-item:nth-child(4) {
  animation-delay: 0.4s;
}
.stagger-item:nth-child(5) {
  animation-delay: 0.5s;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
  outline: 2px solid #1e293b;
  outline-offset: 2px;
}

/* Glass Morphism Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
