/* Custom CSS for CityLife Real Estate */

/* Tailwind Customizations */
@layer utilities {
  .text-gold-300 { color: #fbbf24; }
  .text-gold-400 { color: #f59e0b; }
  .text-gold-500 { color: #d97706; }
  .text-gold-600 { color: #b45309; }
  
  .bg-gold-100 { background-color: #fef3c7; }
  .bg-gold-200 { background-color: #fde68a; }
  .bg-gold-300 { background-color: #fbbf24; }
  .bg-gold-400 { background-color: #f59e0b; }
  .bg-gold-500 { background-color: #d97706; }
  .bg-gold-600 { background-color: #b45309; }
  
  .border-gold-300 { border-color: #fbbf24; }
  .border-gold-400 { border-color: #f59e0b; }
  .border-gold-500 { border-color: #d97706; }
  .border-gold-600 { border-color: #b45309; }
  
  .ring-gold-500 { --tw-ring-color: #d97706; }
}

/* Font Families */
.font-playfair {
  font-family: 'Playfair Display', serif;
}

.font-montserrat {
  font-family: 'Montserrat', sans-serif;
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
  animation: fadeInRight 0.8s ease-out;
}

.animate-pulse-custom {
  animation: pulse 2s ease-in-out infinite;
}

/* Hover Effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Property Cards */
.property-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.property-card:hover {
  transform: translateY(-10px);
}

.property-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(217, 119, 6, 0.2), transparent);
  transition: left 0.5s;
}

.property-card:hover::before {
  left: 100%;
}

/* Hero Section Enhancement */
.hero-gradient {
  background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(217,119,6,0.3) 100%);
}

/* Navigation Enhancement */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #d97706;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Form Styling */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

.form-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
  outline: none;
}

.form-input:invalid {
  border-color: #ef4444;
}

.form-input:valid {
  border-color: #10b981;
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

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

/* Image Hover Effects */
.image-hover {
  overflow: hidden;
}

.image-hover img {
  transition: transform 0.5s ease;
}

.image-hover:hover img {
  transform: scale(1.1);
}

/* Button Enhancements */
.btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
  border: 2px solid #d97706;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #d97706;
  color: white;
  transform: translateY(-2px);
}

/* Statistics Counter */
.counter {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

/* Testimonials */
.testimonial-card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Map Markers */
.map-marker {
  position: relative;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .hero-text {
    font-size: 2rem;
  }
  
  .section-padding {
    padding: 3rem 1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #111827;
    --text-primary: #f9fafb;
    --bg-secondary: #1f2937;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    color: black !important;
    background: white !important;
  }
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
*:focus {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #d97706;
  color: white;
  padding: 8px;
  text-decoration: none;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .bg-gold-500 {
    background-color: #b45309 !important;
  }
  
  .text-gold-500 {
    color: #b45309 !important;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Additional Animation Enhancements */
.floating-icon {
  animation: float 3s ease-in-out infinite;
}

.animation-delay-1000 {
  animation-delay: 1s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* Floating animation for hero icons */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Enhanced hover effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Premium search bar styling */
.search-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
}

.search-input::placeholder {
  color: #6b7280;
}

/* Newsletter section styling */
.newsletter-section {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

/* Statistics section enhancements */
.stats-bg {
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
}

/* Enhanced card styles */
.card-premium {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(212, 175, 55, 0.1);
  transition: all 0.3s ease;
}

.card-premium:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
}

/* Ensure properties are visible */
.property-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Properties grid spacing */
#properties-grid {
  margin-top: 0;
  padding-top: 0;
}

/* Fix any potential overlay issues */
.properties-section {
  position: relative;
  z-index: 1;
}

/* Mobile Navigation Enhancements */
@media (max-width: 768px) {
  /* Mobile contact buttons styling */
  .mobile-contact-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .mobile-contact-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-contact-buttons a:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }
  
  /* Ensure navbar stays properly positioned on mobile */
  nav {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
    background: white !important;
  }
  
  /* Add top padding to body to account for fixed navbar */
  body {
    padding-top: 80px;
  }
  
  /* Ensure main content is not hidden behind navbar */
  main, .hero-section, section:first-child {
    margin-top: 0;
    padding-top: 0;
  }
  
  /* Mobile menu improvements */
  .mobile-menu {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
  }
}

/* Desktop Navigation - Hide mobile buttons */
@media (min-width: 769px) {
  .mobile-contact-buttons {
    display: none;
  }
  
  body {
    padding-top: 0;
  }
}