:root {
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #AE445A;
  --accent-hover: #902c40;
  --light-bg: #f8fafc;
  --text-color: #334155;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  height: 100%;
  overflow: hidden;
  background-color: var(--light-bg);
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);

  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

#scroll-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  will-change: transform;
  padding-top: 20px;
  background-color: var(--light-bg);
}

.tabs-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.tab-link {
  text-decoration: none;
  color: var(--primary-color);
  font-family: 'Host Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.tab-link:hover {
  color: var(--accent-color);
  background: #fff;
}

.tab-link.active {
  color: var(--accent-color);
  background: #fff;
}

.tab-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background-color: var(--accent-color);
}

main {
  padding: 3rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  margin-top: 2rem;
}

.section-header-center {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.section-title {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 2rem;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-color);
  display: inline-block;
  margin: 0;
}

.content-block {
  padding: 2.5rem;
  margin-bottom: 3rem;
  text-align: left;
}

.content-block p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.content-block ul,
.content-block ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-block li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.highlight-strong {
  color: var(--accent-color);
  font-weight: 700;
}

.overview-container {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.overview-text {
  flex: 1;
}

.overview-image {
  flex: 0 0 520px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.overview-image img {
  width: 100%;
  height: auto;
}

.grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.grid-row .content-block {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.submit-container {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  text-align: center;
}

.submit-container h3 {
  font-family: 'Host Grotesk', sans-serif;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.submit-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--accent-color);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent-color);
  transition: var(--transition);
}

.submit-btn:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(174, 68, 90, 0.3);
}

.citation-wrapper {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
}

.citation-text {
  background-color: #f1f5f9;
  padding: 1.5rem;
  border-radius: 8px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
  color: #334155;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}

.citation-note {
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.citation-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.action-btn {
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}

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

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

.btn-secondary {
  background-color: white;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

.btn-secondary:hover {
  background-color: #fff0f0;
}

footer {
  background: linear-gradient(135deg, #1a2747 0%, #374b6b 100%);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 2rem;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  text-align: left;
}

.footer-right {
  text-align: right;
}

.footer-center {
  text-align: center;
}

footer a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  margin: 0 10px;
  transition: opacity 0.3s;
}

footer a:hover {
  opacity: 0.8;
}

.mapping-study-link {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}

.mapping-study-link:hover {
  opacity: 0.85;
}

#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  border: 1px solid rgba(255, 255, 255, 0.3);
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  color: rgb(39, 39, 39);
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scrollToTopBtn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(0) scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.stats-wrapper {
  text-align: center;
  margin-bottom: 1rem;
  padding: 1rem;
}

.stats-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-item {
  display: inline-block;
  background: var(--light-bg);
  padding: 0.5rem 1.3rem;
  border-radius: 50px;
  border: 2px solid var(--border-color);
  font-weight: 500;
  color: var(--primary-color);
  font-size: 1rem;
}

.stat-date {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 400;
}

.grid-row .section-header-center {
  margin-bottom: 1rem;
}

main>section:nth-of-type(3) .section-header-center {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .overview-container {
    flex-direction: column;
  }

  .overview-image {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 1rem;
  }

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

  .content-block {
    padding: 1.5rem;
  }

  main {
    padding-top: 5rem;
    margin-top: 0;
  }

  .tabs-container {
    top: 10px;
    left: 10px;
    gap: 10px;
  }

  .tab-link {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  html,
  body {
    overflow: auto !important;
    height: auto !important;
  }

  #scroll-container {
    transform: none !important;
    height: auto !important;
    position: static !important;
  }
}
  

/* Loading screen spinner */
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
