/* Custom styles for the funeral directory */

/* Utility classes */
.bg-sage-50 { background-color: #f8f9f8; }
.bg-sage-100 { background-color: #f1f3f1; }
.bg-sage-200 { background-color: #e4e7e4; }
.bg-sage-300 { background-color: #d1d6d1; }
.bg-sage-400 { background-color: #a8b2a8; }
.bg-sage-500 { background-color: #7f8e7f; }
.bg-sage-600 { background-color: #5a6b5a; }
.bg-sage-700 { background-color: #4a5a4a; }
.bg-sage-800 { background-color: #3a4a3a; }
.bg-sage-900 { background-color: #2a3a2a; }

.text-sage-50 { color: #f8f9f8; }
.text-sage-100 { color: #f1f3f1; }
.text-sage-200 { color: #e4e7e4; }
.text-sage-300 { color: #d1d6d1; }
.text-sage-400 { color: #a8b2a8; }
.text-sage-500 { color: #7f8e7f; }
.text-sage-600 { color: #5a6b5a; }
.text-sage-700 { color: #4a5a4a; }
.text-sage-800 { color: #3a4a3a; }
.text-sage-900 { color: #2a3a2a; }

.border-sage-200 { border-color: #e4e7e4; }
.border-sage-300 { border-color: #d1d6d1; }
.border-sage-500 { border-color: #7f8e7f; }
.border-sage-600 { border-color: #5a6b5a; }

.bg-charcoal-600 { background-color: #4a5568; }
.bg-charcoal-700 { background-color: #374151; }
.bg-charcoal-800 { background-color: #1f2937; }
.bg-charcoal-900 { background-color: #111827; }

.text-charcoal-500 { color: #6b7280; }
.text-charcoal-600 { color: #4a5568; }
.text-charcoal-700 { color: #374151; }
.text-charcoal-800 { color: #1f2937; }
.text-charcoal-900 { color: #111827; }

.focus\:ring-sage-500:focus {
    --tw-ring-color: #7f8e7f;
}

.focus\:ring-sage-600:focus {
    --tw-ring-color: #5a6b5a;
}

.hover\:bg-sage-50:hover { background-color: #f8f9f8; }
.hover\:bg-sage-600:hover { background-color: #5a6b5a; }
.hover\:bg-sage-700:hover { background-color: #4a5a4a; }

.hover\:border-sage-300:hover { border-color: #d1d6d1; }

/* Custom component styles */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
}

.error-image {
    opacity: 0.7;
    filter: grayscale(100%);
}

/* Hero section styles */
.hero-section {
    min-height: 500px;
    filter: none !important;
    opacity: 1 !important;
}

/* Ensure hero section background displays properly */
.hero-section::before,
.hero-section::after {
    display: none !important;
}

/* Specific hero image styling */
.hero-image {
    filter: none !important;
    opacity: 1 !important;
}

/* Override error image styles for hero images */
.hero-background .error-image {
    filter: none !important;
    opacity: 1 !important;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Filter loading overlay */
#filter-loading {
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tab styles */
.tab-button.active {
    border-bottom-color: #5a6b5a;
    color: #5a6b5a;
}

/* Map styles */
.leaflet-container {
    border-radius: 0.75rem;
}

/* Vendor profile styles */
.vendor-image-gallery img {
    transition: transform 0.3s ease;
}

.vendor-image-gallery img:hover {
    transform: scale(1.05);
}

/* Form styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #5a6b5a;
    box-shadow: 0 0 0 3px rgba(90, 107, 90, 0.1);
}

/* Auto-filter form styles */
.auto-filter-form input[type="radio"],
.auto-filter-form input[type="checkbox"] {
    transition: all 0.2s ease;
}

.auto-filter-form input[type="radio"]:checked,
.auto-filter-form input[type="checkbox"]:checked {
    transform: scale(1.1);
}

/* Button hover effects */
.btn-primary {
    background-color: #5a6b5a;
    color: white;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #4a5a4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 107, 90, 0.3);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }

    .mobile-full {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-break {
        page-break-before: always;
    }
}

/* 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\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-charcoal-600 {
        color: #000000;
    }

    .bg-sage-600 {
        background-color: #000000;
    }
}

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

    #filter-loading {
        animation: none;
    }
}

/* Hero section styles - Updated to use new sunrise background */

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2rem 0;
}

.hero-text {
  color: white;
  text-align: center;
  margin-bottom: 4rem;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-search {
  position: relative;
  z-index: 2;
}

/* Vendor image fallback */
.vendor-image-fallback {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  padding: 1rem;
}

.vendor-image-fallback::before {
  content: "📍";
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-extended {
    min-height: 90vh;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }

  .hero-text {
    margin-bottom: 3rem;
  }
}
/* Add any custom styles here */

/* Optimized background images with image-set() support */
.hero-extended {
    background-image: 
        image-set(
            url("/static/images/hero-sunrise.avif") type("image/avif"),
            url("/static/images/hero-sunrise.webp") type("image/webp"),
            url("/static/images/hero-sunrise.png") type("image/png")
        );
    background-image: url("/static/images/hero-sunrise.png"); /* Fallback */
}

/* Responsive background images for different screen sizes */
@media (max-width: 768px) {
    .hero-extended {
        background-image: 
            image-set(
                url("/static/images/hero-sunrise-640w.avif") type("image/avif"),
                url("/static/images/hero-sunrise-640w.webp") type("image/webp"),
                url("/static/images/hero-sunrise.png") type("image/png")
            );
        background-image: url("/static/images/hero-sunrise-640w.webp"); /* Fallback */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-extended {
        background-image: 
            image-set(
                url("/static/images/hero-sunrise-960w.avif") type("image/avif"),
                url("/static/images/hero-sunrise-960w.webp") type("image/webp"),
                url("/static/images/hero-sunrise.png") type("image/png")
            );
        background-image: url("/static/images/hero-sunrise-960w.webp"); /* Fallback */
    }
}

/* Tier Badge Styles */
.tier-premium-plus {
    background: #7b2cb1;
    color: white;
}

.tier-premium {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.tier-verified {
    background: #4caf50;
    color: white;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hero-extended {
    position: relative;
    height: 85vh;
    min-height: 600px;
    max-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url("/static/images/hero-sunrise.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Line clamp utility for vendor card descriptions */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@layer base {
  html, body { 
    font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b;
    line-height: 1.65;
  }

  h1, h2, h3, h4, h5, h6,
  .heading, .page-title { 
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    letter-spacing: -0.01em;
    font-weight: 500;
  }
}