:root {
  --primary-color: #6c63ff;
  --primary-light: #8f94fb;
  --secondary-color: #232946;
  --accent-color: #f72585;
  --success-color: #4cc9f0;
  --info-color: #4895ef;
  --warning-color: #f8961e;
  --danger-color: #f94144;
  --light-color: #232946;
  --gray-100: #181a20;
  --gray-200: #232946;
  --gray-300: #2c2f3a;
  --gray-300-contrast: #23202b; /* NEW: for message card body contrast */
  --gray-400: #35394a;
  --gray-500: #4e5370;
  --gray-600: #6c6f93;
  --gray-700: #a0a3c2;
  --gray-800: #eaeaf2;
  --gray-900: #ffffff;
  --card-gradient-1: linear-gradient(135deg, #232946, #6c63ff);
  --card-gradient-2: linear-gradient(135deg, #232946, #4895ef);
  --card-gradient-3: linear-gradient(135deg, #232946, #4cc9f0);
  --card-gradient-4: linear-gradient(135deg, #6c63ff, #f72585);
}


body {
  background: var(--gray-100);
  color: #eaeaf2;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  line-height: 1.7;
}

::-webkit-scrollbar {
  width: 8px;
  background: var(--gray-200);
}
::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}

h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

a {
  color: var(--primary-color);
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-color);
}

.bg-gradient-primary {
  background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
}

.text-gradient {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar {
  background-color: var(--gray-200) !important;
  box-shadow: 0 2px 18px rgba(0,0,0,0.22);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.container, .card, .navbar, .footer, .section-title, .section-subtitle {
  border-radius: 16px;
}

hr {
  border-color: var(--gray-400);
}

input, select, textarea {
  background: var(--gray-300);
  color: #fff;
  border: 1px solid var(--gray-400);
  border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--gray-200);
}

p, span, li, label, .text-muted {
  color: #bfc8e2 !important;
}

.card {
  background: var(--gray-200);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-300);
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.32);
}

.card-header {
  background: var(--gray-300);
  border-bottom: 1px solid var(--gray-400);
  color: #fff;
  font-weight: 600;
  padding: 1.25rem;
  min-height: 90px;
}

.card-header h4 {
  color: #fff;
}

.card-header p {
  color: #bfc8e2;
}

.card-header h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.card-header p {
  color: #bfc8e2;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.card-header .bi {
  font-size: 1.75rem;
  vertical-align: middle;
  margin-left: 0.75rem;
  color: var(--primary-color);
}

.card-body {
  padding: 1.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  text-align: center;
  color: #eaeaf2;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  background: var(--gray-300);
  border-top: 1px solid var(--gray-400);
  color: #eaeaf2;
}

.weather-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #eaeaf2;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.weather-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #bfc8e2;
  font-weight: 500;
}

.section-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: #bfc8e2;
  margin-bottom: 2rem;
}

.footer {
  background: var(--gray-200);
  color: #eaeaf2;
  padding: 3rem 0;
  margin-top: 3rem;
  box-shadow: 0 -2px 15px rgba(0,0,0,0.16);
  border-radius: 18px 18px 0 0;
}

.footer-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-link {
  color: #bfc8e2;
  text-decoration: none;
  transition: color 0.2s;
}

}
.footer-link:hover {
  color: var(--primary-color);
}


.footer-title {
  color: var(--gray-800);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-link {
  color: var(--gray-700);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary-color);
}

.card-body p-0 {
  padding: 0 !important;
}

.card-body img.img-fluid {
  width: 100%;
  height: auto;
  display: block;
}

.meteogram-full {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

/* Card content sizing */
.card-body.p-0 {
  overflow: hidden;
}

.card-body.p-0 img.img-fluid {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  display: block;
}

.card-body.p-0 iframe {
  width: 100%;
  max-height: 450px;
  border: 0;
  display: block;
}

/* Nordlys kart */
.nordlys-map img {
  width: 100%;
  height: 350px;
  object-fit: contain;
}

/* Tidevann iframe */
.tide-iframe iframe {
  width: 100%;
  height: 500px;
  border: 0;
}

/* Wind map iframe */
.wind-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

/* Transport iframe */
.transport-iframe iframe {
  width: 100%;
  height: 450px;
  border: 0;
}

/* Karusell header */
.carousel-caption {
  background: rgba(0,0,0,0.45);
  border-radius: 1rem;
  padding: 2rem;
}
.carousel-item img {
  object-fit: cover;
  height: 420px;
}
.carousel-item video {
  object-fit: cover;
  height: 420px;
  width: 100%;
}
@media (min-width: 768px) {
  .carousel-item img {
    height: 540px;
  }
  .carousel-item video {
    height: 540px;
  }
}

/* Weather icons and visual elements */
.weather-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  opacity: 0.8;
}

.weather-direction-arrow {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(67, 97, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.weather-direction-arrow i {
  font-size: 1.8rem;
  color: var(--primary-color);
  transform-origin: center;
}

.trend-indicator {
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
  margin-left: 0.25rem;
}

.trend-indicator-up {
  color: #36b37e;
}

.trend-indicator-down {
  color: #ff5630;
}

.trend-indicator-stable {
  color: #6554c0;
}

/* Visual separator */
.visual-separator {
  width: 40px;
  height: 2px;
  background-color: var(--gray-200);
  margin: 0.75rem auto;
}

/* Webcam section styling */
.tab-content .card {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.tab-content .card-header {
  background-color: #ffffff;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tab-content .card-header h4 {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.tab-content .card-body.p-0 {
  padding: 0 !important;
}

.tab-content .card-body.p-0 img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 450px;
  object-fit: cover;
}

.nav-pills .nav-link {
  color: var(--gray-700);
  background-color: transparent;
  border-radius: 50rem;
  padding: 0.4rem 1rem;
  margin: 0 0.2rem;
  font-size: 0.9rem;
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
  color: white;
}

.nav-pills .nav-link:hover:not(.active) {
  background-color: var(--gray-200);
}

/* Weather value and trend visualization */
.wind-speed-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.trend-arrow-container {
  margin-bottom: 1rem;
}

.trend-icon {
  font-size: 2.5rem;
  animation: pulse 2s infinite ease-in-out;
}

.wind-value-container {
  width: 100%;
}

/* Wind trend container */
.wind-trend-container {
  width: 100%;
  height: 70px;
  margin-top: 0.5rem;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.02);
}

/* Badge styling for trend display */
.badge {
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

@keyframes pulse {
  0% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.7; transform: scale(1); }
}

/* Styling for SVG wind trend visualization */
.wind-trend-svg-container {
  width: 100%;
  height: 70px; /* Match previous chart height */
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 5px; /* Litt padding rundt SVG */
  box-sizing: border-box;
}

.wind-trend-svg-container svg {
  width: 100%;
  height: 100%;
}

/* Animate the drawing of the line */
.wind-trend-line {
  /* Start state is set by JS: stroke-dasharray/offset = length */
  filter: drop-shadow(0px 1px 1px rgba(0, 0, 0, 0.3)); /* Subtil skygge */
}

/* Legg til variasjon basert på trend? (Eksempel - ikke implementert) */
/*
.wind-trend-line.rising {
  filter: drop-shadow(0px 1px 3px rgba(220, 53, 69, 0.5)); 
}
.wind-trend-line.falling {
  filter: drop-shadow(0px 1px 3px rgba(13, 110, 253, 0.5));
}
*/

/* Meldingsstiler */
.message-link:hover {
  color: var(--bs-primary) !important;
}

.message-link:hover i {
  transform: translateY(-2px);
  transition: transform 0.2s ease-in-out;
}

.message-link i {
  transition: transform 0.2s ease-in-out;
}

/* Sikre at meldingslenker er klikkbare */
.message-link {
  cursor: pointer !important;
  pointer-events: auto !important;
  text-decoration: none;
  color: inherit;
  display: inline-block;
  width: 100%;
}

/* Nye stiler for meldingskort */
.message-card {
  transition: all 0.2s ease;
  height: 100%;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  border-color: rgba(0,0,0,0.125) !important;
}

.message-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.message-card .card-header {
  background: #FFE5B4 !important; /* Lys oransje */
  color: #111 !important;
  font-weight: 700;
  border-bottom: 1px solid var(--gray-500);
  padding: 0.85rem 1.25rem;
  letter-spacing: 0.01em;
}

.message-card .message-date {
  color: #111 !important;
}

  border-bottom: 1px solid rgba(0,0,0,0.075);
  padding: 0.75rem 1rem;
  min-height: auto;
}

.message-card .card-img-top {
  height: 180px;
  overflow: hidden;
}

.message-card .card-img-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-card .card-body {
  background: #fff !important;
  color: #111 !important;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  flex: 1 1 auto;
  position: relative;
  z-index: 1;
  display: block;
}

.message-card .message-text {
  color: #111 !important;
}

.message-card .card-link {
  position: relative;
  z-index: 1;
  display: block;
}

.message-card .card-footer {
  background: #FFE5B4 !important; /* Lys oransje */
  color: #111 !important;
  border-top: 1px solid var(--gray-500);
  font-weight: 600;
  padding: 0.7rem 1.25rem;
  letter-spacing: 0.01em;
}
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.message-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Turkis knapp styling - Dagspris */
.btn-dagspris {
  background-color: #17D3E5;
  color: #000;
  border: none;
  border-radius: 30px; /* Veldig runde kanter */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.btn-dagspris:hover {
  background-color: #14bfd0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(23, 211, 229, 0.3);
}

.btn-dagspris:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(23, 211, 229, 0.3);
}

.btn-dagspris.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
} 