:root {
  --accent-color: #007bff;
  --dark-bg: #212529;
}

body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.hero-section {
  height: 400px;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url('image/Isle of Wight.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section h1 {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-card {
  background: white;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: none;
  margin-bottom: 15px;
}

.sidebar-card h3{
  font-weight: bold;
}

.sidebar-card-data-toggler {
  background: white;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: none;
  margin-bottom: 15px;
  position: sticky;
  top: 0;
}

.sidebar-subtext {
  font-size: 0.8rem;
  color: rgb(58, 58, 58);
}

aside.col-lg-3 {
  position: sticky;
  top: 90px;
  align-self: flex-start;
}

.narrative {
  padding: 0px 30px 0px 30px;
  text-align: justify;
  line-height: 1.7;
}

.narrative p {
  margin-bottom: 1rem;
  text-indent: 1.5em;
}

.fakeimg {
  width: 300px;
  max-width: 100%; 
  height: auto;
  display: block;
  margin: 0 auto;
  justify-content: center;
}

.map-container {
  background: white;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.map-box {
  width: 100%;
  height: 600px;
  border: 1px solid #ddd;
  z-index: 10;
  position: relative;
}

.video-box {
  width: 100%;
  height: 100%;
  border: 1px solid #ddd;
  z-index: 10;
  position: relative;
}

.map-title {
  font-weight: 600;
  color: var(--dark-bg);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.map-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--accent-color);
  margin-right: 12px;
}

.layer-control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.layer-checkbox {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
  transition: color 0.2s ease;
}

.layer-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: #eee;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
}


.layer-checkbox input:checked ~ .checkmark {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.layer-checkbox input:checked ~ .checkmark:after {
  display: block;
}

.layer-checkbox .checkmark:after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.layer-checkbox input:checked ~ .label-text {
  color: var(--dark-bg);
  font-weight: 600;
}

footer {
  margin-top: 100px;
  padding: 50px 0;
}


.data-source-card .description {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 12px;
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.layer-item {
  padding: 12px 14px;
  background: #f8f9fa;
}

.layer-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.layer-header strong {
  font-size: 1rem;
  color: #212529;
}

.layer-description {
  font-size: 0.85rem;
  color: #6c757d;
}

.url-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.url-container code {
  background: #e9ecef;
  padding: 6px 10px;
  font-size: 0.85rem;
  word-break: break-all;
  flex: 1 1 auto;
}

.copy-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.copy-btn:hover {
  background-color: #0056b3;
}

.legend-container {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 200px;
}

.source-logo {
  height: 45px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.source-logo:hover {
  transform: scale(1.05);
  filter: brightness(85%);
}

.image-map {
  position: relative;
  width: 100%;
}

.map-pin {
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  font-size: 15px;
  z-index: 50;

  background: #007bff;
  padding: 6px;
  border-radius: 50%;  
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-pin:hover {
  transform: scale(1.05);
  background: #0056b3;
  transition: 0.2s ease;
}


.image-map-comment {
  display: flex;
  justify-content: space-between; 
  text-align: justify;
  gap: 20px;  
}

#legendDiv {
  max-height: 250px;
  overflow-y: auto;
}

#toggle-legend {
  padding: 4px 8px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background-color: var(--accent-color);
  color: white;
  transition: background 0.2s ease;
}

#toggle-legend:hover {
  background-color: #005f8c;
}

/* Responsive Devices */
@media (max-width: 992px) {
  aside.col-lg-3,
  .sidebar-card-data-toggler {
    position: static;
    top: auto;
    align-self: auto;
  }
  .map-box {
    height: 450px;
  }
}
