/* Custom CSS for JustMacros.fit */

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

/* Background pattern for hero sections */
.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Enhanced shadow utilities */
.shadow-3xl {
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
}

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

.prose h1 {
    font-size: 2.25em;
    margin-top: 0;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
    font-weight: 800;
}

.prose h2 {
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3333333;
    font-weight: 700;
    color: #1f2937;
}

.prose h3 {
    font-size: 1.25em;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    line-height: 1.6;
    font-weight: 600;
    color: #374151;
}

.prose p {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    line-height: 1.8;
    font-size: 1.0625rem;
}

.prose ul, .prose ol {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    padding-left: 1.75em;
    line-height: 1.75;
}

.prose li {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
    line-height: 1.75;
}

.prose li p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

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

.prose a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-weight: 600;
}

/* Enhanced blockquote styling for nutrition facts and key data */
.prose blockquote {
    font-style: normal;
    border-left: 4px solid #3b82f6;
    background: linear-gradient(to right, #eff6ff, #ffffff);
    padding: 1.25em 1.5em;
    margin: 1.75em 0;
    color: #1f2937;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.prose blockquote p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.prose blockquote strong {
    color: #1e40af;
}

/* Enhanced image styling in articles */
.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Card-style formatting for recipe ingredients and structured content */
/* Note: :has() selector has limited support in older browsers (Safari 15.4+, Chrome 105+, Firefox 121+) */
/* Falls back to regular list styling in unsupported browsers */
.prose .ingredients-card,
.prose ul:has(li > strong:first-child) {
    background: linear-gradient(to bottom, #fef3c7, #ffffff);
    border: 2px solid #fbbf24;
    border-radius: 0.75rem;
    padding: 1.5em;
    margin: 1.75em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Better table styling for nutrition info */
.prose table {
    width: 100%;
    margin-top: 2em;
    margin-bottom: 2em;
    border-collapse: collapse;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose thead {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
}

.prose th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9375rem;
}

.prose td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:hover {
    background-color: #f9fafb;
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

/* Horizontal rules for section separation */
.prose hr {
    margin-top: 3em;
    margin-bottom: 3em;
    border: 0;
    border-top: 2px solid #e5e7eb;
}

/* Better spacing for nested lists */
.prose ul ul,
.prose ol ul,
.prose ul ol,
.prose ol ol {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Utility classes */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* Loading states */
.htmx-request {
    opacity: 0.5;
    transition: opacity 200ms ease-in;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
}

/* Smooth transitions for interactive elements */
a, button {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Improved table styling */
table {
  table-layout: auto; 
  width: auto; 
}

td, th {
  padding-left: 12px; 
  padding-right: 12px;
}