/*
Theme Name: Agency Portal Theme
Theme URI: https://example.com/
Author: Your Website Doctor LTD
Author URI: https://example.com/
Description: Lightweight custom theme for the Agency Operations Platform.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: agency-portal-theme
*/

:root {
  --apt-bg: #0b1020;
  --apt-surface: #121933;
  --apt-surface-2: #182240;
  --apt-text: #eef2ff;
  --apt-muted: #9aa4c7;
  --apt-border: rgba(255, 255, 255, 0.08);
  --apt-accent: #7c5cff;
  --apt-accent-2: #5eead4;
  --apt-radius-xl: 28px;
  --apt-radius-lg: 20px;
  --apt-radius-md: 14px;
  --apt-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
  --apt-max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #090e1c 0%, #0b1020 100%);
  color: var(--apt-text);
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(8, 13, 27, 0.8);
  border-bottom: 1px solid var(--apt-border);
}

.wrap {
  width: min(var(--apt-max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner,
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--apt-accent), #9c7cff);
  box-shadow: 0 14px 30px rgba(124, 92, 255, 0.34);
}

.brand__text strong {
  display: block;
  font-size: 15px;
}

.brand__text span {
  display: block;
  color: var(--apt-muted);
  font-size: 12px;
}

.primary-nav ul {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  color: var(--apt-muted);
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  background: rgba(255, 255, 255, 0.06);
  color: var(--apt-text);
}

.site-main {
  flex: 1;
  padding: 40px 0;
}

.page-card {
  background: rgba(18, 25, 51, 0.88);
  border: 1px solid var(--apt-border);
  border-radius: var(--apt-radius-xl);
  box-shadow: var(--apt-shadow);
  padding: 32px;
}

.entry-title {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.entry-content {
  color: var(--apt-text);
}

.entry-content p,
.entry-content li {
  color: var(--apt-muted);
  line-height: 1.7;
}

.site-footer {
  border-top: 1px solid var(--apt-border);
  background: rgba(8, 13, 27, 0.72);
}

.site-footer small {
  color: var(--apt-muted);
}

.portal-page .site-main {
  padding: 0;
}

.portal-page .wrap {
  width: 100%;
  max-width: none;
}

.portal-page .portal-frame {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding: 24px;
}

.portal-page .site-header,
.portal-page .site-footer {
  display: none;
}

.portal-page .entry-content,
.portal-page .page-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.portal-page .entry-title {
  display: none;
}

@media (max-width: 900px) {
  .site-header__inner,
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-nav ul {
    flex-wrap: wrap;
  }

  .page-card {
    padding: 22px;
  }

  .portal-page .portal-frame {
    padding: 0;
  }
}
