/* PF Theme - Global Header & Footer */

/* Basic palette. On directory pages, PF Core frontend.css already defines these.
   Here we define them so non-directory pages still look correct. */
:root {
  --bg:    #0e0f14;
  --panel: #151823;
  --muted: #8a92a6;
  --text:  #e9ecf1;
  --accent:#39c6ff;
  --ok:    #2bd17e;
  --warn:  #ffb020;
  --bad:   #ff5d5d;
  --bd:    #1f2433;
}

/* Layout wrappers */
body {
  background: var(--bg);
  color: var(--text);
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pf-main {
  flex: 1 0 auto;
}

/* ===========================
   Header
   =========================== */

.pf-site-header {
  flex: 0 0 auto;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(8, 10, 20, 0.9);
  border-bottom: 1px solid var(--bd);
  position: relative;
  z-index: 50; /* keep above content and filter bars */
}

/* Top row: logo + title/description */
.pf-header-top {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--bd);
}

.pf-header-top-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pf-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Clickable logo wrapper */
.pf-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Custom logo container */
.pf-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo image (header) */
.pf-logo-wrap img.pf-logo-img {
  height: 52px;      /* adjust here if you want bigger/smaller */
  width: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* Fallback text logo if no image set */
.pf-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: radial-gradient(circle at 0 0, var(--accent), #1b2439);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.pf-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pf-site-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.pf-site-tagline {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Second row: nav bar */
.pf-header-nav {
  background: #11141f;
}

.pf-header-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Mobile toggle */
.pf-nav-toggle {
  display: none;
}

.pf-nav-toggle-label {
  display: none; /* hidden on desktop, shown on mobile */
  cursor: pointer;
  padding: 0.7rem 0;
}

.pf-nav-toggle-label span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Menu element from wp_nav_menu */
.pf-main-nav {
  display: flex;
  align-items: center;
}

.pf-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.pf-menu > li {
  position: relative;
}

.pf-menu > li > a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.pf-menu > li.current-menu-item > a,
.pf-menu > li.current-menu-ancestor > a,
.pf-menu > li > a:hover,
.pf-menu > li > a:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

/* Submenu styles */
.pf-menu li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #171a27;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.6);
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 60;
}

.pf-menu li:hover > ul,
.pf-menu li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pf-menu li ul li a {
  display: block;
  padding: 0.4rem 0.9rem;
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: none;
}

.pf-menu li ul li a:hover,
.pf-menu li ul li a:focus-visible {
  color: var(--text);
  background: rgba(57, 198, 255, 0.06);
}

/* ===========================
   Mobile header/nav
   =========================== */

@media (max-width: 768px) {
  .pf-header-top {
    padding: 0.65rem 0.9rem;
  }

  .pf-header-top-inner {
    padding-inline: 0.2rem;
  }

  .pf-site-title {
    font-size: 0.95rem;
  }

  .pf-site-tagline {
    font-size: 0.75rem;
  }

  .pf-header-nav-inner {
    padding: 0 0.9rem;
  }

  .pf-nav-toggle-label {
    display: block;
  }

  .pf-main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem 0.9rem 0.8rem;
    background: #11141f;
    border-bottom: 1px solid var(--bd);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.55);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .pf-menu {
    flex-direction: column;
    gap: 0;
  }

  .pf-menu > li > a {
    padding: 0.55rem 0;
  }

  /* Show menu when checkbox is checked */
  .pf-nav-toggle:checked ~ .pf-main-nav {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
  }

  /* Simple burger animation */
  .pf-nav-toggle:checked + .pf-nav-toggle-label span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .pf-nav-toggle:checked + .pf-nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  .pf-nav-toggle:checked + .pf-nav-toggle-label span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Submenus: show as indented blocks when menu is open */
  .pf-menu li ul {
    position: static;
    box-shadow: none;
    border-radius: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    padding: 0;
    margin: 0 0 0.2rem 0.8rem;
    background: transparent;
  }

  .pf-menu li ul li a {
    padding: 0.3rem 0;
    font-size: 0.82rem;
  }
}

/* ===========================
   Footer
   =========================== */

.pf-site-footer {
  flex: 0 0 auto;
  background: #0c0f18;
  border-top: 1px solid var(--bd);
  padding: 1.5rem 1.25rem 1.2rem;
  color: var(--muted);
}

.pf-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.pf-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1.4fr));
  gap: 1.5rem;
  margin-bottom: 1.3rem;
}

.pf-footer-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.pf-footer-about p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.pf-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-footer-list li + li {
  margin-top: 0.25rem;
}

.pf-footer-list a {
  font-size: 0.83rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.pf-footer-list a:hover,
.pf-footer-list a:focus-visible {
  color: var(--accent);
}

/* Social links */
.pf-footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pf-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  font-size: 0.7rem;
  text-decoration: none;
  color: var(--muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pf-social-link:hover,
.pf-social-link:focus-visible {
  background: rgba(57, 198, 255, 0.12);
  border-color: var(--accent);
  color: var(--text);
}

/* Footer bottom line */
.pf-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.7rem;
  text-align: left;
}

.pf-footer-bottom p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Footer responsive */
@media (max-width: 900px) {
  .pf-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }
}

@media (max-width: 640px) {
  .pf-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
