/* kf-brand.css — Karst Firewall 5.0 visual identity
   §K: sidebar brand, cockpit brand strip, global footer, login rebrand.
   Load order: after kf-tokens.css, before page-specific CSS.
   ───────────────────────────────────────────────────────────────────── */

/* ─── K.4 Sidebar: brand mark (logo replaces FA icon) ─────────────── */

.kf-aside__brand-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

/* ─── K.4 Sidebar: partner footer (expanded only) ───────────────────── */

.kf-brand-footer {
  padding: var(--space-3) var(--space-4) var(--space-4);
  border-top: 1px solid rgba(240, 253, 244, 0.12);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.kf-brand-footer__label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-nav-text-muted);
  margin-bottom: 2px;
}

/* White pill wraps logo so original colors show on dark green bg.
   Pill stretches full sidebar width so the logo can scale up without
   leaving white space on the right. */
.kf-brand-footer__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Solid white — translucent backgrounds let the dark-green sidebar
     desaturate the Interreg + KF artwork (Batch 7 errata corrige). */
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  width: 100%;
}

.kf-brand-footer__logo {
  height: 56px;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Hidden in compact (no room) */
body.kf-nav--compact .kf-brand-footer {
  display: none;
}

/* ─── K.5 Cockpit brand strip ────────────────────────────────────── */

.kf-brand-strip {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-5);
  height: 48px;
  background: var(--brand-primary-dark);
  color: #f0fdf4;
  font-size: 0.875rem;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.kf-brand-strip__mark {
  height: 30px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.kf-brand-strip__title {
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  flex-shrink: 0;
}

a.kf-brand-strip__title {
  color: inherit;
  text-decoration: none;
}

a.kf-brand-strip__title:hover,
a.kf-brand-strip__title:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kf-brand-strip__claim {
  flex: 1;
  font-size: 0.8125rem;
  color: rgba(240, 253, 244, 0.80);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: var(--space-3);
  border-left: 1px solid rgba(240, 253, 244, 0.20);
  margin-left: var(--space-1);
}
/* Batch 6 §K.7 — claim is now an <a> to the internal credits page.
   Keep the visual flat at rest so the strip still reads as a banner,
   surface the affordance on hover/focus. */
a.kf-brand-strip__claim {
  text-decoration: none;
  cursor: pointer;
}
a.kf-brand-strip__claim:hover,
a.kf-brand-strip__claim:focus-visible {
  color: rgba(240, 253, 244, 1);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a.kf-brand-strip__claim:focus-visible {
  outline: 2px solid var(--interreg-yellow, #ffcc00);
  outline-offset: 2px;
  border-radius: 2px;
}

.kf-brand-strip__partners {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.kf-brand-strip__partner-wrap {
  display: inline-flex;
  align-items: center;
  /* Opaque white (errata corrige) — translucent backgrounds were
     bleeding the cockpit brand-strip green through the Interreg pill. */
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

.kf-brand-strip__partner-logo {
  height: 26px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 1100px) {
  .kf-brand-strip__claim { display: none; }
}
@media (max-width: 700px) {
  .kf-brand-strip { height: 40px; padding: 0 var(--space-3); gap: var(--space-3); }
  .kf-brand-strip__title { font-size: 0.8125rem; }
  .kf-brand-strip__mark { height: 22px; }
  .kf-brand-strip__partner-logo { height: 18px; }
  .kf-brand-strip__partners { gap: var(--space-2); }
}

/* ─── K.6 Global footer ──────────────────────────────────────────── */

.kf-footer {
  background: var(--brand-primary-dark);
  color: #dcfce7;
  padding: var(--space-6) var(--space-5);
  margin-top: var(--space-6);
}

.kf-footer__main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

.kf-footer__col h4 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(240, 253, 244, 0.55);
  margin: 0 0 var(--space-3);
  font-weight: 700;
}

.kf-footer__col p {
  font-size: 0.8125rem;
  color: rgba(240, 253, 244, 0.75);
  line-height: 1.55;
  margin: 0;
}

.kf-footer__col small {
  font-size: 0.75rem;
  color: rgba(240, 253, 244, 0.60);
  line-height: 1.4;
}

.kf-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kf-footer__col ul li {
  font-size: 0.8125rem;
  color: rgba(240, 253, 244, 0.72);
  padding: 2px 0;
}

/* Karst Firewall mark — sits in its own white pill so the original
   brand colours read against the dark-green footer (the previous
   filter:brightness(0)invert(1) version showed up as a blank white
   square when the image failed to load and disappeared entirely when
   it did). Sized 2.4× the previous 38px so it actually reads. */
.kf-footer__logo-kf-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: var(--space-3);
}

.kf-footer__logo-kf {
  height: 92px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Logo wrappers (solid white pill) for Interreg / Infordata. Bumped
   from rgba(255,255,255,0.92) → opaque so the brand logos retain
   full contrast on the dark-green footer band. */
.kf-footer__logo-wrap {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  margin-bottom: var(--space-2);
}

.kf-footer__logo-interreg {
  height: 92px;
  width: auto;
  object-fit: contain;
}

.kf-footer__logo-infordata {
  height: 68px;
  width: auto;
  object-fit: contain;
}

.kf-footer__bottom {
  max-width: 1200px;
  margin: var(--space-5) auto 0;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(240, 253, 244, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.kf-footer__bottom small {
  font-size: 0.75rem;
  color: rgba(240, 253, 244, 0.45);
}

.kf-footer__bottom nav {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.kf-footer__bottom a {
  font-size: 0.75rem;
  color: rgba(240, 253, 244, 0.60);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.kf-footer__bottom a:hover {
  color: #f0fdf4;
}

@media (max-width: 1024px) {
  .kf-footer__main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .kf-footer__main { grid-template-columns: 1fr; }
  .kf-footer__bottom { flex-direction: column; text-align: center; }
}

/* ─── K.9 Login page branding ────────────────────────────────────── */

.kf-login-brand {
  text-align: center;
  margin-bottom: var(--space-5);
}

.kf-login-brand__logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  margin-bottom: var(--space-3);
}

.kf-login-brand__name {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.kf-login-brand__sub {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 2px;
}

/* Aside panel on large screens — solid dark-green bg replaces the
   Metronic stock photo. background-color is set with !important so
   the body-level .auth-bg (which paints a light grey via Metronic's
   bundle) can't bleed through and produce the white-text-on-white
   regression we hit before Batch 7. */
.kf-login-aside {
  background-color: var(--brand-primary-dark) !important;
  background-image: linear-gradient(
    150deg,
    var(--brand-primary-dark) 0%,
    #064e3b 45%,
    #0a4923 70%,
    var(--brand-accent-dark) 100%
  ) !important;
}

.kf-login-aside__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-6) var(--space-5);
  text-align: center;
  gap: var(--space-5);
}

.kf-login-aside__tagline {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.3;
  max-width: 420px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.kf-login-aside__sub {
  color: #f0fdf4;
  font-size: 1rem;
  max-width: 380px;
  line-height: 1.55;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
}

.kf-login-aside__partners {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

.kf-login-aside__partner-wrap {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}

.kf-login-aside__partner-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
}

/* Project consortium list, optional — readable on dark green */
.kf-login-aside__partners-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  color: #f0fdf4;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 380px;
  text-align: center;
}
.kf-login-aside__partners-list li {
  padding: 2px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.kf-login-aside__partners-title {
  display: block;
  margin-top: var(--space-3);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(240, 253, 244, 0.75);
}

/* Login footer links */
.kf-login-footer {
  display: flex;
  gap: var(--space-4);
  font-size: 0.8125rem;
  color: #6b7280;
}

.kf-login-footer a {
  color: var(--brand-primary);
  text-decoration: none;
}

.kf-login-footer a:hover {
  text-decoration: underline;
}
