/* ==========================================================================
   CAFAP — shared site header + footer
   Prefixed classes (st-) so it never clashes with page/Bootstrap styles.
   Used on public pages and login pages alike.
   ========================================================================== */
:root{
  --st-gold:#E0A50E; --st-gold-dark:#B9860B;
  --st-ink:#111827; --st-ink-2:#1f2937;
  --st-muted:#6b7280; --st-line:#e5e7eb;
  --st-maxw:1180px; --st-shadow:0 10px 30px rgba(17,24,39,.10);
  --st-blue:#2563eb; --st-news:#e11d48;
}
.st-wrap{max-width:var(--st-maxw);margin:0 auto;padding:0 20px}

/* The legacy theme's reset never caps image width (Bootstrap scopes that to .img-fluid),
   so any image wider than the phone forces the whole document to scroll sideways. */
img{max-width:100%;height:auto}

/* ---- Top bar ---- */
.st-topbar{background:#fff;color:#374151;font-size:14px;font-family:'Poppins',system-ui,sans-serif;border-bottom:1px solid var(--st-line)}
.st-topbar .st-wrap{display:flex;flex-wrap:nowrap;gap:8px 22px;align-items:center;justify-content:center;padding:11px 20px}
.st-topbar a{color:#374151;text-decoration:none}
.st-topbar a:hover{color:var(--st-blue)}
.st-topbar i{color:var(--st-blue);margin-right:6px}
.st-topbar .st-spacer{flex:1}
@media(max-width:720px){.st-topbar .st-spacer{display:none}}
.st-fixed{display:inline-flex;align-items:center;gap:18px;white-space:nowrap;flex:0 0 auto}
/* Scrolling news marquee */
.st-news{flex:1 1 auto;min-width:0;overflow:hidden;position:relative;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}

.st-newstrack{display:inline-flex;align-items:center;white-space:nowrap;will-change:transform;animation:stScroll 12s linear infinite}
.st-news:hover .st-newstrack{animation-play-state:paused}
.st-newsitem{display:inline-flex;align-items:center;gap:8px;margin-right:52px;color:var(--st-news);font-weight:700}
.st-newsitem i{color:var(--st-news);margin:0}
@keyframes stScroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.st-newstrack{animation:none}}
@media(max-width:720px){.st-topbar .st-contacts{display:none}}
/* on phones give the marquee the whole row rather than a few characters of it */
@media(max-width:600px){
  body.has-news .st-loc{display:none}
  .st-topbar .st-wrap{padding:8px 16px}
}

/* ---- Header / nav ---- */
.st-header.scrolled{box-shadow:var(--st-shadow)}
.st-header{position:sticky;top:0;z-index:130;transition:box-shadow .3s;background:rgba(255,255,255,.97);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--st-line);font-family:'Poppins',system-ui,sans-serif}
.st-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;max-width:var(--st-maxw);margin:0 auto}
.st-brand{display:flex;align-items:center;gap:12px;text-decoration:none}
.st-brand img{width:50px;height:auto}
.st-brand b{font-family:'Playfair Display',Georgia,serif;font-size:15px;line-height:1.15;display:block;max-width:230px;color:var(--st-ink)}
.st-brand small{font-size:11px;color:var(--st-muted);letter-spacing:.04em}
.st-menu{display:flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}
.st-menu a{display:inline-block;white-space:nowrap;padding:10px 14px;border-radius:8px;font-size:15px;font-weight:500;
  color:var(--st-ink);text-decoration:none;transition:.2s}
.st-menu a:hover{background:#f8f7f4;color:var(--st-gold-dark)}
.st-menu .st-cta{background:var(--st-gold);color:#1a1200;font-weight:600;line-height:1.2}
.st-menu .st-cta:hover{background:var(--st-gold-dark);color:#fff}
.st-hasdrop{position:relative}
.st-drop{position:absolute;top:calc(100% + 6px);right:0;min-width:190px;background:#fff;border:1px solid var(--st-line);
  border-radius:12px;box-shadow:var(--st-shadow);padding:8px;display:none}
.st-hasdrop:hover .st-drop,.st-hasdrop:focus-within .st-drop{display:block}
.st-drop a{display:block}
.st-burger{display:none;background:none;border:0;font-size:26px;color:var(--st-ink);cursor:pointer;padding:6px 10px}
.st-overlay{display:none}
@media(max-width:960px){
  /* backdrop-filter would make .st-header the containing block for the fixed
     drawer/overlay below, trapping them inside the header box */
  .st-header{-webkit-backdrop-filter:none;backdrop-filter:none;background:#fff}
  .st-burger{display:block;position:relative;z-index:70}
  .st-menu{position:fixed;inset:0 0 0 auto;height:100dvh;width:min(300px,84vw);flex-direction:column;align-items:stretch;
    background:#fff;padding:80px 18px 24px;box-shadow:-8px 0 30px rgba(0,0,0,.15);
    transform:translateX(100%);transition:transform .3s;gap:4px;z-index:65;overflow-y:auto;visibility:hidden}
  .st-menu.open{transform:translateX(0);visibility:visible}
  .st-menu a{display:block;padding:12px 14px}
  .st-menu .st-cta{text-align:center;margin-top:8px}
  .st-drop{position:static;display:block;box-shadow:none;border:0;padding:0 0 0 14px}
  .st-drop a{padding:8px 14px;color:var(--st-muted)}
}
@media(min-width:961px) and (max-width:1120px){
  .st-menu a{padding:10px 9px;font-size:14px}
  .st-brand b{font-size:14px;max-width:190px}
}
@media(max-width:480px){
  .st-nav{gap:10px;padding:10px 16px}
  .st-brand{gap:9px}
  .st-brand img{width:42px}
  .st-brand b{font-size:13px;max-width:none}
  .st-brand small{font-size:10px}
  .st-burger{padding:6px 4px}
}
@media(max-width:960px){
  .st-overlay{display:block;position:fixed;inset:0;background:rgba(0,0,0,.45);opacity:0;visibility:hidden;transition:.3s;z-index:60}
  .st-overlay.show{opacity:1;visibility:visible}
}

/* ---- Footer ---- */
.st-footer{background:#0b0f19;color:#9ca3af;padding:44px 0 0;font-family:'Poppins',system-ui,sans-serif;font-size:14.5px}
.st-footgrid{display:grid;grid-template-columns:1.6fr 1fr 1fr 1.4fr;gap:24px 36px;max-width:var(--st-maxw);margin:0 auto;padding:0 20px}
.st-footer h4{color:#fff;font-size:16px;margin:0 0 10px;font-family:'Playfair Display',Georgia,serif}
.st-footer p{line-height:1.6;margin:0 0 7px;max-width:42ch}
.st-footer a{color:#9ca3af;display:block;padding:3px 0;text-decoration:none;transition:.2s}
.st-footer a:hover{color:var(--st-gold)}
.st-footer a:focus-visible{outline:2px solid var(--st-gold);outline-offset:3px;border-radius:4px}
.st-brandf{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.st-brandf img{width:42px}
.st-brandf strong{color:#fff;font-size:18px}
.st-finfo p{display:flex;align-items:flex-start;gap:10px;max-width:none}
.st-finfo i{color:var(--st-gold);width:18px;margin-top:5px;flex:none}
.st-finfo a{display:inline;padding:0}
.st-copy{border-top:1px solid rgba(255,255,255,.1);margin-top:26px;padding:15px 0;font-size:13px}
.st-copy .st-wrap{display:flex;flex-wrap:wrap;gap:8px 20px;justify-content:space-between;align-items:center}
.st-copy a{color:var(--st-gold);display:inline;padding:0;text-decoration:none}
/* keep the bottom-right credit clear of the home page's floating news bell */
@media(min-width:861px){body.has-news .st-copy .st-wrap{padding-right:96px}}
@media(max-width:860px){body.has-news .st-copy{padding-bottom:58px}}
@media(max-width:860px){.st-footgrid{grid-template-columns:1fr 1fr;gap:22px 28px}}
@media(max-width:520px){
  .st-footer{padding:34px 0 0;text-align:center}
  .st-footgrid{grid-template-columns:1fr;gap:22px}
  .st-footer a{display:inline-block}
  .st-footer p{max-width:none}
  .st-brandf,.st-finfo p{justify-content:center}
  .st-copy .st-wrap{justify-content:center;text-align:center}
}

/* ---- Back to top ---- */
#stToTop{position:fixed;right:20px;bottom:20px;width:46px;height:46px;border-radius:50%;border:0;
  background:var(--st-gold);color:#1a1200;font-size:18px;cursor:pointer;box-shadow:var(--st-shadow);
  opacity:0;visibility:hidden;transition:.3s;z-index:45}
#stToTop.show{opacity:1;visibility:visible}
/* stack clear of the home page's floating news bell */
body.has-news #stToTop{right:29px;bottom:94px}
@media(max-width:600px){body.has-news #stToTop{right:23px;bottom:88px}}
