:root {
  /* Shared Variables */
  --sticky-h: 72px;
  --clamp-lines: 2;
  --fade-height: 2.5rem;
  --gap: 1.5rem;
  /* Increased gap for better separation */
  --padding-box: 2rem;
  /* Increased padding for breathing room */
  --radius: 12px;
  /* Softer, more modern radius */

  /* Shadows - Layered for depth */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Global Colors */
  --bg-body: #f8fafc;
  /* Slightly cooler/cleaner white-ish grey */
  --bg-card: #ffffff;
  --bg-full: #f0f9ff;
  /* Very subtle blue tint */

  /* Text Colors */
  --text-main: #1e293b;
  /* Slate 800 - softer than pure black */
  --text-muted: #64748b;
  /* Slate 500 */

  /* Utility Colors (used on frontpage for specific cards/buttons) */
  --green: #10b981;
  /* Emerald 500 - more vibrant */
  --green-dark: #059669;
  --blue: #3b82f6;
  /* Blue 500 - improved vibrancy */
  --blue-dark: #2563eb;
}

/* Themes */
.theme-sand {
  --primary: #a39074;
  /* Refined sand */
  --primary-dark: #8c7a6b;
  --primary-hover: #968576;
}

.theme-green {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-hover: #047857;
}

.theme-blue {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-hover: #1d4ed8;
}

/* Reset & Typography */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  /* Crisp text */
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  color: #0f172a;
  /* Slate 900 */
  letter-spacing: -0.025em;
  /* Tighter headings */
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Layout */
.container {
  max-width: 960px;
  /* Slightly narrower for better reading measure */
  margin: 0 auto;
  padding: 2rem;
  padding-bottom: calc(var(--sticky-h) + 4rem);
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  margin-top: 1.5rem;
}

/* Header & Profile */
header .profile h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

header .profile .subtitle {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
}

.offer {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-main);
  line-height: 1.5;
}

.profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.profile-img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
}

/* Components */

/* Full Box */
.full-box {
  position: relative;
  margin-top: 2rem;
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  /* Thinner accent border */
  padding: var(--padding-box);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.full-box:hover {
  box-shadow: var(--shadow-lg);
}

.bg-blue-light {
  background-color: var(--bg-full);
}

/* Half Box (Cards) */
.half-box {
  position: relative;
  flex: 1 1 calc(50% - var(--gap));
  background-color: var(--bg-card);
  padding: var(--padding-box);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.04);
  /* Subtle border definition */
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

/* Index.html specific card style override */
.theme-sand .half-box {
  border-left: 1px solid rgba(0, 0, 0, 0.04);
  border-top: 4px solid var(--primary);
}

.half-box:hover,
.theme-sand .half-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Specific borders for frontpage cards */
.half-box.card-green {
  border-top-color: var(--green);
}

.half-box.card-blue {
  border-top-color: var(--blue);
}

/* Collapsible / Clamped Text */
.half-box[data-collapsible] {
  padding-bottom: 4rem;
}

.half-box .half-body {
  position: relative;
}

.half-box .half-body.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: var(--clamp-lines);
  line-clamp: var(--clamp-lines);
}

.half-box .half-body.is-clamped::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fade-height);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  pointer-events: none;
}

.half-toggle {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.half-toggle:hover,
.half-toggle:focus-visible {
  text-decoration: underline;
  background-color: rgba(0, 0, 0, 0.03);
  outline: none;
}

/* Buttons */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  /* Slightly more rounded */
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.cta-button:hover,
.cta-button:focus-visible {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  outline: none;
}

.cta-button:active {
  transform: translateY(0);
}

/* Utility buttons */
.btn-green {
  background-color: var(--green) !important;
}

.btn-green:hover {
  background-color: var(--green-dark) !important;
}

.btn-blue {
  background-color: var(--blue) !important;
}

.btn-blue:hover {
  background-color: var(--blue-dark) !important;
}

.btn-dark {
  background-color: #334155 !important;
  /* Slate 700 */
}

.btn-dark:hover {
  background-color: #1e293b !important;
  /* Slate 800 */
}

/* Intro Box (used in subpages) */
.intro {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Footer & Contact */
.contact {
  position: static;
  width: 100%;
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.95rem;
  margin: 3rem 0 0;
}

.contact a {
  color: white;
  text-decoration: none;
  margin: 0 0.5rem;
  opacity: 0.9;
}

.contact a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  z-index: 999;
  min-height: var(--sticky-h);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.03);
}

.sticky-cta .cta-button {
  margin: 0;
}

/* Emojis */
.emoji {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2.5rem;
  filter: grayscale(100%);
  opacity: 0.2;
  transition: all 0.3s;
}

.half-box:hover .emoji {
  filter: grayscale(0);
  opacity: 1;
  transform: rotate(10deg);
}

/* Specific to Index Hero */
.hero {
  text-align: center;
  padding: 5rem 1rem 4rem;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero .offer {
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero .grid {
  justify-content: center;
  gap: 1rem;
}

/* Specific to /far */
.quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quarter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  min-height: 140px;
}

.quarter-card:hover {
  background: #fff;
  border-left-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quarter-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.quarter-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.quarter-card .more {
  margin-top: auto;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: block;
  text-align: right;
  font-size: 0.9rem;
}

.quarter-card:hover .more {
  text-decoration: underline;
}

.quarter-card .emoji-bw {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.5rem;
  filter: grayscale(100%);
  opacity: 0.3;
}

.quarter-card:hover .emoji-bw {
  filter: grayscale(0);
  opacity: 1;
}

.feature-box {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-areas: "aside content";
  gap: 2rem;
  align-items: start;
}

.feature-box.flip {
  grid-template-columns: 1fr 240px;
  grid-template-areas: "content aside";
}

.feature-aside {
  grid-area: aside;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  /* Matching radius */
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  gap: 1rem;
  text-align: center;
}

.feature-aside * {
  color: inherit;
}

.feature-title {
  order: 1;
  width: 100%;
  font-weight: 700;
  font-size: 1.125rem;
  text-align: center;
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-emoji {
  order: 2;
  font-size: 3.5rem;
  line-height: 1;
  filter: grayscale(0%);
  opacity: 1;
}

.feature-content {
  grid-area: content;
}

.feature-content p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.feature-content ul {
  margin-top: 1rem;
}

/* Specific to /leder Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.testimonial {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-left: 4px solid var(--primary);
  position: relative;
}

.testimonial::before {
  content: "❝";
  color: var(--primary);
  font-size: 3rem;
  position: absolute;
  top: -10px;
  right: 1rem;
  opacity: 0.2;
  font-family: serif;
}

blockquote {
  margin: 0;
  font-style: italic;
  font-size: 1.05rem;
  color: #334155;
}

.cite {
  margin-top: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.role {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .quarter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-box,
  .feature-box.flip {
    grid-template-columns: 1fr;
    grid-template-areas: "aside" "content";
    gap: 1.5rem;
  }

  .feature-box .feature-aside {
    grid-area: aside !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
    width: 100%;
    padding: 1rem;
    gap: 1rem;
    text-align: left;
  }

  .feature-box .feature-content {
    grid-area: content !important;
    width: 100%;
  }

  .feature-box .feature-aside .feature-title {
    text-align: left;
    margin: 0;
    flex: 1;
    font-size: 1.1rem;
    padding: 0;
    border-bottom: none;
  }

  .feature-box .feature-aside .feature-emoji {
    font-size: 2.5rem;
    margin: 0;
    order: 2;
  }
}

@media (max-width: 700px) {
  .half-box {
    flex: 1 1 100%;
  }

  .testimonials {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .profile img {
    margin: 0 auto;
  }

  /* Centers the text content in profile on mobile since flex-direction is column */
  .profile>div {
    width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  .container {
    padding: 1rem;
    padding-bottom: calc(var(--sticky-h) + max(env(safe-area-inset-bottom), 2rem));
  }

  .feature-aside {
    padding: 0.75rem;
  }

  .sticky-cta {
    padding-bottom: max(env(safe-area-inset-bottom), 0.75rem);
    flex-direction: column;
    gap: 0.5rem;
    height: auto;
  }

  .sticky-cta .cta-button {
    width: 100%;
    text-align: center;
  }
}

/* REFLECTIONS CAROUSEL v3 (Card Strip) */
.reflection-section {
  padding: var(--padding-section) 0;
  background-color: var(--bg-body);
  overflow: hidden;
  /* For at skjule scrollbar hvis den stikker ud */
}

.reflections-wrapper {
  position: relative;
  margin: 0 calc(var(--padding-box) * -1);
  /* Full width on mobile inside container */
  padding: 0 var(--padding-box);
}

@media (min-width: 768px) {
  .reflections-wrapper {
    margin: 0;
    padding: 0;
  }
}

/* Slider Navigation Buttons */
.reflection-nav {
  position: absolute;
  top: calc(50% - 1rem); /* Center relative to card image area */
  transform: translateY(-50%);
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: bold;
}

@media (max-width: 767px) {
  .reflection-nav {
    display: none; /* Keep native scroll on mobile */
  }
}

.reflection-nav:hover {
  background: #f8fafc;
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-lg);
  color: var(--primary);
}

.reflection-nav.btn-prev {
  left: -22px;
}

.reflection-nav.btn-next {
  right: -22px;
}

.reflections-scroller {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2rem;
  /* Plads til scrollbar/skygge */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.reflections-scroller::-webkit-scrollbar {
  display: none;
}

.reflection-card {
  flex: 0 0 180px;
  /* Mindre bredde på mobil så man kan se næste kort */
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.2s;
}

@media (min-width: 768px) {
  .reflection-card {
    flex: 0 0 260px;
    /* Lidt bredere på desktop */
  }
}

.reflection-card:hover {
  transform: translateY(-5px);
}

.reflection-card-image {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
  position: relative;
}

.reflection-card:hover .reflection-card-image {
  box-shadow: var(--shadow-md);
}

.reflection-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reflection-card-image::after {
  content: "👆 Se serien";
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  pointer-events: none;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s;
}

.reflection-card:hover .reflection-card-image::after {
  opacity: 1;
}

.reflection-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-heading);
}

.reflection-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

/* MODAL / LIGHTBOX */
dialog.reflection-modal {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  margin: 0;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  /* Skjul interactions når lukket */
}

dialog.reflection-modal[open] {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

dialog.reflection-modal::backdrop {
  background: rgba(0, 0, 0, 0.95);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.4);
  /* Tydeligere baggrund */
  border: none;
  color: white;
  font-size: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  z-index: 20;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Modal Navigation Buttons */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 2.5rem;
  padding: 0;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: background 0.2s, transform 0.1s;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.modal-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.btn-prev {
  left: 1rem;
}

.btn-next {
  right: 1rem;
}

@media (max-width: 768px) {
  .modal-nav {
    display: none;
    /* Skjul på mobil - swipe er nok */
  }
}

.modal-scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: 100%;
  width: 100%;
  gap: 1rem;
  padding: 0;
  align-items: center;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.modal-scroller::-webkit-scrollbar {
  display: none;
}

.modal-slide {
  flex: 0 0 100vw;
  /* Fuld bredde */
  height: 100dvh;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

.modal-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}