/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #333;
}

/* ===== Skip link (accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: #452C63;
  color: #fff;
  border-radius: 0 0 0.25rem 0.25rem;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ===== Header & Nav ===== */
.custom-header {
  background-color: #452C63;
}

.navbar .nav-link {
  position: relative;
  transition: color 0.2s;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #452C63;
  transition: width 0.25s, left 0.25s;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 100%;
  left: 0;
}

.navbar .nav-link.active {
  color: #452C63;
  font-weight: 600;
}

/* ===== Map ===== */
calcite-panel {
  height: 60vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

#map {
  flex: 1;
}

#info-button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 10;
}

#legend-button {
  position: absolute;
  bottom: 70px;
  left: 20px;
  z-index: 10;
}

.p-info {
  text-align: justify;
  font-size: x-small;
  padding: 10px;
}

/* ===== Typography & Sections ===== */
p {
  text-align: justify;
  padding: 0.25rem 0.625rem;
  line-height: 1.7;
}

.section-heading {
  padding-left: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  width: 50px;
  height: 3px;
  background: #452C63;
  border-radius: 2px;
}

.section-block {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding-bottom: 1.5rem;
}

/* ===== About section lists ===== */
.about-list {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.about-list li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

/* ===== Solution Cards ===== */
.solution-card .card-img-col {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  max-height: 350px;
  overflow: hidden;
}

.solution-card .card-img-col img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  padding: 0.5rem;
}

.solution-card {
  border: none;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.solution-card .card-title {
  padding: 0;
  color: #452C63;
  font-weight: 600;
}

.solution-card .card-text {
  text-align: left;
  padding: 0;
}

/* ===== Use-case definition list ===== */
.use-cases {
  padding: 0 0.625rem;
}

.use-cases dt {
  color: #452C63;
  font-weight: 600;
  margin-top: 0.75rem;
}

.use-cases dd {
  margin-left: 0;
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact-info a {
  color: #452C63;
  text-decoration: none;
  white-space: nowrap;
  font-size: 1.05rem;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #452C63;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 1000;
  font-size: 1.2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  color: #fff;
  background: #5a3d80;
}

/* ===== Footer ===== */
.custom-footer {
  background-color: #452C63;
}

/* ===== Focus visibility (accessibility) ===== */
:focus-visible {
  outline: 3px solid #452C63;
  outline-offset: 2px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 768px) {
  .solution-card .card-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .solution-card .card-text {
    text-align: justify;
  }

  .section-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }
}
