/**
 * Chinese Typography Styles
 * Based on client requirements
 */

/* Base font settings */
body {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 1.33;
}

/* Desktop Version (width > 1024px) */
@media (min-width: 1024px) {
    /* Heading 01 */
    h1, .heading-01 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 56px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 02 */
    h2, .heading-02 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 36px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 03 */
    h3, .heading-03 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 28px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 04 */
    h4, .heading-04 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 24px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 05 */
    h5, .heading-05 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 18px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0.16px;
    }

    /* Heading 06 */
    h6, .heading-06 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 14px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0.16px;
    }

    /* Heading 07 - Custom class */
    .heading-07 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 12px;
        line-height: 1.5;
        font-weight: 400;
        letter-spacing: 0.32px;
    }
}

/* Responsive Version (width <= 1024px) */
@media (max-width: 1024px) {
    /* Paragraph font size for mobile */
    .entry-content p,
    .post-content p,
    .page-content p,
    p {
        font-size: 16px;
    }

    /* Heading 01 */
    h1, .heading-01 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 32px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 02 */
    h2, .heading-02 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 28px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 03 */
    h3, .heading-03 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 24px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 04 */
    h4, .heading-04 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 19px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0;
    }

    /* Heading 05 */
    h5, .heading-05 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 16px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0.16px;
    }

    /* Heading 06 */
    h6, .heading-06 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 14px;
        line-height: 1.33;
        font-weight: 500;
        letter-spacing: 0.16px;
    }

    /* Heading 07 - Custom class */
    .heading-07 {
        font-family: 'Noto Sans TC', sans-serif;
        font-size: 12px;
        line-height: 1.5;
        font-weight: 400;
        letter-spacing: 0.32px;
    }
}

/* WordPress & Astra specific overrides */
.entry-title,
.post-title,
.page-title,
.site-title {
    font-family: 'Noto Sans TC', sans-serif;
}

/* Gutenberg editor compatibility */
.wp-block-heading {
    font-family: 'Noto Sans TC', sans-serif;
}

/* Menu items */
.main-navigation a,
.nav-menu a,
.menu a {
    font-family: 'Noto Sans TC', sans-serif;
}

/* Content text */
.entry-content,
.post-content,
.page-content {
    font-family: 'Noto Sans TC', sans-serif;
}

/* Left-align blog post content by default - headings, paragraphs, lists */
/* Targets Gutenberg blocks - only applies when no explicit alignment class is set */
/* Allows manual alignment changes in Gutenberg editor to override */
.entry-content h1:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h1):not(.kb-table h1):not(.bpp-bottom-banner h1),
.entry-content h2:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h2):not(.kb-table h2):not(.bpp-bottom-banner h2),
.entry-content h3:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h3):not(.kb-table h3):not(.bpp-bottom-banner h3),
.entry-content h4:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h4):not(.kb-table h4):not(.bpp-bottom-banner h4),
.entry-content h5:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h5):not(.kb-table h5):not(.bpp-bottom-banner h5),
.entry-content h6:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h6):not(.kb-table h6):not(.bpp-bottom-banner h6),
.entry-content p:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table p):not(.kb-table p):not(.bpp-bottom-banner p),
.entry-content ul:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table ul):not(.kb-table ul):not(.bpp-bottom-banner ul),
.entry-content ol:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table ol):not(.kb-table ol):not(.bpp-bottom-banner ol),
.entry-content li:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table li):not(.kb-table li):not(.bpp-bottom-banner li),
.post-content h1:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h1):not(.kb-table h1):not(.bpp-bottom-banner h1),
.post-content h2:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h2):not(.kb-table h2):not(.bpp-bottom-banner h2),
.post-content h3:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h3):not(.kb-table h3):not(.bpp-bottom-banner h3),
.post-content h4:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h4):not(.kb-table h4):not(.bpp-bottom-banner h4),
.post-content h5:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h5):not(.kb-table h5):not(.bpp-bottom-banner h5),
.post-content h6:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h6):not(.kb-table h6):not(.bpp-bottom-banner h6),
.post-content p:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table p):not(.kb-table p):not(.bpp-bottom-banner p),
.post-content ul:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table ul):not(.kb-table ul):not(.bpp-bottom-banner ul),
.post-content ol:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table ol):not(.kb-table ol):not(.bpp-bottom-banner ol),
.post-content li:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table li):not(.kb-table li):not(.bpp-bottom-banner li) {
    text-align: left !important;
}

/* Blog content headings, paragraphs and lists - force left alignment and styling */
/* Target headings, paragraphs, lists, and list items inside the Elementor "Theme Post Content" widget */
/* Also force left alignment unless explicitly set to center, right, or justify */
.elementor-widget-theme-post-content .elementor-widget-container h1:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h1):not(.kb-table h1):not(.bpp-bottom-banner h1),
.elementor-widget-theme-post-content .elementor-widget-container h2:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h2):not(.kb-table h2):not(.bpp-bottom-banner h2),
.elementor-widget-theme-post-content .elementor-widget-container h3:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h3):not(.kb-table h3):not(.bpp-bottom-banner h3),
.elementor-widget-theme-post-content .elementor-widget-container h4:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h4):not(.kb-table h4):not(.bpp-bottom-banner h4),
.elementor-widget-theme-post-content .elementor-widget-container h5:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h5):not(.kb-table h5):not(.bpp-bottom-banner h5),
.elementor-widget-theme-post-content .elementor-widget-container h6:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table h6):not(.kb-table h6):not(.bpp-bottom-banner h6),
.elementor-widget-theme-post-content .elementor-widget-container p:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table p):not(.kb-table p):not([class*="kb-table"] p):not(.bpp-bottom-banner p):not(.smart-slider p),
.elementor-widget-theme-post-content .elementor-widget-container ul:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table ul):not(.kb-table ul):not([class*="kb-table"] ul):not(.bpp-bottom-banner ul):not(.smart-slider ul),
.elementor-widget-theme-post-content .elementor-widget-container ol:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table ol):not(.kb-table ol):not([class*="kb-table"] ol):not(.bpp-bottom-banner ol):not(.smart-slider ol),
.elementor-widget-theme-post-content .elementor-widget-container li:not(.has-text-align-center):not(.has-text-align-right):not(.has-text-align-justify):not(table li):not(.kb-table li):not([class*="kb-table"] li):not(.bpp-bottom-banner li):not(.smart-slider li) {
    text-align: left !important;
}

/* Blog content paragraphs and lists - 16px font, #636972 color (ONLY paragraphs/lists, NOT headings) */
.elementor-widget-theme-post-content .elementor-widget-container p:not(table p):not(.kb-table p):not([class*="kb-table"] p):not(.bpp-bottom-banner p):not(.smart-slider p),
.elementor-widget-theme-post-content .elementor-widget-container ul:not(table ul):not(.kb-table ul):not([class*="kb-table"] ul):not(.bpp-bottom-banner ul):not(.smart-slider ul),
.elementor-widget-theme-post-content .elementor-widget-container ol:not(table ol):not(.kb-table ol):not([class*="kb-table"] ol):not(.bpp-bottom-banner ol):not(.smart-slider ol),
.elementor-widget-theme-post-content .elementor-widget-container li:not(table li):not(.kb-table li):not([class*="kb-table"] li):not(.bpp-bottom-banner li):not(.smart-slider li) {
    font-family: 'Noto Sans TC', sans-serif !important;
    font-size: 16px !important;
    color: #636972 !important;
}

/* Default table styling - 16px font, #636972 color (can be overridden by Kadence) */
table:not(.bpp-bottom-banner table),
table:not(.bpp-bottom-banner table) td,
table:not(.bpp-bottom-banner table) th,
table:not(.bpp-bottom-banner table) p {
    font-size: 16px;
    color: #636972;
}

/* Kadence table - fix list alignment to ensure bullets align at same vertical position across all columns */
.kb-table td,
.kb-table th,
[class*="kb-table"] td,
[class*="kb-table"] th,
table.kb-table-data td,
table.kb-table-data th {
    vertical-align: top !important;
}

.kb-table ul,
.kb-table ol,
[class*="kb-table"] ul,
[class*="kb-table"] ol,
table.kb-table-data ul,
table.kb-table-data ol {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.kb-table ul li,
.kb-table ol li,
[class*="kb-table"] ul li,
[class*="kb-table"] ol li,
table.kb-table-data ul li,
table.kb-table-data ol li {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}

/* Archive post cards (based on your existing code) */
.archive-post-title {
    font-family: 'Noto Sans TC', sans-serif;
}

.archive-post-category {
    font-family: 'Noto Sans TC', sans-serif;
}

.archive-post-excerpt {
    font-family: 'Noto Sans TC', sans-serif;
}

.archive-post-author {
    font-family: 'Noto Sans TC', sans-serif;
}

.archive-post-date {
    font-family: 'Noto Sans TC', sans-serif;
}