/* ==========================================================================
   SOCEC-BA — layout.css
   Top bar, header, navigation, page banners, footer, floating UI.
   ========================================================================== */

/* Scroll progress */
.scroll-progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 120; background: linear-gradient(90deg, var(--lime), var(--blue-light)); }

/* Top bar */
.topbar { background: var(--deep); color: #fff; font-size: 13px; position: relative; z-index: 61; }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar__list { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar__list a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; opacity: .95; }
.topbar__list a:hover { color: #c4ee7e; opacity: 1; }
.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 2px; }
.lang button { background: transparent; border: 0; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .06em; padding: 3px 12px; border-radius: 999px; }
.lang button[aria-pressed="true"] { background: var(--btn-b); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); background: var(--surface); color: var(--fg); box-shadow: 0 2px 18px rgba(7, 33, 109, .10); transition: background .25s, box-shadow .25s, color .25s; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.is-home .site-header { margin-bottom: calc(var(--header-h) * -1); background: transparent; color: #fff; box-shadow: none; }
.is-home .site-header.is-solid, .is-home.menu-open .site-header { background: var(--surface); color: var(--fg); box-shadow: 0 2px 18px rgba(7, 33, 109, .10); }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__badge { width: 54px; height: 54px; border-radius: 50%; background: #fff; display: grid; place-items: center; padding: 3px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); flex: none; }
.brand__badge img { width: 100%; height: 100%; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .01em; }
.brand__tag { font-size: 11px; opacity: .85; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav .nl { position: relative; font-weight: 600; font-size: 15.5px; padding: 8px 0; }
.nav .nl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav .nl:hover::after, .nav .nl[aria-current="page"]::after { transform: scaleX(1); }
.is-home .site-header:not(.is-solid) .nl[aria-current="page"] { color: #c4ee7e; }
.site-header.is-solid .nl[aria-current="page"], body:not(.is-home) .nl[aria-current="page"] { color: var(--green-text); }
.nav__cta { display: none; }
.site-header__right { display: flex; align-items: center; gap: 14px; }
.burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid currentColor; background: transparent; align-items: center; justify-content: center; }

/* Page banner (inner pages) */
.page-banner { position: relative; overflow: hidden; color: #fff; background: var(--navy); min-height: 300px; display: flex; align-items: center; }
.page-banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.page-banner__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 24, 90, .92) 0%, rgba(7, 33, 109, .75) 45%, rgba(7, 33, 109, .15) 100%); }
.page-banner__in { position: relative; display: flex; flex-direction: column; gap: 14px; padding-block: 64px; width: 100%; }
.page-banner h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 600; }
.page-banner p { max-width: 620px; color: rgba(255, 255, 255, .9); font-size: 18px; }
.crumb { font-size: 14px; color: rgba(255, 255, 255, .85); display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { color: #c4ee7e; }
.crumb a:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, .82); font-size: 15px; }
.ft-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-block: 64px 48px; }
.ft-brand { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.ft-brand .brand__name { color: #fff; }
.ft-brand p { max-width: 320px; line-height: 1.65; }
.site-footer h4 { color: #fff; font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: #c4ee7e; }
.ft-contact li { display: flex; gap: 10px; align-items: flex-start; }
.ft-contact img { margin-top: 2px; }
.ft-bottom { border-top: 1px solid rgba(255, 255, 255, .14); }
.ft-bottom .wrap { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 20px; font-size: 13px; }

/* Floating */
.to-top { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 70; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--grad-btn); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(31, 122, 20, .4); transition: transform .2s; }
.to-top:hover { transform: translateY(-3px); }

@media (max-width: 1080px) {
  .ft-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .site-header__right .btn { display: none; }
  .burger { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); color: var(--fg); padding: 12px max(16px, env(safe-area-inset-left, 0px)) 22px; box-shadow: 0 18px 30px rgba(7, 33, 109, .18); border-top: 1px solid var(--line); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .nav.is-open { display: flex; }
  .nav .nl { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav .nl::after { display: none; }
  .nav .nl[aria-current="page"] { color: var(--green-text) !important; }
  .nav__cta { display: block; margin-top: 18px; }
  .nav__cta .btn { width: 100%; }
}
@media (max-width: 720px) {
  .brand__tag { display: none; }
  .brand__badge { width: 48px; height: 48px; }
  .ft-grid { grid-template-columns: 1fr; padding-block: 48px 32px; }
  .page-banner { min-height: 260px; }
  .page-banner__in { padding-block: 44px; }
  .page-banner__shade { background: linear-gradient(90deg, rgba(6, 24, 90, .9), rgba(7, 33, 109, .65)); }
  .topbar__list { gap: 16px; }
}
