/* ============================================================================
   SINGLE POST CONTENT STYLES
   Comprehensive styling for article content - headings, text, links, lists, etc.
   ============================================================================ */

/* Article Content Container */
.entry-content,
.prose {
    @apply text-gray-800 dark:text-gray-200;
    font-size: 1.125rem; /* 18px */
    line-height: 1.75; /* 28px */
    letter-spacing: -0.011em;
}

/* ============================================================================
   HEADINGS
   ============================================================================ */

.entry-content h1,
.prose h1 {
    @apply text-gray-900 dark:text-white;
    font-size: 2.5rem; /* 40px */
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.entry-content h2,
.prose h2 {
    @apply text-gray-900 dark:text-white;
    font-size: 2rem; /* 32px */
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid theme('colors.gray.200');
}

.theme-dark .entry-content h2,
.theme-dark .prose h2,
[data-theme="dark"] .entry-content h2,
[data-theme="dark"] .prose h2 {
    border-bottom-color: theme('colors.gray.700');
}

.entry-content h3,
.prose h3 {
    @apply text-gray-900 dark:text-white;
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.015em;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h4,
.prose h4 {
    @apply text-gray-900 dark:text-white;
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.entry-content h5,
.prose h5 {
    @apply text-gray-800 dark:text-gray-100;
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.entry-content h6,
.prose h6 {
    @apply text-gray-700 dark:text-gray-200;
    font-size: 1rem; /* 16px */
    font-weight: 600;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* First heading removes top margin */
.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child,
.prose > h1:first-child,
.prose > h2:first-child,
.prose > h3:first-child {
    margin-top: 0;
}

/* ============================================================================
   PARAGRAPHS
   ============================================================================ */

.entry-content p,
.prose p {
    @apply text-gray-700 dark:text-gray-300;
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.entry-content p:last-child,
.prose p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph (first paragraph after heading) */
.entry-content > p:first-of-type,
.prose > p:first-of-type {
    font-size: 1.25rem;
    @apply text-gray-800 dark:text-gray-200;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* ============================================================================
   LINKS
   ============================================================================ */

.entry-content a,
.prose a {
    @apply text-blue-600 dark:text-blue-400;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: theme('colors.blue.300');
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
}

.entry-content a:hover,
.prose a:hover {
    @apply text-blue-700 dark:text-blue-300;
    text-decoration-color: theme('colors.blue.600');
    text-decoration-thickness: 2px;
}

.theme-dark .entry-content a:hover,
.theme-dark .prose a:hover,
[data-theme="dark"] .entry-content a:hover,
[data-theme="dark"] .prose a:hover {
    text-decoration-color: theme('colors.blue.400');
}

/* External links indicator */
.entry-content a[href^="http"]:not([href*="yourdomain.com"])::after,
.prose a[href^="http"]:not([href*="yourdomain.com"])::after {
    content: " ↗";
    font-size: 0.875em;
    opacity: 0.7;
}

/* ============================================================================
   LISTS
   ============================================================================ */

.entry-content ul,
.entry-content ol,
.prose ul,
.prose ol {
    @apply text-gray-700 dark:text-gray-300;
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}

.entry-content ul li,
.prose ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    line-height: 1.75;
}

.entry-content ol li,
.prose ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    line-height: 1.75;
}

/* Nested lists */
.entry-content ul ul,
.entry-content ol ol,
.prose ul ul,
.prose ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.entry-content ul ul li,
.prose ul ul li {
    list-style-type: circle;
}

.entry-content ul ul ul li,
.prose ul ul ul li {
    list-style-type: square;
}

/* Custom bullet styling */
.entry-content ul > li::marker,
.prose ul > li::marker {
    @apply text-blue-600 dark:text-blue-400;
    font-weight: bold;
}

.entry-content ol > li::marker,
.prose ol > li::marker {
    @apply text-blue-600 dark:text-blue-400;
    font-weight: 600;
}

/* ============================================================================
   BLOCKQUOTES
   ============================================================================ */

.entry-content blockquote,
.prose blockquote {
    @apply bg-gray-50 dark:bg-gray-800;
    border-left: 4px solid theme('colors.blue.600');
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.7;
    @apply text-gray-800 dark:text-gray-200;
    border-radius: 0 0.5rem 0.5rem 0;
}

.entry-content blockquote p,
.prose blockquote p {
    margin-bottom: 1rem;
}

.entry-content blockquote p:last-child,
.prose blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content blockquote cite,
.prose blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-style: normal;
    @apply text-gray-600 dark:text-gray-400;
}

.entry-content blockquote cite::before,
.prose blockquote cite::before {
    content: "— ";
}

/* ============================================================================
   CODE
   ============================================================================ */

.entry-content code,
.prose code {
    @apply bg-gray-100 dark:bg-gray-800;
    @apply text-pink-600 dark:text-pink-400;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
    font-weight: 400;
}

.entry-content pre,
.prose pre {
    @apply bg-gray-900 dark:bg-gray-950;
    @apply text-gray-100;
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    line-height: 1.6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.entry-content pre code,
.prose pre code {
    @apply bg-transparent text-gray-100;
    padding: 0;
    border-radius: 0;
    font-size: 0.875rem;
}

/* ============================================================================
   IMAGES
   ============================================================================ */

.entry-content img,
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.entry-content figure,
.prose figure {
    margin: 2rem 0;
}

.entry-content figcaption,
.prose figcaption {
    @apply text-gray-600 dark:text-gray-400;
    text-align: center;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    font-style: italic;
}

/* WordPress alignment classes */
.entry-content .alignleft,
.prose .alignleft {
    float: left;
    margin: 0.5rem 2rem 1rem 0;
    max-width: 50%;
}

.entry-content .alignright,
.prose .alignright {
    float: right;
    margin: 0.5rem 0 1rem 2rem;
    max-width: 50%;
}

.entry-content .aligncenter,
.prose .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================================
   TABLES
   ============================================================================ */

.entry-content table,
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
    overflow: hidden;
    border-radius: 0.5rem;
}

.entry-content thead,
.prose thead {
    @apply bg-gray-100 dark:bg-gray-800;
}

.entry-content th,
.prose th {
    @apply text-gray-900 dark:text-white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid theme('colors.gray.300');
}

.theme-dark .entry-content th,
.theme-dark .prose th,
[data-theme="dark"] .entry-content th,
[data-theme="dark"] .prose th {
    border-bottom-color: theme('colors.gray.600');
}

.entry-content td,
.prose td {
    @apply text-gray-700 dark:text-gray-300;
    padding: 1rem;
    border-bottom: 1px solid theme('colors.gray.200');
}

.theme-dark .entry-content td,
.theme-dark .prose td,
[data-theme="dark"] .entry-content td,
[data-theme="dark"] .prose td {
    border-bottom-color: theme('colors.gray.700');
}

.entry-content tbody tr:hover,
.prose tbody tr:hover {
    @apply bg-gray-50 dark:bg-gray-800/50;
}

.entry-content tbody tr:last-child td,
.prose tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================================================
   HORIZONTAL RULE
   ============================================================================ */

.entry-content hr,
.prose hr {
    border: none;
    border-top: 2px solid theme('colors.gray.200');
    margin: 3rem 0;
}

.theme-dark .entry-content hr,
.theme-dark .prose hr,
[data-theme="dark"] .entry-content hr,
[data-theme="dark"] .prose hr {
    border-top-color: theme('colors.gray.700');
}

/* Decorative HR */
.entry-content hr.wp-block-separator,
.prose hr.wp-block-separator {
    border: none;
    text-align: center;
    margin: 3rem auto;
    height: 1.5rem;
}

.entry-content hr.wp-block-separator::before,
.prose hr.wp-block-separator::before {
    content: "* * *";
    @apply text-gray-400 dark:text-gray-600;
    font-size: 1.5rem;
    letter-spacing: 1rem;
}

/* ============================================================================
   EMPHASIS & STRONG
   ============================================================================ */

.entry-content strong,
.entry-content b,
.prose strong,
.prose b {
    @apply text-gray-900 dark:text-white;
    font-weight: 700;
}

.entry-content em,
.entry-content i,
.prose em,
.prose i {
    font-style: italic;
}

.entry-content mark,
.prose mark {
    @apply bg-yellow-200 dark:bg-yellow-900/50;
    @apply text-gray-900 dark:text-yellow-100;
    padding: 0.1em 0.3em;
    border-radius: 0.25rem;
}

/* ============================================================================
   WORDPRESS BLOCKS
   ============================================================================ */

/* Button Block */
.entry-content .wp-block-button,
.prose .wp-block-button {
    margin: 1.5rem 0;
}

.entry-content .wp-block-button__link,
.prose .wp-block-button__link {
    @apply bg-blue-600 text-white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.entry-content .wp-block-button__link:hover,
.prose .wp-block-button__link:hover {
    @apply bg-blue-700;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Video Block */
.entry-content .wp-block-video,
.entry-content .wp-block-embed,
.prose .wp-block-video,
.prose .wp-block-embed {
    margin: 2rem 0;
}

.entry-content .wp-block-video video,
.prose .wp-block-video video {
    border-radius: 0.5rem;
}

/* Pull Quote */
.entry-content .wp-block-pullquote,
.prose .wp-block-pullquote {
    @apply border-blue-600;
    border-left-width: 4px;
    border-right-width: 4px;
    padding: 2rem;
    margin: 2rem 0;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .entry-content,
    .prose {
        font-size: 1rem; /* 16px on mobile */
    }

    .entry-content h1,
    .prose h1 {
        font-size: 2rem; /* 32px */
    }

    .entry-content h2,
    .prose h2 {
        font-size: 1.75rem; /* 28px */
    }

    .entry-content h3,
    .prose h3 {
        font-size: 1.375rem; /* 22px */
    }

    .entry-content > p:first-of-type,
    .prose > p:first-of-type {
        font-size: 1.125rem;
    }

    .entry-content .alignleft,
    .entry-content .alignright,
    .prose .alignleft,
    .prose .alignright {
        float: none;
        max-width: 100%;
        margin: 1rem 0;
    }

    .entry-content pre,
    .prose pre {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .entry-content blockquote,
    .prose blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .entry-content,
    .prose {
        font-size: 12pt;
        color: #000;
    }

    .entry-content a,
    .prose a {
        text-decoration: underline;
        color: #000;
    }

    .entry-content a[href]::after,
    .prose a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
