/*
Theme Name: Inbox Company
Template: twentytwentyfive
Description: company.inbox.lv — child of Twenty Twenty-Five. Layout after inbox.eu, colours from inbox.lv.
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: inbox-company
*/

/* ---------- base ---------- */
html { scroll-padding-top: 72px; }
body { -webkit-font-smoothing: antialiased; }
.ib-wrap { box-sizing: border-box; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 600px) { .ib-wrap { padding: 0 20px; } }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

/* ---------- header ---------- */
.ib-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--wp--preset--color--border); }
.admin-bar .ib-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ib-header { top: 46px; } }
.ib-header .ib-wrap { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.ib-logo { display: block; flex: 0 0 auto; line-height: 0; }
.ib-logo img { width: 128px; height: auto; }
.ib-nav { margin-left: auto; }
.ib-nav ul { list-style: none; margin: 0; padding: 0; }
.ib-nav > ul { display: flex; gap: 4px; }
.ib-nav li { position: relative; }
.ib-nav a { display: block; padding: 8px 12px; font-size: 15px; border-radius: 8px; color: var(--wp--preset--color--graphite); text-decoration: none; font-weight: 500; white-space: nowrap; }
.ib-nav a:hover, .ib-nav a:focus-visible { color: var(--wp--preset--color--brand); background: var(--wp--preset--color--brand-tint); }
.ib-nav .current-menu-item > a, .ib-nav .current-menu-ancestor > a, .ib-nav .current-menu-parent > a { color: var(--wp--preset--color--brand); }
.ib-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.ib-nav .sub-menu { position: absolute; left: 0; top: 100%; min-width: 230px; padding: 8px; background: #fff; border-radius: 8px; box-shadow: var(--wp--preset--shadow--md); opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s ease; }
.ib-nav li:hover > .sub-menu, .ib-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ib-nav .sub-menu a { font-weight: 400; }

.ib-langs { display: flex; gap: 2px; font-size: 14px; font-weight: 500; text-transform: uppercase; }
.ib-langs a { padding: 6px 8px; border-radius: 4px; color: var(--wp--preset--color--muted); text-decoration: none; }
.ib-langs a:hover { color: var(--wp--preset--color--brand); }
.ib-langs .is-current { color: var(--wp--preset--color--brand); background: var(--wp--preset--color--brand-tint); }

.ib-burger { display: none; margin-left: 8px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; position: relative; }
.ib-burger span, .ib-burger span::before, .ib-burger span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--wp--preset--color--ink); content: ""; transition: .2s; }
.ib-burger span { top: 21px; }
.ib-burger span::before { left: 0; top: -7px; }
.ib-burger span::after { left: 0; top: 7px; }
.ib-burger[aria-expanded="true"] span { background: transparent; }
.ib-burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.ib-burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1000px) {
	.ib-header .ib-wrap { gap: 12px; min-height: 56px; }
	.ib-logo img { width: 116px; }
	.ib-langs { margin-left: auto; }
	.ib-burger { display: block; }
	.ib-nav { position: fixed; inset: 56px 0 0 0; margin: 0; padding: 16px 20px 40px; background: #fff; overflow-y: auto; display: none; }
	.admin-bar .ib-nav { top: 102px; }
	.ib-nav.is-open { display: block; }
	.ib-nav > ul { flex-direction: column; gap: 0; }
	.ib-nav a { font-size: 18px; padding: 14px 8px; white-space: normal; }
	.ib-nav > ul > li { border-bottom: 1px solid var(--wp--preset--color--border); }
	.ib-nav .menu-item-has-children > a::after { display: none; }
	.ib-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 12px 12px; min-width: 0; }
	.ib-nav .sub-menu a { font-size: 16px; padding: 10px 8px; color: var(--wp--preset--color--muted); }
	body.ib-nav-open { overflow: hidden; }
}

/* ---------- sections ---------- */
.ib-band { background: var(--wp--preset--color--surface-2); }
.ib-hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 64px); }
.ib-hero .ib-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.ib-hero h1 { margin: 0 0 16px; font-size: var(--wp--preset--font-size--display); }
.ib-hero p { margin: 0 0 32px; font-size: var(--wp--preset--font-size--md); color: var(--wp--preset--color--graphite); max-width: 34em; }
.ib-hero__art { background: var(--wp--preset--color--surface); border-radius: 16px; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.ib-hero__art img { width: 62%; height: auto; }
@media (max-width: 800px) { .ib-hero .ib-wrap { grid-template-columns: 1fr; } .ib-hero__art { display: none; } }

.ib-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.ib-btn { display: inline-block; padding: 12px 24px; border-radius: 8px; border: 1px solid var(--wp--preset--color--brand); background: var(--wp--preset--color--brand); color: #fff; font-weight: 500; text-decoration: none; line-height: 1.5; }
.ib-btn:hover { background: var(--wp--preset--color--brand-hover); border-color: var(--wp--preset--color--brand-hover); color: #fff; }
.ib-btn--outline { background: transparent; color: var(--wp--preset--color--brand); }
.ib-btn--outline:hover { background: var(--wp--preset--color--brand-tint); color: var(--wp--preset--color--brand); border-color: var(--wp--preset--color--brand); }
.ib-btn--white { background: transparent; border-color: #fff; color: #fff; }
.ib-btn--white:hover { background: #fff; color: var(--wp--preset--color--brand); border-color: #fff; }

.ib-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.ib-section-head h2 { margin: 0; font-size: var(--wp--preset--font-size--xxl); }
.ib-section-head a { font-weight: 500; text-decoration: none; white-space: nowrap; }
.ib-section-head a::after { content: " →"; }

.ib-pagehead { padding: clamp(24px, 3vw, 36px) 0 0; }
.ib-pagehead h1 { margin: 0; font-size: var(--wp--preset--font-size--xl); }
.ib-pagehead p { margin: 12px 0 0; color: var(--wp--preset--color--muted); }

/* ---------- chips ---------- */
.ib-chips { display: flex; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.ib-chips::-webkit-scrollbar { display: none; }
.ib-chips a, .ib-chip a, .wp-block-post-terms.ib-chip a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--wp--preset--color--brand-tint); color: var(--wp--preset--color--brand); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.ib-chips a:hover, .ib-chip a:hover { background: var(--wp--preset--color--brand-tint-hover); }
.ib-chips .is-current a { background: var(--wp--preset--color--brand); color: #fff; }
.wp-block-post-terms.ib-chip { font-size: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ib-meta .ib-chip { display: inline-flex; }
.wp-block-post-terms.ib-chip .wp-block-post-terms__separator { display: none; }

/* ---------- cards ---------- */
.ib-cards .wp-block-post-template { gap: 40px 32px; }
.ib-cards .wp-block-post { display: flex; flex-direction: column; gap: 12px; position: relative; }
.ib-cards .wp-block-post-title { margin: 0; font-size: var(--wp--preset--font-size--md); line-height: 1.35; }
.ib-cards .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ib-cards .wp-block-post:hover .wp-block-post-title a { color: var(--wp--preset--color--brand); }
.ib-cards .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: 12px; }
.ib-card-img { display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--wp--preset--color--surface); }
.ib-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ib-card-img:hover img { transform: scale(1.03); }
.ib-card-img--empty { display: grid; place-items: center; }
.ib-card-img--empty img { width: 42%; height: auto; object-fit: contain; opacity: .35; transform: none !important; }
@media (max-width: 1024px) { .ib-cards .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ib-cards .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; } }

/* list rows (press, search) */
.ib-list { list-style: none; margin: 0; padding: 0; }
.ib-list li { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: center; padding: 20px 0; border-top: 1px solid var(--wp--preset--color--border); }
.ib-list li:last-child { border-bottom: 1px solid var(--wp--preset--color--border); }
.ib-list .ib-card-img { aspect-ratio: 7 / 5; border-radius: 8px; }
.ib-list h3 { margin: 0 0 6px; font-size: var(--wp--preset--font-size--md); }
.ib-list h3 a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ib-list h3 a:hover { color: var(--wp--preset--color--brand); }
.ib-list time { font-size: 12px; color: var(--wp--preset--color--muted); }
@media (max-width: 600px) { .ib-list li { grid-template-columns: 96px 1fr; gap: 16px; } }

/* career band */
.ib-cta { background: var(--wp--preset--color--brand); color: #fff; border-radius: 16px; padding: clamp(32px, 5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ib-cta h2 { color: #fff; margin: 0 0 8px; font-size: var(--wp--preset--font-size--xl); }
.ib-cta p { margin: 0; opacity: .9; }

/* ---------- single / page content ---------- */
.ib-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--wp--preset--color--muted); font-size: 14px; }
.ib-content { font-size: 18px; line-height: 1.6; }
.ib-content img { max-width: 100%; height: auto; border-radius: 8px; }
.ib-content .alignleft { float: left; margin: 4px 24px 16px 0; }
.ib-content .alignright { float: right; margin: 4px 0 16px 24px; }
.ib-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.ib-content .wp-caption { max-width: 100%; }
.ib-content .wp-caption-text { font-size: 14px; color: var(--wp--preset--color--muted); margin-top: 6px; }
.ib-content table { border-collapse: collapse; width: 100%; font-size: 16px; }
.ib-content td, .ib-content th { border: 1px solid var(--wp--preset--color--border); padding: 8px 12px; vertical-align: top; }
.ib-content iframe { max-width: 100%; }
.ib-content::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) { .ib-content .alignleft, .ib-content .alignright { float: none; margin: 0 0 16px; } }
.ib-postnav { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--wp--preset--color--border); padding-top: 24px; }
.ib-postnav a { text-decoration: none; font-weight: 500; }

/* pagination */
.wp-block-query-pagination { gap: 8px; margin-top: 48px; }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; border-radius: 8px; text-align: center; text-decoration: none; color: var(--wp--preset--color--graphite); }
.wp-block-query-pagination a:hover { background: var(--wp--preset--color--brand-tint); color: var(--wp--preset--color--brand); }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--brand); color: #fff; }

/* 404 */
.ib-404 { text-align: center; padding: clamp(56px, 9vw, 112px) 0 48px; }
.ib-404 .ib-404__code { font-size: 96px; line-height: 1; font-weight: 700; color: var(--wp--preset--color--brand); margin: 0 0 16px; }
.ib-404 .ib-buttons { justify-content: center; }
.ib-search { display: flex; gap: 8px; max-width: 480px; margin: 0 auto 32px; }
.ib-search input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--wp--preset--color--border); border-radius: 8px; font: inherit; }

/* ---------- footer ---------- */
.ib-footer { background: var(--wp--preset--color--graphite); color: #c7c7c8; padding: 64px 0 24px; font-size: 14px; margin-top: clamp(56px, 9vw, 112px); }
.ib-footer a { color: #fff; text-decoration: none; }
.ib-footer a:hover { color: #fff; text-decoration: underline; }
.ib-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.ib-footer__logo { width: 150px; height: auto; display: block; margin-bottom: 20px; }
.ib-footer h2 { color: #fff; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 16px; }
.ib-footer ul { list-style: none; margin: 0; padding: 0; }
.ib-footer li { margin: 0 0 10px; }
.ib-footer address { font-style: normal; line-height: 1.7; }
.ib-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.ib-footer .ib-langs a { color: #c7c7c8; }
.ib-footer .ib-langs .is-current { color: #fff; background: rgba(255,255,255,.12); }
@media (max-width: 900px) { .ib-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ib-footer__grid { grid-template-columns: 1fr; gap: 32px; } }

/* main spacing */
.ib-main { margin-block-start: 0; }
.ib-main > .ib-section { padding-top: clamp(48px, 7vw, 88px); }
.ib-main > .ib-pagehead + .ib-section { padding-top: 20px; }
.ib-main > .ib-pagehead + .wp-block-group { padding-top: 24px !important; }
