/* =========================================================================
   CSThemes – article content styles.
   Loaded on the front-end AND inside the block/classic editor so what you
   write looks the same everywhere.
   ========================================================================= */

.entry-content, .editor-styles-wrapper { font-family: var(--cs-font-body); font-size: 1.0625rem; line-height: 1.8; color: var(--cs-text); }
.editor-styles-wrapper { background: var(--cs-bg); }
.entry-content > * { margin-top: 0; margin-bottom: 1.4em; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6,
.editor-styles-wrapper h1, .editor-styles-wrapper h2, .editor-styles-wrapper h3, .editor-styles-wrapper h4, .editor-styles-wrapper h5, .editor-styles-wrapper h6 { font-family: var(--cs-font-heading); font-weight: var(--cs-heading-weight); color: var(--cs-heading); line-height: 1.3; margin-top: 1.6em; margin-bottom: .6em; scroll-margin-top: 100px; }
.entry-content h2, .editor-styles-wrapper h2 { font-size: 1.55rem; }
.entry-content h3, .editor-styles-wrapper h3 { font-size: 1.3rem; }
.entry-content h4, .editor-styles-wrapper h4 { font-size: 1.12rem; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content a:not(.wp-block-button__link):not(.cs-btn):not(.cs-share__btn), .editor-styles-wrapper a:not(.wp-block-button__link) { color: var(--cs-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--cs-link-hover); }
.entry-content img { border-radius: var(--cs-radius); height: auto; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .editor-styles-wrapper figcaption { font-size: .85rem; color: var(--cs-text-light); text-align: center; margin-top: 8px; }
.entry-content ul, .entry-content ol, .editor-styles-wrapper ul, .editor-styles-wrapper ol { padding-left: 1.5em; }
.entry-content li, .editor-styles-wrapper li { margin-bottom: .4em; }
.entry-content li > ul, .entry-content li > ol { margin-top: .4em; margin-bottom: 0; }
.entry-content strong, .editor-styles-wrapper strong { color: var(--cs-heading); }
.entry-content hr, .editor-styles-wrapper hr { border: 0; border-top: 1px solid var(--cs-border); margin: 2em 0; }
.entry-content blockquote, .editor-styles-wrapper blockquote { border-left: 4px solid var(--cs-primary); background: var(--cs-bg-alt); padding: 16px 22px; margin: 0 0 1.4em; border-radius: 0 var(--cs-radius) var(--cs-radius) 0; font-style: italic; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite, .editor-styles-wrapper blockquote cite { display: block; font-style: normal; font-size: .85rem; color: var(--cs-text-light); margin-top: 8px; }
.wp-block-pullquote { border-top: 3px solid var(--cs-primary); border-bottom: 3px solid var(--cs-primary); padding: 1.5em 0; }
.wp-block-pullquote blockquote { border: 0; background: transparent; padding: 0; font-size: 1.3rem; }
.entry-content table, .editor-styles-wrapper table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td, .editor-styles-wrapper th, .editor-styles-wrapper td { border: 1px solid var(--cs-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry-content th, .editor-styles-wrapper th { background: var(--cs-bg-alt); color: var(--cs-heading); }
.wp-block-table { overflow-x: auto; }
.wp-block-table.is-style-cs-table-striped tbody tr:nth-child(odd) td { background: var(--cs-bg-alt); }
.entry-content pre, .editor-styles-wrapper pre { background: #1e1e1e; color: #f3f3f3; padding: 16px 20px; border-radius: var(--cs-radius); overflow: auto; font-size: .9rem; line-height: 1.6; }
.entry-content code, .editor-styles-wrapper code { background: var(--cs-bg-alt); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content iframe { max-width: 100%; }
.cs-embed { position: relative; padding-top: 56.25%; margin-bottom: 1.4em; border-radius: var(--cs-radius); overflow: hidden; background: #000; }
.cs-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wp-block-embed__wrapper { border-radius: var(--cs-radius); overflow: hidden; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; padding-top: 56.25%; }
.wp-block-embed.is-type-video .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper { padding-top: 56.25%; }
.wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper { padding-top: 75%; }
.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe, .wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.wp-block-image img { height: auto; }
.wp-block-image.is-style-cs-image-rounded img { border-radius: 18px; }
.wp-block-gallery { margin-bottom: 1.4em; }
.wp-block-separator { border: 0; border-top: 1px solid var(--cs-border); }
.wp-block-separator.is-style-wide { border-top-width: 1px; }
.wp-block-separator.is-style-dots::before { color: var(--cs-text-light); }
.wp-block-details { border: 1px solid var(--cs-border); border-radius: var(--cs-radius); padding: 12px 16px; background: var(--cs-bg-alt); }
.wp-block-details summary { font-weight: 600; color: var(--cs-heading); cursor: pointer; }
.wp-block-details[open] summary { margin-bottom: 8px; }
.wp-block-columns { gap: 24px; }
.wp-block-group.has-background { padding: 1.5rem; border-radius: var(--cs-radius); }
.wp-block-cover { border-radius: var(--cs-radius); overflow: hidden; }
.wp-block-media-text { border-radius: var(--cs-radius); overflow: hidden; }
.wp-block-search__button { background: var(--cs-primary); color: var(--cs-primary-text); border: 0; border-radius: var(--cs-radius-sm); }
.wp-block-search__input { border: 1px solid var(--cs-border); border-radius: var(--cs-radius-sm); padding: 8px 12px; }
.wp-block-latest-posts li, .wp-block-categories li, .wp-block-archives li { margin-bottom: .5em; }
.wp-block-quote.is-style-plain { border: 0; background: transparent; padding: 0; }
.has-text-align-center { text-align: center; }
.has-primary-background-color { background-color: var(--cs-primary); }
.has-primary-color { color: var(--cs-primary); }
.has-secondary-background-color { background-color: var(--cs-secondary); }
.has-secondary-color { color: var(--cs-secondary); }
.has-accent-background-color { background-color: var(--cs-accent); }
.has-accent-color { color: var(--cs-accent); }
.has-surface-background-color { background-color: var(--cs-bg-alt); }
.has-background-background-color { background-color: var(--cs-bg); }
.has-white-color { color: #fff; }
.has-white-background-color { background-color: #fff; }
.has-black-color { color: #111; }
.has-black-background-color { background-color: #111; }
.has-text-color { color: var(--cs-text); }
.has-heading-color { color: var(--cs-heading); }
.has-text-light-color { color: var(--cs-text-light); }

/* Buttons (core + theme) */
.wp-block-button__link { background: var(--cs-primary); color: var(--cs-primary-text); border-radius: var(--cs-radius); padding: 10px 22px; font-weight: 600; text-decoration: none !important; transition: background .2s, transform .2s; }
.wp-block-button__link:hover { background: var(--cs-primary-dark); color: var(--cs-primary-text); transform: translateY(-1px); }
.is-style-outline .wp-block-button__link, .is-style-cs-btn-outline .wp-block-button__link { background: transparent !important; border: 2px solid var(--cs-primary); color: var(--cs-primary) !important; }
.is-style-outline .wp-block-button__link:hover, .is-style-cs-btn-outline .wp-block-button__link:hover { background: var(--cs-primary) !important; color: var(--cs-primary-text) !important; }
.entry-content .cs-btn { text-decoration: none !important; }

/* Callout boxes (block styles + [cs_box] shortcode) */
.cs-box, .is-style-cs-box-info, .is-style-cs-box-tip, .is-style-cs-box-warning, .is-style-cs-box-danger { --box: 37,99,235; position: relative; padding: 16px 20px 16px 54px; border-radius: var(--cs-radius); border: 1px solid rgba(var(--box), .35); background: rgba(var(--box), .07); margin-bottom: 1.4em; color: var(--cs-text); }
.cs-box::before, .is-style-cs-box-info::before, .is-style-cs-box-tip::before, .is-style-cs-box-warning::before, .is-style-cs-box-danger::before { content: ""; position: absolute; left: 18px; top: 17px; width: 24px; height: 24px; border-radius: 50%; background-color: rgb(var(--box)); background-repeat: no-repeat; background-position: center; background-size: 14px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='16' x2='12' y2='12'/><line x1='12' y1='8' x2='12.01' y2='8'/></svg>"); }
.cs-box--tip, .is-style-cs-box-tip { --box: 22,163,74; }
.cs-box--tip::before, .is-style-cs-box-tip::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>"); }
.cs-box--warning, .is-style-cs-box-warning { --box: 217,119,6; }
.cs-box--warning::before, .is-style-cs-box-warning::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>"); }
.cs-box--danger, .is-style-cs-box-danger { --box: 220,38,38; }
.cs-box--danger::before, .is-style-cs-box-danger::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='12' y1='5' x2='12' y2='14'/><line x1='12' y1='18' x2='12.01' y2='18'/></svg>"); }
.cs-box__title { display: block; margin-bottom: 4px; color: var(--cs-heading); }
.cs-box__body > :last-child, .is-style-cs-box-info > :last-child, .is-style-cs-box-tip > :last-child, .is-style-cs-box-warning > :last-child, .is-style-cs-box-danger > :last-child { margin-bottom: 0; }

/* Other block styles */
.is-style-cs-lead { font-size: 1.25rem; line-height: 1.6; color: var(--cs-heading); font-weight: 500; }
.is-style-cs-list-check { list-style: none; padding-left: 0; }
.is-style-cs-list-check li { position: relative; padding-left: 30px; }
.is-style-cs-list-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%; background: var(--cs-primary) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 12px no-repeat; }
.is-style-cs-heading-bar { padding-left: 14px; border-left: 5px solid var(--cs-primary); }

/* Alignment helpers inside content */
.entry-content .alignwide { max-width: 100%; }
.entry-content .alignfull { max-width: 100%; }
@media (max-width: 599px) {
	.entry-content, .editor-styles-wrapper { font-size: 1rem; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em auto; display: block; }
}
