/*
Theme Name: NSA Academy
Theme URI: https://nsa.football
Author: NSA
Description: Custom NSA Academy theme front page implementation.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nsa-academy
*/

html, body {
  height: 100%;
}

:root {
  --nsa-red: #c8102e;
  --nsa-blue: #143e8f;
  --nsa-dark: #0f172a;
  --nsa-text: #1f2937;
  --nsa-muted: #6b7280;
  --nsa-bg: #eef2f7;
  --nsa-white: #ffffff;
  --nsa-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Arial", "Helvetica Neue", sans-serif;
  color: var(--nsa-text);
  background: var(--nsa-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.nsa-container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.nsa-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 78px;
}

.nsa-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--nsa-white);
  font-weight: 700;
}

.nsa-logo {
  height: 48px;
  width: auto;
  display: block;
}

.nsa-flag {
  width: 34px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    linear-gradient(90deg, transparent 0 28%, #ffffff 28% 37%, transparent 37% 100%),
    linear-gradient(0deg, transparent 0 42%, #ffffff 42% 58%, transparent 58% 100%),
    linear-gradient(90deg, transparent 0 30%, #1f3d9a 30% 35%, transparent 35% 100%),
    linear-gradient(0deg, transparent 0 44%, #1f3d9a 44% 56%, transparent 56% 100%),
    #ba0c2f;
}

.nsa-main-nav a:hover {
  opacity: 0.85;
}

.nsa-hero-content {
  text-align: center;
  padding: 7rem 0 4rem;
}

.nsa-btn {
  min-width: 178px;
  font-size: 1.2rem;
  padding: 0.18rem 0.2rem;
  border-radius: 3px;
  border: 2px solid transparent;
  text-align: center;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nsa-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.nsa-btn-red {
  background: var(--nsa-red);
  color: var(--nsa-white);
}

.nsa-btn-white {
  background: var(--nsa-white);
  color: #1e293b;
}

.nsa-btn-blue {
  background: var(--nsa-blue);
  color: var(--nsa-white);
}

.nsa-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.nsa-image-1 {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05)), linear-gradient(120deg, #7a2b2b, #1f4f96);
}

.nsa-image-2 {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05)), linear-gradient(120deg, #245770, #4f8fb8);
}

.nsa-image-3 {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05)), linear-gradient(120deg, #245740, #6caa6f);
}

.nsa-image-4 {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.05)), linear-gradient(120deg, #6c3b2c, #4e7aa8);
}

.nsa-card-grid > .wp-block-column:nth-child(even) .nsa-card-title,
.wp-block-columns.nsa-card-grid > .wp-block-column:nth-child(even) .nsa-card-title {
  background: var(--nsa-blue);
}

.nsa-card-btn {
  margin-top: 1rem;
}

.nsa-steps {
  background: var(--nsa-white);
  border: 1px solid #d8deea;
  box-shadow: var(--nsa-shadow);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.nsa-faq details {
  background: var(--nsa-white);
  border: 1px solid #d8deea;
  margin-bottom: 0.55rem;
}

.nsa-faq-content {
  padding: 0 0.95rem 0.95rem;
  color: #334155;
}

.site-footer {
  margin-top: auto;
  padding-top: 2.3rem;
  color: #d8e2f3;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.07), transparent 38%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05), transparent 42%),
    linear-gradient(130deg, #0d2a5f, #0d2149 45%, #0b1c3b);
}

.nsa-footer-main {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 1.8rem;
  padding: 1.6rem 0 1.45rem;
}

.nsa-footer-column h3 {
  margin: 0 0 0.65rem;
  color: #ffffff;
  font-size: 1.25rem;
}

.nsa-footer-column p,
.nsa-footer-column li,
.nsa-footer-column a {
  color: #d6dfef;
  font-size: 0.92rem;
  line-height: 1.5;
}

.nsa-footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nsa-footer-column li {
  margin-bottom: 0.5rem;
}

.nsa-footer-column a:hover {
  color: #ffffff;
}

.nsa-footer-logo-link {
  display: inline-block;
  margin-bottom: 0.6rem;
}

.nsa-footer-logo {
  height: 45px;
  width: auto;
  display: block;
}

.nsa-footer-socials {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.nsa-footer-socials a {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 700;
}

.nsa-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  padding: 0.85rem 1rem 1rem;
  color: #c6d4ea;
  font-size: 0.92rem;
}

@media (max-width: 1024px) {
  .nsa-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nsa-main-nav ul {
    gap: 0.8rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nsa-footer-main {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
  }

  .nsa-footer-column h3 {
    font-size: 1.25rem;
  }

  .nsa-footer-column p,
  .nsa-footer-column li,
  .nsa-footer-column a {
    font-size: 0.9rem;
  }
}

@media (max-width: 760px) {
  .nsa-topbar {
    position: static;
    background: #0d1d3b;
  }

  .nsa-topbar-inner {
    min-height: 64px;
    flex-direction: column;
    justify-content: center;
    padding: 0.7rem 0;
  }

  .nsa-logo {
    height: 42px;
  }

  .nsa-main-nav ul {
    justify-content: center;
  }

  .nsa-hero-content {
    padding: 2.4rem 0 2.2rem;
  }

  .nsa-main {
    margin-top: 1rem;
  }

  .nsa-card-grid,
  .nsa-steps {
    grid-template-columns: 1fr;
  }

  .nsa-footer-main {
    grid-template-columns: 1fr;
    gap: 1.3rem;
    padding-top: 1.35rem;
    padding-bottom: 1.2rem;
  }

  .nsa-footer-logo {
    height: 40px;
  }
}

/* Refinement pass for closer visual parity */
body.page-template-template-nsa-front-page {
  background: #eef0f3;
  color: #1d2738;
}

.page-template-template-nsa-front-page .entry-content,
.page-template-template-nsa-front-page .wp-site-blocks {
  margin: 0;
  max-width: none;
}

.page-template-template-nsa-front-page .wp-block-group.nsa-hero,
.page-template-template-nsa-front-page .wp-block-group.nsa-main,
.page-template-template-nsa-front-page .wp-block-group.nsa-section {
  margin-bottom: 0;
}

.nsa-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
  background: linear-gradient(
    to bottom,
    rgba(9, 20, 42, 0.74) 0%,
    rgba(9, 20, 42, 0.46) 52%,
    rgba(9, 20, 42, 0) 100%
  );
}

.nsa-brand-text {
  line-height: 1.2;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nsa-main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  color: var(--nsa-white);
  gap: 1.05rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.nsa-hero {
  position: relative;
  min-height: 500px;
  color: var(--nsa-white);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(9, 20, 42, 0.62), rgba(9, 20, 42, 0.62)),
    url("assets/images/hero-top.png") center/cover no-repeat;
}

.nsa-hero .nsa-hero-content {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 7.9rem 0 8.2rem;
}

.nsa-hero .nsa-hero-content > * {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.nsa-hero h1 {
  font-size: clamp(2.2rem, 5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin-top: 0;
  margin-bottom: 0.7rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

.nsa-hero p {
  max-width: 760px;
  font-size: 1.24rem;
  line-height: 1.45;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 1.7rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.34);
  color: var(--nsa-white);
}


.nsa-btn .wp-block-button__link {
  border-radius: 1px !important;
  border: 0 !important;
  padding: 0.18rem 0.95rem !important;
  min-width: 148px;
  font-weight: 700;
  line-height: 1.05;
}

.nsa-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.nsa-actions .wp-block-button {
  padding: 6px 25px;
  margin: 0 !important;
}

.nsa-actions .wp-block-button__link {
  height: 34px;
  font-weight: 400 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nsa-btn-red .wp-block-button__link {
  background: #c61230 !important;
  color: #fff !important;
}

.nsa-btn-blue .wp-block-button__link {
  background: #184394 !important;
  color: #fff !important;
}

.nsa-btn-white .wp-block-button__link {
  background: #fff !important;
  color: #1b2b47 !important;
}

.nsa-main {
  margin-top: -38px;
  position: relative;
  z-index: 2;
}

.wp-block-columns.nsa-card-grid {
  margin-top: 0;
  margin-bottom: 0;
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  gap: 10px !important;
  background: #fff;
  border: 1px solid #d6deea;
  border-radius: 3px;
  padding: 8px;
  box-shadow: 0 3px 9px rgba(10, 24, 48, 0.08);
  align-items: stretch !important;
}

.wp-block-columns.nsa-card-grid > .wp-block-column {
  margin: 0 !important;
  display: flex;
  align-self: stretch;
}

.wp-block-columns.nsa-card-grid > .wp-block-column > .nsa-card {
  width: 100%;
}

.nsa-card {
  background: var(--nsa-white);
  border: 1px solid #d9dee8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  overflow: hidden;
}

.nsa-card-image {
  height: 136px;
  background-size: cover;
  background-position: center;
  border-radius: 3px 3px 0 0;
}

.nsa-card-title {
  margin: 0;
  background: var(--nsa-red);
  color: var(--nsa-white);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  font-size: 1.18rem;
  padding: 0.62rem 0.72rem;
  height: 54px;
}

.nsa-card-body {
  font-size: 1rem;
  line-height: 1.48;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0.95rem 0.78rem 1rem;
}

.nsa-card-body > p {
  margin: 0 0 0.8rem;
  flex: 1 1 auto;
}

.nsa-card-btn .wp-block-button__link {
  height: 28px;
  padding: 0.2rem 0.58rem !important;
  font-size: 0.89rem;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nsa-card .nsa-card-btn {
  display: flex;
  margin-top: auto;
  justify-content: center;
  margin-bottom: 0.05rem;
}

.nsa-card .nsa-card-btn .wp-block-button {
  margin: 0 !important;
}

.nsa-section {
  padding: 3rem 0 0;
}

.nsa-section h2 {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: clamp(1.2rem, 3.7vw, 1.8rem);
  font-weight: 700;
  color: #1c2a43;
}

.wp-block-columns.nsa-steps {
  gap: 0 !important;
  background: #ffffff;
  border: 1px solid #e3e7ee;
  border-radius: 2px;
  box-shadow: 0 1px 5px rgba(17, 24, 39, 0.06);
  min-height: 136px;
  padding: 0.95rem 0.7rem 0;
  align-items: stretch !important;
}

.wp-block-columns.nsa-steps > .wp-block-column {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wp-block-columns.nsa-steps > .wp-block-column:not(:last-child)::after {
  content: "\203A";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  line-height: 1;
  color: #d5dbe6;
  font-weight: 300;
}

.nsa-step {
  text-align: center;
  width: 100%;
  max-width: 255px;
  margin: 0 auto;
  padding: 0.15rem 0.35rem 0rem;
}

.nsa-step > * {
  float: none !important;
  clear: both;
  display: block;
  width: 100%;
}

.nsa-step p {
  text-align: center;
}

.nsa-step img {
  display: block;
  margin: 0 auto 0.38rem;
}

.nsa-step p img,
.nsa-step .alignleft,
.nsa-step .alignright,
.nsa-step .aligncenter {
  float: none !important;
  display: block !important;
  margin: 0 auto 0.38rem !important;
}

.nsa-step > p {
  margin: 0;
  font-size: 1.04rem;
  color: #2d3748;
  line-height: 1.35;
}

.nsa-step-number {
  color: #162e68;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.28rem !important;
}

.nsa-benefits {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 1.4rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.nsa-benefits ul {
  margin: 0;
  list-style: none;
  padding-left: 0;
}

.nsa-benefits li {
  margin: 0.8rem 0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem 2rem 1.1rem 2.5rem;
  position: relative;
}

.nsa-benefits li::before {
  content: "\2714";
  color: #fff;
  background: #d11a32;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.1rem;
}

.nsa-faq {
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 2.2rem;
}

.nsa-faq .wp-block-details {
  margin: 0 0 0.55rem;
  border: 1px solid #dbe2ec;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.nsa-faq summary {
  padding: 0.9rem 2.6rem 0.9rem 1rem;
  list-style: none;
  position: relative;
  font-size: 1.02rem;
  font-weight: 600;
  color: #2b3548;
  cursor: pointer;
  line-height: 1.35;
  transition: background-color 0.15s ease;
}

.nsa-faq summary::-webkit-details-marker {
  display: none;
}

.nsa-faq summary::after {
  content: "\2304";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8b97ab;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.24s ease, color 0.2s ease;
}

.nsa-faq details[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.nsa-faq details[open] > summary {
  background: #fcfdff;
  border-bottom: 1px solid #e6ebf2;
}

.nsa-faq details > :not(summary) {
  margin: 0;
  padding: 0 1rem;
  color: #2f3a4f;
  font-size: 1.04rem;
  line-height: 1.5;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease,
    padding 0.28s ease;
}

.nsa-faq details[open] > :not(summary) {
  max-height: 180px;
  opacity: 1;
  padding: 0.95rem 1rem 1.05rem;
}

@media (max-width: 1024px) {
  .nsa-main {
    margin-top: -86px;
  }

  .nsa-hero .nsa-hero-content {
    padding-top: 7rem;
    padding-bottom: 7.2rem;
  }

  .wp-block-columns.nsa-card-grid {
    gap: 8px !important;
  }

  .nsa-card-title {
    font-size: 1rem;
  }

  .nsa-card-body {
    font-size: 0.92rem;
  }

  .nsa-card-body > p {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 760px) {
  .nsa-hero {
    min-height: 420px;
  }

  .nsa-hero .nsa-hero-content {
    padding-top: 3rem;
    padding-bottom: 2.6rem;
  }

  .nsa-hero h1 {
    font-size: 2.3rem;
  }

  .nsa-hero p {
    font-size: 1.02rem;
  }

  .nsa-main {
    margin-top: 0.8rem;
  }

  .wp-block-columns.nsa-card-grid {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .wp-block-columns.nsa-steps > .wp-block-column:not(:last-child)::after {
    display: none;
  }

  .nsa-section h2 {
    font-size: 2.15rem;
  }

  .nsa-card-image {
    height: 160px;
  }

  .nsa-card-body > p {
    flex: 0 1 auto;
  }
}

/* Button markup refactor support: wrapper div OR direct anchor */
.page-template-template-nsa-front-page .nsa-btn {
  background: transparent !important;
  border: 0;
  padding: 0;
  min-width: 0;
}

.page-template-template-nsa-front-page .nsa-actions .wp-block-button {
  padding: 0;
  margin: 0 !important;
}

.page-template-template-nsa-front-page .nsa-actions .wp-block-button__link,
.page-template-template-nsa-front-page .nsa-actions a.nsa-btn-link {
  min-width: 148px;  
  padding: 23px 40px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px !important;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 400 !important;
  line-height: 1.05;
}

.page-template-template-nsa-front-page .nsa-actions.wp-block-buttons {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.page-template-template-nsa-front-page .nsa-actions > a.nsa-btn-link {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
}

.page-template-template-nsa-front-page .nsa-card-btn .wp-block-button {
  margin: 0 !important;
}

.page-template-template-nsa-front-page .nsa-card-btn {
  margin-top: auto !important;
  justify-content: center;
}

.page-template-template-nsa-front-page .nsa-card-btn .wp-block-button__link,
.page-template-template-nsa-front-page .nsa-card-btn a.nsa-btn-link {
  min-width: 114px;  
  padding: 20px 30px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.89rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.page-template-template-nsa-front-page .nsa-btn-red .wp-block-button__link,
.page-template-template-nsa-front-page a.nsa-btn-link.nsa-btn-red {
  background: #c61230 !important;
  color: #fff !important;    
}

.page-template-template-nsa-front-page .nsa-btn-blue .wp-block-button__link,
.page-template-template-nsa-front-page a.nsa-btn-link.nsa-btn-blue {
  background: #184394 !important;
  color: #fff !important;
}

.page-template-template-nsa-front-page .nsa-btn-white .wp-block-button__link,
.page-template-template-nsa-front-page a.nsa-btn-link.nsa-btn-white {
  background: #fff !important;
  color: #1b2b47 !important;
}

/* Final card CTA alignment override */
.page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid {
  align-items: stretch !important;
}

.page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column {
  display: flex !important;
  align-self: stretch !important;
  height: auto !important;
  min-height: 100%;
}

.page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column.is-layout-flow.wp-block-column-is-layout-flow {
  display: flex !important;
}

.page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column > .wp-block-group.nsa-card {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.wp-block-group .nsa-card-body .nsa-card-body-parent {
  flex-grow: 1;
}

.page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column > * {
  width: 100%;
}

.page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-group.nsa-card-body {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;  
  flex-grow: 1;
}

.page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-group.nsa-card-body > p {
  margin: 0 0 0.8rem;
  flex: 1 1 auto;
}

.page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-buttons.nsa-card-btn {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  justify-content: center !important;
  align-self: stretch;
}

.page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-buttons.nsa-card-btn .wp-block-button {
  margin: 0 !important;
}

/* Contact page */
.page-template-template-contact-page {
  background: #eef0f3;
}

.nsa-contact-hero {
  min-height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(9, 20, 42, 0.52), rgba(9, 20, 42, 0.52)),
    url("assets/images/hero-top.png") center/cover no-repeat;
}

.nsa-contact-hero h1 {
  margin: 0;
  padding-top: 2.8rem;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.nsa-contact-main {
  padding: 2rem 0 0.5rem;
}

.nsa-contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.nsa-contact-copy h2,
.nsa-contact-form-card h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 3.1vw, 2.6rem);
  color: #1b2c47;
}

.nsa-contact-copy > p,
.nsa-contact-form-card > p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #49566b;
  max-width: 560px;
}

.nsa-contact-card {
  margin-top: 1.5rem;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(14, 33, 67, 0.22), rgba(14, 33, 67, 0.1)),
    url("assets/images/hero-top.png") center/cover no-repeat;
  border: 1px solid #d4dceb;
}

.nsa-contact-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 37, 84, 0.84);
  color: #e5edf9;
  padding: 1.15rem 1.2rem 1.35rem;
}

.nsa-contact-card-overlay h3 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-size: 1.5rem;
}

.nsa-contact-card-overlay ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nsa-contact-card-overlay li {
  margin-bottom: 0.6rem;
}

.nsa-contact-card-overlay a {
  color: #e5edf9;
  font-size: 1.08rem;
}

.nsa-contact-follow {
  margin: 0.9rem 0 0.55rem;
  font-weight: 700;
  color: #fff;
}

.nsa-contact-socials {
  display: flex;
  gap: 0.55rem;
}

.nsa-contact-socials a {
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 4px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nsa-contact-form-card {
  background: #f5f5f7;
  border: 1px solid #e1e4eb;
  box-shadow: 0 5px 16px rgba(14, 30, 66, 0.08);
  padding: 1.35rem 1.6rem 1.2rem;
}

.nsa-contact-form-card .wpcf7 {
  margin-top: 1rem;
}

.nsa-contact-form-card .wpcf7-form p {
  margin: 0 0 0.75rem;
}

.nsa-contact-form-card label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #556278;
  margin-bottom: 0.2rem;
}

.nsa-contact-form-card .wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.28rem;
}

.nsa-contact-form-card input[type="text"],
.nsa-contact-form-card input[type="email"],
.nsa-contact-form-card input[type="tel"] {
  width: 100%;
  border: 1px solid #d4d9e3;
  border-radius: 2px;
  padding: 0.62rem 0.7rem;
  font-size: 0.95rem;
  color: #25324a;
  background: #fff;
}

.nsa-contact-form-card textarea {
  width: 100%;
  border: 1px solid #d4d9e3;
  border-radius: 2px;
  padding: 0.62rem 0.7rem;
  font-size: 0.95rem;
  color: #25324a;
  background: #fff;
  min-height: 124px;
  resize: vertical;
}

.nsa-contact-form-card input[type="submit"] {
  width: 100%;
  margin-top: 0.4rem;
  border: 0;
  border-radius: 2px;
  background: #c61230;
  color: #fff;
  padding: 0.72rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.nsa-contact-form-card input[type="submit"]:hover {
  opacity: 0.95;
}

.nsa-contact-note {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: #616d82;
}

.nsa-contact-form-missing {
  border: 1px dashed #c9d0dd;
  background: #fff;
  color: #374259;
  padding: 0.8rem;
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  .nsa-contact-layout {
    grid-template-columns: 1fr;
  }

  .nsa-contact-form-card {
    padding: 1.2rem;
  }
}

@media (max-width: 760px) {
  .nsa-contact-hero {
    min-height: 300px;
  }

  .nsa-contact-hero h1 {
    padding-top: 0.75rem;
  }

  .nsa-contact-card {
    min-height: 420px;
  }
}

/* Default page design */
.page:not(.page-template-template-nsa-front-page):not(.page-template-template-contact-page) {
  background: #f3f5f9;
}

.nsa-page-hero {
  min-height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(rgba(9, 20, 42, 0.56), rgba(9, 20, 42, 0.56)),
    url("assets/images/hero-top.png") center/cover no-repeat;
}

.nsa-page-hero h1 {
  margin: 0;
  padding-top: 2.8rem;
  font-size: clamp(2.1rem, 4vw, 2.95rem);
  text-wrap: nowrap;
}

.nsa-page-breadcrumb-wrap {
  background: #fff;
  border-bottom: 1px solid #e2e7f1;
}

.nsa-page-breadcrumb {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: #65738c;
}

.nsa-page-breadcrumb a {
  color: #2a4e93;
}

/* Hide legacy breadcrumb row in already-saved pages. */
.nsa-page-breadcrumb-wrap {
  display: none !important;
}

.nsa-page-main {
  padding: 2.2rem 0 1.2rem;
}

.nsa-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1.4rem;
  align-items: start;
}

.nsa-page-content {
  color: #364256;
  line-height: 1.65;
}

.nsa-page-content h1,
.nsa-page-content h2,
.nsa-page-content h3 {
  color: #1b2c47;
  line-height: 1.24;
  margin-top: 0;
}

.nsa-page-content h2 {
  font-size: 2rem;
}

p {
  font-size: 1.08rem;
  margin: 0 0 0.9rem;
  color: #364256;
  line-height: 1.50;
}

.nsa-page-content img {
  max-width: 100%;
  height: auto;
}

.nsa-page-side-image {
  margin-bottom: 1.1rem;
  border: 1px solid #dde4f0;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.nsa-page-side-image img {
  display: block;
  width: 100%;
  height: auto;
}

.nsa-page-contact-card {
  background: #f7f8fa;
}

.nsa-page-contact-card h2 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  color: #1b2c47;
}

@media (max-width: 1024px) {
  .nsa-page-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nsa-page-hero {
    min-height: 230px;
  }

  .nsa-page-hero h1 {
    padding-top: 0.8rem;
  }
}

/* Elite cups page */
.nsa-cups-main {
  padding: 1.6rem 0 1.8rem;
}

.nsa-cups-intro {
  margin: 0 auto 1.2rem;
  max-width: 900px;
  color: #2f3c54;
  font-size: 1.1rem;
  line-height: 1.52;
}

.nsa-cups-cta {
  margin-bottom: 1.45rem;
}

.nsa-cups-cta.wp-block-buttons {
  width: auto !important;
  max-width: 60%;
  margin: 0 auto 1.45rem auto;
}

.nsa-cups-cta .wp-block-button__link {
  min-width: 240px;
  padding: 0.5rem 1.5rem !important;
  font-size: 1.05rem;
}

.nsa-cups-grid {
  gap: 1rem !important;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}

.nsa-cups-grid > .wp-block-column {
  margin-top: 0 !important;
}

.nsa-cup-card {
  border: 1px solid #dfe4ee;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.nsa-cup-image {
  height: 112px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.nsa-cup-image-1,
.nsa-cup-image-3,
.nsa-cup-image-4,
.nsa-cup-image-6 {
  background:
    linear-gradient(rgba(10, 20, 40, 0.2), rgba(10, 20, 40, 0.2)),
    url("assets/images/hero-top.png") center/cover no-repeat;
}

.nsa-cup-image-2,
.nsa-cup-image-5 {
  background:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    linear-gradient(120deg, #0a4891, #0d6bb2 48%, #004176);
}

.nsa-cup-body {
  padding: 0.72rem 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nsa-cup-title {
  margin: 0 0 0.32rem;
  font-size: 1.2rem;
  color: #1d2c47;
}

.nsa-cup-meta {
  margin: 0 0 0.24rem;
  color: #1f3250;
  font-size: 0.9rem;
  line-height: 1.3;
}

.nsa-cup-body > p {
  font-size: 0.95rem;
}

.nsa-cup-btn {
  margin-top: auto;
}

.nsa-cup-btn .wp-block-button {
  margin: 0 !important;
}

.nsa-cup-btn .wp-block-button__link {
  min-width: 92px;
  padding: 6px 14px !important;
  font-size: 0.86rem;
}

.nsa-cups-grid-auto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.nsa-cups-grid-auto .nsa-cup-card {
  min-width: 0;
}

.nsa-cup-image-link {
  display: block;
}

.nsa-cup-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nsa-cup-title a {
  color: inherit;
}

.nsa-cup-card-cta {
  margin: 0.7rem 0 0;
}

.nsa-cup-read-more {
  display: inline-block;
  min-width: 92px;
  text-align: center;
  background: #c61230;
  color: #fff;
  padding: 6px 14px;
  border-radius: 2px;
  font-size: 0.86rem;
  font-weight: 700;
}

.nsa-cups-empty {
  margin: 0.5rem 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px dashed #ced6e4;
  background: #fff;
  color: #4a5870;
}

@media (max-width: 1024px) {
  .nsa-cups-grid {
    margin-bottom: 0.8rem !important;
  }

  .nsa-cups-grid-auto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nsa-cups-intro {
    font-size: 0.98rem;
  }

  .nsa-cups-grid-auto {
    grid-template-columns: 1fr;
  }
}

/* Elite cup detail page */
.nsa-cup-detail-main {
  padding: 2.35rem 0 1.2rem;
}

.nsa-cup-facts-bar {
  margin: 0 0 1.35rem !important;
  border: 1px solid #dce4f1;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  align-items: center !important;
  gap: 0 !important;
}

.nsa-cup-facts-bar > .wp-block-column {
  margin-top: 0 !important;
  padding: 1.15rem 1.1rem;
}

.nsa-cup-facts p {
  margin: 0 0 0.55rem;
  color: #22344f;
  font-size: 0.95rem;
}

.nsa-cup-facts p:last-child {
  margin-bottom: 0;
}

.nsa-cup-logo {
  text-align: center;
}

.nsa-cup-logo h4 {
  margin: 0;
  color: #0d4b9c;
  letter-spacing: 0.01em;
}

.nsa-cup-logo p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #3d4a61;
}

.nsa-cup-facts-cta {
  justify-content: flex-end;
}

.nsa-cup-detail-body {
  margin: 0 0 1.2rem !important;
  gap: 1.2rem !important;
}

.nsa-cup-detail-body > .wp-block-column {
  margin-top: 0 !important;
}

.nsa-cup-detail-body h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  color: #1a2d4a;
}

.nsa-cup-detail-body p {
  color: #334258;
  line-height: 1.58;
}

.nsa-cup-detail-image {
  min-height: 248px;
  border: 1px solid #dbe3f0;
  background:
    linear-gradient(rgba(12, 24, 46, 0.16), rgba(12, 24, 46, 0.16)),
    url("assets/images/hero-top.png") center/cover no-repeat;
}

.nsa-cup-featured-title {
  margin: 0.4rem 0 0.65rem;
  color: #1a2d4a;
}

.nsa-cup-perks {
  margin: 0 0 1rem !important;
  gap: 0.9rem !important;
}

.nsa-cup-perks > .wp-block-column {
  margin-top: 0 !important;
}

.nsa-cup-perk-card {
  border: 1px solid #dde4f0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  height: 100%;
  padding: 0.85rem 0.9rem;
}

.nsa-cup-perk-card h4 {
  margin: 0 0 0.32rem;
  color: #1c2e4b;
  font-size: 1rem;
}

.nsa-cup-perk-card p {
  margin: 0;
  color: #435268;
  font-size: 0.9rem;
}

.nsa-cup-bottom-panels {
  margin: 0 !important;
  gap: 1rem !important;
}

.nsa-cup-bottom-panels > .wp-block-column {
  margin-top: 0 !important;
}

.nsa-cup-apply-card,
.nsa-cup-links-card {
  border: 1px solid #dde4f0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  padding: 0.95rem;
  height: 100%;
}

.nsa-cup-apply-card h3,
.nsa-cup-links-card h3 {
  margin-top: 0;
  color: #1b2c47;
}

.nsa-cup-apply-card ul,
.nsa-cup-links-card ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.nsa-cup-apply-card li,
.nsa-cup-links-card li {
  margin-bottom: 0.35rem;
  color: #33435b;
}

.nsa-cup-links-card a {
  color: #1f3a6b;
}

.nsa-cup-apply-cta {
  margin-top: 0.65rem;
}

@media (max-width: 1024px) {
  .nsa-cup-facts-cta {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .nsa-cup-detail-image {
    min-height: 200px;
  }
}

/* About page */
.nsa-about-main {
  padding: 1.2rem 0 1.2rem;
}

.nsa-about-top {
  gap: 1.25rem !important;
  margin: 0 0 1rem !important;
}

.nsa-about-top > .wp-block-column {
  margin-top: 0 !important;
}

.nsa-about-top h2 {
  margin: 0 0 0.55rem;
  color: #1b2c47;
}

.nsa-about-top p {
  color: #33445c;
  line-height: 1.56;
}

.nsa-about-focus-item {
  position: relative;
  margin-bottom: 0.7rem;
  padding: 0.15rem 0 0.15rem 4rem;
  border-left: 0;
  min-height: 64px;
}

.nsa-about-focus-icon {
  position: absolute;
  left: 0.15rem;
  top: 0.25rem;
  margin: 0 !important;
  width: 46px;
  height: 46px;
}

.nsa-about-focus-icon img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.nsa-about-focus-item h4 {
  margin: 0 0 0.2rem;
  color: #142a51;
}

.nsa-about-focus-item p {
  margin: 0;
  font-size: 0.95rem;
}

.nsa-about-side-image {
  min-height: 292px;
  border: 1px solid #dbe3f0;
  background:
    linear-gradient(rgba(12, 24, 46, 0.14), rgba(12, 24, 46, 0.14)),
    url("assets/images/hero-top.png") center/cover no-repeat;
}

.nsa-about-cta {
  margin: -2rem 0 0.6rem;
  position: relative;
  z-index: 1;
}

.nsa-about-cta .wp-block-button__link {
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.15);
}

.nsa-about-logos {
  margin: 0 !important;
  gap: 0.5rem !important;
}

.nsa-about-logos > .wp-block-column {
  margin-top: 0 !important;
}

.nsa-about-logos p {
  margin: 0;
  border: 1px solid #d9e1ee;
  background: #fff;
  color: #1e3256;
  font-weight: 700;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nsa-about-bottom {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
}

.nsa-about-bottom > h2 {
  color: #152b52;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.nsa-about-bottom > h2::before,
.nsa-about-bottom > h2::after {
  content: "";
  display: block;
  width: clamp(70px, 16vw, 180px);
  border-top: 1px solid #d8dfeb;
}

.nsa-about-bottom > p {
  max-width: 760px;
  margin: 0 auto 0.9rem;
  color: #3a4a62;
}

.nsa-about-why {
  gap: 0.8rem !important;
  margin: 0.2rem 0 0 !important;
}

.nsa-about-why > .wp-block-column {
  position: relative;
  margin-top: 0 !important;
  padding-top: 1.3rem;
  border-top: 1px solid #d9e2ee;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon text";
  column-gap: 0.7rem;
  row-gap: 0.1rem;
  align-items: start;
  text-align: left;
}

.nsa-about-why h4 {
  grid-area: title;
  margin: 0 0 0.2rem;
  color: #1a2f56;
  padding-left: 0;
}

.nsa-about-why-icon {
  grid-area: icon;
  margin: 0 !important;
  align-self: start;
}

.nsa-about-why-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.nsa-about-why p {
  grid-area: text;
  margin: 0;
  color: #42526a;
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .nsa-about-side-image {
    min-height: 230px;
  }

  .nsa-about-cta {
    margin-top: 0.45rem;
  }

  .nsa-about-focus-item {
    padding-left: 3.25rem;
  }

  .nsa-about-focus-icon {
    width: 38px;
    height: 38px;
    left: 0;
  }

  .nsa-about-focus-icon img {
    width: 38px;
    height: 38px;
  }

  .nsa-about-bottom > h2::before,
  .nsa-about-bottom > h2::after {
    width: clamp(34px, 12vw, 80px);
  }

  .nsa-about-why > .wp-block-column {
    display: block;
    text-align: center;
    padding-top: 1rem;
  }

  .nsa-about-why-icon {
    margin: 0 auto 0.35rem !important;
  }
}

/* Final mobile card safety overrides (must stay near end). */
@media (max-width: 760px) {
  .page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column,
  .page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column > .wp-block-group.nsa-card {
    height: auto !important;
    min-height: 0 !important;
  }

  .page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-group.nsa-card-body {
    display: flex !important;
    flex-direction: column !important;
    grid-template-rows: none !important;
    flex: 0 1 auto !important;
  }

  .page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-group.nsa-card-body > p {
    flex: 0 1 auto !important;
    margin: 0 0 0.75rem !important;
  }

  .page-template-template-nsa-front-page .wp-block-group.nsa-card .wp-block-buttons.nsa-card-btn {
    margin-top: auto !important;
    align-self: stretch !important;
  }

  /* Enforce reliable visual stacking: image -> title -> text -> button. */
  .page-template-template-nsa-front-page .wp-block-group.nsa-card {
    background: #ffffff !important;
  }

  .page-template-template-nsa-front-page .wp-block-group.nsa-card .nsa-card-image {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-height: 170px;
  }

  .page-template-template-nsa-front-page .wp-block-group.nsa-card .nsa-card-title {
    position: relative !important;
    z-index: 2;
    margin: 0 !important;
    height: auto !important;
    min-height: 52px;
    background: var(--nsa-red) !important;
    color: #fff !important;
  }

  .page-template-template-nsa-front-page .wp-block-columns.nsa-card-grid > .wp-block-column:nth-child(even) .nsa-card-title {
    background: var(--nsa-blue) !important;
  }

  .page-template-template-nsa-front-page .wp-block-group.nsa-card .nsa-card-body {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding-top: 0.85rem;
  }
}

/* Small/medium screens on inner pages: prevent nav overlapping hero titles. */
@media (max-width: 1200px) {
  body:not(.page-template-template-nsa-front-page) .nsa-topbar {
    position: static;
    background: #0d1d3b;
  }

  body:not(.page-template-template-nsa-front-page) .nsa-page-hero h1 {
    padding-top: 0.9rem;
  }
}

/* Front page nav/hero balance on small screens (long labels like "Trene med klubb"). */
@media (max-width: 900px) {
  .page-template-template-nsa-front-page .nsa-topbar-inner {
    min-height: 72px;
    padding: 0.6rem 0;
  }

  .page-template-template-nsa-front-page .nsa-main-nav ul {
    gap: 0.8rem;
    row-gap: 0.45rem;
    justify-content: center;
    font-size: 0.81rem;
  }

  .page-template-template-nsa-front-page .nsa-hero .nsa-hero-content {
    padding-top: 8.8rem;
  }
}
