/* ==========================================================================
   IMV — templates: News listing/detail, brand & job detail, search, 404
   ========================================================================== */

/* ---------- News listing (Figma News) ---------- */
.news-page { position: relative; overflow: hidden; padding-bottom: 64px; background: var(--c-surface-3); }
.news-page__decor { position: absolute; top: 0; left: 0; width: 38%; max-width: 560px; height: 640px; pointer-events: none; }
.news-layout { position: relative; display: grid; grid-template-columns: 300px minmax(0, 1fr) 240px; gap: 24px 32px; padding-top: 28px; }
.news-layout__title { margin-top: 10px; font-size: 28px; line-height: 1.2; font-weight: 800; text-transform: uppercase; color: var(--c-brand-900); }
.news-layout__lead { max-width: 290px; margin-top: 8px; font-size: 15px; line-height: 1.6; font-weight: 600; color: var(--c-brand-900); }
.news-layout__main { padding-top: 40px; }
.news-grid { columns: 2; column-gap: 12px; }
.news-grid > .news-card { width: 100%; margin-bottom: 12px; break-inside: avoid; }
.news-layout__sidebar { display: flex; flex-direction: column; gap: 12px; padding-top: 40px; }
.news-page .pagination ul { margin-top: 20px; }

.sidebar-box { padding: 16px 18px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); }
.sidebar-box--search { padding: 0; background: transparent; border: 0; }
.sidebar-box__title { margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--c-brand-900); }
.sidebar-box__text { margin-bottom: 12px; font-size: 12px; line-height: 1.7; font-weight: 600; color: var(--c-brand-900); }
.sidebar-cats a { display: block; padding: 5px 0 5px 4px; font-size: 13px; font-weight: 600; color: var(--c-text); }
.sidebar-cats a:hover, .sidebar-cats a.is-active { color: var(--c-accent); }

.search-form { position: relative; }
.search-form input {
	width: 100%; height: 40px; padding: 0 14px 0 42px; border: 1px solid transparent; border-radius: var(--radius-sm);
	background: var(--c-input); font-size: 14px; color: var(--c-brand-900);
}
.search-form__icon { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; color: var(--c-brand-900); transform: translateY(-50%); }
.search-form--wide { max-width: 560px; margin-bottom: 32px; }
.search-form--wide input { height: 48px; background: #fff; border-color: var(--c-border); }

.newsletter-form__row { display: flex; gap: 8px; }
.newsletter-form input {
	flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
	font-size: 13px; color: var(--c-brand-900);
}
.newsletter-form__btn { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); background: var(--c-brand-600); color: #fff; }
.newsletter-form__btn:hover { background: #0131ad; }
.newsletter-form__btn .icon { width: 20px; height: 20px; stroke-width: 2; }
.newsletter-form .form-notice { font-size: 12px; }

@media (max-width: 1180px) {
	.news-layout { grid-template-columns: minmax(0, 1fr) 260px; }
	.news-layout__intro { grid-column: 1 / -1; }
	.news-layout__main, .news-layout__sidebar { padding-top: 0; }
}

@media (max-width: 860px) {
	.news-layout { grid-template-columns: 1fr; }
	.news-page__decor { width: 70%; height: 420px; }
}

@media (max-width: 560px) {
	.news-grid { columns: 1; }
}

/* ---------- Brand detail ---------- */
.brand-detail__grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; gap: 56px; }
.brand-detail__logo { display: grid; place-items: center; min-height: 200px; padding: 40px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.brand-detail__logo img { width: auto; max-height: 90px; }
.brand-detail__summary { margin-bottom: 16px; font-size: 20px; line-height: 1.7; font-weight: 600; color: var(--c-brand-900); }
.brand-detail__body .btn { margin-top: 24px; }

@media (max-width: 860px) {
	.brand-detail__grid { grid-template-columns: 1fr; gap: 28px; }
	.brand-detail__logo { min-height: 140px; }
}

/* ---------- Job detail ---------- */
.job-detail { width: min(100% - var(--gutter) * 2, 860px); padding-bottom: var(--section-y); }
.job-detail > .breadcrumb { margin-top: 40px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 28px; }
.job-meta li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--c-text); }
.job-meta .icon { width: 18px; height: 18px; color: var(--c-accent); }
.job-detail > .btn { margin-top: 32px; }

/* ---------- 404 ---------- */
.error-404 { display: flex; flex-direction: column; align-items: center; padding: 80px 0 100px; text-align: center; }
.error-404__code { font-size: 120px; line-height: 1; font-weight: 800; color: var(--c-accent); opacity: .15; }
.error-404__text { max-width: 520px; margin-bottom: 28px; }

/* ==========================================================================
   News article (layout follows IMV Portal article page)
   ========================================================================== */
.article-bar { border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.article-bar .container { padding: 14px 0; }
.breadcrumb--article ol { flex-wrap: nowrap; gap: 8px; color: var(--c-muted); font-size: 14px; font-weight: 500; line-height: 1.4; }
.breadcrumb--article li { gap: 8px; min-width: 0; }
.breadcrumb--article li:last-child { flex: 1 1 auto; }
.breadcrumb--article a { white-space: nowrap; }
.breadcrumb--article a:hover { color: var(--c-accent); opacity: 1; }
.breadcrumb--article .breadcrumb__sep { width: 14px; height: 14px; stroke-width: 2; }
.breadcrumb--article [aria-current] { display: block; overflow: hidden; color: var(--c-accent); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 318px; align-items: start; gap: 40px; padding: 28px 0 72px; }
.article { min-width: 0; }
.article__tools { display: flex; justify-content: flex-end; gap: 8px; }
.tool-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
	border: 1px solid var(--c-border); border-radius: 8px; background: #fff; color: var(--c-brand-900);
	font-size: 14px; font-weight: 600; transition: border-color .15s, background-color .15s, color .15s;
}
.tool-btn .icon { width: 17px; height: 17px; }
.tool-btn:hover { border-color: #c9d0f5; background: var(--c-surface); }
.tool-btn--icon { width: 38px; padding: 0; }
.tool-btn.is-on { border-color: var(--c-accent); background: #eef1ff; color: var(--c-accent); }
.share { position: relative; }
.share__menu {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; display: grid; min-width: 190px; padding: 6px;
	border-radius: 10px; background: #fff; box-shadow: var(--shadow-float);
}
.share__menu[hidden] { display: none; }
.share__menu a, .share__menu button {
	display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; color: var(--c-brand-900);
	font-size: 14px; font-weight: 500; text-align: left;
}
.share__menu .icon { width: 17px; height: 17px; color: var(--c-accent); }
.share__menu a:hover, .share__menu button:hover { background: var(--c-surface); }
.share__status { position: absolute; top: calc(100% + 6px); right: 0; font-size: 12px; color: var(--c-muted); white-space: nowrap; }

.article__title {
	margin: 4px 0 14px; color: var(--c-brand-900); font-size: clamp(22px, .9vw + 16px, 30px); font-weight: 700;
	line-height: 1.35; letter-spacing: -.005em; overflow-wrap: anywhere;
}
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 22px; font-size: 14px; color: var(--c-text); }
.article__meta li { display: inline-flex; align-items: center; gap: 8px; }
.article__meta .icon { width: 16px; height: 16px; color: var(--c-muted); }
.article__meta b { color: var(--c-brand-900); font-weight: 600; }
.article__meta a:hover { color: var(--c-accent); }
.article__media { margin: 0 0 28px; overflow: hidden; border-radius: 16px; background: var(--c-surface-2); }
.article__media img { width: 100%; }

.article__content { max-width: none; color: #1f2350; font-size: 16px; line-height: 1.85; }
.article__content > * + * { margin-top: 1em; }
.article__content h2 { margin-top: 1.7em; font-size: 22px; line-height: 1.4; font-weight: 700; color: var(--c-brand-900); scroll-margin-top: 96px; }
.article__content h3 { margin-top: 1.5em; font-size: 18px; line-height: 1.45; font-weight: 700; color: var(--c-brand-900); scroll-margin-top: 96px; }
.article__content strong, .article__content b { color: var(--c-brand-900); font-weight: 700; }
.article__content img { border-radius: 12px; }
.article__content li + li { margin-top: .35em; }

.article-helpful {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 40px; padding: 14px 18px;
	border-radius: 12px; background: var(--c-surface);
}
.article-helpful__q { color: var(--c-muted); font-size: 14px; font-weight: 600; }
.article-helpful__views { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--c-muted); font-size: 14px; }
.article-helpful__views .icon { width: 16px; height: 16px; }

.article-comments { margin-top: 40px; }
.article-comments__title { margin-bottom: 18px; color: var(--c-brand-900); font-size: 20px; font-weight: 700; }
.article-comments .comment-form { display: grid; gap: 14px; }
.article-comments textarea, .article-comments input[type="text"], .article-comments input[type="email"] {
	width: 100%; padding: 12px 16px; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; font-size: 14px;
}
.article-comments label { display: block; margin-bottom: 4px; color: var(--c-muted); font-size: 13px; font-weight: 600; }
.article-comments .comment-form-author, .article-comments .comment-form-email { max-width: 360px; }
.article-comments .comment-list { margin-top: 28px; display: grid; gap: 18px; }
.article-comments .comment-body { padding: 14px 16px; border: 1px solid var(--c-border); border-radius: 12px; font-size: 14px; }
.article-comments .comment-author img { float: left; margin-right: 12px; border-radius: 50%; }

.article-related { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--c-border); }
.article-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.article-related__head h2 { color: var(--c-brand-900); font-size: 18px; font-weight: 700; }
.article-related__head a { color: var(--c-accent); font-size: 14px; font-weight: 600; }
.article-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.related-card { display: flex; flex-direction: column; padding-bottom: 14px; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: var(--shadow-card); }
.related-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-surface-2); }
.related-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.related-card:hover .related-card__media img { transform: scale(1.04); }
.related-card__title { margin: 12px 16px 8px; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 14px; line-height: 1.5; font-weight: 700; color: var(--c-brand-900); }
.related-card__title a:hover { color: var(--c-accent); }
.related-card__meta { display: flex; gap: 12px; margin: auto 16px 0; color: var(--c-muted); font-size: 12px; font-weight: 600; }
.stat-views { display: inline-flex; align-items: center; gap: 4px; }
.stat-views .icon { width: 14px; height: 14px; }

.article-aside { display: grid; gap: 16px; align-self: start; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.aside-card { padding: 18px 20px; border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-surface); }
.aside-card--newsletter { background: #fff; }
.aside-card__title { color: var(--c-brand-900); font-size: 16px; font-weight: 700; line-height: 1.3; }
.aside-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.aside-card__head a { color: var(--c-accent); font-size: 13px; font-weight: 600; white-space: nowrap; }
.aside-toc .aside-card__title { margin-bottom: 12px; }
.toc__item { margin: 0; border-left: 2px solid var(--c-border); }
.toc__item a { display: block; padding: 6px 0 6px 14px; color: var(--c-muted); font-size: 13px; line-height: 1.5; transition: color .15s; }
.toc__item--3 a { padding-left: 28px; }
.toc__item a:hover { color: var(--c-accent); }
.toc__item.is-active { border-left-color: var(--c-accent); }
.toc__item.is-active a { color: var(--c-brand-900); font-weight: 600; }

.rank-list { display: grid; }
.rank-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) 64px; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.rank-item:last-child { border-bottom: 0; padding-bottom: 0; }
.rank-item__num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c-brand-900); color: #fff; font-size: 12px; font-weight: 700; }
.rank-item__title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--c-brand-900); font-size: 13px; font-weight: 700; line-height: 1.4; }
.rank-item__body:hover .rank-item__title { color: var(--c-accent); }
.rank-item__meta { display: flex; gap: 8px; margin-top: 4px; color: var(--c-muted); font-size: 12px; }
.rank-item__thumb { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--c-surface-2); }
.rank-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.latest-list li { padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.latest-list li:first-child { padding-top: 0; }
.latest-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.latest-list a { display: block; margin-top: 8px; color: var(--c-brand-900); font-size: 13px; font-weight: 700; line-height: 1.45; }
.latest-list a:hover { color: var(--c-accent); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #e3ebff; color: var(--c-accent); font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge .icon { width: 12px; height: 12px; stroke-width: 2.5; }

/* ---- Unilever-style article: split hero + blue content band + widget sidebar ---- */
.page-hero--article .page-hero__split { align-items: center; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding-bottom: 40px; }
.page-hero--article .page-hero__figure { aspect-ratio: 16 / 9; border-radius: 0 999px 999px 0; }
.page-hero--article .page-hero__figure img { object-position: center; }
.page-hero--article.is-nofigure .page-hero__split { grid-template-columns: minmax(0, 760px); }
.page-hero--article .breadcrumb { margin-bottom: 20px; }
.page-hero--article .page-hero__content { max-width: 600px; }
.page-hero--article .page-hero__title { font-size: clamp(26px, 1.5vw + 16px, 40px); line-height: 1.22; font-weight: 800; overflow-wrap: anywhere; }
.page-hero--article .page-hero__eyebrow { margin-bottom: 12px; text-transform: uppercase; }
.page-hero--article .page-hero__lead { margin-top: 0; font-size: 16px; line-height: 1.75; }
.article-hero__date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 16px 0 0; color: #fff; font-size: 15px; font-weight: 600; }
.article-hero__views { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; opacity: .85; }
.article-hero__views .icon { width: 16px; height: 16px; }
.article-hero__line { height: 2px; margin: 18px 0; border: 0; background: linear-gradient(90deg, var(--c-cyan, #00d8ff), rgba(0, 216, 255, 0)); }
.page-hero--article .article__tools { justify-content: flex-start; margin-top: 24px; }
.page-hero--article .tool-btn { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; }
.page-hero--article .tool-btn:hover { border-color: #fff; background: rgba(255, 255, 255, .18); }

.article-band { background: var(--c-sky); color: #fff; }
.article-band .article-layout { padding: 64px 0 80px; }
.article-band .article__content { max-width: 790px; margin-inline: auto; color: #fff; font-size: 17px; line-height: 1.85; }
.article-band .article__content h2,
.article-band .article__content h3,
.article-band .article__content h4,
.article-band .article__content strong,
.article-band .article__content b { color: #fff; }
.article-band .article__content h2 { font-size: clamp(22px, .9vw + 16px, 30px); }
.article-band .article__content h3 { font-size: clamp(19px, .5vw + 15px, 24px); }
.article-band .article__content a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .55); }
.article-band .article__content a:hover { text-decoration-color: #fff; }
.article-band .article__content img { border-radius: 16px; }
.article-band .article__content blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--c-cyan, #00d8ff); font-size: 1.05em; }
.article-band .article__content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-band .article__content th, .article-band .article__content td { padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .35); }
.article-band .article-helpful { max-width: 790px; margin-inline: auto; background: rgba(255, 255, 255, .12); }
.article-band .article-helpful__q { color: #fff; }
.article-band .article-helpful .tool-btn { border-color: transparent; }
.article-band .aside-card { border-color: transparent; box-shadow: 0 10px 30px rgba(3, 9, 103, .18); }
.article-band .article-aside { top: 96px; }

.article-after { padding: 56px 0 80px; background: #fff; }
.article-after__inner > :first-child { margin-top: 0; }
.article-after .article-related { margin-top: 0; padding-top: 0; border-top: 0; }
.article-after .article-comments + .article-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--c-border); }

@media (max-width: 1100px) {
	.article-layout { grid-template-columns: 1fr; gap: 40px; }
	.article-aside { position: static; max-height: none; overflow: visible; }
	.aside-toc { display: none; }
}

@media (max-width: 640px) {
	.article-related__grid { grid-template-columns: 1fr; }
	.article-helpful__views { margin-left: 0; }
	.article-bar .container { padding: 10px 0; }
	.page-hero--article .page-hero__split { grid-template-columns: 1fr; }
	.page-hero--article .page-hero__figure { border-radius: 0 999px 999px 0; aspect-ratio: 16 / 9; }
	.article-band .article-layout { padding: 40px 0 56px; }
	.article-band .article__content { font-size: 16px; }
}
