/* Custom Typography Styles for Entry Content */
.entry-content {
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    color: #cbd5e1;
}

/* Headings - Article Typography */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: #ffffff;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.2;

    /* Green Background Style */
    background-color: #006847;
    border-radius: 8px;
    padding: 10px 20px;
    width: fit-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    clear: both;
}

.entry-content h1 {
    font-size: 30px;
}

.entry-content h2 {
    font-size: 28px;
}

.entry-content h3 {
    font-size: 25px;
}

.entry-content h4 {
    font-size: 20px;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    word-break: break-word;
}

/* Paragraphs */
.entry-content p {
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Hide empty paragraphs */
.entry-content p:empty {
    display: none;
}

/* 
 * ============================================================
 * ELEMENTOR FIX
 *
 * Elementor sets font-size on the .elementor-text-editor DIV
 * (not directly on p). But .entry-content p overrides
 * inheritance on p tags. The fix: make p tags inside
 * Elementor text editor use `unset` so they fully inherit
 * from whatever Elementor puts on the wrapper div.
 * ============================================================
 */

/* 
 * Force p and headings inside Elementor Text Editor
 * to unset font-size so Elementor's wrapper style takes over
 */
.elementor-widget-text-editor .elementor-text-editor > p,
.elementor-widget-text-editor .elementor-text-editor p {
    font-size: unset !important;
    line-height: unset !important;
    font-weight: unset !important;
    margin-top: 0;
    margin-bottom: 0.5em;
}

/*
 * Also reset inside .entry-content in case the page template wraps it
 */
.entry-content .elementor-widget-text-editor .elementor-text-editor p {
    font-size: unset !important;
    line-height: unset !important;
    font-weight: unset !important;
}

/* Lists */
.entry-content ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.entry-content ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.entry-content li {
    margin-bottom: 0.5em;
    padding-left: 0.5em;
}

/* Links */
.entry-content a {
    color: #00e701;
    text-decoration: underline;
}

.entry-content a:hover {
    color: #1fff20;
}

/* Blockquotes */
.entry-content blockquote {
    border-left: 4px solid #00e701;
    padding-left: 1rem;
    font-style: italic;
    margin: 1rem 0;
    color: #94a3b8;
}

/* Images */
.entry-content img {
    border-radius: 0.5rem;
    margin: 1rem 0;
    max-width: 100%;
    height: auto;
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1em 0;
    font-size: 16px;
}

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

.entry-content th {
    background-color: #006847;
    color: #ffffff;
    font-weight: 700;
}

.entry-content td {
    background-color: rgba(30, 41, 59, 0.5);
}

.entry-content tr:nth-child(even) td {
    background-color: rgba(30, 41, 59, 0.3);
}
