@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --green: #1e5c38;
  --green-dark: #143d25;
  --green-light: #2d7a50;
  --white: #ffffff;
  --bg: #f2ede3;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #e8b84b;
  --max-width: 1100px;
  --nav-height: 180px;
}

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 { line-height: 1.15; }
h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ─── */
header {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo img {
  height: 170px;
  width: auto;
}

.logo-text {
  display: none;
}

.logo-text small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ─── Navigation ─── */
nav { position: relative; }

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
  transition: background 0.15s;
}

nav ul li a:hover,
nav ul li.active > a {
  background: rgba(255,255,255,0.18);
  text-decoration: none;
}

.has-dropdown { position: relative; }

.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7rem;
  opacity: 0.8;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 220px;
  padding: 0.4rem 0;
  padding-top: calc(0.4rem + 8px);
  flex-direction: column;
}

.has-dropdown:hover .dropdown { display: flex; }

.dropdown li a {
  color: var(--text) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: 0 !important;
  font-size: 0.9rem !important;
  text-align: left !important;
}

.dropdown li a:hover {
  background: var(--bg) !important;
  color: var(--green) !important;
}

.dropdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.3rem 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 6px;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  line-height: 1;
}

/* ─── Hero ─── */
.hero {
  background: linear-gradient(to bottom right, rgba(8,35,16,0.72), rgba(14,59,32,0.58)),
              url('images/headerny.jpg') center center / cover no-repeat;
  color: white;
  padding: 6rem 1.5rem 8rem;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: left;
}

.hero h1 {
  font-size: 5rem;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  max-width: 600px;
}

.hero .subtitle {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 480px;
  margin: 0 0 2.5rem;
  font-weight: 400;
}

.hero-btns { display: flex; gap: 1rem; justify-content: flex-start; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: filter 0.15s, transform 0.1s;
}

.btn:hover { text-decoration: none; filter: brightness(1.08); transform: translateY(-1px); }

.btn-accent { background: var(--accent); color: #1a1a1a; }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.7); }
.btn-green { background: var(--green); color: white; }

/* ─── Main / Content ─── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--green);
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ─── Infobox (training info on frontpage) ─── */
.infobox {
  background: var(--green);
  color: white;
  border-radius: 8px;
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
}

.infobox .tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 0.3rem;
}

.infobox strong { font-size: 1.2rem; display: block; }
.infobox p { color: rgba(255,255,255,0.82); margin: 0; font-size: 0.9rem; }
.infobox p a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.infobox p a:hover { color: white; }
.infobox-grid { display: flex; gap: 2rem; margin-top: 0.75rem; flex-wrap: wrap; }
.infobox-item { display: flex; flex-direction: column; gap: 0.2rem; }
.infobox-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.65; }
.infobox-value { font-size: 1.15rem; font-weight: 600; }

/* ─── Cards / Grid ─── */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

/* ─── News cards ─── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.news-card {
  background: white;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition: box-shadow 0.15s, transform 0.15s;
}

.news-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-top: 4px solid var(--green);
}

.news-card-body {
  padding: 1.25rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card .date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.news-card h3 { margin-bottom: 0.6rem; font-size: 1.05rem; }

.news-card .excerpt {
  flex: 1;
  color: var(--text-muted);
  font-size: 0.91rem;
  margin-bottom: 0;
}

.news-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--green);
  font-weight: 600;
  font-size: 0.88rem;
}

/* ─── Article ─── */
.article-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.article-body { max-width: 720px; }

.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.5rem;
}

.article-body li { margin-bottom: 0.4rem; line-height: 1.7; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.back-link:hover { color: var(--green); text-decoration: none; }

/* ─── Forms ─── */
.form-wrap { max-width: 580px; }

.form-group { margin-bottom: 1.2rem; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.93rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
  appearance: auto;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
}

textarea { resize: vertical; min-height: 130px; }

.required::after { content: ' *'; color: #dc2626; }

.btn-primary {
  background: var(--green);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.btn-primary:hover { background: var(--green-dark); }

/* ─── Person cards (bestyrelse etc.) ─── */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.person-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.person-card h3 { color: var(--green); margin-bottom: 0.2rem; }
.person-card .role { color: var(--text-muted); font-size: 0.88rem; font-style: italic; margin-bottom: 0.75rem; }
.person-card .contact { font-size: 0.9rem; line-height: 1.9; }
.person-card .contact a { color: var(--green); }

/* ─── Sponsor cards ─── */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.sponsor-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.sponsor-card h3 { color: var(--green); margin-bottom: 0.75rem; font-size: 1.3rem; }
.sponsor-card .contact { margin-top: 1rem; font-size: 0.9rem; line-height: 1.9; }
.sponsor-card .contact a { color: var(--green); }

/* ─── Gallery ─── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gallery-grid a { display: block; overflow: hidden; border-radius: 8px; }

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.gallery-grid a:hover img { transform: scale(1.03); }

/* ─── Documents list ─── */
.doc-list { list-style: none; margin-top: 1rem; }

.doc-list li {
  border-bottom: 1px solid var(--border);
}

.doc-list li:last-child { border-bottom: none; }

.doc-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  color: var(--text);
  font-size: 0.95rem;
  transition: color 0.15s;
}

.doc-list a:hover { color: var(--green); text-decoration: none; }

.doc-list .icon { font-size: 1.2rem; flex-shrink: 0; }

.doc-section { margin-bottom: 2.5rem; }
.doc-section h3 {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* ─── Contact grid ─── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info-block { font-size: 0.95rem; line-height: 2; }
.contact-info-block strong { display: block; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.75rem; }
.contact-info-block strong:first-child { margin-top: 0; }

/* ─── Footer ─── */
footer {
  background: #111;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  font-size: 0.88rem;
}

footer a { color: rgba(255,255,255,0.75); }
footer a:hover { color: white; }

/* ─── Utilities ─── */
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }

/* ─── Responsive ─── */
@media (max-width: 820px) {
  :root { --nav-height: 70px; }
  .logo img { height: 60px; width: 60px; }
  nav > ul { display: none; }
  nav > ul.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--green-dark);
    padding: 0.5rem 0 1rem;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }
  nav > ul.open li a { padding: 0.75rem 1.5rem; border-radius: 0; }
  nav > ul.open li.has-dropdown > a::after { content: ' ▾'; font-size: 1rem; opacity: 1; }
  nav > ul.open li.has-dropdown.open > a::after { content: ' ▴'; font-size: 1rem; opacity: 1; }
  .has-dropdown .dropdown { display: none !important; }
  .has-dropdown.open .dropdown { display: flex !important; position: static; box-shadow: none; border: none; border-radius: 0; background: rgba(0,0,0,0.2); padding: 0; flex-direction: column; }
  .has-dropdown.open .dropdown li a { color: rgba(255,255,255,0.8) !important; padding-left: 2.5rem !important; font-size: 0.85rem !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
  .has-dropdown.open .dropdown hr { display: none; }
  .menu-toggle { display: block; }
  .logo-text small { display: none; }
  .hero h1 { font-size: 3rem; }
  .hero .subtitle { font-size: 1rem; }
  .hero::after { height: 50px; }
  .contact-layout { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .infobox { padding: 1rem 1.25rem; }
  .infobox-grid { gap: 1.25rem; }
  #tilmeld-btn { margin-left: 0 !important; width: 100%; margin-top: 0.5rem; }
}

@media (max-width: 480px) {
  main { padding: 1.5rem 1rem 3rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .hero h1 { font-size: 2.4rem; }
  .card-grid, .person-grid, .sponsor-grid { grid-template-columns: 1fr; }
}
