/* =========================================================================
   CONFLUENCE LAYOUT & NAVIGATION
   Header, Footer, Container utilities, and Mobile-First Viewport Rules
   ========================================================================= */

/* Container Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

@media (max-width: 430px) {
  .container {
    padding: 0 12px;
  }
}

/* -------------------------------------------------------------------------
   STICKY SITE NAVIGATION HEADER
   ------------------------------------------------------------------------- */
header.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  width: 100%;
  max-width: 100vw;
}

.site-header .container {
  max-width: 1440px;
  padding: 0 32px;
  width: 100%;
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

/* Brand Emblem & Logotype */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.logo-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
}

.logo-badge svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text h1 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-text);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-text p {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Navigation Links (Desktop Centered) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 2px;
  transition: color var(--transition-fast);
  display: inline-block;
}

.nav-links a:hover {
  color: var(--color-primary);
}

/* Navigation Action Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-success-text);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
}

.btn-header-ai {
  background: var(--color-primary);
  color: #FFFFFF;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.btn-header-ai:hover {
  background: var(--color-primary-hover);
}

/* -------------------------------------------------------------------------
   RESPONSIVE HEADER RULES (TABLET & MOBILE)
   Prevents horizontal blowout on iPhone 14 Pro Max & small displays
   ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .site-header .container {
    padding: 0 20px;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 0.82rem;
  }
  .status-badge {
    padding: 5px 10px;
    font-size: 0.74rem;
  }
}

@media (max-width: 1024px) {
  .status-badge {
    display: none; /* Hide status pill on tablet to prioritize nav links */
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none; /* Collapsed on tablet/mobile into the floating assistant trigger */
  }
}

@media (max-width: 768px) {
  .site-header .container {
    padding: 0 16px;
  }
  .nav-inner {
    height: 62px;
    gap: 12px;
  }
  .logo-badge {
    width: 34px;
    height: 34px;
  }
  .logo-badge svg {
    width: 19px;
    height: 19px;
  }
  .brand-text h1 {
    font-size: 0.98rem;
  }
  .brand-text p {
    display: none; /* Hide subtitle tagline on mobile to keep header clean and compact */
  }
  .btn-header-ai {
    padding: 7px 13px;
    font-size: 0.8rem;
    gap: 6px;
  }
}

@media (max-width: 430px) {
  .site-header .container {
    padding: 0 12px;
  }
  .nav-inner {
    height: 58px;
    gap: 8px;
  }
  .brand-text h1 {
    font-size: 0.88rem;
  }
  .btn-header-ai {
    padding: 6px 10px;
    font-size: 0.76rem;
  }
  .btn-header-ai .btn-text-full {
    display: none;
  }
  .btn-header-ai .btn-text-short {
    display: inline;
  }
}

@media (min-width: 431px) {
  .btn-header-ai .btn-text-full {
    display: inline;
  }
  .btn-header-ai .btn-text-short {
    display: none;
  }
}

/* -------------------------------------------------------------------------
   SITE FOOTER
   ------------------------------------------------------------------------- */
footer.site-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 56px 0 32px;
  margin-top: auto;
  border-top: 1px solid #1E293B;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid #1E293B;
}

.footer-brand h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.84rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.84rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: #38BDF8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 0.78rem;
  color: #64748B;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
