/* =============================================================
   Political Sphere — Home landing page
   Static reference build from Figma ("Revamp landing page design").

   Design tokens are declared as CSS variables below so they can be
   dropped straight into any theme/builder's own variable system —
   in the current WordPress theme these map onto the same idea as
   :root in assets/css/main.css. Note this redesign introduces a new
   palette/type system (near-black navbar, blue accent, Manrope +
   Tinos) that intentionally replaces the current --accent (#5b641f)
   and font stack.
============================================================= */

:root {
  --ps-bg-page: #ede9e2;       /* outer page background */
  --ps-bg-content: #efefef;    /* main content band background */
  --ps-bg-card: #ffffff;       /* article card background */
  --ps-navbar-bg: #0d0b09;     /* navbar background */

  --ps-text-primary: #1b1710;
  --ps-text-secondary: #756c63;
  --ps-text-inverse: #ffffff;
  --ps-text-inverse-muted: rgba(255, 255, 255, 0.65);
  --ps-text-inverse-faint: rgba(255, 255, 255, 0.5);

  --ps-accent: #054478;        /* links, article numbers */
  --ps-accent-hover: #033257;

  --ps-border: rgba(27, 23, 16, 0.07);
  --ps-border-strong: rgba(27, 23, 16, 0.1);
  --ps-border-footer: rgba(0, 0, 0, 0.1);

  --ps-font-sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --ps-font-serif: "Tinos", Georgia, "Times New Roman", serif;

  --ps-container-max: 1240px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ps-bg-page);
  color: var(--ps-text-primary);
  font-family: var(--ps-font-sans);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.ps-container {
  width: min(100% - 48px, var(--ps-container-max));
  margin-inline: auto;
}

/* ---------- Navbar ---------- */

.ps-navbar {
  background: var(--ps-navbar-bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ps-navbar__inner {
  width: min(100% - 48px, 1400px);
  margin-inline: auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.ps-brand__logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 2px;
}

.ps-brand__logo--wordmark {
  width: auto;
  height: 31px;
  max-width: 220px;
  border-radius: 0;
  object-fit: contain;
}

.ps-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.ps-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 72px;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--ps-font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ps-text-inverse-muted);
  text-decoration: none;
  cursor: pointer;
}

.ps-nav__link:hover {
  color: var(--ps-text-inverse);
}

.ps-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 24px;
  width: 100%;
  height: 2px;
  background: transparent;
}

.ps-nav__link--active {
  color: var(--ps-text-inverse);
}

.ps-nav__link--active::after {
  background: var(--ps-text-inverse);
}

.ps-chevron {
  transition: transform 0.15s ease;
}

.ps-nav__link--trigger[aria-expanded="true"] .ps-chevron {
  transform: rotate(180deg);
}

.ps-nav__dropdown {
  position: relative;
}

.ps-nav__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  min-width: 260px;
  display: grid;
  gap: 4px;
  background: var(--ps-bg-card);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.ps-nav__menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ps-text-primary);
  text-decoration: none;
}

.ps-nav__menu a:hover {
  background: var(--ps-bg-content);
}

.ps-navbar__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.ps-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--ps-text-inverse);
  padding: 0;
}

.ps-navbar__divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
}

.ps-lang {
  font-family: var(--ps-font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ps-text-inverse-faint);
  text-decoration: none;
}

.ps-lang:hover {
  color: var(--ps-text-inverse);
}

.ps-nav-toggle {
  display: none;
  width: 36px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: transparent;
  padding: 6px;
}

.ps-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  background: var(--ps-text-inverse);
}

.ps-search-bar {
  display: flex;
  gap: 8px;
  width: min(100% - 48px, 1400px);
  margin-inline: auto;
  padding-block: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ps-search-bar input {
  flex: 1 1 auto;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ps-text-inverse);
  padding: 0 12px;
}

.ps-search-bar button {
  border: 0;
  border-radius: 4px;
  background: var(--ps-accent);
  color: var(--ps-text-inverse);
  padding: 0 18px;
  font-weight: 600;
  font-size: 13px;
}

/* ---------- Main content ---------- */

.ps-main {
  background: var(--ps-bg-content);
  padding-block: 48px;
}

.ps-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ps-card {
  background: var(--ps-bg-card);
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

.ps-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 36px 20px;
}

.ps-card__title {
  margin: 0;
  font-family: var(--ps-font-sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ps-text-primary);
}

.ps-card__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-family: var(--ps-font-sans);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ps-accent);
  text-decoration: none;
  white-space: nowrap;
}

.ps-card__all:hover {
  color: var(--ps-accent-hover);
  text-decoration: underline;
}

.ps-card__rule {
  margin: 0 36px;
  height: 1px;
  background: var(--ps-border-strong);
}

.ps-article-list {
  display: grid;
}

.ps-article {
  position: relative;
  display: flex;
  gap: 28px;
  padding: 24px 36px;
}

.ps-article:not(.ps-article--last)::after {
  content: "";
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 0;
  height: 1px;
  background: var(--ps-border);
}

.ps-article--last {
  border-bottom: 0;
}

.ps-article__date {
  flex: 0 0 auto;
  width: 56px;
  padding-top: 2px;
  white-space: nowrap;
}

.ps-article__day {
  display: block;
  font-family: var(--ps-font-serif);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--ps-accent);
}

.ps-article__month {
  display: block;
  margin-top: 4px;
  font-family: var(--ps-font-sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ps-text-secondary);
  white-space: nowrap;
}

.ps-article__title {
  flex: 1 1 auto;
  align-self: flex-start;
  font-family: var(--ps-font-serif);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ps-text-primary);
  text-decoration: none;
}

.ps-article__title:hover {
  color: var(--ps-accent);
}

/* ---------- Footer ---------- */

.ps-footer {
  background: var(--ps-bg-content);
  padding-bottom: 40px;
}

.ps-footer__top-rule {
  height: 1px;
  background: var(--ps-border-footer);
}

.ps-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px;
  padding-top: 48px;
}

.ps-footer__heading {
  margin: 0 0 20px;
  font-family: var(--ps-font-sans);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-text-primary);
}

.ps-footer__links {
  display: grid;
  gap: 14px;
}

.ps-footer__links a,
.ps-footer__email {
  font-family: var(--ps-font-sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--ps-text-primary);
  text-decoration: none;
}

.ps-footer__links a:hover,
.ps-footer__email:hover {
  color: var(--ps-accent);
}

.ps-footer__bottom {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--ps-border-footer);
  font-family: var(--ps-font-sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--ps-text-primary);
}

.ps-footer__bottom p {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .ps-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ps-navbar-bg);
    z-index: 30;
  }

  .ps-nav--open {
    display: flex;
  }

  .ps-nav__link {
    height: auto;
    padding: 14px 24px;
    justify-content: space-between;
  }

  .ps-navbar {
    position: relative;
  }

  .ps-nav-toggle {
    display: block;
  }

  .ps-columns,
  .ps-footer__grid {
    grid-template-columns: 1fr;
  }

  .ps-footer__grid {
    gap: 40px;
  }
}

@media (max-width: 560px) {
  .ps-card__head {
    padding: 22px 20px 16px;
    flex-wrap: wrap;
  }

  .ps-card__rule {
    margin-inline: 20px;
  }

  .ps-article {
    padding: 18px 20px;
    gap: 16px;
  }

}

/* WordPress integration: the source design above is intentionally kept
   recognizable while these rules connect it to the existing theme shell. */
.page-shell {
  background: var(--ps-bg-content);
}

.ps-navbar.site-header {
  border: 0;
}

.ps-navbar .language-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ps-text-inverse-faint);
  font-size: inherit;
}

.ps-navbar .language-actions a + a::before {
  content: none;
}

.ps-lang--active {
  color: var(--ps-text-inverse);
}

.ps-card__title,
.ps-article__title {
  margin: 0;
}

.ps-home-content {
  padding: 48px 0 0;
}

.ps-home-content__body {
  background: var(--ps-bg-card);
  padding: 32px 36px;
}

.ps-home-content__body > :first-child {
  margin-top: 0;
}

.ps-home-content__body > :last-child {
  margin-bottom: 0;
}

.ps-empty-state {
  margin: 0;
  padding: 24px 36px;
  color: var(--ps-text-secondary);
}

.ps-footer.site-footer {
  margin-top: 0;
  border: 0;
  padding: 0 0 40px;
  background: var(--ps-bg-content);
}

@media (max-width: 960px) {
  .ps-nav[data-open] {
    display: flex;
  }

  .ps-nav__dropdown {
    width: 100%;
  }

  .ps-nav__menu {
    position: static;
    min-width: 0;
    margin: 0 24px 12px;
    transform: none;
  }

  .ps-navbar .language-actions {
    display: flex;
  }
}

@media (max-width: 560px) {
  .ps-container {
    width: min(100% - 32px, var(--ps-container-max));
  }

  .ps-navbar__inner {
    width: min(100% - 32px, 1400px);
    gap: 12px;
  }

  .ps-brand__logo--wordmark {
    height: 27px;
    max-width: 180px;
  }

  .ps-navbar .language-actions {
    gap: 6px;
  }

  .ps-home-content {
    padding-top: 32px;
  }

  .ps-home-content__body {
    padding: 24px 20px;
  }

  .ps-empty-state {
    padding-inline: 20px;
  }
}
