/* ==========================================================================
   THE STANDARD ARENA - layout.css
   Utility bar, header bar (logo left, menu center, tools right), drawer, footer.
   ========================================================================== */

/* ---------- Utility bar ---------- */
.topbar { background: var(--sa-navy); color: rgba(255, 255, 255, 0.78); font-size: 0.8rem; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 6px 0; }
.topbar-gsc {
        color: rgba(255, 255, 255, 0.78); font-size: 0.72rem; font-weight: 600;
        letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
        transition: color 0.2s ease;
}
.topbar-gsc:hover { color: var(--sa-gold); }
.topbar-menu { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar-menu a {
        color: rgba(255, 255, 255, 0.78); font-size: 0.72rem; font-weight: 600;
        letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
        transition: color 0.2s ease;
}
.topbar-menu a:hover { color: var(--sa-gold); }
.topbar-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }

/* ---------- Header bar: logo left, menu center, sign in and search right ---------- */
.masthead {
        position: sticky; top: 0; z-index: 900;
        background: rgba(250, 247, 240, 0.95);
        backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--sa-line);
        transition: box-shadow 0.25s ease;
}
.masthead.is-stuck { box-shadow: 0 10px 30px rgba(12, 27, 42, 0.08); }
.masthead-in {
        display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
        gap: 24px; min-height: 74px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; justify-self: start; }
.brand .custom-logo-link { display: inline-block; max-width: 250px; }
.brand .custom-logo { max-height: 54px; width: auto; }
.brand-name { display: inline-flex; align-items: baseline; gap: 0.12em; text-decoration: none; white-space: nowrap; }
.brand-the {
        font-family: var(--sa-serif); font-style: italic; font-weight: 400;
        font-size: clamp(0.95rem, 1.6vw, 1.15rem); color: var(--sa-gold); margin-right: 0.14em;
}
.brand-main {
        font-family: var(--sa-serif); font-weight: 600; letter-spacing: 0.04em;
        font-size: clamp(1.35rem, 2.4vw, 1.8rem); color: var(--sa-navy); line-height: 1;
}
.brand-main--gold { color: var(--sa-gold-2); }

.nav-desk { justify-self: center; min-width: 0; }
.nav-menu {
        display: flex; align-items: center; justify-content: center; flex-wrap: nowrap;
        gap: 0; list-style: none; margin: 0; padding: 0;
}
.nav-menu .menu-item { position: relative; }
.nav-menu a {
        display: inline-block; padding: 24px 13px;
        font-size: 0.7rem; font-weight: 650; letter-spacing: 0.15em; text-transform: uppercase;
        color: var(--sa-navy); position: relative; white-space: nowrap;
}
.nav-menu a::after {
        content: ""; position: absolute; left: 13px; right: 13px; bottom: 17px; height: 2px;
        background: var(--sa-gold); transform: scaleX(0); transform-origin: center;
        transition: transform 0.25s ease;
}
.nav-menu a:hover, .nav-menu .current-menu-item > a, .nav-menu .current_page_item > a { color: var(--sa-gold-2); }
.nav-menu a:hover::after, .nav-menu .current-menu-item > a::after, .nav-menu .current_page_item > a::after { transform: scaleX(1); }

.nav-signin {
        display: inline-flex; align-items: center; justify-content: center;
        background: var(--sa-navy); color: #fff;
        font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
        padding: 10px 18px; border-radius: var(--sa-radius-sm); white-space: nowrap;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav-signin:hover { background: var(--sa-gold); color: #1A1505; transform: translateY(-1px); }

/* Action items live as buttons/links outside the menu lists (topbar, nav-tools, drawer CTAs). */
.nav-desk .menu-item--submit, .nav-desk .menu-item--cta, .nav-desk .menu-item--signin,
.drawer-menu .menu-item--submit, .drawer-menu .menu-item--cta, .drawer-menu .menu-item--signin { display: none; }

.nav-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; justify-self: end; }
.nav-burger {
        display: none;
        background: none; border: 0; padding: 8px; cursor: pointer;
}
.burger-box { display: flex; flex-direction: column; gap: 5px; }
.burger-box i { width: 22px; height: 2px; background: var(--sa-navy); border-radius: 2px; }
.nav-search-toggle {
        background: none; border: 1px solid var(--sa-line); border-radius: 50%;
        width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
        color: var(--sa-navy); cursor: pointer; transition: all 0.2s ease;
}
.nav-search-toggle:hover { border-color: var(--sa-gold); color: var(--sa-gold-2); }

/* ---------- Mobile drawer (full-page, distinct from the desktop header) ----------
   The desktop header is a light paper bar with a centered row of small uppercase
   links. The mobile drawer is the opposite model: a navy page that covers the
   whole screen when opened, with large left-aligned serif links separated by
   hairline dividers, a sign-in row and CTAs pinned to the bottom. */
.drawer { position: fixed; inset: 0; z-index: 1200; }
.drawer-scrim {
        position: absolute; inset: 0; background: rgba(8, 17, 27, 0.64);
        opacity: 0; transition: opacity 0.3s ease;
}
.drawer-panel {
        position: absolute; inset: 0; width: 100%;
        display: flex; flex-direction: column;
        background: linear-gradient(165deg, var(--sa-navy-3) 0%, var(--sa-navy) 55%, #0A1622 100%);
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        padding: 22px 26px 34px;
        transform: translateX(100%);
        transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-top {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding-bottom: 18px; border-bottom: 1px solid var(--sa-line-dark);
}
.drawer-brand { display: inline-flex; align-items: center; min-width: 0; }
.drawer-brand .custom-logo-link { display: inline-block; max-width: 250px; }
.drawer-brand .custom-logo { max-height: 46px; width: auto; }
.drawer-brand .brand-name { display: inline-flex; align-items: baseline; gap: 0.12em; white-space: nowrap; }
.drawer-brand .brand-the { font-size: 0.95rem; margin-right: 0.14em; }
.drawer-brand .brand-main { font-size: 1.35rem; color: #fff; }
.drawer-brand .brand-main--gold { color: var(--sa-gold-2); }
.drawer-close {
        background: none; border: 1px solid var(--sa-line-dark); color: #fff;
        width: 42px; height: 42px; border-radius: 50%; font-size: 1.4rem; line-height: 1;
        cursor: pointer; flex-shrink: 0;
        transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.drawer-close:hover { border-color: var(--sa-gold); color: var(--sa-gold); transform: rotate(90deg); }

/* Large left-aligned serif list - a different navigation language from the
   desktop header's centered uppercase row. */
.drawer-nav { padding-top: 8px; }
.drawer-menu { list-style: none; margin: 0; padding: 0; }
.drawer-menu li { border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.drawer-menu a {
        display: block; padding: 16px 2px;
        font-family: var(--sa-serif); font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 500; line-height: 1.15;
        color: #fff; text-align: left;
        transition: color 0.2s ease, padding-left 0.2s ease;
}
.drawer-menu a:hover,
.drawer-menu .current-menu-item > a,
.drawer-menu .current_page_item > a { color: var(--sa-gold-2); padding-left: 8px; }

.drawer-utility { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.drawer-signin {
        display: inline-flex; align-items: center; justify-content: center;
        background: #fff; color: var(--sa-navy);
        font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
        padding: 14px 20px; border-radius: var(--sa-radius-sm); text-align: center;
        transition: background 0.2s ease, color 0.2s ease;
}
.drawer-signin:hover { background: var(--sa-gold); color: #1A1505; }
.drawer-cta {
        margin-top: auto; padding-top: 28px;
        display: flex; flex-direction: column; gap: 12px;
}
@media (prefers-reduced-motion: reduce) {
        .drawer-scrim, .drawer-panel { transition: none; }
        .drawer-panel { transform: none; }
}

/* ---------- Footer ---------- */
.footer { background: var(--sa-navy); color: rgba(255, 255, 255, 0.72); padding: 44px 0 40px; }
/* Edge-to-edge footer with exactly equal spacing: the six columns are sized to
   their content and distributed with identical gaps between neighbouring
   menus - the first menu starts at the left end, the last ends at the far
   right, so only the container's 24px side padding remains beyond either
   edge. Every menu (title + links) is left-aligned inside its own column. */
.footer-cols { display: grid; grid-template-columns: repeat(6, auto); justify-content: space-between; gap: 14px; }
.footer-col { min-width: 0; text-align: left; }
.footer-col-title {
        font-family: var(--sa-sans); font-size: 0.72rem; font-weight: 700;
        letter-spacing: 0.24em; text-transform: uppercase; color: var(--sa-gold); margin-bottom: 18px;
}
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-menu a { color: rgba(255, 255, 255, 0.72); font-size: 0.92rem; overflow-wrap: break-word; }
.footer-menu a:hover { color: var(--sa-gold); }

.footer-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 48px; }
.footer-social a {
        display: inline-flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.78);
        transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.footer-social a:hover {
        background: var(--sa-gold); border-color: var(--sa-gold); color: #1A1505;
        transform: translateY(-2px);
}
.footer-social a svg { width: 17px; height: 17px; fill: currentColor; }

.footer-legal { text-align: center; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--sa-line-dark); }
.footer-entity { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); margin-bottom: 8px; }
.footer-entity strong { color: rgba(255, 255, 255, 0.85); }
.footer-copy { text-align: center; width: 100%; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); margin: 4px 0 0; }

/* ---------- Content + sidebar layout ---------- */
/* Equal top padding for both columns: the headline (content column) and the
   sidebar start on the same line, one compact step below the header - the
   sidebar never hangs glued to the top of the page before scrolling. */
.sa-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: start; padding-top: 32px; }
.sa-layout__main { min-width: 0; }
.sa-layout__aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* Closing bands (apply/unlock, register, speakers, archive buttons) live INSIDE
   the main column, so the sidebar always comes last - beside the content on
   desktop and underneath everything on phones. */
.sa-layout__main .sa-section { padding: 30px 0 8px; }
.sa-layout__main .sa-section--apply { padding: 14px 0 26px; }
.sa-layout__main .sa-cta-band { padding: 8px 0 24px; }

/* Singles and pages close with breathing room before the footer - the sidebar
   never touches it. */
.single .sa-layout, .page .sa-layout { margin-bottom: 64px; }

/* Fact rows keep their designed desktop rhythm inside the main column
   (four on single opportunities, three on events - see sections.css). */

/* ---------- Sidebar widgets ---------- */
.widget {
        background: var(--sa-white); border: 1px solid var(--sa-line);
        border-radius: var(--sa-radius); padding: 26px 24px 24px;
}
.widget-title {
        font-family: var(--sa-sans); font-size: 0.7rem; font-weight: 700;
        letter-spacing: 0.22em; text-transform: uppercase; color: var(--sa-gold-2);
        margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--sa-line);
}
.widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.widget-list li { padding: 11px 0; border-bottom: 1px solid var(--sa-line); }
.widget-list li:first-child { padding-top: 2px; }
.widget-list li:last-child { border-bottom: 0; padding-bottom: 2px; }
.widget-list a { color: var(--sa-navy); font-weight: 600; font-size: 0.94rem; line-height: 1.45; }
.widget-list a:hover { color: var(--sa-gold-2); }
.widget-date { display: block; font-size: 0.76rem; letter-spacing: 0.02em; color: var(--sa-grey); margin-top: 3px; }

/* Core (user-added) widgets get the same editorial treatment. */
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 9px 0; border-bottom: 1px solid var(--sa-line); }
.widget ul li:last-child { border-bottom: 0; }
.widget ul ul { padding-left: 14px; }
.widget ul ul li { border-bottom: 0; padding: 4px 0; }
.widget a { color: var(--sa-navy); }
.widget a:hover { color: var(--sa-gold-2); }
.widget input[type="search"], .widget input[type="text"], .widget select {
        width: 100%; padding: 11px 14px; border: 1px solid var(--sa-line);
        border-radius: var(--sa-radius-sm); background: var(--sa-paper);
        font-family: inherit; font-size: 0.92rem; color: var(--sa-ink);
}
.widget input[type="submit"] {
        margin-top: 10px; background: var(--sa-navy); color: #fff; border: 0;
        border-radius: var(--sa-radius-sm); padding: 10px 18px; cursor: pointer;
        font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.66rem;
        transition: background 0.2s ease, color 0.2s ease;
}
.widget input[type="submit"]:hover { background: var(--sa-gold); color: #1A1505; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a {
        display: inline-block; border: 1px solid var(--sa-line); border-radius: 999px;
        padding: 4px 13px; font-size: 0.78rem !important; color: var(--sa-grey);
        transition: border-color 0.2s ease, color 0.2s ease;
}
.tagcloud a:hover { border-color: var(--sa-gold); color: var(--sa-gold-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1350px) {
        .nav-menu a { padding: 24px 9px; font-size: 0.66rem; letter-spacing: 0.1em; }
}
@media (max-width: 1140px) {
        .nav-desk { display: none; }
        .nav-burger { display: inline-flex; }
        .masthead-in { grid-template-columns: auto auto; justify-content: space-between; min-height: 66px; }
        .topbar-gsc, .topbar-menu { display: none; }
        .topbar-in { justify-content: flex-end; }
}
@media (max-width: 1240px) {
        .footer-cols { gap: 10px; }
}
@media (max-width: 1024px) {
        /* Three menus per row, two rows: columns stay content-sized with equal
           spacing, and the third column of each row shares one aligned left
           edge, flush at the right end (equal side padding only beyond it). */
        .footer-cols { grid-template-columns: repeat(3, auto); gap: 28px; }
        .sa-layout { grid-template-columns: 1fr; gap: 36px; }
        .sa-layout__aside { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
        /* Stacked layout: content stretches to the same width as the sidebar
           panels - cards, facts rows and body copy sit flush like the sidebar
           (12px from the screen edges on phones). */
        .sa-layout .sa-container--wide { width: 100%; }
}
@media (max-width: 560px) {
        /* Phones: 2 columns x 3 rows (six menus), compact type so each column
           fits, everything left-aligned, full footer width with exactly equal
           left/right padding - the second column of every row starts from one
           shared margin and sits flush at the right end. */
        .footer-cols { grid-template-columns: repeat(2, auto); gap: 26px 18px; }
        .footer-col-title { font-size: 0.66rem; letter-spacing: 0.16em; margin-bottom: 13px; }
        .footer-menu { gap: 8px; }
        .footer-menu a { font-size: 0.86rem; }
        .topbar-in { min-height: 40px; gap: 10px; justify-content: center; }
        .topbar-actions { flex-shrink: 0; margin-left: 0; }
        .topbar-actions .btn { padding: 8px 12px; font-size: 0.62rem; letter-spacing: 0.08em; }
        .masthead-in { min-height: 58px; gap: 8px; }
        .brand-main { font-size: clamp(0.95rem, 3.2vw, 1.3rem); }
        .brand-the { font-size: clamp(0.72rem, 2vw, 0.95rem); }
        .nav-tools { gap: 7px; }
        .nav-signin { padding: 7px 10px; font-size: 0.56rem; letter-spacing: 0.08em; }
        .nav-search-toggle { width: 32px; height: 32px; }
        .nav-burger { padding: 6px; }
        .footer-social a { width: 40px; height: 40px; }
        .footer-social a svg { width: 15px; height: 15px; }
}
@media (max-width: 380px) {
        .masthead-in { gap: 6px; }
        .brand-main { font-size: 0.92rem; }
        .brand-the { font-size: 0.7rem; }
        .nav-signin { padding: 6px 8px; font-size: 0.52rem; }
        .nav-search-toggle { width: 30px; height: 30px; }
        .nav-burger { padding: 4px; }
}
