:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --primary: #084c63;
  --primary-light: #0b6380;
  --accent: #006837;
  --accent-hover: #004d29;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 6px;
  --max-width: 1120px;
}

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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 54px;
}

.brand img {
  display: block;
  height: 54px;
  width: auto;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Hero-sektion */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 2rem 0;
  border-bottom: 4px solid var(--accent);
}

.hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1rem;
  color: #cbd5e1;
  max-width: 680px;
}

/* Hovedindhold */
main {
  flex: 1;
  padding: 1.75rem 0;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.content-card h2 {
  color: var(--primary);
  margin: 1.25rem 0 0.5rem;
  font-size: 1.5rem;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card p {
  margin-bottom: 1.15rem;
}

.content-card ul {
  margin: 0 0 1.25rem 1.5rem;
}

.content-card li {
  margin-bottom: 0.4rem;
}

/* Kontaktformular */
.contact-form {
  margin-top: 2rem;
  max-width: 640px;
  display: grid;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background: #f8fafc;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}

.hp-field {
  display: none !important;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
  justify-self: start;
}

.btn:hover {
  background: var(--accent-hover);
}

/* Beskedbokse */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 1.35rem 0;
  font-size: 0.9rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
    gap: 1rem;
  }
  .main-nav ul {
    gap: 1.1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .content-card {
    padding: 1.5rem;
  }
}

/* Team-kort på Om os */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.team-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.team-card img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  background: #e2e8f0;
  margin-bottom: 0.45rem;
  border: 3px solid var(--primary-light);
}

.team-card h3 {
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

.team-card p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

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

.project-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.project-gallery img:hover {
  transform: scale(1.02);
}

.project-list {
  list-style: none !important;
  margin-left: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem !important;
}

.project-list li a {
  display: block;
  padding: 1.15rem 1.25rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease;
}

.project-list li a:hover {
  background: #f1f5f9;
  transform: translateX(3px);
}

/* Dynamiske projektkort på /projekter */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.project-card-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #e2e8f0;
}

.project-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.project-card-body h3 {
  color: var(--primary);
  font-size: 1rem;
  margin: 0;
}

.project-card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.project-card-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

/* Dynamisk hero-baggrund med mørkt petroleums-overlay og teknisk gitter */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: background-image 1.2s ease-in-out;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(8, 76, 99, 0.72) 0%, rgba(11, 99, 128, 0.82) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 28px);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* Mørk CAD-grafik & koordinatgitter i hero-banneret */
.hero {
  position: relative;
  background-image: url('/assets/img/cad-bg.png');
  background-size: cover;
  background-position: center 25%;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Vi overlejrer det blå mønster med vores brand-petroleum, så det står flot og dæmpet */
  background: 
    linear-gradient(135deg, rgba(8, 76, 99, 0.72) 0%, rgba(11, 99, 128, 0.68) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 32px);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}
