/* ============================================================
   T3PILLARS SITE KIT — FRONT-END STYLES  v1.1
   All rules scoped under .t3sk-* to avoid theme conflicts.
============================================================ */

/* ── DESIGN TOKENS ── */
:root {
  --t3-navy:      #0a0f1e;
  --t3-navy-mid:  #0d1a3a;
  --t3-blue:      #1a56db;
  --t3-teal:      #06b6d4;
  --t3-gold:      #f59e0b;
  --t3-white:     #ffffff;
  --t3-off-white: #f4f6fb;
  --t3-border:    #e2e7f3;
  --t3-text:      #0d1b3e;
  --t3-muted:     #64748b;
  --t3-ease:      0.22s cubic-bezier(0.4,0,0.2,1);

  /* Runtime heights — updated by JS when admin bar / banner are present */
  --t3-adminbar-h: 0px;
  --t3-banner-h:   0px;
  --t3-header-h:   64px;
}

/* WordPress admin bar offsets (WP sets body class admin-bar) */
body.admin-bar          { --t3-adminbar-h: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar        { --t3-adminbar-h: 46px; }
}

/* ── SCOPED RESET ── */
.t3sk-banner *,
.t3sk-header *,
.t3sk-mobile-overlay *,
.t3sk-footer * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.t3sk-banner a,
.t3sk-header a,
.t3sk-mobile-overlay a,
.t3sk-footer a {
  text-decoration: none !important;
  color: inherit;
}
.t3sk-header ul,
.t3sk-footer ul { list-style: none; }
.t3sk-banner button,
.t3sk-header button,
.t3sk-mobile-overlay button { font-family: inherit; cursor: pointer; }

/* ── FONT BASE ── */
.t3sk-banner,
.t3sk-header,
.t3sk-mobile-overlay,
.t3sk-footer {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}


/* ============================================================
   BANNER — one line, centred, no dot, close pinned to edge
============================================================ */
.t3sk-banner {
  position: sticky;
  top: var(--t3-adminbar-h);
  left: 0; right: 0;
  z-index: 10100;
  width: 100%;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform;
}
.t3sk-banner.t3sk-banner-hidden { display: none; }

/* Outer row: relative so close button can be absolute */
.t3sk-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;   /* centre the content group */
  height: 42px;
  padding: 0 48px;           /* reserve 48px each side for the close button */
  overflow: hidden;
}

/* Centre group: text + button inline, tight gap, no flex stretching */
.t3sk-banner-center {
  display: flex;
  align-items: center;
  gap: 10px;                 /* gap ONLY between text and button */
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* Text — truncates if viewport is too narrow */
.t3sk-banner-text {
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

/* CTA button — right beside the text, fixed size */
.t3sk-banner-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff !important;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 6px;
  padding: 5px 12px;
  white-space: nowrap;
  line-height: 1;
  transition: background var(--t3-ease), border-color var(--t3-ease);
  text-decoration: none !important;
}
.t3sk-banner-btn svg { flex-shrink: 0; transition: transform var(--t3-ease); }
.t3sk-banner-btn:hover { background: rgba(255,255,255,0.26); border-color: rgba(255,255,255,0.65); }
.t3sk-banner-btn:hover svg { transform: translateX(2px); }

/* Close — absolutely positioned at right edge, doesn't affect centering */
.t3sk-banner-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  transition: color var(--t3-ease), background var(--t3-ease);
  cursor: pointer;
}
.t3sk-banner-close:hover { color: #fff; background: rgba(255,255,255,0.12); }


/* ============================================================
   HEADER
   — sticky, sits directly below banner (and admin bar)
   — top offset computed by JS into --t3-sticky-top
============================================================ */
.t3sk-header {
  position: sticky;
  top: var(--t3-sticky-top, var(--t3-adminbar-h)); /* JS sets --t3-sticky-top */
  left: 0;
  right: 0;
  z-index: 9990;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--t3-border);
  transition: box-shadow var(--t3-ease), background var(--t3-ease);
  transform: translateZ(0);
  will-change: transform;
}
.t3sk-header.t3sk-scrolled {
  box-shadow: 0 2px 28px rgba(10,15,30,0.10);
  background: rgba(255,255,255,1);
}

.t3sk-header-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--t3-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── LOGO ── */
.t3sk-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
}
.t3sk-logo-img   { height: 40px; width: auto; display: block; }
.t3sk-logo-mark  {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--t3-blue), var(--t3-teal));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit','Plus Jakarta Sans',sans-serif;
  font-weight: 900; font-size: 0.95rem; color: #fff;
  letter-spacing: -0.04em; flex-shrink: 0;
}
.t3sk-logo-text  {
  font-family: 'Outfit','Plus Jakarta Sans',sans-serif;
  font-weight: 800; font-size: 1.1rem;
  color: var(--t3-text); letter-spacing: -0.02em;
}
.t3sk-logo-text--light { color: #fff; }

/* ── DESKTOP NAV
   Compact enough to fit 5–8 items at normal screen widths.
   Font size and padding reduced slightly; gap tightened.
── */
.t3sk-nav { display: flex; align-items: center; flex: 1 1 auto; justify-content: center; }
.t3sk-nav-list {
  display: flex; align-items: center; gap: 0;
  list-style: none; margin: 0; padding: 0;
  flex-wrap: nowrap;
}
.t3sk-nav-link {
  font-size: 0.84rem;          /* slightly smaller → more items fit */
  font-weight: 600;
  color: var(--t3-text);
  padding: 7px 11px;           /* tighter horizontal padding */
  border-radius: 7px;
  display: flex; align-items: center;
  transition: background var(--t3-ease), color var(--t3-ease);
  white-space: nowrap;
  line-height: 1;
}
.t3sk-nav-link:hover  { background: var(--t3-off-white); color: var(--t3-blue); }
.t3sk-nav-link.t3sk-active {
  color: var(--t3-blue);
  background: rgba(26,86,219,0.07);
}

/* ── CHEVRON ── */
.t3sk-chevron {
  margin-left: 3px;
  flex-shrink: 0;
  transition: transform var(--t3-ease);
  display: block;
}

/* ── DROPDOWN — hover-safe with pseudo-element bridge ── */
.t3sk-has-dropdown {
  position: relative;
}

/* Invisible bridge: fills the gap between nav link bottom and dropdown top
   so moving the mouse down doesn't close the menu */
.t3sk-has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 10px; /* matches the margin-top below */
  background: transparent;
}

.t3sk-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 210px;
  background: var(--t3-white);
  border: 1px solid var(--t3-border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(10,15,30,0.13);
  padding: 6px;
  list-style: none;
  margin: 0;
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 9999;
}

/* Show on hover over the LI — covers both the link and the dropdown */
.t3sk-has-dropdown:hover .t3sk-dropdown,
.t3sk-has-dropdown:focus-within .t3sk-dropdown {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Rotate chevron when dropdown is open */
.t3sk-has-dropdown:hover .t3sk-chevron,
.t3sk-has-dropdown:focus-within .t3sk-chevron {
  transform: rotate(180deg);
}

.t3sk-dropdown-link {
  display: block;
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--t3-muted);
  padding: 8px 13px;
  border-radius: 8px;
  transition: background var(--t3-ease), color var(--t3-ease);
  white-space: nowrap;
  text-decoration: none !important;
}
.t3sk-dropdown-link:hover { background: var(--t3-off-white); color: var(--t3-blue); }

/* ── HEADER ACTIONS (desktop) ── */
.t3sk-header-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* ── SHARED BUTTONS ── */
.t3sk-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 0.84rem;
  padding: 8px 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--t3-ease); cursor: pointer; white-space: nowrap;
  text-decoration: none !important; border: 1.5px solid transparent; line-height: 1;
}
.t3sk-btn-ghost {
  color: var(--t3-text); border-color: var(--t3-border); background: transparent;
}
.t3sk-btn-ghost:hover  { background: var(--t3-off-white); border-color: var(--t3-blue); color: var(--t3-blue); }
.t3sk-btn-primary {
  background: var(--t3-blue); color: #fff !important;
  border-color: var(--t3-blue); box-shadow: 0 3px 14px rgba(26,86,219,0.28);
}
.t3sk-btn-primary:hover {
  background: #1447c0; border-color: #1447c0;
  transform: translateY(-1px); box-shadow: 0 5px 20px rgba(26,86,219,0.38);
}
.t3sk-btn-outline-white {
  background: transparent; color: #fff !important; border-color: rgba(255,255,255,0.5);
}
.t3sk-btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.85); }

/* ── HAMBURGER ── */
.t3sk-hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 9px;
  border: 1.5px solid var(--t3-border); background: var(--t3-white);
  transition: background var(--t3-ease), border-color var(--t3-ease);
  position: relative; z-index: 1100; flex-shrink: 0;
}
.t3sk-hamburger:hover { background: var(--t3-off-white); border-color: #b8cfe8; }
.t3sk-hb-icon { position: relative; width: 18px; height: 13px; }
.t3sk-hb-icon span {
  position: absolute; left: 0; height: 2px;
  background: var(--t3-text); border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68,-0.55,0.27,1.55);
}
.t3sk-hb-icon span:nth-child(1) { top: 0;   width: 18px; }
.t3sk-hb-icon span:nth-child(2) { top: 6px; width: 12px; }
.t3sk-hb-icon span:nth-child(3) { top: 12px; width: 18px; }
.t3sk-hamburger.t3sk-open { background: var(--t3-navy); border-color: var(--t3-navy); }
.t3sk-hamburger.t3sk-open .t3sk-hb-icon span { background: #fff; }
.t3sk-hamburger.t3sk-open .t3sk-hb-icon span:nth-child(1) { top: 6px; transform: rotate(45deg);  width: 18px; }
.t3sk-hamburger.t3sk-open .t3sk-hb-icon span:nth-child(2) { width: 0; opacity: 0; }
.t3sk-hamburger.t3sk-open .t3sk-hb-icon span:nth-child(3) { top: 6px; transform: rotate(-45deg); width: 18px; }


/* ============================================================
   MOBILE OVERLAY
   — full-screen dark nav; all text explicitly white
   — compact nav font so 5-8 items fit without scrolling
============================================================ */
.t3sk-mobile-overlay {
  display: none;
  position: fixed;
  /* sits below admin bar when logged in */
  top: var(--t3-adminbar-h);
  left: 0; right: 0; bottom: 0;
  z-index: 9980;
  background: var(--t3-navy);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.t3sk-mobile-overlay::before {
  content: '';
  position: absolute; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(26,86,219,0.16) 0%, transparent 70%);
  top: -80px; right: -120px; border-radius: 50%; pointer-events: none;
}
.t3sk-mobile-overlay.t3sk-open { opacity: 1; pointer-events: all; }

/* Nav list */
.t3sk-mobile-nav {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 100%; max-width: 380px;
  position: relative; z-index: 2;
  list-style: none; margin: 0; padding: 16px 24px;
}

/* Mobile nav links also used as toggle buttons */
.t3sk-mobile-nav-link,
button.t3sk-mobile-nav-link {
  font-family: 'Outfit','Plus Jakarta Sans',sans-serif;
  font-size: clamp(1.35rem, 4.5vw, 2rem);
  font-weight: 700;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 10px;
  width: 100%; text-align: center;
  transition: color var(--t3-ease), background var(--t3-ease);
  letter-spacing: -0.02em; line-height: 1.25;
  text-decoration: none !important;
  background: none;
  border: none;
  cursor: pointer;
}
.t3sk-mobile-nav-link:hover,
.t3sk-mobile-nav-link:focus,
button.t3sk-mobile-nav-link:hover,
button.t3sk-mobile-nav-link:focus {
  color: #67e8f9 !important;
  background: rgba(255,255,255,0.06);
}

/* Mobile chevron */
.t3sk-mobile-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.t3sk-mobile-toggle[aria-expanded="true"] .t3sk-mobile-chevron {
  transform: rotate(180deg);
}

/* Mobile sub-menu accordion */
.t3sk-mobile-sub {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  width: 100%;
}
.t3sk-mobile-sub.t3sk-sub-open {
  max-height: 600px;
}
.t3sk-mobile-sub-link {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72) !important;
  padding: 7px 20px;
  border-radius: 8px;
  text-align: center;
  transition: color var(--t3-ease), background var(--t3-ease);
  text-decoration: none !important;
}
.t3sk-mobile-sub-link:hover { color: #fff !important; background: rgba(255,255,255,0.08); }
.t3sk-mobile-sub-parent {
  color: rgba(255,255,255,0.5) !important;
  font-size: 0.82rem;
  padding-bottom: 4px;
}
.t3sk-mobile-item { width: 100%; }

/* Divider */
.t3sk-mobile-divider {
  width: 40px; height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 8px 0 16px; flex-shrink: 0;
  position: relative; z-index: 2;
}

/* CTA area — single primary button only (no duplicate ghost) */
.t3sk-mobile-actions {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; z-index: 2;
  width: 100%; max-width: 280px;
  padding: 0 24px 24px;
}
.t3sk-btn-mobile-cta {
  width: 100%;
  font-size: 0.95rem !important;
  padding: 13px 24px !important;
  border-radius: 11px !important;
}


/* ============================================================
   FOOTER
============================================================ */
.t3sk-footer {
  background: var(--t3-navy);
  padding: 64px 28px 0;
  color: rgba(255,255,255,0.65);
}
.t3sk-footer-inner { max-width: 1260px; margin: 0 auto; }

.t3sk-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.t3sk-footer-logo { margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.t3sk-footer-logo-img { height: 36px; width: auto; filter: brightness(10); opacity: 0.88; }
.t3sk-footer-about {
  font-size: 0.875rem; line-height: 1.75;
  color: rgba(255,255,255,0.52); max-width: 270px; margin-bottom: 18px;
}

/* Social */
.t3sk-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.t3sk-social-btn {
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.11);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: background var(--t3-ease), color var(--t3-ease), border-color var(--t3-ease);
  text-decoration: none !important;
}
.t3sk-social-btn svg { width: 15px; height: 15px; }
.t3sk-social-btn:hover { background: var(--t3-blue); border-color: var(--t3-blue); color: #fff; }

/* Link columns */
.t3sk-footer-col-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 18px;
}
.t3sk-footer-links { display: flex; flex-direction: column; gap: 12px; list-style: none; padding: 0; margin: 0; }
.t3sk-footer-links a {
  font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.62);
  transition: color var(--t3-ease); text-decoration: none !important;
}
.t3sk-footer-links a:hover { color: #fff; }

/* Bottom bar */
.t3sk-footer-bottom {
  padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.t3sk-footer-copyright { font-size: 0.82rem; color: rgba(255,255,255,0.3); }
.t3sk-footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.t3sk-footer-legal a {
  font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.35);
  transition: color var(--t3-ease); text-decoration: none !important;
}
.t3sk-footer-legal a:hover { color: rgba(255,255,255,0.72); }


/* ============================================================
   RESPONSIVE
============================================================ */

/* ── 1180px: nav starts getting tight — reduce padding further ── */
@media (max-width: 1180px) {
  .t3sk-nav-link { padding: 7px 9px; font-size: 0.82rem; }
}

/* ── 1024px: footer 2-col ── */
@media (max-width: 1024px) {
  .t3sk-footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .t3sk-footer-about { max-width: 100%; }
}

/* ── 900px: switch to hamburger, show mobile menu ── */
@media (max-width: 900px) {
  .t3sk-nav            { display: none; }
  .t3sk-header-actions { display: none; }
  .t3sk-hamburger      { display: flex; }
  .t3sk-mobile-overlay { display: flex; }
}

/* ── 768px: tighten header padding ── */
@media (max-width: 768px) {
  .t3sk-header-inner { padding: 0 16px; }

  .t3sk-footer      { padding: 44px 20px 0; }
  .t3sk-footer-top  { grid-template-columns: 1fr; gap: 28px; }

  .t3sk-banner-inner { padding: 0 40px; height: 40px; }
  .t3sk-banner-text  { font-size: 0.78rem; }
}

/* ── 480px: hide CTA button — text only + close ── */
@media (max-width: 480px) {
  .t3sk-banner-inner  { padding: 0 36px; }
  .t3sk-banner-btn    { display: none; }
  .t3sk-banner-text   { font-size: 0.75rem; }
  /* Tighten close button on very small screens */
  .t3sk-banner-close  { right: 8px; }
}

/* ── 480px: footer bottom stacks ── */
@media (max-width: 480px) {
  .t3sk-footer-bottom { flex-direction: column; align-items: flex-start; }
  .t3sk-footer-legal  { gap: 14px; }
}
