/* =========================================================
   Digefolket – Stubbe Strandvej Grundejerforening
   Stylesheet  |  alle tekster på dansk
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ── Palet & globale variabler ─────────────────────────── */
:root {
  --sand:        #f5f0e8;
  --sand-dark:   #e8e0d0;
  --dige:        #3a5a40;      /* mosgrøn – diger og enge */
  --dige-light:  #5c7a62;
  --hav:         #2a4a6b;      /* dyb fjordblå */
  --hav-light:   #4a7a9b;
  --text:        #1e2a1e;
  --text-light:  #4a5040;
  --accent:      #c8860a;      /* gammel guld / messing */
  --white:       #ffffff;
  --rule:        rgba(58, 90, 64, 0.25);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Helvetica Neue', sans-serif;

  --max-w: 960px;
  --radius: 3px;
}

/* ── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--sand);
}

img { display: block; max-width: 100%; height: auto; }
a   { color: var(--hav); text-decoration: none; }
a:hover { color: var(--dige); text-decoration: underline; }

/* ── Typografi ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--dige);
}
h2 { font-size: 1.65rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.2rem; color: var(--hav); margin-bottom: 0.35rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Topbar / navigation ───────────────────────────────── */
.topbar {
  background: var(--dige);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.4rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--sand);
  letter-spacing: 0.03em;
  font-style: italic;
}
.site-logo span { color: var(--accent); font-style: normal; font-weight: 600; }

nav { display: flex; gap: 0.25rem; }

nav a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sand-dark);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  transition: background 0.18s, color 0.18s;
}
nav a:hover, nav a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  text-decoration: none;
}
nav a.nav-grundejer {
  background: var(--accent);
  color: var(--white);
  border-radius: var(--radius);
}
nav a.nav-grundejer:hover {
  background: #a06d08;
}

/* ── Hero / bannerbillede ──────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: clamp(280px, 42vw, 520px);
  overflow: hidden;
  background: var(--hav);   /* fallback */
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

/* placeholder vist når billede mangler */
.hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--hav) 0%, var(--dige) 100%);
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(255,255,255,0.35);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.0)  50%,
    rgba(0,0,0,0.35) 100%);
}

.hero-caption {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--max-w), 90%);
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-caption h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--white);
  font-weight: 400;
  font-style: italic;
}
.hero-caption .tagline {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  font-family: var(--font-body);
  margin-bottom: 0;
}

/* ── Sidens indhold (wrapper) ──────────────────────────── */
.page-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto auto;
  gap: 2.5rem 3rem;
}

/* ── Velkomstsektion ───────────────────────────────────── */
.welcome {
  grid-column: 1;
  grid-row: 1;
}

.section-rule {
  width: 3rem;
  height: 3px;
  background: var(--accent);
  border: none;
  margin: 0.6rem 0 1.2rem;
}

.welcome p { color: var(--text-light); font-size: 1.05rem; }

/* ── Nyheder / begivenheder ────────────────────────────── */
.news {
  grid-column: 1;
  grid-row: 2;
}

.news-list { list-style: none; }

.news-list li {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0 1.2rem;
  align-items: start;
}
.news-list li:last-child { border-bottom: 1px solid var(--rule); }

.news-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.1rem;
  font-family: var(--font-body);
}

.news-body h3 { font-size: 1rem; color: var(--dige); margin-bottom: 0.2rem; }
.news-body p  { font-size: 0.9rem; color: var(--text-light); margin: 0; line-height: 1.55; }

/* ── Praktisk information (sidebar) ───────────────────── */
.practical {
  grid-column: 2;
  grid-row: 1 / 3;
}

.practical-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 2px 12px rgba(58,90,64,0.07);
  position: sticky;
  top: 4.5rem;
}

.practical-card h2 { font-size: 1.25rem; }

.contact-list { list-style: none; margin-top: 1.1rem; }

.contact-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--sand-dark);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.contact-list li:first-child { border-top: 1px solid var(--sand-dark); }

.contact-label {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}
.contact-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 400;
}
.contact-value a { color: var(--hav); }
.contact-value a:hover { color: var(--dige); }

.grundejer-btn {
  display: block;
  margin-top: 1.6rem;
  background: var(--dige);
  color: var(--white);
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.18s;
}
.grundejer-btn:hover { background: var(--dige-light); text-decoration: none; color: var(--white); }
.grundejer-btn .lock { margin-right: 0.4em; }

/* ── Sidefod ───────────────────────────────────────────── */
footer {
  background: var(--dige);
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  text-align: center;
  padding: 1.4rem 1.5rem;
}
footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: var(--white); }
footer .footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* ── Grundejersider (restricted) ───────────────────────── */
.restricted-notice {
  max-width: 560px;
  margin: 4rem auto;
  padding: 2.5rem 2rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  text-align: center;
}
.restricted-notice .lock-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.restricted-notice h2 { margin-bottom: 0.4rem; }
.restricted-notice p  { color: var(--text-light); font-size: 0.95rem; }
.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--hav);
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 680px) {
  .page-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 2rem;
    padding: 2rem 1rem 3rem;
  }
  .welcome  { grid-column: 1; grid-row: 1; }
  .news     { grid-column: 1; grid-row: 3; }
  .practical { grid-column: 1; grid-row: 2; }

  .practical-card { position: static; }

  .topbar-inner { flex-direction: column; height: auto; padding: 0.6rem 0; gap: 0.4rem; }
  nav { flex-wrap: wrap; justify-content: center; }

  .hero { height: clamp(200px, 55vw, 340px); }


}

/* ── Dokumentliste (grundejersiden) ───────────────────── */
.doc-list { list-style: none; margin-top: 0.5rem; }

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

.doc-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.5rem;
  color: var(--text);
  transition: background 0.15s;
  border-radius: var(--radius);
}
.doc-link:hover {
  background: var(--sand-dark);
  text-decoration: none;
  color: var(--text);
}

.doc-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }

.doc-info { display: flex; flex-direction: column; gap: 0.1rem; }

.doc-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--hav);
}
.doc-link:hover .doc-title { color: var(--dige); }

.doc-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ── Nyheder – tilføj til bunden af style.css ─────────── */
.news-alle {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.news-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
.news-link:hover { color: var(--dige); }

/* ── Print ─────────────────────────────────────────────── */
@media print {
  .topbar { display: none; }
/*
  .hero { height: 300px; }
  .hero-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
*/
/*
  .practical-card { position: static; box-shadow: none; }
  .page-content { grid-template-columns: 1fr; }
  .practical { grid-column: 1; }
*/
  .page-content {
    display: block;        /* abandon grid entirely for print */
    padding: 1rem 0;
  }

  .welcome, .news {
    display: block;
    width: 100%;
    margin-bottom: 2rem;
  }

  .practical {
    display: block;
    width: 100%;
  }

  .practical-card {
    position: static;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .hero { height: 300px; page-break-after: avoid; }
  .hero-img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .hero-overlay {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

}
