/* ==========================================================================
   Sejlklubben Fjorden — style.css
   Nyt, moderne designsystem. Farvepalet inspireret af hav, himmel og træ.
   ========================================================================== */

:root {
  --color-navy-900: #0b2f4a;
  --color-navy-800: #123c5c;
  --color-navy-700: #1a4d73;
  --color-teal-500: #2a9d8f;
  --color-teal-400: #3db8a8;
  --color-sand-100: #f7f3ea;
  --color-sand-200: #eee6d3;
  --color-white: #ffffff;
  --color-ink: #1c2b33;
  --color-muted: #5a6b74;
  --color-border: #e1e6e9;

  --font-heading: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(11, 47, 74, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 47, 74, 0.12);
  --container-width: 1140px;
}

/* --- Reset / base ------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.6;
}

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

a {
  color: var(--color-teal-500);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy-900);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* --- Header / navigation -------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy-900);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  max-width: var(--container-width);
  margin-inline: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-white);
}

.brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* Klubbens stander i en hvid cirkel med sort ramme. Størrelsen styres med --badge-size. */
.stander-badge {
  --badge-size: 64px;
  width: var(--badge-size);
  height: var(--badge-size);
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stander-badge img {
  display: block;
  width: 64%;
  height: auto;
}

.brand__mark {
  --badge-size: 44px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--color-sand-100);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.site-nav a.is-active {
  background: var(--color-teal-500);
  color: var(--color-white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle__bar {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  background-image:
    linear-gradient(135deg, rgba(11, 47, 74, 0.88), rgba(18, 60, 92, 0.72) 55%, rgba(42, 157, 143, 0.55)),
    url("../img/frontpage-hero.jpg");
  background-size: cover;
  background-position: center 68%;
  background-repeat: no-repeat;
  color: var(--color-white);
  padding: 96px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 60px;
  background: var(--color-white);
  clip-path: polygon(0 100%, 100% 100%, 100% 40%, 75% 70%, 50% 40%, 25% 70%, 0 40%);
}

.hero__inner {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 640px;
  margin-bottom: 18px;
}

.hero p {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--color-sand-100);
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* --- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.btn--primary {
  background: var(--color-teal-500);
  color: var(--color-white);
}

.btn--primary:hover {
  background: var(--color-teal-400);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--color-white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--danger {
  background: transparent;
  border-color: #c0392b;
  color: #c0392b;
}

.btn--danger:hover {
  background: rgba(192, 57, 43, 0.08);
}

/* --- Sections ----------------------------------------------------------- */

.section {
  padding: 72px 0;
}

.section--sand {
  background: var(--color-sand-100);
}

.section__header {
  max-width: 640px;
  margin-bottom: 40px;
}

.section__eyebrow {
  color: var(--color-teal-500);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.section__header p {
  color: var(--color-muted);
}

/* --- Card grid ------------------------------------------------------------ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--color-muted);
  margin: 0;
}

/* --- Page header (undersider) ------------------------------------------ */

.page-header {
  background: var(--color-navy-900);
  color: var(--color-white);
  padding: 56px 0;
}

.page-header h1 {
  color: var(--color-white);
  margin-bottom: 8px;
}

.page-header p {
  color: var(--color-sand-100);
  margin: 0;
  max-width: 640px;
}

/* --- Tables (bestyrelse, priser) ---------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
}

th, td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}

thead th {
  background: var(--color-sand-200);
  color: var(--color-navy-900);
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* --- Board / person cards ------------------------------------------------ */

.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.person-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.person-card__avatar {
  margin: 0 auto 14px;
}

.person-card h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.person-card .role {
  color: var(--color-teal-500);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.person-card .placeholder-note {
  color: var(--color-muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* --- News / aktuelt list ------------------------------------------------- */

.news-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Aktuelt: periodetekst og tydelig markering, når listen skifter årstal. */
.aktuelt-periode {
  color: var(--color-muted);
  margin: 0 0 28px;
}

.year-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-size: 1.6rem;
  color: var(--color-navy-900);
}

.year-divider:not(:first-child) {
  margin-top: 22px;
}

.year-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--color-teal-500);
  opacity: 0.5;
}

.news-item {
  display: flex;
  gap: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.news-item__date {
  flex: 0 0 auto;
  width: 84px;
  text-align: center;
  background: var(--color-sand-200);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  color: var(--color-navy-900);
  font-family: var(--font-heading);
}

.news-item__date .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.news-item__date .month {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.news-item h3 {
  margin-bottom: 6px;
}

.news-item p {
  color: var(--color-muted);
  margin: 0;
}

.news-item__toggle summary {
  cursor: pointer;
  color: var(--color-teal-500);
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
}

.news-item__toggle summary::-webkit-details-marker {
  display: none;
}

.news-item__toggle summary::before {
  content: '+ ';
}

.news-item__toggle[open] summary::before {
  content: '– ';
}

.news-item__toggle summary:hover {
  text-decoration: underline;
}

.news-item__toggle p {
  margin-top: 10px;
}

/* Reservationer (udlejning af klubhuset) — markeret rødligt, så det er tydeligt
   at det ikke er et almindeligt klub-event. */
.news-item--reservation {
  background: #fdf4f3;
  border-color: #f0b8b0;
}

.news-item--reservation .news-item__date {
  background: #fbdedb;
  color: #9b2c2c;
}

.news-item--reservation h3 {
  color: #9b2c2c;
}

.news-item--reservation .news-item__toggle summary {
  color: #c0392b;
}

/* --- Gallery -------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-navy-700), var(--color-teal-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.8rem;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

a.gallery-item {
  box-shadow: var(--shadow-sm);
}

a.gallery-item:hover img,
a.gallery-item:focus-visible img {
  transform: scale(1.04);
}

/* YouTube-videoer på billedsiden (16:9, to pr. række på store skærme). */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.video-item {
  margin: 0;
}

.video-item iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-navy-900);
  box-shadow: var(--shadow-sm);
}

.video-item figcaption {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(11, 47, 74, 0.88);
}

.lightbox__img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.lightbox__btn {
  position: fixed;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__close {
  top: 16px;
  right: 16px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev {
  left: 16px;
}

.lightbox__next {
  right: 16px;
}

/* --- Info blocks (find os / kontakt) -------------------------------------- */

.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-list .icon {
  flex: 0 0 auto;
  font-size: 1.2rem;
}

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Footer ---------------------------------------------------------------- */

.site-footer {
  background: var(--color-navy-900);
  color: var(--color-sand-100);
  margin-top: 40px;
}

.site-footer__inner {
  max-width: var(--container-width);
  margin-inline: auto;
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.site-footer h3 {
  color: var(--color-white);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0 0 10px;
  color: var(--color-sand-100);
}

.site-footer a {
  color: var(--color-sand-100);
}

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

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer__bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 860px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy-900);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 2px;
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .hero {
    padding: 64px 0 96px;
  }

  .section {
    padding: 56px 0;
  }

  .news-item {
    flex-direction: column;
  }

  .news-item__date {
    width: auto;
    align-self: flex-start;
  }
}

/* --- Medlemslogin: "Log ind" i hovedmenuen + medlemsbjælke under menuen -------- */

.site-nav a.site-nav__login:not(.is-active) {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.member-bar {
  background: var(--color-navy-800);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.member-bar__inner {
  max-width: var(--container-width);
  margin-inline: auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.88rem;
}

.member-bar__user {
  color: var(--color-sand-100);
  opacity: 0.75;
  white-space: nowrap;
}

.member-bar__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.member-bar__nav--admin {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.member-bar__label {
  color: var(--color-teal-400);
  font-weight: 600;
  margin-right: 4px;
}

.member-bar__nav a {
  color: var(--color-sand-100);
  padding: 5px 10px;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.member-bar__nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.member-bar__nav a.is-active {
  background: var(--color-teal-500);
  color: var(--color-white);
}

.member-bar__logout {
  margin: 0 0 0 auto;
}

.member-bar__logout button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--color-sand-100);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.member-bar__logout button:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 760px) {
  .member-bar__inner {
    padding: 6px 16px;
  }

  .member-bar__nav--admin {
    padding-left: 0;
    border-left: none;
  }
}
