/**
 * Classic Editor Content Styles
 * Styles for WordPress Classic Editor (TinyMCE) output
 * Scoped under .entry-content to avoid conflicts with Tailwind and global styles
 */

.entry-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #000000;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #0a1628;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.entry-content h1 {
    font-size: 2.25em;
    margin-top: 0;
}

.entry-content h2 {
    font-size: 1.875em;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.3em;
}

.entry-content h3 {
    font-size: 1.5em;
}

.entry-content h4 {
    font-size: 1.25em;
}

.entry-content h5 {
    font-size: 1.125em;
}

.entry-content h6 {
    font-size: 1em;
    color: #6b7280;
}

/* Paragraphs */
.entry-content p {
    margin-top: 0;
    margin-bottom: 1.25em;
    color: #000000;
}

.entry-content p:last-child {
    margin-bottom: 0;
}

/* Links */
.entry-content a {
    color: #1e3a8a;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.entry-content a:hover {
    color: #1e40af;
    text-decoration: none;
}

.entry-content a:focus {
    outline: 2px solid #1e3a8a;
    outline-offset: 2px;
}

/* Strong and emphasis */
.entry-content strong,
.entry-content b {
    font-weight: 700;
    color: #1f2937;
}

.entry-content em,
.entry-content i {
    font-style: italic;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin-top: 0;
    margin-bottom: 1.25em;
    padding-left: 2em;
}

.entry-content ul {
    list-style-type: disc;
}

.entry-content ol {
    list-style-type: decimal;
}

.entry-content li {
    margin-bottom: 0.5em;
    color: #475569;
}

.entry-content li > p {
    margin-bottom: 0.5em;
}

.entry-content ul ul,
.entry-content ul ol,
.entry-content ol ul,
.entry-content ol ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.entry-content ul ul {
    list-style-type: circle;
}

.entry-content ul ul ul {
    list-style-type: square;
}

/* Blockquotes */
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #1e3a8a;
    background-color: #f8fafc;
    font-style: italic;
    color: #475569;
}

.entry-content blockquote p {
    margin-bottom: 0.75em;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content blockquote cite {
    display: block;
    margin-top: 0.75em;
    font-size: 0.875em;
    font-style: normal;
    color: #6b7280;
}

.entry-content blockquote cite::before {
    content: "— ";
}

/* Images */
.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em 0;
    border-radius: 8px;
}

.entry-content img[class*="wp-image-"] {
    height: auto;
}

/* WordPress alignment classes */
.entry-content .alignleft {
    float: left;
    margin: 0.5em 1.5em 1em 0;
}

.entry-content .alignright {
    float: right;
    margin: 0.5em 0 1em 1.5em;
}

.entry-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.entry-content .alignnone {
    margin: 1.5em 0;
}

/* Image captions */
.entry-content .wp-caption {
    max-width: 100%;
    margin: 1.5em 0;
}

.entry-content .wp-caption img {
    margin: 0;
    display: block;
}

.entry-content .wp-caption-text {
    margin-top: 0.5em;
    font-size: 0.875em;
    color: #6b7280;
    text-align: center;
    font-style: italic;
}

/* Horizontal rule */
.entry-content hr {
    border: 0;
    border-top: 2px solid #e5e7eb;
    margin: 2em 0;
}

/* Code and preformatted text */
.entry-content code {
    font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
    font-size: 0.875em;
    padding: 0.2em 0.4em;
    background-color: #f1f5f9;
    border-radius: 3px;
    color: #dc2626;
}

.entry-content pre {
    font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
    font-size: 0.875em;
    line-height: 1.6;
    padding: 1em;
    background-color: #f1f5f9;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.entry-content pre code {
    padding: 0;
    background-color: transparent;
    color: inherit;
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9375em;
}

.entry-content table th,
.entry-content table td {
    padding: 0.75em 1em;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.entry-content table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #0a1628;
}

.entry-content table tr:nth-child(even) {
    background-color: #f9fafb;
}

.entry-content table tr:hover {
    background-color: #f1f5f9;
}

/* Definition lists */
.entry-content dl {
    margin: 1.25em 0;
}

.entry-content dt {
    font-weight: 700;
    color: #1f2937;
    margin-top: 1em;
}

.entry-content dd {
    margin-left: 2em;
    margin-bottom: 1em;
    color: #475569;
}

/* Address */
.entry-content address {
    font-style: normal;
    margin-bottom: 1.25em;
    color: #475569;
}

/* Subscript and superscript */
.entry-content sub,
.entry-content sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.entry-content sup {
    top: -0.5em;
}

.entry-content sub {
    bottom: -0.25em;
}

/* Abbreviations */
.entry-content abbr,
.entry-content acronym {
    border-bottom: 1px dotted #6b7280;
    cursor: help;
}

/* Mark/highlight */
.entry-content mark {
    background-color: #fef3c7;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

/* Delete and insert */
.entry-content del {
    text-decoration: line-through;
    color: #6b7280;
}

.entry-content ins {
    text-decoration: none;
    border-bottom: 2px solid #10b981;
}

/* Accessibility: Skip links */
.entry-content a.skip-link {
    position: absolute;
    left: -9999px;
}

.entry-content a.skip-link:focus {
    position: static;
}

/* WordPress embeds and gallery */
.entry-content .wp-video,
.entry-content .wp-audio-shortcode,
.entry-content iframe,
.entry-content embed,
.entry-content object {
    max-width: 100%;
    margin: 1.5em 0;
}

.entry-content .gallery {
    margin: 1.5em 0;
}

.entry-content .gallery-item {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    width: 100%;
    padding: 0.5em;
}

.entry-content .gallery-columns-2 .gallery-item {
    max-width: 50%;
}

.entry-content .gallery-columns-3 .gallery-item {
    max-width: 33.33%;
}

.entry-content .gallery-columns-4 .gallery-item {
    max-width: 25%;
}

.entry-content .gallery-columns-5 .gallery-item {
    max-width: 20%;
}

.entry-content .gallery-columns-6 .gallery-item {
    max-width: 16.66%;
}

.entry-content .gallery-caption {
    display: block;
    font-size: 0.875em;
    color: #6b7280;
    margin-top: 0.5em;
}

/* Clear floats */
.entry-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .entry-content {
        font-size: 15px;
    }

    .entry-content h1 {
        font-size: 1.875em;
    }

    .entry-content h2 {
        font-size: 1.5em;
    }

    .entry-content h3 {
        font-size: 1.25em;
    }

    .entry-content .alignleft,
    .entry-content .alignright {
        float: none;
        margin: 1em auto;
        display: block;
    }

    .entry-content table {
        font-size: 0.875em;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 0.5em;
    }
}
