/* ==========================================================================
   Imkon Finans — subpage styles (owner: pages agent).
   Loaded on every page right after site.css. Build on the tokens and the
   class API defined in site.css; do not redefine :root tokens here.

   Contents: 1 shared page helpers · 2 CTA blocks · 3 products (list, detail)
   · 4 blog · 5 contacts · 6 documents & dividends · 7 our services
   · 8 team · 9 reception days · 10 vacancies · 11 partners
   ========================================================================== */

/* ---------- 1. Shared page helpers ---------- */

/* First section under a .page-head: a little less top padding, so the
   content reads as part of the page head instead of a separate band. */
.section--flush-top { padding-top: calc(var(--section-y) * .72); }

.page-head__row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 992px) {
  .page-head__row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 2.5rem; }
}
.page-head__title { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.page-head__title > :is(h1, .page-title) { min-width: 0; }
.page-head__icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: var(--r);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  overflow: hidden;
}
.page-head__icon img { width: 100%; height: 100%; object-fit: cover; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: .75rem; flex: 0 0 auto; }
@media (max-width: 575.98px) {
  .page-head__actions > * { flex: 1 1 100%; }
  .page-head__icon { width: 52px; height: 52px; font-size: 1.4rem; }
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.25rem;
  margin: 1rem 0 0;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
}
.page-meta .bi { color: var(--brand); margin-right: .4rem; }

/* Sticky sidebars stay clear of the sticky header */
@media (min-width: 992px) {
  .aside-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}

.aside-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 1rem;
}

/* Soft indigo icon square used by several cards */
.icon-sq {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.icon-sq--solid { background: var(--brand); color: #fff; }
.c-card--flat .icon-sq:not(.icon-sq--solid) { background: #fff; }

/* Small rounded info chip (vacancy meta, reception day) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 34px;
  padding: .35rem .85rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
}
.chip .bi { color: var(--brand); }
.chip--brand { background: var(--brand-soft); color: #1E1A99; font-weight: 600; }

.empty-state { max-width: 560px; margin-inline: auto; text-align: center; }
.empty-state .icon-sq { width: 64px; height: 64px; font-size: 1.6rem; border-radius: var(--r-lg); margin-bottom: 1.25rem; }

/* Long-form reading column */
.reading { max-width: 780px; }

/* ---------- 2. CTA blocks ---------- */

/* Dark gradient CTA with a hand-drawn illustration (product list) */
.cta-dark { position: relative; }
.cta-dark .dark-block-title { font-size: clamp(2rem, 1.3rem + 2.2vw, 2.875rem); margin-bottom: 1rem; }
.cta-dark__text { font-size: 1.0625rem; max-width: 34rem; margin-bottom: 2rem; }
.cta-dark__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 575.98px) {
  .cta-dark__actions > * { flex: 1 1 100%; }
}
.cta-dark__art { display: block; width: min(100%, 420px); height: auto; margin-inline: auto; }
@media (prefers-reduced-motion: no-preference) {
  .cta-dark__art .float { animation: cta-float 6s ease-in-out infinite; transform-origin: center; }
}
@keyframes cta-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Centred "join us" block (partners page) */
.join-block { max-width: 640px; margin-inline: auto; text-align: center; }
.join-block__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.5rem;
  color: var(--ink);
}
.join-block__icon svg { width: 100%; height: 100%; }
.join-block .section-title { margin-bottom: .75rem; }
.join-block p { color: var(--muted); font-size: 1.0625rem; margin-bottom: 1.75rem; }

/* ---------- 3. Products ---------- */

/* List: full-bleed tiles (templates/includes/product_tile.html, shared with
   the home page). The wrap-safe "•" separators live in site.css .tile__facts. */
.tile-grid--products .tile__text { font-weight: 500; }

/* Detail: key figures */
.kf-tile {
  --tile-bg: var(--tile-1);
  --kf-ghost-size: clamp(120px, 14vw, 220px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  border-radius: var(--r-lg);
  background: var(--tile-bg);
  color: #fff;
}
.kf-label {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}
.kf-tile .kf-label { color: #fff; opacity: .88; }
.kf-figure {
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.125rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.kf-tile .kf-figure { color: #fff; }
.kf-figure .kf-sep { font-weight: 500; opacity: .7; margin-inline: .15em; }
.kf-unit { font-size: 1.125rem; font-weight: 600; margin: 0; }
.kf-tile .kf-unit { color: #fff; }
/* Same colour as the product's tile everywhere (tile_n from the view) */
.kf-tile.tile--1 { --tile-bg: var(--tile-1); }
.kf-tile.tile--2 { --tile-bg: var(--tile-2); }
.kf-tile.tile--3 { --tile-bg: var(--tile-3); }
.kf-tile.tile--4 { --tile-bg: var(--tile-4); }
.kf-tile.tile--5 { --tile-bg: var(--tile-5); }
.kf-tile.tile--6 { --tile-bg: var(--tile-6); }
.kf-tile__foot {
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, .28);
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
}
/* The rate line stops short of the ghost "%" in the corner, never under it */
.kf-tile__rate { padding-right: calc(var(--kf-ghost-size) * .78); }
@media (max-width: 575.98px) {
  .kf-tile { --kf-ghost-size: 96px; }
  .kf-tile__foot { font-size: 1rem; }
}
.kf-tile__foot .bi {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kf-stack { display: grid; gap: 1rem; height: 100%; grid-auto-rows: 1fr; }
@media (min-width: 576px) and (max-width: 991.98px) {
  .kf-stack { grid-auto-flow: column; grid-auto-columns: 1fr; grid-auto-rows: auto; }
}
@media (min-width: 992px) {
  .kf-stack { gap: 1.5rem; }
}
.kf-stack .kf-card { justify-content: center; }
.kf-ghost {
  position: absolute;
  right: -.02em;
  bottom: -.2em;
  z-index: -1;
  font-size: var(--kf-ghost-size);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
  color: rgba(255, 255, 255, .12);
  pointer-events: none;
  user-select: none;
}
.kf-card { display: flex; flex-direction: column; gap: .4rem; }
.kf-card .kf-figure { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem); }
.kf-card .kf-figure small { font-size: 1.125rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: .35em; }
.kf-card__text { font-size: 1.125rem; font-weight: 700; color: var(--ink); line-height: 1.4; margin: 0; }

/* Detail: sticky apply card */
.apply-card { display: flex; flex-direction: column; gap: 1rem; }
.apply-card h2 { font-size: 1.375rem; font-weight: 700; margin: 0; }
.apply-card p { color: var(--muted); margin: 0; }
.apply-card__phone { font-size: .9375rem; color: var(--muted); }
.apply-card__phone a { font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.apply-card__phone a:hover { color: var(--brand); }

/* ---------- 4. Blog ---------- */
.c-card--media .ratio { flex: 0 0 auto; }
.c-card--media .ratio iframe { border-radius: 0; }
.c-card__meta .bi { color: var(--brand); margin-right: .35rem; }
.c-card__excerpt { font-size: .9375rem; color: var(--muted); margin: 0; }

.post-hero-img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin-bottom: 2rem;
}
.post-video { border-radius: var(--r-lg); overflow: hidden; margin-bottom: 2rem; }

.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li + li { border-top: 1px solid var(--line); }
.recent-item {
  display: flex;
  gap: .9rem;
  align-items: center;
  padding: .9rem 0;
  text-decoration: none;
  color: var(--ink);
}
.recent-item img { flex: 0 0 64px; width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); }
.recent-item__ph {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.recent-item__title { display: block; font-weight: 600; line-height: 1.4; transition: color .15s var(--ease); overflow-wrap: anywhere; hyphens: auto; }
.recent-item__date { display: block; font-size: .8125rem; color: var(--muted); margin-top: .2rem; }
.recent-item:hover .recent-item__title { color: var(--brand); }

/* ---------- 5. Contacts ---------- */
.info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}
@media (min-width: 1200px) {
  .info-card { flex-direction: column; align-items: flex-start; gap: .9rem; }
}
.info-card__label { display: block; font-size: .875rem; font-weight: 500; color: var(--muted); margin-bottom: .2rem; }
.info-card__value { display: block; font-size: 1.0625rem; font-weight: 700; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
a.info-card__value { text-decoration: none; }
a.info-card__value:hover { color: var(--brand); text-decoration: underline; }

.map-card { padding: 8px; height: 100%; display: flex; }
.map-card__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 320px;
  border-radius: calc(var(--r-lg) - 6px);
  overflow: hidden;
  background: var(--surface-2);
}
.map-card__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.branch-card { display: flex; align-items: flex-start; gap: 1rem; height: 100%; }
.branch-card__name { font-size: 1.0625rem; font-weight: 700; margin: 0 0 .25rem; }
.branch-card__phone { display: inline-block; font-weight: 700; font-size: 1.0625rem; color: var(--brand); text-decoration: none; margin-bottom: .25rem; }
.branch-card__phone:hover { color: var(--brand-hover); text-decoration: underline; }
.branch-card__meta { font-size: .875rem; color: var(--muted); }

.form-card h2 { font-size: clamp(1.375rem, 1.15rem + .7vw, 1.75rem); margin-bottom: .5rem; }
.form-card .form-note { color: var(--muted); margin-bottom: 1.75rem; }
.form-error { font-size: .875rem; font-weight: 500; margin-top: .4rem; }
.form-card .field-card .form-control { font-size: 1.0625rem; }
/* Field with a validation error (red is reserved for form errors) */
.form-card .field-card:has(~ .form-error) { border-color: #dc3545; }
.form-card .field-card:has(~ .form-error):focus-within { box-shadow: 0 0 0 4px rgba(220, 53, 69, .2); }

/* ---------- 6. Documents & dividends ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1.75rem; }
.filter-bar__label { font-size: .9375rem; font-weight: 600; color: var(--muted); margin-right: .25rem; }

.doc-list { display: grid; gap: 12px; }
.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  border-color: var(--line-strong);
  border-radius: var(--r);
}
@media (min-width: 768px) {
  .doc-card { gap: 1.25rem; padding: 1.15rem 1.5rem; }
}
.doc-card:hover { color: var(--text); }
.doc-card .doc-ext {
  min-width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: .75rem;
}
.doc-card__body { flex: 1 1 auto; min-width: 0; }
.doc-card__title { display: block; font-weight: 600; color: var(--ink); line-height: 1.4; transition: color .15s var(--ease); }
.doc-card:hover .doc-card__title { color: var(--brand); }
.doc-card__meta { display: block; font-size: .875rem; color: var(--muted); margin-top: .15rem; }
.doc-card__date { flex: 0 0 auto; font-size: .875rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.doc-card__dl {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.doc-card:hover .doc-card__dl { background: var(--brand); color: #fff; }
@media (max-width: 575.98px) {
  .doc-card { flex-wrap: wrap; align-items: flex-start; }
  .doc-card__body { flex-basis: calc(100% - 52px - 1rem); }
  .doc-card__date { order: 3; margin-left: calc(52px + 1rem); align-self: center; }
  .doc-card__dl { order: 4; margin-left: auto; width: 40px; height: 40px; }
}

.table-card { padding: 0; overflow: hidden; }
.table-card .table-responsive { margin: 0; }
.dividends-table thead th {
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  vertical-align: bottom;
  min-width: 9rem;
  border-bottom: 1px solid var(--line-strong);
}
.dividends-table thead th:first-child { min-width: 5rem; }
.dividends-table tbody td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dividends-table tbody tr:last-child > * { border-bottom: 0; }
.dividends-table .year-cell { font-weight: 800; color: var(--ink); }
@media (min-width: 768px) {
  .dividends-table :is(th, td):first-child { padding-left: 1.75rem; }
  .dividends-table :is(th, td):last-child { padding-right: 1.75rem; }
}
/* Phones: every year becomes a small card of label → value rows */
@media (max-width: 767.98px) {
  .dividends-table thead { display: none; }
  .dividends-table, .dividends-table tbody, .dividends-table tr, .dividends-table td { display: block; width: 100%; }
  .dividends-table tr { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
  .dividends-table tbody tr:last-child { border-bottom: 0; }
  .dividends-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .4rem 0;
    border: 0;
    text-align: right;
  }
  .dividends-table td::before {
    content: attr(data-label);
    flex: 1 1 55%;
    white-space: normal;
    text-align: left;
    font-size: .875rem;
    font-weight: 500;
    color: var(--muted);
  }
  .dividends-table .year-cell { font-size: 1.25rem; padding-bottom: .6rem; }
  .dividends-table .year-cell::before { align-self: center; }
}

/* ---------- 7. Our services ---------- */
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  height: 100%;
}
.feature-card p { margin: 0; font-weight: 500; color: var(--ink); line-height: 1.5; align-self: center; }

.tabs-wrap { display: flex; justify-content: center; margin-bottom: 1.75rem; }
.tabs-wrap .seg-tabs { background: #fff; box-shadow: 0 2px 16px rgba(166, 166, 166, .12); flex-wrap: wrap; }
.tab-card .rich-text > :first-child { margin-top: 0; }
.tab-card .rich-text > :last-child { margin-bottom: 0; }

/* ---------- 8. Team ---------- */
.duties-card .check-list { gap: 1rem 2rem; }
@media (min-width: 768px) {
  .duties-card .check-list { grid-template-columns: repeat(2, 1fr); }
}
.duties-card .check-list > li { font-weight: 500; color: var(--ink); }

.team-grid .team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
}
.team-card__name { font-size: 1.1875rem; font-weight: 700; color: var(--ink); margin: 1.25rem 0 .35rem; line-height: 1.35; }
.team-card__role { font-size: .9375rem; font-weight: 600; color: var(--brand); margin: 0; }
.team-card__bio { font-size: .9375rem; color: var(--muted); margin: .75rem 0 0; }
/* Phones: photo left, text right — keeps five members from filling five screens */
@media (max-width: 575.98px) {
  .team-grid .team-card {
    display: grid;
    grid-template-columns: 88px 1fr;
    column-gap: 1.1rem;
    align-items: center;
    text-align: left;
    padding: 1.25rem;
  }
  .team-grid .team-card > :is(.team-photo, .team-photo-placeholder) {
    grid-row: 1 / span 3;
    width: 88px;
    height: 88px;
    font-size: 1.8rem;
    box-shadow: 0 0 0 4px var(--brand-soft);
  }
  .team-card__name { margin-top: 0; font-size: 1.0625rem; }
  .team-card__bio { grid-column: 2; }
}

/* ---------- 9. Reception days ---------- */
.hours-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: clamp(1.25rem, .9rem + 1.2vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--brand);
  color: #fff;
  margin-bottom: clamp(1.5rem, 1rem + 1.4vw, 2.5rem);
}
.hours-band .icon-sq { background: rgba(255, 255, 255, .16); color: #fff; width: 56px; height: 56px; font-size: 1.5rem; }
.hours-band__label { display: block; font-size: .9375rem; font-weight: 500; color: #fff; opacity: .88; }
.hours-band__value { display: block; font-size: clamp(1.25rem, 1rem + .9vw, 1.625rem); font-weight: 800; color: #fff; line-height: 1.3; }

.rd-card { display: flex; flex-direction: column; height: 100%; }
.rd-card__day { align-self: flex-start; margin-bottom: 1.25rem; }
.rd-card__name { font-size: 1.1875rem; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 0 0 .3rem; }
.rd-card__role { font-size: .9375rem; color: var(--muted); font-weight: 500; margin: 0 0 1.25rem; }
.rd-card__time {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rd-card__time .bi { color: var(--brand); }

/* ---------- 10. Vacancies ---------- */
.vac-card__head {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) {
  .vac-card__head { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.vac-card__title { font-size: clamp(1.375rem, 1.15rem + .7vw, 1.75rem); font-weight: 700; margin: 0 0 1rem; }
.vac-card__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.vac-card__cta { flex: 0 0 auto; }
.vac-card h3 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 .75rem; }
.vac-card .rich-text { font-size: 1rem; }
.vac-card .rich-text ul { padding-left: 1.25rem; margin-bottom: 0; }
.vac-card .rich-text li + li { margin-top: .35rem; }

/* ---------- 11. Partners page ---------- */
.partner-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  height: 100%;
  text-align: center;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.partner-tile:has(a:hover) { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.partner-tile__logo {
  height: 96px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.partner-tile__logo img { max-height: 80px; max-width: 100%; width: auto; object-fit: contain; }
.partner-tile__name { font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.35; overflow-wrap: anywhere; hyphens: auto; }

@media (prefers-reduced-motion: reduce) {
  .partner-tile:has(a:hover) { transform: none; }
}
