/*
 * Additions required by the CMS (form feedback, language switcher, optional breadcrumbs, legal pages).
 * The original design lives untouched in style.css and resources/css/pages/*.css.
 */

/* Spam honeypot - never visible */
.cms-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Form feedback */
.cms-form-alert { border-radius: 10px; padding: 0.85rem 1rem; margin-bottom: 1.25rem; font-size: 0.95rem; line-height: 1.5; }
.cms-form-alert-success { background: #e8f6f3; color: #1d5c52; border: 1px solid #b9e3da; }
.cms-form-alert-error { background: #fdecec; color: #8a1f1f; border: 1px solid #f5c2c2; }
.cms-field-error { color: #b42318; font-size: 0.85rem; margin-top: 0.35rem; }

/* Language switcher (only rendered when a page exists in several languages) */
.cms-lang-switch { display: flex; align-items: center; gap: 0.15rem; margin-left: 0.5rem; }
.cms-lang-switch .nav-link { padding-left: 0.4rem !important; padding-right: 0.4rem !important; font-size: 0.85rem; letter-spacing: 0.04em; }
.cms-lang-switch .nav-link.active { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

/* Optional visible breadcrumbs (off by default to keep the original design) */
.cms-breadcrumbs { padding: 150px 0 0; background: transparent; font-size: 0.9rem; }
.cms-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.cms-breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.5; }
.cms-breadcrumbs a { color: inherit; text-decoration: none; }
.cms-breadcrumbs a:hover { text-decoration: underline; }

/* Preview banner for unpublished pages (only visible to logged-in CMS users) */
.cms-preview-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2000; background: #1a2b3c; color: #fff; padding: 0.6rem 1rem; border-radius: 999px; font-size: 0.85rem; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.cms-preview-bar a { color: #8fe0d2; margin-left: 0.5rem; }

/* ---------------------------------------------------------------------------------------------
 * Insights blog (list cards link to article pages; article pages reuse the original "Read" styles)
 * ------------------------------------------------------------------------------------------- */
.insight-card { position: relative; }
.insight-title a { color: inherit; text-decoration: none; }
.insight-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cms-insight-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.cms-insight-filter a {
    padding: .45rem 1.1rem; border-radius: 50px; border: 1px solid rgba(26, 58, 92, .15); background: #fff;
    color: var(--primary-navy); font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .2s ease;
}
.cms-insight-filter a:hover { border-color: var(--accent-teal); color: var(--accent-teal-dark); }
.cms-insight-filter a.is-active { background: var(--primary-navy); border-color: var(--primary-navy); color: #fff; }
.cms-insight-empty { text-align: center; color: var(--gray-600); padding: 3rem 0; }
.cms-insight-pagination { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 3rem; font-weight: 600; }
.cms-insight-pagination a { color: var(--accent-teal-dark); text-decoration: none; }

.cms-insight-hero { padding-bottom: 90px; }
.cms-insight-hero .container { position: relative; z-index: 2; }
.cms-insight-back { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255, 255, 255, .7); font-size: .85rem; text-decoration: none; margin-bottom: 1.25rem; }
.cms-insight-back:hover { color: #fff; }
.cms-insight-hero .insight-modal-category { display: table; }
.cms-insight-title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: 1rem; }

.cms-insight-article { background: var(--off-white); padding: 0 0 5rem; }
.cms-insight-card {
    max-width: 880px; margin: -50px auto 0; position: relative; z-index: 3; background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .04);
}
.cms-insight-featured { width: 100%; max-height: 460px; object-fit: cover; display: block; }
.cms-insight-card .insight-modal-body { overflow: visible; }
/* Rich text written in the CMS (new articles) uses the same look as the original article styles */
.cms-insight-card .insight-modal-body h2, .cms-insight-card .insight-modal-body h3 { font-family: var(--font-display); color: #1a3a5c; font-weight: 700; margin: 1.75rem 0 .75rem; }
.cms-insight-card .insight-modal-body h2 { font-size: 1.35rem; }
.cms-insight-card .insight-modal-body h3 { font-size: 1.1rem; }
.cms-insight-card .insight-modal-body p:not([class]), .cms-insight-card .insight-modal-body li:not([class]) { font-size: .97rem; color: var(--gray-700); line-height: 1.8; }
.cms-insight-card .insight-modal-body ul:not([class]), .cms-insight-card .insight-modal-body ol:not([class]) { padding-left: 1.25rem; margin-bottom: 1rem; }
.cms-insight-card .insight-modal-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }
.cms-insight-card .insight-modal-body figcaption { font-size: .85rem; color: var(--gray-600); text-align: center; margin-top: -.5rem; }
.cms-insight-card .insight-modal-body blockquote { border-left: 3px solid var(--accent-teal); padding: .25rem 0 .25rem 1rem; color: var(--gray-700); font-style: italic; }
.cms-insight-related { padding-top: 0; }
.cms-insight-related-title { font-family: var(--font-display); color: var(--primary-navy); font-weight: 700; font-size: 1.75rem; margin-bottom: 2rem; }
@media (max-width: 768px) {
    .cms-insight-card { margin-top: -30px; border-radius: 12px; }
    .cms-insight-card .insight-modal-body { padding: 1.75rem 1.5rem; }
}
