/* Custom animations and styles */

/* Fade in animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-delay-1 {
  animation: fadeIn 0.8s ease 0.2s forwards;
}

.animate-fade-in-delay-2 {
  animation: fadeIn 0.8s ease 0.4s forwards;
}

.animate-fade-in-delay-3 {
  animation: fadeIn 0.8s ease 0.6s forwards;
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f8f6f2;
}

::-webkit-scrollbar-thumb {
  background: #8a9ba8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4a574;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #d4a574;
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #1a2332;
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Image loading placeholder */
img {
  background-color: #f8f6f2;
}

/* Price display */
.font-mono {
  font-variant-numeric: tabular-nums;
}

/* Button hover effects */
.btn-primary {
  background-color: #d4a574;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #bf8e5c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid #d4a574;
  color: #d4a574;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #d4a574;
  color: white;
}

/* Card hover effects */
.property-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(26, 35, 50, 0.15);
}

/* Hero parallax effect */
@media (prefers-reduced-motion: no-preference) {
  .parallax-bg {
    background-attachment: fixed;
  }
}

/* Mobile menu animation */
.mobile-menu-enter {
  opacity: 0;
  transform: translateX(100%);
}

.mobile-menu-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Form validation states */
.input-error {
  border-color: #d32f2f !important;
}

.input-success {
  border-color: #3d5a45 !important;
}

.error-message {
  color: #d32f2f;
  font-size: 12px;
  margin-top: 4px;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

.toast-success {
  background-color: #3d5a45;
}

.toast-error {
  background-color: #d32f2f;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Print styles */
@media print {
  nav,
  footer,
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
  
  a {
    text-decoration: underline;
    color: black;
  }
}
