/*
Theme Name: DMA Microsite
Theme URI: https://next.staging.dma.org
Author: DMA
Description: Lightweight classic WordPress theme for campaign microsites with embedded NXT forms.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: dma-microsite
*/

:root {
  --dma-bg: #ffffff;
  --dma-text: #171717;
  --dma-accent: #df3045;
  --dma-footer-bg: #e9e9e9;
  --dma-border: #d7d7d7;
  --dma-max-width: 1120px;
  --dma-gap: clamp(1rem, 1.8vw, 1.5rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--dma-bg);
  color: var(--dma-text);
  font-family: "Avenir Next", "Avenir", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-color: var(--dma-accent);
  text-underline-offset: 0.2rem;
}

a:focus-visible {
  outline: 2px solid var(--dma-accent);
  outline-offset: 2px;
}

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

.site-header {
  padding: clamp(1.25rem, 3vw, 2rem) var(--dma-gap);
  border-bottom: 1px solid var(--dma-border);
  background: #fff;
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: min(100% - (var(--dma-gap) * 2), var(--dma-max-width));
  margin-inline: auto;
}

.site-branding {
  display: inline-flex;
  align-items: center;
}

.dma-site-logo {
  width: 192px;
  height: 128px;
  object-fit: contain;
  display: block;
}

.site-main {
  flex: 1;
  padding-block: clamp(1.25rem, 2.4vw, 2.25rem);
}

.page-header {
  margin-bottom: 1rem;
}

.entry-title {
  margin: 0 0 0.75rem;
  line-height: 1.15;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
}

.entry-content > * {
  max-width: 70ch;
}

.entry-content > .wp-block-group,
.entry-content > .wp-block-columns,
.entry-content > iframe,
.entry-content > script,
.entry-content > form,
.entry-content > .nxt-embed,
.entry-content > .nxt-form {
  max-width: 100%;
}

.entry-content iframe {
  width: 100%;
  min-height: 70vh;
  border: 0;
}

.site-footer {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  background: var(--dma-footer-bg);
  color: var(--dma-text);
}

.site-footer__inner {
  padding-block: clamp(1.5rem, 3vw, 2.2rem);
}

.footer-back-top {
  display: inline-flex;
  justify-self: end;
  margin-bottom: 0.9rem;
  color: var(--dma-accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo .dma-site-logo {
  width: 192px;
  height: 128px;
}

.footer-address,
.footer-legal,
.footer-social {
  font-size: 0.95rem;
}

.footer-address {
  margin: 0;
  color: rgb(111,111,111);
}

.footer-social {
    color: rgb(111,111,111);
}

.footer-social strong {
  display: block;
  margin-bottom: 0.45rem;
}

.footer-social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.social-icon {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--dma-text);
}

.social-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1;
}

.footer-legal {
  margin-top: .25rem;
  padding: 0.25rem 0;
  font-size: 0.75rem;
}

.social-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  border-bottom-color: var(--dma-accent);
}

.error-404 {
  padding-block: 1rem;
}

.error-404 .entry-title {
  margin-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
    column-gap: 2rem;
  }

  .footer-actions {
    align-self: start;
    align-items: flex-end;
    justify-self: end;
  }

  .footer-social ul {
    justify-content: flex-end;
  }
}
