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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  line-height: 1.6;
  color: #3b2f2f; /* mørk brun tekst */
  background-color: #FBF7F3; /* lys beige baggrund */
}

/* Navigation */
nav {
  background: #EADBC8; /* enkel beige baggrund */
  padding: 0.7rem 0;
  position: sticky;
  top: 0;
  box-shadow: none; /* simplificeret */
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav li {
  margin: 0 2rem;
}

nav a {
  color: #3b2f2f;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
}

nav a:hover {
  color: #5c4030;
}

/* Active / selected nav link */
nav a.active {
  background: #8B5E3C; /* solid brun */
  color: #FFF9F6; /* lys tekst */
  transform: translateY(-1px);
}

/* Header */
header {
  background: #F8F4EE; /* diskret beige */
  color: #3b2f2f;
  padding: 3rem 1.5rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

header h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  text-shadow: none;
}

header p {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 5px solid white;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 1rem;
}

/* Hero section: text box with side image */
.hero {
  background: #F8F4EE;
  padding: 2rem;
  border-radius: 10px;
}
.hero-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: center;
}
.hero-textbox {
  background: #FFFFFF;
  border: 1px solid rgba(209,184,154,0.6);
  padding: 1.6rem;
  border-radius: 8px;
}
.hero-textbox h2 {
  color: #5c4030;
  margin-bottom: 0.75rem;
}
.hero-textbox p { color: #3b2f2f; font-size: 1.05rem; line-height: 1.7; }
.hero-image { display: flex; justify-content: center; }
.hero-img { width: 100%; max-width: 320px; border-radius: 8px; object-fit: cover; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; }
  .hero-img { max-width: 60%; margin: 0 auto; }
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Sections */
section {
  margin: 3rem 0;
  padding: 2rem;
  border-radius: 10px;
}

section h2 {
  color: #8B5E3C; /* brun */
  font-size: 1.8rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #D1B89A; /* svag beige kant */
  padding-bottom: 0.5rem;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: #FFFFFF; /* ren hvid boks for tydelig kontrast */
  border-radius: 10px;
  padding: 1.6rem;
  box-shadow: 0 3px 10px rgba(59, 47, 47, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(209, 184, 154, 0.6); /* diskret kant */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}

/* Align specific cards' content to the top */
.card.align-top {
  justify-content: flex-start;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(59, 47, 47, 0.08);
}

.card h3 {
  color: #5c4030;
  margin-bottom: 0.8rem;
  font-size: 1.15rem;
}

.card p {
  color: #666;
  line-height: 1.8;
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Make the grid a bit tighter on small screens for boxes */
@media (max-width: 600px) {
  .grid {
    gap: 1rem;
  }
  .card {
    padding: 1.2rem;
    min-height: auto;
  }
}

/* About Section */
.about-section {
  background: #F8F4EE; /* blød beige */
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-content img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Compact layout: boxes + image side-by-side */
.compact .compact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.compact .profile-column {
  display: flex;
  align-items: start;
  justify-content: center;
}

.side-img {
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

@media (max-width: 900px) {
  .compact .compact-layout {
    grid-template-columns: 1fr;
  }
  .side-img {
    max-width: 100%;
  }
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

/* Image uploader styles */
.image-upload-section { margin: 2rem 0; }
.image-uploader { display: flex; flex-direction: column; gap: 1rem; max-width: 720px; }
.image-preview img { max-width: 100%; max-height: 300px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.uploader-actions { display: flex; gap: 0.6rem; }
.inserted-image { margin-bottom: 1.6rem; }
.inserted-image img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.inserted-images { display:flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.inserted-images .inserted-image { flex: 1 1 calc(33.333% - 0.66rem); margin-bottom: 0; position: relative; }
.inserted-images .inserted-image img { width:100%; height: auto; display:block; }
.inserted-image .remove-image { position: absolute; top: 8px; right: 8px; background: rgba(59,47,47,0.85); color: #fff; border: none; padding: 0.3rem 0.5rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.inserted-image-top { margin-bottom: 1rem; }
.inserted-image-top img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }

@media (max-width: 800px) {
  .inserted-images .inserted-image { flex-basis: 100%; }
}

/* side thumbnails next to activity boxes */
.activities-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.side-images { display: flex; flex-direction: column; gap: 1rem; }
.side-images .side-thumb { position: relative; }
.side-images .side-thumb img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); transition: transform 0.15s ease; }
.side-images .side-thumb img:hover { transform: scale(1.03); }
.side-images .side-thumb .remove-image { position: absolute; top: 8px; right: 8px; background: rgba(59,47,47,0.85); color: #fff; border: none; padding: 0.3rem 0.5rem; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }

@media (max-width: 900px) {
  .activities-layout { grid-template-columns: 1fr; }
  .side-images { flex-direction: row; gap: 0.6rem; overflow-x: auto; }
  .side-images .side-thumb img { height: 80px; }
}

/* Hide uploader area (kept in DOM for reversibility) */
.image-upload-section { display: none !important; }

/* About page uploader (visible) */
.about-images-row { margin: 1.6rem 0; }
.about-images-row-inner { display:flex; gap:1rem; justify-content:center; align-items:start; }
.about-images-row-inner .side-thumb { width: calc(50% - 0.5rem); position: relative; }
.about-images-row-inner .side-thumb img { width:100%; height: 300px; object-fit: cover; border-radius: 8px; box-shadow: 0 12px 36px rgba(0,0,0,0.14); }
.about-images-row-inner .side-thumb .remove-image { position: absolute; top: 10px; right: 10px; background: rgba(59,47,47,0.85); color: #fff; border: none; padding: 0.35rem 0.5rem; border-radius: 6px; cursor: pointer; }

@media (max-width: 900px) {
  .about-images-row-inner { flex-direction: column; }
  .about-images-row-inner .side-thumb { width: 100%; }
  .about-images-row-inner .side-thumb img { height: 200px; }
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #eee;
  aspect-ratio: 1;
}

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

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(59, 47, 47, 0.85); /* mørk brun overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay p {
  color: white;
  font-size: 1.2rem;
  text-align: center;
  padding: 1rem;
}

/* Contact Section */
.contact-section {
  background: #F8F4EE;
  text-align: center;
}

.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #8B5E3C;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8B5E3C;
}

.btn {
  background: #8B5E3C; /* solid brun knapp */
  color: #FFF9F6;
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: 6px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 94, 60, 0.12);
}

/* Footer */
footer {
  background: #3b2f2f; /* mørk brun */
  color: #F8F4EE;
  text-align: center;
  padding: 1.6rem;
  margin-top: 3rem;
}

footer p {
  margin: 0.5rem 0;
}

.social-links {
  margin-top: 1rem;
}

.social-links a {
  color: #8B5E3C;
  margin: 0 1rem;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.social-links a:hover {
  color: #5c4030;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  nav ul {
    flex-direction: column;
  }

  nav li {
    margin: 0.5rem 0;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  section h2 {
    font-size: 1.8rem;
  }
}
