/*
Theme Name: Oddermosestrand
Theme URI: https://oddermosestrand.dk
Description: Skræddersyet tema til Grundejerforeningen Oddermosestrand – 46 sommerhuse ved Hjelm Bugt på Møn.
Version: 1.0.0
Author: Grundejerforeningen Oddermosestrand
Author URI: https://oddermosestrand.dk
Text Domain: oddermosestrand
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
  --sea: #1a5276;
  --sea-light: #2980b9;
  --sand: #f5e6d0;
  --sand-dark: #d4b896;
  --dune: #8b7355;
  --grass: #3d6b4f;
  --grass-light: #5a9e6f;
  --sky: #e8f1f5;
  --storm: #34495e;
  --white: #fefefa;
  --text: #2c3e3a;
  --text-light: #5d6d7e;
  --accent: #c0392b;
  --warm: #e67e22;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1100px;
  --content-width: 750px;
  --narrow-width: 600px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--sea-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3.5vw, 34px); }
h3 { font-size: 20px; }
h4 { font-size: 17px; }

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* ========================================
   Layout
   ======================================== */
.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.content-width {
  max-width: var(--content-width);
  margin: 0 auto;
}

.narrow-width {
  max-width: var(--narrow-width);
  margin: 0 auto;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  background: linear-gradient(135deg, var(--sea) 0%, var(--storm) 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}

.site-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand-dark), var(--warm));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--sea);
  flex-shrink: 0;
}

.site-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
}

.site-subtitle {
  font-size: 11px;
  opacity: 0.75;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

/* Navigation */
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 4px;
}

.main-navigation a {
  display: block;
  color: var(--white);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.2s;
  white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
  background: rgba(255,255,255,0.15);
  font-weight: 600;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 26px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
}

/* Mobile menu */
@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--storm);
    padding: 12px 24px 20px;
    gap: 4px;
  }
  .main-navigation.toggled ul {
    display: flex;
  }
  .main-navigation a {
    font-size: 15px;
    padding: 10px 12px;
  }
}

/* ========================================
   Hero Section (Front Page)
   ======================================== */
.hero {
  background: linear-gradient(160deg, var(--sea) 0%, #1a6b8a 40%, var(--grass-light) 100%);
  color: var(--white);
  padding: 80px 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 20px,
    rgba(255,255,255,0.5) 20px, rgba(255,255,255,0.5) 22px
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 16px;
  font-family: var(--font-body);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 17px;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.hero-wave {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 20px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--warm);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-primary:hover {
  background: #d35400;
  color: var(--white);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: var(--white);
}

.btn-outline {
  background: none;
  border: 1px solid var(--sea);
  color: var(--sea);
}

.btn-outline:hover {
  background: var(--sea);
  color: var(--white);
}

/* ========================================
   Section Styling
   ======================================== */
.page-section {
  padding: 50px 24px 60px;
}

.page-section--sky {
  background: var(--sky);
}

.page-section--white {
  background: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  margin-bottom: 8px;
}

.section-title p {
  font-size: 15px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--warm);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ========================================
   Cards
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border-top: 3px solid var(--sea);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.card--warm { border-top-color: var(--warm); }
.card--grass { border-top-color: var(--grass); }
.card--accent { border-top-color: var(--accent); }
.card--sea-light { border-top-color: var(--sea-light); }

.card__icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card__body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-light);
}

/* ========================================
   News Feed
   ======================================== */
.news-item {
  background: var(--white);
  border-radius: 10px;
  padding: 18px 22px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.news-item:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.news-item__date {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  padding-top: 3px;
  min-width: 80px;
}

.news-item__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.news-item__title a {
  color: var(--text);
}

.news-item__title a:hover {
  color: var(--sea-light);
}

.news-item__excerpt {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Full news items (archive page) */
.news-full {
  background: var(--white);
  border-radius: 12px;
  padding: 24px 26px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.news-full__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.news-tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  color: var(--white);
  background: var(--sea);
}

.news-tag--varsel { background: var(--accent); }
.news-tag--aktiviteter { background: var(--grass); }
.news-tag--lokalt { background: var(--dune); }
.news-tag--nyhedsbrev { background: var(--warm); }

.news-full__date {
  font-size: 13px;
  color: var(--text-light);
}

.news-full__title {
  font-family: var(--font-display);
  font-size: 19px;
  margin-bottom: 8px;
}

.news-full__body {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ========================================
   Timeline (Kystbeskyttelse)
   ======================================== */
.timeline-item {
  display: flex;
  gap: 18px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.timeline-item__year {
  min-width: 76px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sea);
  padding-top: 3px;
}

.timeline-item--highlight .timeline-item__year {
  color: var(--accent);
}

.timeline-item__dot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-item__dot span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sea);
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-item--highlight .timeline-item__dot span {
  background: var(--accent);
}

.timeline-item__line {
  width: 2px;
  flex: 1;
  min-height: 30px;
  background: rgba(26, 82, 118, 0.2);
}

.timeline-item__text {
  font-size: 14px;
  line-height: 1.6;
}

.timeline-item--highlight .timeline-item__text {
  background: rgba(192, 57, 43, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
}

/* ========================================
   Alert Banner
   ======================================== */
.alert-banner {
  background: linear-gradient(135deg, rgba(192,57,43,0.08), rgba(230,126,34,0.08));
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.alert-banner__icon {
  font-size: 24px;
  flex-shrink: 0;
}

.alert-banner__text {
  font-size: 14px;
  line-height: 1.6;
}

/* ========================================
   Document List
   ======================================== */
.doc-category {
  background: var(--white);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.doc-category__title {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--sky);
  font-size: 14px;
}

.doc-item:first-of-type {
  border-top: none;
}

.doc-item__badge {
  background: var(--sky);
  color: var(--sea);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.doc-item__badge:hover {
  background: var(--sea);
  color: var(--white);
}

/* ========================================
   Board Members
   ======================================== */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.board-member {
  background: var(--white);
  border-radius: 10px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.board-member__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand), var(--sand-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 22px;
}

.board-member__name {
  font-size: 15px;
  font-weight: 600;
}

.board-member__role {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ========================================
   Contact Page
   ======================================== */
.contact-block {
  background: var(--white);
  border-radius: 12px;
  padding: 28px 26px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.contact-block h3 {
  font-family: var(--font-display);
  margin-bottom: 16px;
  color: var(--text);
}

.contact-info {
  font-size: 15px;
  line-height: 1.8;
}

.links-list {
  font-size: 14px;
  line-height: 2;
}

.links-list a {
  display: block;
}

.map-placeholder {
  margin-top: 16px;
  background: var(--sky);
  border-radius: 10px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 14px;
}

/* ========================================
   Password Protection
   ======================================== */
.password-gate {
  max-width: 400px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.password-gate p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
  text-align: center;
}

.password-gate label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

.password-gate input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--sand-dark);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.password-gate input[type="password"]:focus {
  border-color: var(--sea);
}

.password-gate button,
.password-gate input[type="submit"] {
  width: 100%;
  background: var(--sea);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
}

.password-gate button:hover,
.password-gate input[type="submit"]:hover {
  background: var(--storm);
}

.password-gate .error-msg {
  color: var(--accent);
  font-size: 13px;
  text-align: center;
  margin-bottom: 12px;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--storm);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px 30px;
  font-size: 13px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--white);
  margin-bottom: 10px;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-nav {
  list-style: none;
  line-height: 2;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  opacity: 0.5;
}

/* ========================================
   WordPress-specific
   ======================================== */
.wp-block-image img {
  border-radius: 8px;
}

.entry-content h2 {
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.entry-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.entry-content ul, .entry-content ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.entry-content li {
  margin-bottom: 0.3em;
}

.entry-content blockquote {
  border-left: 3px solid var(--warm);
  padding-left: 20px;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--text-light);
}

/* Single post */
.single-post-header {
  margin-bottom: 30px;
}

.single-post-header h1 {
  font-size: clamp(24px, 3.5vw, 34px);
  margin-bottom: 10px;
}

.single-post-meta {
  font-size: 14px;
  color: var(--text-light);
}

/* Pagination */
.pagination {
  text-align: center;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 4px;
  border-radius: 6px;
  font-size: 14px;
}

.pagination .current {
  background: var(--sea);
  color: var(--white);
}

.pagination a {
  background: var(--white);
  border: 1px solid var(--sand-dark);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 600px) {
  .hero {
    padding: 50px 20px 10px;
  }

  .news-item {
    flex-direction: column;
    gap: 6px;
  }

  .news-item__date {
    min-width: auto;
  }

  .timeline-item {
    gap: 10px;
  }

  .timeline-item__year {
    min-width: 60px;
    font-size: 12px;
  }

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

  .board-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
