/* Complete CSS redesign matching minimalist blog aesthetic */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Filter buttons styling */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #000;
  background: #f9fafb;
}

.filter-btn.active {
  background: #000;
  color: white;
  border-color: #000;
}

/* Card 3D hover effect */
.card-3d-container {
  perspective: 1000px;
}

.card-3d-inner {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.card-3d-container:hover .card-3d-inner {
  transform: translateY(-8px) rotateX(2deg);
}

/* Card flip effect for interactive cards */
.card-flip-container {
  perspective: 1500px;
  cursor: pointer;
}

.card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 600px;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.card-flip-container:hover .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front,
.card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* Cookie Popup */
.cookie-popup {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  z-index: 9999;
  transition: bottom 0.5s ease;
  border-top: 1px solid #e5e7eb;
}

.cookie-popup.show {
  bottom: 0;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f5f3ef;
}

::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Loading animation for images */
img {
  transition: opacity 0.3s ease;
}

img[src*="placeholder.svg"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mobile menu transition */
#mobileMenu {
  transition: all 0.3s ease;
}

/* Ensure proper spacing on mobile */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card-flip-inner {
    min-height: 500px;
  }
}

/* Prevent text selection on buttons */
button {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Print styles */
@media print {
  .cookie-popup,
  header,
  footer,
  #burgerBtn {
    display: none;
  }
}

/* Accessibility improvements */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* 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;
  }

  .card-flip-container:hover .card-flip-inner {
    transform: none;
  }

  .card-3d-container:hover .card-3d-inner {
    transform: translateY(-8px);
  }
}

/* Smooth hover transitions */
a,
button {
  transition: all 0.2s ease;
}

/* Typography adjustments */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Image container aspect ratio helper */
.aspect-ratio-box {
  position: relative;
  overflow: hidden;
}

.aspect-ratio-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
