/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* CSS Custom Properties - Design System */
:root {
  /* Primærfarger - Turkis */
  --color-primary: #45B7D1;
  --color-primary-dark: #2E9CCA;
  --color-primary-light: #7DD3E8;

  /* Sekundærfarger */
  --color-sand: #F5E6D3;
  --color-sand-warm: #F7D794;
  --color-wood: #A0826D;
  --color-wood-dark: #8B7355;
  --color-grass: #88D498;
  --color-mint: #96CEB4;

  /* Aksentfarger */
  --color-sun: #FFB84D;
  --color-sun-light: #FFEAA7;
  --color-snow: #E8F8F5;
  --color-ice: #DFF9FB;

  /* Nøytrale farger */
  --color-bg-primary: #FEFEFE;
  --color-bg-cream: #FAF9F6;
  --color-bg-grey: #F5F5F5;

  --color-text-primary: #2C3E50;
  --color-text-secondary: #5A6C7D;
  --color-text-muted: #95A5A6;

  /* Spacing (8px grid) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* Border Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Skygger */
  --shadow-low: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-high: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-colored: 0 4px 12px rgba(69, 183, 209, 0.15);

  /* Overganger */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 400ms ease-in-out;

  /* Typografi */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', sans-serif;
  --font-heading-alt: 'Fredoka One', cursive, sans-serif; /* Gammel heading-font som backup */

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.25rem;    /* 20px */
  --text-xl: 1.5rem;     /* 24px */
  --text-2xl: 2rem;      /* 32px */
  --text-3xl: 3rem;      /* 48px */

  /* Touch Targets */
  --touch-min: 44px;
  --touch-recommended: 48px;
  --touch-large: 56px;
}

/* Global Styles */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: linear-gradient(
    180deg,
    #FEFEFE 0%,
    #F8FCFD 50%,
    #F5F9FA 100%
  );
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

/* Accessibility - Respekter prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive Typography */
@media (min-width: 768px) {
  :root {
    --text-2xl: 3rem;      /* 48px */
    --text-xl: 2.25rem;    /* 36px */
    --text-lg: 1.75rem;    /* 28px */
  }
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   HAMBURGER MENU STYLES
   ============================================ */

/* Hamburger Button */
.hamburger-button {
  position: fixed;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
  padding: 8px;
}

.hamburger-button:hover {
  opacity: 0.7;
}

.hamburger-button:active {
  opacity: 0.5;
}

.hamburger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #6B7280;
  transition: all var(--transition-normal);
}

/* Animated hamburger to X */
.hamburger-button.active .hamburger-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-button.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.hamburger-button.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Slide-in Menu */
.slide-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 85vw);
  height: 100vh;
  background-color: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: right var(--transition-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.slide-menu.active {
  right: 0;
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Menu Header */
.menu-header {
  display: none; /* Header fjernet for renere design */
}

.menu-logo {
  display: none;
}

/* Menu User Section (when logged in) */
.menu-user-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-bg-cream);
  border-bottom: 1px solid var(--color-bg-grey);
  margin-top: var(--space-md);
}

.menu-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  font-size: var(--text-base);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-user-info {
  flex: 1;
  min-width: 0;
}

.menu-username {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-user-stats {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

/* Menu Navigation */
.menu-nav {
  padding: var(--space-sm) 0;
  flex: 1;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px var(--space-md);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background-color var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.menu-link:hover {
  background-color: var(--color-bg-grey);
}

.menu-link:active {
  background-color: #e0e0e0;
}

.menu-icon {
  font-size: var(--text-base);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* SVG Menu Icons - minimalistisk stil */
.menu-icon-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--color-text-primary);
}

.menu-link-primary .menu-icon-svg {
  stroke: white;
}

.menu-link-primary {
  background-color: var(--color-primary);
  color: white;
  margin: 0 var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.menu-link-primary:hover {
  background-color: var(--color-primary-dark);
}

.menu-link-admin {
  color: var(--color-sun);
  font-weight: 600;
}

.menu-logout {
  color: #dc3545;
}

.menu-logout:hover {
  background-color: #fee;
}

.menu-divider {
  height: 1px;
  background-color: var(--color-bg-grey);
  margin: var(--space-xs) var(--space-md);
}

/* Menu Footer */
.menu-footer {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-bg-grey);
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  flex-shrink: 0;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .slide-menu,
  .menu-overlay,
  .hamburger-button,
  .hamburger-icon span {
    transition: none;
  }
}
