/* ACEP Ghana — clean modern journal redesign */
:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --text: #152033;
  --muted: #5b6778;
  --accent: #0c6e6a;
  --accent-dark: #095551;
  --line: #d4dde6;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(21, 32, 51, 0.07);
  --shadow-hover: 0 14px 36px rgba(21, 32, 51, 0.11);
  --content: 720px;
  --grid: 1180px;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, serif;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 8% -12%, rgba(12, 110, 106, 0.09), transparent 52%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(21, 32, 51, 0.05), transparent 48%),
    var(--bg);
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

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

.wrap {
  width: min(100% - 2rem, var(--grid));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2rem, var(--content));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 246, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.brand:hover {
  color: var(--accent-dark);
}

.brand__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand__tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.menu-toggle__icon {
  display: inline-block;
  width: 1.1rem;
  height: 0.85rem;
  position: relative;
}

.menu-toggle__icon span,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle__icon span {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle__icon::before {
  top: 0;
}

.menu-toggle__icon::after {
  bottom: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.main-nav {
  display: none;
}

.main-nav.is-open {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 4rem);
  overflow: auto;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.menu > li > a,
.menu > li > span.nav-label {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.menu > li > a:hover,
.menu > li > a[aria-current="page"] {
  background: rgba(12, 110, 106, 0.1);
  color: var(--accent-dark);
}

.menu .submenu {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0 0 0 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.menu .submenu a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.menu .submenu a:hover,
.menu .submenu a[aria-current="page"] {
  color: var(--accent-dark);
  background: rgba(12, 110, 106, 0.08);
}

@media (min-width: 980px) {
  .menu-toggle {
    display: none;
  }

  .main-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .menu {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.15rem;
    padding: 0;
  }

  .menu > li {
    position: relative;
  }

  .menu > li > a,
  .menu > li > span.nav-label {
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
  }

  .menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 50;
  }

  .menu > li:hover > .submenu,
  .menu > li:focus-within > .submenu {
    display: flex;
  }
}

/* Hero */
.page-hero {
  padding: 2.5rem 0 1.25rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span[aria-hidden="true"] {
  opacity: 0.5;
}

/* Layout */
.site-content {
  flex: 1;
  padding: 0 0 3.5rem;
}

.layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .layout--with-sidebar {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}

/* Cards */
.posts-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.home-follow {
  margin-top: 0.85rem !important;
  font-size: 1rem !important;
}

.resource-link {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.resource-link:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.resource-link h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

.entry-content .blogcamp-box,
.entry-content .container-box {
  margin-bottom: 1.5rem;
}

.entry-content .trigger {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

.entry-content .toggle_container {
  display: block !important;
}

.entry-content .blogcamp-cont h3 {
  margin-top: 0;
}

@media (min-width: 700px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .posts-grid .card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
  }

  .posts-grid .card--featured .card__media {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .posts-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(12, 110, 106, 0.08);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.card__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.02em;
}

.card__title a {
  color: var(--text);
  text-decoration: none;
}

.card__title a:hover {
  color: var(--accent);
}

.card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  flex: 1;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-weight: 700;
  text-decoration: none;
}

.card__cta::after {
  content: "→";
  transition: transform var(--transition);
}

.card__cta:hover::after {
  transform: translateX(3px);
}

/* Home sections */
.home-intro {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 800px) {
  .home-intro {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }
}

.section-block {
  margin-top: 2.75rem;
}

.section-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.section-block__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-block__head a {
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.feature-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.55rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.feature-card a {
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.85rem;
}

.list-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.list-links a {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.list-links a:hover {
  border-color: rgba(12, 110, 106, 0.35);
  box-shadow: var(--shadow);
  color: var(--accent-dark);
}

/* Article */
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.35rem;
  box-shadow: var(--shadow);
}

@media (min-width: 700px) {
  .article {
    padding: 2.25rem 2.5rem;
  }
}

.article .entry-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.article .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.entry-meta .updated:not(.published) {
  display: none;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table {
  margin: 0 0 1.15rem;
}

.entry-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.85rem;
  line-height: 1.25;
}

.entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.6rem 0 0.7rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content li {
  margin-bottom: 0.45rem;
}

.entry-content blockquote {
  margin-left: 0;
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: rgba(12, 110, 106, 0.06);
  color: var(--muted);
}

.entry-content img {
  border-radius: 8px;
  margin: 1rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.entry-content iframe {
  max-width: 100%;
}

.post-nav {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) {
  .post-nav {
    grid-template-columns: 1fr 1fr;
  }
}

.post-nav a {
  display: block;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
}

.post-nav a:hover {
  border-color: rgba(12, 110, 106, 0.35);
  color: var(--accent-dark);
}

.post-nav .label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

/* Sidebar */
.sidebar .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li + li {
  margin-top: 0.45rem;
}

.sidebar a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.sidebar a:hover,
.sidebar a[aria-current="page"] {
  color: var(--accent);
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
  color: var(--text);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.contact-details {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .contact-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.contact-details div {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}

.contact-details strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* Footer */
.site-footer {
  background: #132033;
  color: #d7dee8;
  padding: 2.75rem 0 1.5rem;
  margin-top: auto;
}

.site-footer a {
  color: #e8eef5;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: #fff;
}

.footer-desc {
  margin: 0;
  color: #aeb8c6;
  max-width: 28rem;
  font-size: 0.98rem;
}

.footer-heading {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f9aab;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  color: #93a0b0;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
}

/* Utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.empty-note {
  color: var(--muted);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 16px;
  }

  .brand__name {
    font-size: 1.15rem;
  }
}
