/* ============================================
   BFS – Brancheforeningen for Storkøkken- & Bageriudstyr
   Stylesheet
   ============================================ */

/* ---------- Custom properties ---------- */
:root {
  --primary:      #1a2e4a;
  --primary-dark: #0f1e32;
  --accent:       #0066cc;
  --accent-hover: #0055aa;
  --bg:           #f5f7fa;
  --white:        #ffffff;
  --text:         #1a1a2e;
  --text-muted:   #6b7280;
  --border:       #e2e8f0;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.1);
  --radius:       8px;
  --radius-lg:    16px;
  --max-width:    1140px;
  --nav-height:   72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- Container ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: var(--white); }
.btn-lg { padding: 13px 28px; font-size: 1rem; }

/* ---------- Header / Navigation ---------- */
header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
header .container { display: flex; align-items: center; height: var(--nav-height); }
nav {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-icon {
  height: 61px;
  width: auto;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.nav-logo-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.nav-links .btn-nav-login {
  background: var(--accent);
  color: var(--white);
  margin-left: 8px;
}
.nav-links .btn-nav-login:hover { background: var(--accent-hover); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: var(--primary);
  color: var(--white);
  padding: 80px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(0,102,204,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Hero stat strip */
.hero-stats {
  background: var(--primary-dark);
  padding: 20px 0;
}
.hero-stats .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  divide: var(--border);
}
.stat-item { padding: 12px 20px; }
.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Section ---------- */
section { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.section-header p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-white { background: var(--white); }
.section-bg { background: var(--bg); }

/* ---------- Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(0,102,204,0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.4rem;
}
.card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; color: var(--primary); }
.card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ---------- Nyheder ---------- */
.nyheder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.nyhed-kort {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.nyhed-kort:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.nyhed-img {
  height: 180px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 2rem;
}
.nyhed-img img { width: 100%; height: 100%; object-fit: cover; }
.nyhed-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.nyhed-dato {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.nyhed-body h3 { font-size: 1rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; line-height: 1.4; }
.nyhed-body p { font-size: 0.875rem; color: var(--text-muted); flex: 1; }

/* ---------- Bestyrelse ---------- */
.bestyrelse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 860px;
  margin: 0 auto;
}
.bestyrelse-kort {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.bestyrelse-foto {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg);
  margin: 0 auto 20px;
  overflow: hidden;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}
.bestyrelse-foto img { width: 100%; height: 100%; object-fit: cover; }
.bestyrelse-navn { font-size: 1rem; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.bestyrelse-rolle { font-size: 0.8rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.bestyrelse-firma { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 12px; }
.bestyrelse-kontakt { font-size: 0.8rem; color: var(--text-muted); }
.bestyrelse-kontakt a { color: var(--accent); }

/* ---------- Medlemmer ---------- */
.medlemmer-search {
  max-width: 400px;
  margin: 0 auto 32px;
}
.medlemmer-search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
  transition: border-color 0.2s;
}
.medlemmer-search input:focus { outline: none; border-color: var(--accent); }

.medlemmer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.medlem-kort {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.medlem-kort:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.medlem-logo {
  height: 56px;
  display: flex;
  align-items: center;
}
.medlem-logo img { max-height: 48px; max-width: 140px; object-fit: contain; }
.medlem-logo-placeholder {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 12px;
  text-align: center;
  width: 100%;
  max-width: 140px;
  letter-spacing: 0.03em;
}
.medlem-navn { font-size: 0.975rem; font-weight: 600; color: var(--primary); line-height: 1.3; }
.medlem-adresse { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.medlem-tlf { font-size: 0.82rem; color: var(--text-muted); }
.medlem-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.medlem-links a {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  transition: color 0.2s;
}
.medlem-links a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Om foreningen ---------- */
.om-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.om-grid img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.om-text h2 { font-size: 1.75rem; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.om-text p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.7; }

/* ---------- Kontakt strip ---------- */
.kontakt-strip {
  background: var(--primary);
  color: var(--white);
  padding: 48px 0;
  text-align: center;
}
.kontakt-strip h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.kontakt-strip p { color: rgba(255,255,255,0.75); margin-bottom: 24px; }
.kontakt-info {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.kontakt-info a { color: rgba(255,255,255,0.9); font-size: 0.95rem; transition: color 0.2s; }
.kontakt-info a:hover { color: var(--white); text-decoration: none; }
.kontakt-info span { color: rgba(255,255,255,0.5); font-size: 0.85rem; display: block; margin-bottom: 4px; }

/* ---------- Footer ---------- */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.6);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { color: var(--white); font-weight: 700; font-size: 0.95rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); text-decoration: none; }
.footer-copy { font-size: 0.8rem; }

/* ---------- Page header (indre sider) ---------- */
.page-header {
  background: var(--primary);
  color: var(--white);
  padding: 48px 0 52px;
  text-align: center;
}
.page-header h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; margin-bottom: 10px; }
.page-header p { color: rgba(255,255,255,0.75); max-width: 520px; margin: 0 auto; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: calc(100vh - var(--nav-height) - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 6px; color: var(--primary); }
.login-card .sub { color: var(--text-muted); margin-bottom: 32px; font-size: 0.9rem; }
.login-form { text-align: left; }
.login-form label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--text); }
.login-form input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 1rem; margin-bottom: 18px;
  box-sizing: border-box; transition: border-color 0.2s;
}
.login-form input:focus { outline: none; border-color: var(--accent); }
.login-form .btn { width: 100%; margin-top: 4px; }
.login-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  border-radius: var(--radius); padding: 12px 16px; font-size: 0.875rem;
  margin-bottom: 16px; display: none;
}
.login-success {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d;
  border-radius: var(--radius); padding: 12px 16px; font-size: 0.875rem;
  margin-bottom: 16px; display: none;
}

/* ---------- Indholdsboks (login-område) ---------- */
.indhold-wrap { padding: 48px 0; }
.indhold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.dokument-kort {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s;
}
.dokument-kort:hover { box-shadow: var(--shadow-md); }
.dokument-ikon { font-size: 1.8rem; flex-shrink: 0; }
.dokument-info h3 { font-size: 0.9rem; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.dokument-info p { font-size: 0.8rem; color: var(--text-muted); }
.dokument-info a { font-size: 0.85rem; color: var(--accent); font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-links .btn-nav-login { margin-left: 0; margin-top: 8px; text-align: center; }

  .hero { padding: 56px 0 64px; }
  .hero-stats .container { grid-template-columns: repeat(3, 1fr); }

  .om-grid { grid-template-columns: 1fr; }
  .om-grid img { display: none; }

  .login-card { padding: 32px 24px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  .kontakt-info { flex-direction: column; gap: 16px; }

  section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .hero-stats .container { grid-template-columns: 1fr; }
  .stat-item { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .stat-item:last-child { border-bottom: none; }
  .hero-btns { flex-direction: column; align-items: center; }
  .bestyrelse-grid { grid-template-columns: 1fr; max-width: 420px; }
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
