/* Totalberedskapskonferansen 2026 - Stylesheet */

:root {
  --primary: #1a3a5c;
  --primary-light: #2a4a6c;
  --secondary: #8b2635;
  --glass: rgba(255, 255, 255, 0.92);
  --glass-dark: rgba(26, 58, 92, 0.9);
  --text-dark: #1a1a1a;
  --text-light: #4a4a4a;
  --border: #c5c5c5;
  --success: #1e6f3e;
  --warning: #a07600;
  --danger: #8b2635;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

body {
  background: #000 url('/hovedbilde.png') center center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Language Switcher */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 5px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 5px;
  box-shadow: var(--shadow);
}

.language-switcher button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.2s;
}

.language-switcher button:hover {
  background: rgba(10, 42, 102, 0.1);
}

.language-switcher button.active {
  background: var(--primary);
  color: white;
}

/* Main container */
.center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 24px;
}

/* Card */
.card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow);
  max-width: min(1000px, 90vw);
  width: 100%;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */
.title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.2;
}

.subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  color: var(--primary);
  margin: 24px 0 16px;
}

.description {
  font-size: 18px;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 32px;
}

/* Info box */
.info-box {
  background: rgba(10, 42, 102, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
  text-align: center;
}

.info-box .date {
  font-size: 18px;
  color: var(--primary);
  line-height: 1.8;
}

/* Buttons */
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0;
}

.btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 42, 102, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #d62839;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.highlight-item {
  text-align: center;
  padding: 20px;
}

.highlight-item .icon {
  font-size: 48px;
  margin-bottom: 12px;
  width: 64px;
  height: 64px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shield icon - for Samfunnssikkerhet */
.icon-shield {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  clip-path: polygon(50% 0%, 100% 15%, 100% 70%, 50% 100%, 0% 70%, 0% 15%);
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.3);
}

.icon-shield::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  clip-path: polygon(50% 20%, 80% 35%, 70% 65%, 50% 80%, 30% 65%, 20% 35%);
  opacity: 0.9;
}

/* Network icon - for Nettverk */
.icon-network {
  background: transparent;
}

.icon-network::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, var(--primary) 8px, transparent 8px),
    radial-gradient(circle at 15% 15%, var(--primary) 6px, transparent 6px),
    radial-gradient(circle at 85% 15%, var(--primary) 6px, transparent 6px),
    radial-gradient(circle at 15% 85%, var(--primary) 6px, transparent 6px),
    radial-gradient(circle at 85% 85%, var(--primary) 6px, transparent 6px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.icon-network::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, transparent 46%, var(--primary) 48%, var(--primary) 52%, transparent 54%),
    linear-gradient(45deg, transparent 46%, var(--primary) 48%, var(--primary) 52%, transparent 54%);
  background-size: 100% 100%;
  opacity: 0.6;
}

/* Knowledge icon - for Kunnskap */
.icon-knowledge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.3);
  animation: subtle-glow 3s ease-in-out infinite;
}

@keyframes subtle-glow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

.highlight-item h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 8px;
}

.highlight-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* Navigation */
.nav-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nav-bar a {
  padding: 10px 20px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-bar a:hover,
.nav-bar a.active {
  background: rgba(10, 42, 102, 0.1);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--danger);
}

.form-group label .optional {
  font-weight: 400;
  color: var(--text-light);
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group .help-text {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-group label {
  flex: 1;
  cursor: pointer;
  font-weight: 400;
}

/* Alert boxes */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 16px;
}

.alert-success {
  background: #d4edda;
  border-left: 4px solid var(--success);
  color: #155724;
}

.alert-warning {
  background: #fff3cd;
  border-left: 4px solid var(--warning);
  color: #856404;
}

.alert-danger {
  background: #f8d7da;
  border-left: 4px solid var(--danger);
  color: #721c24;
}

.alert-info {
  background: #d1ecf1;
  border-left: 4px solid #17a2b8;
  color: #0c5460;
}

/* Loading spinner */
.spinner {
  border: 4px solid rgba(10, 42, 102, 0.1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Program content */
.program-content {
  margin: 24px 0;
  text-align: left;
}

.program-content h2,
.program-content h3 {
  color: var(--primary);
  margin-top: 24px;
  margin-bottom: 12px;
}

.program-content ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

.program-content li {
  margin-bottom: 8px;
}

/* Verification modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content .verification-code {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.modal-content .verification-code input {
  width: 50px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  border: 2px solid var(--border);
  border-radius: 8px;
}

.modal-content .verification-code input:focus {
  border-color: var(--primary);
  outline: none;
}

/* Calendar buttons */
.calendar-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0;
}

.calendar-buttons a {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.2s;
}

.calendar-buttons a:hover {
  background: var(--primary-light);
}

/* QR Code display */
.qr-display {
  text-align: center;
  margin: 24px 0;
}

.qr-display img {
  max-width: 300px;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Admin Panel */
.admin-panel {
  max-width: 1400px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: rgba(10, 42, 102, 0.05);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-card .number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .label {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table th {
  background: var(--primary);
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

table tr:hover {
  background: rgba(10, 42, 102, 0.03);
}

/* Footer */
footer {
  font-size: 13px;
  color: rgba(10, 42, 102, 0.9);
  text-align: center;
  padding: 16px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  background: linear-gradient(to top, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
}

/* Responsive */
@media (max-width: 768px) {
  .language-switcher {
    top: 10px;
    right: 10px;
  }

  .center {
    padding: 70px 16px 16px;
  }

  .card {
    padding: 20px;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .highlights {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 24px;
  }

  .modal-content .verification-code input {
    width: 40px;
    height: 50px;
    font-size: 20px;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .language-switcher,
  .nav-bar,
  footer,
  .btn {
    display: none;
  }

  .card {
    background: white;
    box-shadow: none;
  }
}
