@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  outline: none;
}

:root {
  font-size: 16px; /* Base font size for rem calculations */
  line-height: 1.5; /* Base line height */
  color: #333; /* Base text color */
  font-family: 'Open Sans', Arial, sans-serif; /* Base font family */
  /* --glow-color: hwb(186 38% 0%); */
  --glow-color: #61dafb;

  /* Borrowed Color Pallette and Naming Convention */
  --color-fg-default: #c5d1de;
  --color-fg-success: #57ab5a;
  --color-fg-muted: #717e8b;
  --color--bg-done-emphasis: #8256d0;

  /* FORM */
  --white: #afafaf;
  --red: #e31b23;
  --bodyColor: #292a2b;
  --borderFormEls: hsl(0, 0%, 10%);
  --bgFormEls: hsl(0, 0%, 14%);
  --bgFormElsFocus: hsl(0, 7%, 20%);

  --bg: #282c34;
  --size: 100px;
  --glow: radial-gradient(
      50% 50% at center,
      hsl(var(--glow-color), 80%, 85%),
      hsl(var(--glow-color), 80%, 70%),
      transparent
    )
    no-repeat fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Set specific styles for headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  color: var(--color-fg-default);
}

/* Set specific styles for bold text */
strong,
b {
  font-weight: 600;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

body {
  height: 100vh;

  background: var(--bg);

  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 400;
}

/* Background image logo */
.logo-container {
  background-image: url('https://res.cloudinary.com/dpmninzv7/image/upload/v1714068493/main-logo-white-transparent_r85vhf.svg');
  position: fixed; /* Use fixed positioning */
  top: 50%; /* Move the top edge of the logo to the middle of the viewport */
  left: 50%; /* Move the left edge of the logo to the middle of the viewport */
  transform: translate(-50%, -50%);

  background-size: contain; /* Ensure the background image fits within the container */
  background-repeat: no-repeat; /* Prevent the background image from repeating */
  background-position: center; /* Center the background image within the container */
  z-index: 0;
  opacity: 0.06;
}

img {
  position: relative;
  z-index: 0;
}

li {
  /* list-style-type: none; */
  margin: 0;
  padding: 0;
}

/* Apply changes to list items on hover */

li:hover a {
  border-bottom: 2px solid #ddd;

  transform: scale(1.1);
}

h1 {
  font-size: 16px;
  margin: 0;
}

h2 {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 59px;
  margin-left: 20px;
  margin-bottom: 1rem;
  text-align: center;
}

/* PAGE CONTAINER */
.intro-text__header {
  color: var(--color-fg-success);
}
.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;

  max-width: 90%;
  margin: auto;
  cursor: default;
}

/* Header style */

.header-navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  width: 100%;

  /* padding: 20px 0; */
}

/* Header */

.header {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #ddd;
  background-color: #282c34;
}

/* Header text style */
.header h1 {
  text-align: left;
  color: var(--glow-color);
}

/* NAVBAR  */

.navbar-block {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: #282c34;
  top: 0;
  width: 100%;
  z-index: 10000;
}
.navbar__list {
  display: flex;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar__item {
  cursor: pointer;
  transition: background-size 0.24s;
  text-decoration: none;
  opacity: 1;
  border-radius: 10px;

  margin: 0 10px;
}

/* NAV AND FOOTER STYLING */
.navbar-block a,
footer a {
  text-decoration: none; /* Remove underline from links */
  font-size: 16px;
  /* Add padding to make the clickable area larger */
  padding: 10px 20px;
  border-radius: 5px;
  color: #61dafb;
  transition: background-color 0.3s ease; /* Smooth transition for background color */
}

/* ABOUT CONTENT SECTION */

.content {
  width: 100%;
}

.about-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px;
  margin-top: 10rem;
  justify-items: start;
}

/* CARD STYLING */
.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  border-radius: 5px;
  font-size: 1rem;
  /* max-width: 450px; */
  /* aspect-ratio: 1 / 1; use if in a row, muted for column */
  z-index: -1;
  gap: 40px;
  padding: 5px;
}

.about-grid {
  display: grid;
  gap: 100px;
}

.section-header {
  font-size: 1.5rem;
  margin: 10px 0;
  width: 100%;
  text-align: center;
  padding-bottom: 5rem;
}

.about-header {
  font-size: inherit;
  color: var(--color-fg-success);
  margin-top: 20px;
  padding: 5px;
}

.p-text {
  font-size: 1.5rem;
  font-weight: 250;
  line-height: 1.2;
  margin-bottom: 1rem;

  color: var(--color-fg-default);

  padding: 10px;

  max-width: 45em;
  min-width: 245px;
  text-align: center;
}

.features__list {
  display: grid;
  grid-template-columns: 1fr;
  list-style: none;
}

.features__list,
.highlights__list,
.under-construction__list {
  display: grid;
  grid-template-columns: 1fr;
  list-style: none;
  text-wrap: nowrap;
}

.coming__next--centered,
.intro__text--centered,
.whats-not-visible--centered {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;

  margin-top: 5rem;
}

.whats-not-visible__text--centered {
  text-align: center;
}
.list-item {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;

  color: var(--color-fg-default);

  padding: 4px;

  max-width: 50rem;

  text-align: start;
}
/* Map Element */

/* Center and Style the Map Section */
/* Styling the article to be centered */

.map-census {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 4rem;
  max-width: 83%;

  border-left: 1px solid var(--color-fg-success);

  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  height: 50vh;
  padding: 20px;
}

/* Form container styling */
.form-content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  width: 90%;

  margin: 0 auto;
}

/* Form Group Styling */
.form-group {
  margin-bottom: 20px;
}

/* Form Search Characteristic */
.form-search__characteristic,
.form-search__subdivision {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.map-census__boundary {
  /* Full width of the container */
  width: 100%;
  /* Minimum width for smaller screens */
  min-width: 300px;
  /* Maximum width for larger screens */
  max-width: 90%;
  height: 30vh;
  background-color: #e0e0e0;
  border: 2px solid var(--borderFormEls);
  border-radius: 8px;
}

/* Header styling */
.map-census h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--color-fg-default);
}

/* CENSUS RESULT SECTION  */
.geometry-header,
.census-data-header {
  font-size: 3rem;
  font-weight: 250;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-align: center;
}

.text-content {
  padding: 16px;

  border-left: 1px solid var(--color-fg-success);
  /* border-bottom: 1px solid var(--color-fg-default); */
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Form-specific styling */
.form-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 10px;
}

/* A more straightforward way to select the first two children would be to use :nth-child(1), :nth-child(2). */
.text-content > :nth-child(-n + 2) {
  grid-column: span 2;
}

/* Styles for list items of geo-data */
.geometry-list ul li {
  font-size: 1.6em;
  color: var(--color-fg-default);
}

.form-info__header {
  text-align: center;
  padding: 0;
  max-width: 100%;
  width: 600px;
  margin: 0 auto;
  display: block;
}

.form-info-block {
  text-align: center;
  margin-bottom: 20px;
  color: #666; /* Grey color for secondary text */
}

/* Styles for headings and list items */

#data-list,
.geometry-list {
  font-size: 1rem;
  padding-left: 20rem;
  color: var(--color-fg-default);
  list-style: none;
  display: grid;
}

/* Form Label */
.form-label {
  font-size: 1rem;
  color: var(--color-fg-default);
  margin-bottom: 5px;
}

/* Form Group */
.form-group__subdivision,
.form-group__selection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* Style for the input field */

.form-input-text {
  /* Responsivness */
  /* Full width of the container */
  width: 100%;
  /* Minimum width for smaller screens */
  min-width: 300px;
  /* Maximum width for larger screens */
  max-width: 90%;

  padding: 10px;
  font-size: 1rem;

  border-bottom-color: var(--color-fg-success);
  border-radius: 5px;
  transition: border-color 0.3s ease;
  background-color: var(--bodyColor);
  z-index: 1;
  cursor: text;

  /* Text */
  color: var(--color-fg-default);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dropdown */
/* The container <div> - needed to position the dropdown content */
.dropdown-content {
  position: absolute;
  display: inline-block;
  padding-top: 0;
  margin-top: 34px;
  z-index: 1;
}

.dropdown__options::before {
  font-size: 1.2rem;
  opacity: 1;
  font-weight: 500;
  font-style: normal;
  font-stretch: normal;
  font-optical-sizing: auto;

  line-height: initial;
  text-shadow: none;
}

/* Dropdown Content (Hidden by Default) */
.dropdown__options {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  border: 1px solid var(--color-fg-default);
  min-width: 400px;
  max-height: 200px;
  overflow-y: scroll;
  overflow-x: hidden;
}

/* Change color of dropdown links on hover */
.dropdown-content .dropdown__option:hover {
  background-color: #57606a;
  color: var(--color-fg-default);
}

/* Links inside the dropdown */
.dropdown-content div {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.form-input-text:hover,
.form-input-text:focus-visible {
  box-shadow: 0 4px 9px #61dafb;
}

.form-input-text:focus {
  padding: 15px;
  border-radius: 2px;

  /* box-shadow: 0 4px 8px #e0e0e1; */
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;
  background-color: transparent;
  opacity: 0.8;
}

.form-input-text::placeholder {
  color: inherit;

  font-size: 0.8rem;
  text-transform: capitalize;
  font-weight: 400;
  font-style: italic;
}

/* API DOCUMENTATION for access to the resoures */

/* SECTION CONTAINER FOR THE API SECTION */
.api-documentation {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px;
  border-radius: 5px;

  margin-top: 10rem;
  /* border: 1px solid #61dafb; */
  block-size: fit-content;
  max-width: max-content;
  background: #22272e;
  color: var(--color-fg-default);
}

.api-documentation h3 {
  color: var(--color-fg-success);
  margin-top: 8px;
}

.endpoint-item {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
  /* margin-bottom: 1rem; */

  color: var(--color-fg-default);
  list-style: none;
  padding: 4px;
}

/* Set width to the maximum content width */
.endpoints__highlights {
  width: max-content;
}
/* Display elements as inline-block */
.path {
  display: inline-block;
  padding: 15px;
  border-radius: 2px;
  color: var(--color-fg-default);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;
  background-color: var(--bg);
}

/* Override the default code-block styling */
/* .hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  background: rgba(29, 78, 216, 0.15);
  color: var(--color-fg-default);
} */

.code-snippets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px;
  border-radius: 5px;
  /* align end */
  justify-items: start;
  align-items: center;
}
.response-examples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px;
  border-radius: 5px;
  /* align end */
  justify-items: center;
  align-items: center;
}

/* FOOTER SECTON */

.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #282c34;
  text-align: center;
  padding: 10px 0;
}

/* Style footer at bottom of dynamic page */
.footer__list {
  display: flex;
  justify-content: center;
  text-shadow: none;
  list-style-type: none;
}

.f-text {
  color: var(--color-fg-default);
}

@media (max-width: 1400px) {
  .form-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    user-select: none;
  }

  .form-text {
    padding: 7px;
    text-align: center;
  }

  .form-input-text {
    margin: 0;
    padding: 4rem;
  }
  .text-content {
    margin: 0;
  }
}

@media (max-width: 1430px) {
  h1 {
    text-align: center;
    color: var(--color-fg-muted);
  }

  /* Dropdown Content (Hidden by Default) */
  .dropdown__options {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 400px;
    max-height: 200px;
    overflow-y: scroll;
    overflow-x: hidden;
    border: 1px solid #ddd;

    z-index: 1;
  }
  /* Change color of dropdown links on hover */
  .dropdown-content .dropdown__option:hover {
    background-color: #ddd;
  }

  /* Links inside the dropdown */
  .dropdown-content div {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
  }
}
@media (max-width: 400px) {
  .footer {
    display: none;
  }
}

/* Census and Map */
@media (max-width: 1685px) {
  .page-container {
    display: grid;
    grid-template-columns: 1fr;

    justify-items: center;
    padding: 0;
    margin-left: auto;
  }
}
@media (max-width: 1685px) {
  .intro-text-block {
    width: 100%;
    display: block;
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 0px;

    cursor: default;
  }

  h1 {
    display: none;
  }

  .navbar-block a {
    font-size: 3em;
  }
  .section-header {
    font-size: 3em;
  }
  .about-header {
    font-size: 2em;
  }

  p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    padding: 0;
  }
  .list-item {
    font-size: 2em;
    line-height: 1.5;
    margin: 0;
    padding: 0;
  }

  .map-census,
  .text-content {
    border: none;
  }
}
@media (max-width: 1685px) {
  .under-construction__list,
  .highlights__list {
    text-wrap: wrap;
  }
}

/* Media Queries */
@media (max-width: 768px) {
  .form-content-container {
    padding: 15px;
    max-width: 90%;
  }

  .form-label,
  .form-input-text,
  .form-submit button {
    font-size: 0.9rem;
  }
}

/* - Wrap .form-text and related elements that share styling in a container div */
