/* HomeQuoteTools Custom Styles */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #1f2937;
}

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

/* Prose styling for article content */
.prose {
  color: #374151;
  max-width: 65ch;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.875rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h3 {
  color: #111827;
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose h4 {
  color: #111827;
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.prose strong {
  color: #111827;
  font-weight: 600;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #1d4ed8;
}

.prose code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'Courier New', monospace;
}

.prose blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1rem;
  font-style: italic;
  color: #4b5563;
  margin: 1.5rem 0;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.75;
  color: #4b5563;
  margin-bottom: 1.5rem;
}

/* Button hover effects */
button, .btn {
  transition: all 0.2s ease;
}

button:active, .btn:active {
  transform: translateY(1px);
}

/* Input focus states */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* Ad container responsiveness */
.ad-container {
  overflow-x: auto;
}

/* Card hover effects */
.hover\:shadow-xl:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Navbar dropdown animation */
.group:hover > div {
  animation: fadeInDown 0.2s ease-in-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid #3b82f6;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
  .prose {
    font-size: 0.875rem;
  }
  
  .prose h2 {
    font-size: 1.5rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
  }
  
  .ad-container [style*="width: 728px"] {
    width: 100% !important;
    max-width: 728px;
    height: auto !important;
    min-height: 90px;
  }
}

/* Print styles */
@media print {
  .no-print, nav, footer, .ad-container {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  .prose {
    max-width: 100%;
  }
}

/* Accessibility improvements */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  body {
    border: 2px solid currentColor;
  }
  
  button, .btn {
    border: 2px solid currentColor;
  }
}

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