/*
Theme Name: US Exchange Alumni Association Malawi
Theme URI: https://example.org/
Author: Revelation Nyirongo
Author URI: https://example.org/
Description: A professional WordPress theme for the US Exchange Alumni Association (Malawi), with sections for exchange programs, upcoming events, membership, online payments via WooCommerce, and alumni stories.
Version: 1.1.8
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: usmea-malawi
Tags: custom-logo, custom-menu, featured-images, two-columns, accessibility-ready, blog, e-commerce
*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f4f6f8;
  --surface-strong: #eef2f6;
  --ink: #252b33;
  --ink-soft: #5d6673;
  --navy: #143764;
  --navy-dark: #0b2547;
  --line: #d7dfe8;
  --line-strong: #b8c6d7;
  --accent: #be2131;
  --accent-dark: #981927;
  --accent-soft: #fff0f2;
  --success: #22684f;
  --shadow: 0 18px 40px rgba(15, 40, 71, 0.08);
  --radius: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}

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

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

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

p {
  margin: 0 0 1rem;
}

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

.utility-bar {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.84);
}

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

.utility-message {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.utility-links a {
  color: #fff;
  font-size: 0.88rem;
}

.utility-cta {
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.custom-logo-link,
.site-logo-link {
  flex: 0 0 auto;
}

.custom-logo,
.site-logo-image {
  width: auto;
  max-width: 250px;
  max-height: 66px;
}

.branding-copy {
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.site-description {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.header-navigation {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu a,
.footer-menu a {
  font-size: 0.94rem;
  font-weight: 700;
}

.button,
.wp-block-button__link,
button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.add_to_cart_button,
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #fff !important;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.add_to_cart_button:hover,
.header-cta:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff !important;
  transform: translateY(-1px);
}

.button-outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink) !important;
}

.button-outline:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff !important;
}

.hero-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  padding: 2rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.hero-banner__text {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.section-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.6rem 0 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stats-card,
.program-card,
.event-card,
.story-card,
.membership-card,
.panel,
.entry-card,
.archive-card {
  background: var(--surface);
  border: 1px solid var(--line);
}

.stats-card {
  padding: 1rem;
}

.stats-card strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
}

.stats-card span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.notice {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.section-soft {
  background: var(--surface-soft);
}

.section-intro h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-header p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
}

.about-grid,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.cards-3,
.cards-4,
.membership-grid {
  display: grid;
  gap: 1.4rem;
}

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

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

.impact-action-card,
.feature-panel {
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.impact-action-card {
  border-top: 4px solid var(--accent);
}

.impact-action-card h3,
.feature-panel h2 {
  font-size: clamp(1.3rem, 2.6vw, 2rem);
}

.impact-action-card p,
.feature-panel p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.feature-panel {
  height: 100%;
}

.feature-panel--accent {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}

.feature-panel--accent .section-label,
.feature-panel--accent h2,
.feature-panel--accent .checklist li {
  color: #fff;
}

.feature-panel--accent .section-label {
  color: #ffd2d8;
}

.program-card,
.event-card,
.story-card,
.membership-card,
.panel,
.entry-card,
.archive-card {
  padding: 1.6rem;
}

.program-card,
.event-card,
.story-card {
  border-top: 4px solid var(--navy);
}

.program-card:hover,
.event-card:hover,
.story-card:hover {
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.6rem;
  margin-bottom: 1rem;
  background: var(--surface-soft);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.program-card h3,
.event-card h3,
.story-card h3,
.membership-card h3 {
  font-size: 1.45rem;
}

.program-card p,
.event-card p,
.story-card p,
.membership-card p {
  color: var(--ink-soft);
}

.program-card a:last-child,
.event-card a:last-child,
.story-card a:last-child {
  display: inline-block;
  margin-top: 0.7rem;
  font-weight: 800;
  color: var(--accent);
}

.meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
}

.story-quote {
  font-size: 1.04rem;
}

.story-author {
  margin-top: 1rem;
  color: var(--ink);
  font-weight: 800;
}

.membership-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.membership-card {
  padding: 2rem;
  background: var(--navy-dark);
  color: #fff;
  border: none;
}

.membership-card .section-label,
.membership-card .notice,
.membership-card .checklist li,
.membership-card p,
.membership-card h2,
.membership-card h3 {
  color: inherit;
}

.membership-card .section-label {
  color: #ffb59b;
}

.membership-card .notice {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #ffb59b;
}

.membership-card .button-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff !important;
}

.membership-card .button-outline:hover {
  border-color: #fff;
  background: #fff;
  color: var(--navy-dark) !important;
}

.membership-card-secondary {
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.membership-card-secondary .section-label {
  color: var(--accent);
}

.checklist {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.8rem;
}

.checklist li::before {
  content: "•";
  position: absolute;
  left: 0.1rem;
  top: 0;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.2;
}

.site-footer {
  padding: 2.5rem 0;
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.88);
}

.site-footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer-branding .custom-logo,
.footer-branding .site-logo-image {
  max-width: 210px;
  max-height: 56px;
}

.footer-tagline {
  margin: 0.4rem 0 0.8rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.content-area {
  padding: 2rem 0 4rem;
}

.site-main {
  padding: 0;
}

.entry-card h1,
.archive-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.screen-reader-text {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cta-section {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
}

.cta-panel {
  padding: 2.2rem;
  border-top: 5px solid var(--accent);
  background: var(--navy-dark);
  color: #fff;
  box-shadow: var(--shadow);
}

.cta-panel .section-label,
.cta-panel h2 {
  color: #fff;
}

.cta-panel .section-label {
  color: #ffd2d8;
}

@media (max-width: 1100px) {
  .header-inner,
  .section-header,
  .footer-grid,
  .membership-grid,
  .about-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .header-navigation {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    top: auto;
    backdrop-filter: none;
  }

  .utility-inner,
  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .utility-inner {
    gap: 0;
    padding: 0.55rem 0;
  }

  .utility-message {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.35;
  }

  .utility-links {
    display: none;
  }

  .header-inner {
    align-items: stretch;
    gap: 0.8rem;
    padding: 0.75rem 0 1rem;
  }

  .site-branding {
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
  }

  .branding-copy {
    display: none;
  }

  .header-navigation {
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .header-navigation nav:empty {
    display: none;
  }

  .header-cta {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .section-header h2,
  .section-intro h2,
  .feature-panel h2 {
    max-width: none;
  }

  .stats-grid,
  .cards-3,
  .cards-4 {
    grid-template-columns: 1fr;
  }

  .custom-logo,
  .site-logo-image {
    max-width: min(220px, 72vw);
    max-height: 54px;
  }
}

@media (max-width: 640px) {
  .footer-branding {
    align-items: start;
    flex-direction: column;
  }

  .nav-menu,
  .footer-menu,
  .utility-links,
  .hero-actions {
    gap: 0.8rem;
  }

  .section {
    padding-top: 3rem;
  }

  .cta-panel,
  .program-card,
  .event-card,
  .story-card,
  .membership-card,
  .entry-card,
  .archive-card {
    padding: 1.3rem;
  }

  .hero-banner {
    min-height: 360px;
    padding: 1.5rem;
  }
}

.usmea-registration-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  align-items: start;
}

.usmea-registration-intro {
  position: sticky;
  top: 2rem;
}

.usmea-registration-intro h1,
.usmea-checkout-summary h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.usmea-fee-summary {
  display: grid;
  gap: 0.2rem;
  margin-top: 1.5rem;
  padding: 1.4rem;
  border-left: 5px solid var(--accent);
  background: var(--navy-dark);
  color: #fff;
  box-shadow: var(--shadow);
}

.usmea-fee-summary span,
.usmea-fee-summary small {
  color: rgba(255, 255, 255, 0.75);
}

.usmea-fee-summary strong {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.1;
}

.usmea-registration-card {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  background: #fff;
  box-shadow: var(--shadow);
}

.usmea-membership-form {
  display: grid;
  gap: 1.5rem;
}

.usmea-membership-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.usmea-membership-form legend {
  width: 100%;
  margin-bottom: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  color: var(--navy-dark);
  font-size: 1.15rem;
  font-weight: 800;
}

.usmea-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.usmea-membership-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
}

.usmea-membership-form label > span,
.usmea-consent strong {
  color: var(--accent);
}

.usmea-membership-form input:not([type="checkbox"]),
.usmea-membership-form select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}

.usmea-membership-form input:focus,
.usmea-membership-form select:focus {
  border-color: var(--navy);
  outline: 3px solid rgba(20, 55, 100, 0.14);
}

.usmea-field-wide {
  grid-column: 1 / -1;
}

.usmea-consent {
  grid-template-columns: auto 1fr !important;
  align-items: start;
  gap: 0.7rem !important;
  padding: 1rem;
  background: var(--surface-soft);
  line-height: 1.5;
}

.usmea-consent input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.usmea-payment-button {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 58px;
  border-radius: 10px;
  text-align: left;
}

.usmea-payment-button strong {
  white-space: nowrap;
}

.usmea-payment-note {
  margin: -0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-align: center;
}

.usmea-form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.usmea-checkout-summary {
  margin: 0 0 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-left: 5px solid var(--accent);
  background: var(--navy-dark);
  color: #fff;
}

.usmea-checkout-summary .section-label {
  color: #ffd2d8;
}

.usmea-checkout-summary h1,
.usmea-checkout-summary p {
  color: #fff;
}

.usmea-checkout-summary strong {
  font-size: 1.35rem;
}

@media (max-width: 820px) {
  .usmea-registration-shell {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
  }

  .usmea-registration-intro {
    position: static;
  }
}

@media (max-width: 640px) {
  .usmea-form-grid {
    grid-template-columns: 1fr;
  }

  .usmea-field-wide {
    grid-column: auto;
  }

  .usmea-payment-button {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }
}
