/*
Theme Name: ADDI
Theme URI: https://ddisafund.org
Author: OpenUp
Author URI: https://openup.org.za
Description: ADDI / DDISA Fund theme.
Version: 2.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: addi
*/

/* ================================================================
   RESET / BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Epilogue', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #061329;
  background: #fff;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; padding: 0; font: inherit; }

/* ================================================================
   SINGLE POST
   ================================================================ */
.post-single__wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.post-single__date {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 16px;
}

.post-single__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: #061329;
  margin-bottom: 20px;
}

.post-single__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.post-cat-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: #e5e7eb;
  color: #061329;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s ease;
}
.post-cat-tag:hover { background: #d1d5db; }

.post-single__image {
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
}
.post-single__image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-single__excerpt {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.6;
  color: #061329;
  margin-bottom: 24px;
}

.post-single__divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin-bottom: 32px;
}

.post-single__content { line-height: 1.8; }

.post-single__content p,
.post-single__content ul,
.post-single__content ol,
.post-single__content blockquote { margin-bottom: 1.5rem; }

.post-single__content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; }
.post-single__content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 0.75rem; }
.post-single__content h4 { font-size: 1.125rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }

.post-single__content ul { list-style: disc; padding-left: 1.5rem; }
.post-single__content ol { list-style: decimal; padding-left: 1.5rem; }

.post-single__content a { color: #12cf6d; text-decoration: underline; }
.post-single__content a:hover { color: #061329; }

.post-single__content blockquote {
  border-left: 4px solid #12cf6d;
  padding-left: 1.25rem;
  color: #6b7280;
  font-style: italic;
}

.post-single__content img {
  max-width: 100%;
  border-radius: 6px;
}

/* ================================================================
   SITE HEADER
   ================================================================ */
/* FSE wraps the template part in <header> — sticky goes there */
.wp-block-template-part[data-area="header"] {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  height: 100px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 3em;
  gap: 40px;
}

/* Logo */
.site-header__logo img {
  height: 56px;
  width: auto;
}

/* Desktop nav */
.site-header__nav { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-item { display: flex; align-items: center; }

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: #061329;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link--active { color: #12cf6d; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.hamburger__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #061329;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================================================
   OFF-CANVAS MOBILE MENU
   ================================================================ */
.mobile-menu {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 200;
  width: 300px;
  max-width: 85vw;
  height: 100dvh;
  background: #fff;
  box-shadow: -4px 0 24px rgb(0 0 0 / 0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 80px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.mobile-menu__logo img { height: 40px; width: auto; }

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #061329;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.mobile-menu__close:hover { background: #f5f7fa; }

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 4px;
}

.mobile-nav-list .nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 1.0625rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-nav-list .nav-link:hover,
.mobile-nav-list .nav-link--active {
  background: #f5f7fa;
  color: #12cf6d;
}

/* Backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgb(0 0 0 / 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .site-header__nav { display: none; }
  .hamburger { display: flex; }

  .site-header__inner { padding: 0 20px; }
}

@media (max-width: 480px) {
  .site-header { height: 72px; }
  .site-header__logo img { height: 44px; }
}
