/* Mithra Makina v2 — inner pages (inner part): page hero + breadcrumb, card grids, detail layouts, prose, side list, gallery + <dialog> lightbox, 404.
   Uses base.css tokens and classes (.mm-eyebrow, .mm-btn, .mm-round(-sm), .mm-arrow, .mm-link-arrow). Own classes start with in- (home uses hm-).
   Templates: views/mithramakina/pages/{pagecat,detail,gallery,inner_inc}.php, pages/column/*, error_page/error_404.php. */

/* ---------- Own box model + container: inner pages do not need bootstrap.min.css / Porto (values = Bootstrap 4.2 .container; >=1200 = base.css) ---------- */
.in-hero, .in-sec, .in-lb, :where(.in-hero, .in-sec, .in-lb) *, :where(.in-hero, .in-sec, .in-lb) *::before, :where(.in-hero, .in-sec, .in-lb) *::after { box-sizing: border-box; }
.in-hero > .container, .in-sec > .container { width: calc(100% - 40px); max-width: none; margin-right: auto; margin-left: auto; padding: 0; } /* = home .hm-wrap */
@media (min-width: 992px) { .in-hero > .container, .in-sec > .container { width: min(1286px, 100% - 164px); } }
:where(.in-hero, .in-sec, .in-lb) [hidden] { display: none !important; }
:where(.in-hero, .in-sec) img { vertical-align: middle; }

/* ---------- Page hero: calm navy band that runs under the glass bar (.mm-page-hero tells base.css to drop the top padding) ---------- */
.in-hero { position: relative; overflow: hidden; padding: calc(var(--mm-header-space) + 52px) 0 60px; background: linear-gradient(115deg, var(--mm-navy) 0%, var(--mm-footer-bg) 55%, #0a2f66 100%); color: #fff; }
.in-hero::after { content: ""; position: absolute; right: -12%; bottom: -70%; width: 62%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(0, 95, 222, .32), transparent); pointer-events: none; } /* soft blue glow, decoration only */
.in-hero .container { position: relative; z-index: 1; }
/* optional page photo (in_hero $key): same left-side dark veil as the home hero; text sits on the dark part */
.in-hero--photo { padding-bottom: 104px; background: var(--mm-navy); }
.in-hero__bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; } /* photos are framed for 40%: helmets stay below the glass header at 1366-1920 (parts/photos/reframe.py) */
.in-hero--photo::after { --l: calc((100% - min(1286px, 100% - 164px)) / 2); inset: 0; width: auto; aspect-ratio: auto;
	background: linear-gradient(90deg, rgba(4, 14, 30, .84) 0, rgba(4, 14, 30, .8) calc(var(--l) + 600px), rgba(4, 14, 30, .55) calc(var(--l) + 860px), rgba(4, 14, 30, .12) calc(var(--l) + 1080px)),
		linear-gradient(0deg, rgba(4, 14, 30, .5) 0, rgba(4, 14, 30, 0) 30%), linear-gradient(180deg, rgba(4, 14, 30, .45) 0, rgba(4, 14, 30, 0) 130px); }
@media (max-width: 991.98px) { .in-hero--photo { padding-bottom: 64px; } .in-hero--photo::after { background: linear-gradient(0deg, rgba(4, 14, 30, .88) 0, rgba(4, 14, 30, .78) 55%, rgba(4, 14, 30, .76) 100%); } }
.in-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 30px; padding: 0; list-style: none; font-size: var(--mm-fs-small); line-height: 24px; color: rgba(255, 255, 255, .8); }
.in-crumbs li { min-width: 0; line-height: inherit; overflow-wrap: anywhere; }
.in-crumbs li + li::before { content: "/"; margin: 0 10px; color: rgba(255, 255, 255, .5); }
.in-crumbs a { display: inline-block; min-height: 24px; } /* WCAG 2.5.8 target >= 24px */
.in-crumbs a, .in-crumbs a:hover { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 3px; }
.in-crumbs a:hover { text-decoration-color: #fff; }
.in-hero :focus-visible { outline-color: var(--mm-blue-light) !important; }
.in-hero__eyebrow { margin-bottom: 18px; color: #fff; line-height: 14px; letter-spacing: 3px; } /* = home hero eyebrow */
.in-hero__title { max-width: 940px; margin: 0; font-size: 48px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; color: #fff; overflow-wrap: break-word; }
.in-hero__sub { margin: 16px 0 0; font-size: var(--mm-fs-lead); line-height: 1.4; color: rgba(255, 255, 255, .85); }
@media (max-width: 991.98px) {
	.in-hero { padding: calc(var(--mm-header-space) + 28px) 0 36px; }
	.in-crumbs ol { margin-bottom: 20px; }
	.in-hero__eyebrow { margin-bottom: 14px; }
	.in-hero__title { font-size: 32px; line-height: 1.2; }
	.in-hero__sub { font-size: 16px; }
}
@media (max-width: 575.98px) { .in-hero__title { font-size: 28px; } }

/* ---------- Section ---------- */
.in-sec { padding: 64px 0 88px; background: var(--mm-bg-soft); }
@media (max-width: 991.98px) { .in-sec { padding: 36px 0 56px; } }

/* ---------- Card grids (lists) of .mm-card (base.css); gaps leave room for the 12px hover surface ---------- */
.in-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; margin: 0; padding: 0; list-style: none; }
.in-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; }
.in-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.in-grid > li { display: flex; min-width: 0; }
.in-grid > li[hidden] { display: none; }
@media (max-width: 1199.98px) { .in-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .in-grid, .in-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } }
@media (max-width: 575.98px) { .in-grid, .in-grid--4, .in-grid--2 { grid-template-columns: minmax(0, 1fr); } }

/* project filter (lists with > 12 projects): search + sector + year + counter on one row (phone: stacked) */
.in-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 28px; }
.in-search { flex: 0 1 360px; margin: 0; }
.in-select { flex: 0 1 220px; margin: 0; }
.in-search input, .in-select select { width: 100%; height: 48px; border: 1px solid var(--mm-line-strong); border-radius: var(--mm-radius-btn); font: inherit; font-size: 16px; color: var(--mm-text); } /* 16px: iOS does not zoom on focus */
.in-search input { padding: 0 16px 0 46px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23606c8b' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 16px center / 18px no-repeat; }
.in-select select { padding: 0 40px 0 16px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23005fde' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") right 16px center / 12px no-repeat; cursor: pointer; }
.in-search input::placeholder { color: var(--mm-muted); opacity: 1; }
.in-count { margin: 0 0 0 8px; font-size: var(--mm-fs-small); line-height: 20px; color: var(--mm-muted); white-space: nowrap; }
.in-empty { margin: 24px 0 0; line-height: 1.6; color: var(--mm-muted); }
@media (max-width: 767.98px) { .in-search, .in-select { flex-basis: 100%; } .in-count { margin-left: 0; } }

/* ---------- Detail layouts (pages_lang.grid -> .in-detail--<grid>); a missing image / side list falls back to one column ---------- */
.in-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 56px; align-items: start; }
.in-main, .in-media { min-width: 0; }
@media (min-width: 992px) { /* columns only on desktop; phone = one column, side list after the text */
	.in-detail--col_left_image_1_text_3:has(> .in-figure), .in-detail--col_left_text_1_gallery_3:has(> .in-media) { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
	.in-detail--col_right_image_1_text_3:has(> .in-figure), .in-detail--col_right_text_1_gallery_3:has(> .in-media) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
	.in-detail--col_left_image_2_text_2:has(> .in-figure), .in-detail--col_right_image_2_text_2:has(> .in-figure) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.in-detail--col_left_menu_1_text_3:has(> .in-side) { grid-template-columns: 300px minmax(0, 1fr); }
	.in-detail--col_right_menu_1_text_3:has(> .in-side) { grid-template-columns: minmax(0, 1fr) 300px; }
	.in-detail[class*="col_right_image"] > .in-figure, .in-detail--col_right_menu_1_text_3 > .in-side, .in-detail--col_right_text_1_gallery_3 > .in-prose { order: 2; }
}
@media (max-width: 991.98px) { .in-detail { gap: 32px; } .in-detail > .in-side { order: 2; } }
.in-figure { margin: 0; }
.in-figure img { display: block; width: 100%; height: auto; border-radius: var(--mm-radius); box-shadow: var(--mm-shadow); }

/* long text: <= ~78 characters per line (34em of Figtree 16px; "ch" = width of "0" gave ~110). Robust to old CMS HTML (inline styles, empty tags, tables) */
.in-prose { max-width: 34em; font-size: 16px; line-height: 1.7; color: var(--mm-text); overflow-wrap: break-word; }
.in-prose > :first-child { margin-top: 0; }
.in-prose > :last-child { margin-bottom: 0; }
.in-prose p, .in-prose ul, .in-prose ol, .in-prose table, .in-prose blockquote { margin: 0 0 1.1em; }
.in-prose p { font-size: inherit; line-height: inherit; color: inherit; }
.in-prose h2 { margin: 1.9em 0 .6em; font-size: 24px; line-height: 1.25; }
.in-prose h3 { margin: 1.6em 0 .5em; font-size: 20px; line-height: 1.3; }
.in-prose h4, .in-prose h5, .in-prose h6 { margin: 1.4em 0 .4em; font-size: 17px; line-height: 1.35; }
.in-prose ul, .in-prose ol { padding-left: 1.3em; }
.in-prose ul { list-style: disc !important; } /* panel editor writes inline list-style-type: square */
.in-prose li { margin: .35em 0; padding-left: .2em; line-height: inherit; }
.in-prose li::marker { color: var(--mm-blue); }
.in-prose strong, .in-prose b { font-weight: 700; color: var(--mm-navy); }
.in-prose a { text-decoration: underline; text-underline-offset: 2px; }
.in-prose :not(h1, h2, h3, h4, h5, h6)[style], .in-prose font { font-size: inherit !important; font-family: inherit !important; line-height: inherit !important; text-indent: 0 !important; }
.in-prose [style*="justify"] { text-align: left !important; }
.in-prose :is(p, h1, h2, h3, h4, h5, h6, li):empty { display: none; }
.in-prose img { max-width: 100%; height: auto !important; border-radius: var(--mm-radius); vertical-align: middle; }
.in-prose :is(p, li) > img { display: block; margin: 12px 0 4px; } /* client logos typed after the text: own line */
.in-prose .in-logo { margin-bottom: 14px; }
.in-prose .in-logo img { display: inline-block; margin: 0 12px 0 0; border-radius: 0; }
.in-prose table { width: 100% !important; height: auto !important; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.in-prose th, .in-prose td { width: auto !important; padding: 10px 14px; border-bottom: 1px solid var(--mm-line); text-align: left; vertical-align: top; overflow-wrap: break-word; }
.in-prose th { white-space: nowrap; background: #eef3f9; font-weight: 600; color: var(--mm-navy); }
@media (max-width: 575.98px) { .in-prose h2 { font-size: 21px; } .in-prose table { display: block; overflow-x: auto; } .in-prose th, .in-prose td { min-width: 7em; padding: 8px 10px; } }

/* founder portrait in the About text (content part inserts <figure class="mm-founder">): beside the text on desktop, above it on phones */
.in-prose .mm-founder { width: min(100%, 420px); margin: 0 0 1.6em; }
.in-prose:has(> .mm-founder)::after { content: ""; display: table; clear: both; }
.in-prose .mm-founder img { display: block; width: 100%; height: auto !important; aspect-ratio: 1122 / 1402; object-fit: cover; border-radius: var(--mm-radius); box-shadow: var(--mm-shadow); background: var(--mm-line); }
.in-prose .mm-founder figcaption { margin-top: 10px; font-size: var(--mm-fs-small); line-height: 1.4; color: var(--mm-muted); }
@media (min-width: 992px) {
	.in-prose:has(> .mm-founder) { max-width: calc(34em + 380px); }
	.in-prose:has(> .mm-founder) > :not(.mm-founder) { max-width: 34em; } /* portrait = right column; text stays <= 34em, also below it */
	.in-prose .mm-founder { float: right; width: 340px; margin: 6px 0 24px 40px; }
}

/* side list (project detail: other projects of the category). Scrolls inside itself; inner.js keeps the current item visible */
.in-side { position: sticky; top: calc(var(--mm-header-space) + 24px); padding: 24px 0 6px; border-radius: var(--mm-radius); background: #fff; box-shadow: var(--mm-shadow); }
.in-side__h { padding: 0 24px 14px; line-height: 14px; letter-spacing: 2.4px; } /* = home section eyebrow */
.in-side__list { position: relative; max-height: calc(100vh - var(--mm-header-space) - 140px); margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.in-side__list li + li { border-top: 1px solid #eef1f5; }
.in-side__list a { display: block; padding: 11px 24px 11px 21px; border-left: 3px solid transparent; font-size: 14px; line-height: 1.35; color: var(--mm-text); text-decoration: none; }
html body .in-side__list a:focus-visible { outline-offset: -3px; }
.in-side__list strong { display: block; font-weight: 700; color: var(--mm-navy); }
.in-side__list span { display: block; margin-top: 2px; font-size: 13px; color: var(--mm-muted); }
.in-side__list a:hover strong { color: var(--mm-blue); }
.in-side__list a[aria-current] { border-left-color: var(--mm-blue); background: #f1f6fd; }
.in-side__list a[aria-current] strong { color: var(--mm-blue-dark); }
@media (max-width: 991.98px) { .in-side { position: static; } .in-side__list { max-height: 440px; } }

/* ---------- Photo grid + lightbox ---------- */
.in-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 24px; margin: 0; padding: 0; list-style: none; }
.in-prose + .in-gallery { margin-top: 40px; }
.in-gallery a { cursor: zoom-in; } /* tile = .mm-card (base.css) */
.in-gallery img { aspect-ratio: 4 / 3; }
.in-gallery--contain { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.in-gallery--contain img { aspect-ratio: 1; padding: 18px; object-fit: contain; background: #fff; } /* logos/certificates: white tile is the photo */
@media (max-width: 575.98px) { .in-gallery, .in-gallery--contain { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } .in-gallery--contain img { padding: 10px; } }

.in-lb { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 72px 80px; border: 0; background: rgba(0, 4, 31, .92); } /* dark layer on the full-screen dialog, not ::backdrop: axe ignores ::backdrop (false 1.02:1 caption warning) */
.in-lb[open] { display: grid; place-items: center; }
.in-lb::backdrop { background: transparent; }
html:has(.in-lb[open]) { overflow: hidden; }
.in-lb figure { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; margin: 0; }
.in-lb img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 170px); border-radius: var(--mm-radius); background: #fff; }
.in-lb figcaption { font-size: var(--mm-fs-small); color: rgba(255, 255, 255, .85); }
.in-lb .mm-round { position: fixed; }
.in-lb__x { top: 18px; right: 18px; }
.in-lb__prev, .in-lb__next { top: calc(50% - 21px); }
.in-lb__prev { left: 18px; }
.in-lb__next { right: 18px; }
.in-lb :focus-visible { outline-color: var(--mm-blue-light) !important; }
@media (max-width: 575.98px) {
	.in-lb { padding: 72px 12px 88px; }
	.in-lb__prev, .in-lb__next { top: auto; bottom: 22px; }
	.in-lb__prev { left: calc(50% - 54px); }
	.in-lb__next { right: calc(50% - 54px); }
}

/* ---------- Detail footer: PDF, back link ---------- */
.in-pdf { margin: 40px 0 0; line-height: 1.6; }
.in-pdf .mm-btn { max-width: 100%; white-space: normal; text-align: left; }
.in-back { margin: 56px 0 0; line-height: 1.6; padding-top: 28px; border-top: 1px solid var(--mm-line); }
.in-back .mm-link-arrow { gap: 12px; text-decoration: none; }

/* ---------- 404 ---------- */
.in-404__text { max-width: 60ch; margin: 0; font-size: var(--mm-fs-lead); line-height: 1.5; }
.in-404__btns { line-height: 1.6; display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

/* kurumsal: About + Policies (pages/detail.php .in-detail--ku): each section = side column (h2 or founder portrait) + ~70ch text; one column on phones */
.in-detail--ku { display: block; }
.in-detail--ku .ku-sec.in-prose { max-width: none; scroll-margin-top: 112px; } /* anchors from the old-URL 301s land below the glass bar */
.in-detail--ku .ku-sec.in-prose > * { max-width: none; }
.in-detail--ku .ku-sec + .ku-sec { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--mm-line); }
.in-detail--ku .ku-sec > h2 { margin: 0 0 20px; font-size: 26px; line-height: 1.25; color: var(--mm-navy); }
.in-detail--ku .ku-sec > h2::before { content: ""; display: block; width: 40px; height: 3px; margin-bottom: 16px; background: var(--mm-blue); }
.in-detail--ku .ku-body > :first-child { margin-top: 0; }
.in-detail--ku .ku-body > :last-child { margin-bottom: 0; }
.in-detail--ku .ku-sec > .mm-founder { float: none; }
.in-detail--ku .ku-sec:has(> .mm-founder) .ku-body { font-size: 18px; line-height: 1.7; color: var(--mm-navy); }
@media (min-width: 992px) {
	.in-detail--ku .ku-sec.in-prose { display: grid; grid-template-columns: 300px minmax(0, 68ch); column-gap: clamp(48px, 7vw, 112px); align-items: start; font-size: 17px; }
	.in-detail--ku .ku-sec + .ku-sec { margin-top: 72px; padding-top: 72px; }
	.in-detail--ku .ku-body { grid-column: 2; }
	.in-detail--ku .ku-sec > h2 { position: sticky; top: 112px; margin: 0; }
	.in-detail--ku .ku-sec > .mm-founder { width: 100%; margin: 0; }
	.in-detail--ku .ku-sec:has(> .mm-founder) { align-items: center; } /* short intro sits mid-height beside the tall portrait */
	.in-detail--ku .ku-sec:has(> .mm-founder) .ku-body { font-size: 19px; }
	.in-detail--ku .ku-sec--pol.in-prose { grid-template-columns: 300px minmax(0, 1fr); } /* cards use the full width; the policy text keeps ~70ch */
	.in-detail--ku .ku-cards.ku-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.in-detail--ku .ku-cards.ku-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Policies: principle cards (features of page 11, sql/politika.sql) + full text behind a native <details> (keyboard + find-in-page) */
.in-detail--ku .ku-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.in-detail--ku .ku-cards li { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 22px 20px 20px; border: 1px solid var(--mm-line); border-radius: var(--mm-radius); background: #fff; font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--mm-navy); }
.in-detail--ku .ku-cards li::before { content: none; }
.in-detail--ku .ku-cards svg { flex: none; color: var(--mm-blue); }
.in-detail--ku .ku-full { margin-top: 28px; border-top: 1px solid var(--mm-line); border-bottom: 1px solid var(--mm-line); }
.in-detail--ku .ku-full summary { display: flex; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: var(--mm-fs-btn); font-weight: 600; color: var(--mm-blue); }
.in-detail--ku .ku-full summary::-webkit-details-marker { display: none; }
.in-detail--ku .ku-full summary::after { content: "+"; margin-left: auto; font-size: 24px; font-weight: 300; line-height: 1; color: var(--mm-muted); }
.in-detail--ku .ku-full[open] summary::after { content: "\2212"; }
.in-detail--ku .ku-full summary:hover { color: var(--mm-blue-dark); }
.in-detail--ku .ku-full__text { max-width: 68ch; padding-bottom: 24px; }
.in-detail--ku .ku-full__text > :first-child { margin-top: 0; }
.in-detail--ku .ku-full__text > :last-child { margin-bottom: 0; }
@media (max-width: 575.98px) {
	.in-detail--ku .ku-cards li { gap: 12px; padding: 18px 16px 16px; font-size: 15px; }
}

/* founding */
/* category 5 year list (pages/founding.php): year left, one line per project right, thin rule between years */
.fd { max-width: 1080px; border-top: 1px solid var(--mm-line); }
.fd-year { border-bottom: 1px solid var(--mm-line); }
.fd-year summary { display: flex; align-items: baseline; gap: 0 32px; padding: 22px 0; cursor: pointer; list-style: none; }
.fd-year summary::-webkit-details-marker { display: none; }
.fd-year summary::after { content: "+"; margin-left: auto; font-size: 24px; font-weight: 300; line-height: 1; color: var(--mm-muted); }
.fd-year[open] summary::after { content: "\2212"; }
.fd-year__y { flex: 0 0 160px; font-size: 48px; font-weight: 300; line-height: 1; color: var(--mm-navy); font-variant-numeric: tabular-nums; }
.fd-year__n { font-size: var(--mm-fs-small); color: var(--mm-muted); }
.fd-list { margin: -6px 0 0; padding: 0 0 28px 192px; list-style: none; }
.fd-list li { padding: 7px 0; font-size: var(--mm-fs-body); line-height: 1.55; color: var(--mm-text, var(--mm-ink)); }
.fd-list li + li { border-top: 1px solid var(--mm-bg-soft); }
.fd-list__co { font-weight: 600; color: var(--mm-navy); }
.fd-year summary:hover .fd-year__y { color: var(--mm-blue); }
@media (max-width: 575.98px) {
	.fd-year summary { gap: 0 16px; padding: 18px 0; }
	.fd-year__y { flex-basis: 72px; font-size: 30px; }
	.fd-list { padding: 0 0 22px 88px; }
	.fd-list li { font-size: 14px; }
}
