/* Color Palette */
:root {
  --navy: #003049;
  --red: #d62828;
  --orange: #f77f00;
  --yellow: #fcbf49;
  --cream: #f7ecdc;
  --text-light: #fff;
  --text-dark: #1a1a1a;
  --spacing: 1rem;
  --border-radius: 8px;
  --font-stack: "Roboto", Tahoma, Geneva, Verdana, sans-serif;
}

.red__color {
  color: var(--red);
}
.orange__color {
  color: var(--orange);
}

@font-face {
  font-family: "NHL Phoenix Regular";
  src: url("fonts/NHLPhoenix.ttf") format("ttf");
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  color: var(--text-dark);
  background-color: var(--navy);
}

.navbar__title {
  margin: 0;
}

h1 {
  font-size: 4.5rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.4rem;
}
h4 {
  font-size: 1rem;
}

p {
  font-size: 1rem;
  line-height: 1.5rem;
  letter-spacing: 0.03em;
}

a {
  font-family: inherit;
  color: var(--orange);
  text-decoration: underline;
}

a:hover,
a:focus {
  text-decoration: none;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--navy);
  padding: 1rem 2rem;
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar__logo {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--orange);
}

.navbar__links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.navbar__links li a {
  text-decoration: none;
  color: var(--cream);
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar__links li a:hover {
  color: #f77f00;
}

.background-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.flex-display {
  justify-content: center;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.background-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  /*  background-color: rgba(0, 0, 0, 0.2); */
  z-index: -1;
}

.main-content {
  gap: var(--spacing);
  padding: var(--spacing);
  padding: 4rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.card__title {
  color: var(--orange);
  margin-bottom: 0;
  text-align: left;
  font-size: 2.5rem;
}

.section-caption {
  font-size: 0.8rem;
  color: var(--orange);
  margin: 0 0 1rem 0;
  font-weight: bold;
}

.card__desc {
  color: var(--text-light);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem auto;
  font-size: 1.2rem;
  line-height: 1.6;
}

.graph-container {
  width: 100%;
  max-width: 1000px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.graph-box {
  width: 60%;
  height: 450px;
  border: 2px solid #eae2b7;
  overflow: hidden;
  margin: 1rem auto;
}

.graph-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.small-img {
  max-width: 70%;
  height: auto;
  margin: 1rem auto;
  display: block;
}

.site-header {
  position: relative;
  height: 100vh;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;

  justify-content: center;
  color: var(--text-light);
}

.site-header__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.site-header__content {
  z-index: 1;
  text-align: center;
}

.site-header__title {
  font-family: "NHL Phoenix", serif;
  font-size: 9rem;
  color: var(--orange);
  text-align: center;
  line-height: 1;
  animation: float 2s ease-in-out infinite;
  color: #fca82f;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 10px rgba(252, 168, 47, 0.4);
  letter-spacing: 0.05em;
}

.line {
  display: block;
}

.site-header__subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0;
}

.site-header__title .line {
  display: block;
  font-family: "NHL Phoenix", serif;
}

.line-1 {
  font-size: 130px;
  color: var(--orange);
  margin-bottom: -3px;
}

.line-2 {
  font-size: 80px;
  color: var(--orange);
}

.line-3 {
  font-size: 130px;
  color: var(--orange);
  margin-top: -3px;
}

.footer {
  background-color: var(--navy);
  color: var(--text-light);
  text-align: center;
  padding: var(--spacing);
}

.footer__text {
  margin: 0;
}

.world_tour_container {
  display: flex;
  gap: 1rem;
  align-items: center;
  max-width: 1000px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

#map {
  width: 100%;
  height: 800px;
  min-height: 400px;
  border-radius: 8px;
}

.data__section {
  display: flex;
  justify-content: center;
  margin: 16px auto;
  max-width: 1000px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.info-panel {
  padding: 2rem;
  background: var(--cream);
  border-radius: 5px;
  display: none;
  height: fit-content;
}

#global-favorites {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.card-box {
  perspective: 1000px;
  width: 285px;
  height: 395px;
  overflow: hidden;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.2s ease-in-out;
}

.card-box.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  backface-visibility: hidden;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: var(--cream);
}

.card-front {
  padding: 0;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.front-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border-radius: 0;
  padding: 0;
  margin: 0;
}

.card-back {
  background-color: var(--cream);
  transform: rotateY(180deg);
  text-align: center;
  font-size: 1rem;
  color: var(--text-dark);
  overflow-y: auto;
  padding: 1rem;
  box-sizing: border-box;
}

.card-back img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0;
  margin-bottom: 0.75rem;
}

.card-back .card-details p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.card-title {
  font-family: "Caudex", serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.75rem;
  color: var(--text-dark);
}

.card-back .card-details p {
  font-family: "Caudex", serif;
  font-size: 0.9rem;
  line-height: 1.2;
  margin: 0.2rem 0;
}

#propertySelector {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #ccc;
  background-color: #fff;
  font-family: var(--font-stack);
  color: var(--text-dark);
  width: max-content;
  max-width: 300px;
}

svg text {
  font-family: var(--font-stack);
  fill: var(--text-light);
}

.axis-label {
  fill: var(--text-light);
  font-size: 1.25rem;
}

.x-axis path,
.y-axis path,
.x-axis line,
.y-axis line {
  stroke: #ccc;
}

.x-axis text,
.y-axis text {
  font-size: 1rem;
  fill: var(--text-light);
  font-weight: 300;
}

#line-chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}

#tooltip {
  position: absolute;
  display: none;
  pointer-events: none;
  background: var(--text-light);
  color: var(--text-dark);
  padding: 0.5rem;
  border-radius: 0px;
  font-size: 0.85rem;
  z-index: 1000;
  opacity: 0.75;
}

#category-race {
  width: 100%;
  height: auto;
  margin: 2rem auto;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#category-race svg {
  width: 100%;
  max-width: 1600px;
  height: auto;
  display: block;
}

body,
html {
  overflow-x: hidden;
}

.bump-line {
  stroke-width: 7;
  opacity: 0.7;
  transition: opacity 0.3s ease, stroke-width 0.3s ease;
}

.line-group:hover .bump-line {
  opacity: 1;
  stroke-width: 10;
}

.bump-dot {
  transition: r 0.2s ease, fill-opacity 0.2s ease;
  r: 6px;
  fill-opacity: 0.8;
  pointer-events: all;
  cursor: pointer;
}

.line-group:hover .bump-dot {
  fill-opacity: 1;
  r: 8px;
}

.line-group text {
  font-size: 12px;
  fill: var(--text-light);
  pointer-events: none;
}

#category-race text {
  font-family: var(--font-stack);
  fill: var(--text-light);
}

#category-race .title {
  fill: var(--text-light);
  font-weight: 600;
}

#tooltip-categ {
  position: absolute;
  display: none;
  pointer-events: none;
  background: var(--text-light);
  color: var(--text-dark);
  padding: 0.5rem;
  border-radius: 0px;
  font-size: 0.85rem;
  z-index: 1000;
  opacity: 0.8;
}

.graph-container {
  margin-bottom: 1rem;
  padding-bottom: 0;
}

body,
html {
  overflow-x: hidden;
}

.background-wrapper,
.data__section {
  padding-left: 0;
  padding-right: 0;
}

label[for="yearSelector"] {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 500;
  margin-right: 0.5rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

#yearSelector {
  appearance: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background-color: var(--cream);
  color: var(--text-dark);
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-family: var(--font-stack);
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: left;
}

#yearSelector:hover {
  border-color: var(--cream);
  box-shadow: 0 0 0 2px rgba(247, 127, 0, 0.2);
}

#yearSelector:focus {
  outline: none;
  border-color: var(--cream);
  box-shadow: 0 0 0 3px rgba(247, 127, 0, 0.3);
}

label[for="propertySelector"] {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 500;
  margin-right: 0.5rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}

#propertySelector {
  appearance: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background-color: var(--cream);
  color: var(--text-dark);
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-family: var(--font-stack);
  transition: all 0.2s ease;
  cursor: pointer;
  width: fit-content;
  text-align: left;
}

#propertySelector:hover {
  border-color: var(--cream);
  box-shadow: 0 0 0 2px rgba(247, 127, 0, 0.2);
}

#propertySelector:focus {
  outline: none;
  border-color: var(--cream);
  box-shadow: 0 0 0 3px rgba(247, 127, 0, 0.3);
}

.property-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  gap: 0.5rem;
}

.mapboxgl-popup-content {
  background-color: rgba(0, 48, 73, 0.65) !important;
  color: #fff;
  font-family: "Inter", sans-serif;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  font-size: small;
  max-width: 200px;
}

.mapboxgl-popup-content h3,
.mapboxgl-popup-content p {
  font-size: inherit;
}
#world_heat_map {
  width: 100%;
  display: flex;
  justify-content: center;
}

#world_heat_map svg {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

.selector-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

.story-block {
  max-width: 1000px;
  margin: 2rem auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  color: var(--text-light);
}

.story-block h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--orange);
  text-align: left;
}
.story-block h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--yellow);
  text-align: left;
}

.story-block p {
  font-size: 1.1rem;
  line-height: 1.7rem;
  margin-bottom: 0.8rem;
  text-align: justify;
}

select,
#yearSelector,
#propertySelector {
  background-color: var(--navy);
  color: var(--text-light);
  border: 2px solid var(--orange);
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  font-family: var(--font-stack);
  font-size: 1rem;
  cursor: pointer;
  width: max-content;
  max-width: 300px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  padding-right: 2.5rem;
  text-align: left;
}

select::after,
#yearSelector::after,
#propertySelector::after {
  content: "";
  position: absolute;
  pointer-events: none;
  top: 50%;
  right: 1rem;
  width: 0;
  height: 0;
  margin-top: -3px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--orange);
  text-align: left;
}

select {
  position: relative;
  text-align: left;
}

select:hover,
#yearSelector:hover,
#propertySelector:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
}

select:focus,
#yearSelector:focus,
#propertySelector:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 12px var(--yellow);
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.play-button {
  margin-top: 2rem;
  padding: 1.2rem 3rem;
  font-size: 1.4rem;
  font-family: "NHL Phoenix", serif;
  color: #fca82f;
  background-color: transparent;
  border: 2px solid #fca82f;
  border-radius: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.play-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(252, 168, 47, 0.4),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 1;
}

.play-button:hover::before {
  left: 100%;
}

.play-button:hover {
  color: #fff;
  background-color: #fca82f;
  box-shadow: 0 0 12px rgba(252, 168, 47, 0.6);
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.float-img {
  position: absolute;
  width: 100px;
  opacity: 0.9;
  animation: floatAnim 5s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.float-img:hover {
  transform: scale(1.2) rotate(5deg);
  z-index: 2;
  opacity: 1;
}

.float-img {
  --tilt: 0deg;
  transform: rotate(var(--tilt));
  animation: floatAnim 5s ease-in-out infinite;
}

@keyframes floatAnim {
  0% {
    transform: translateY(0px) rotate(var(--tilt));
  }
  50% {
    transform: translateY(-10px) rotate(var(--tilt));
  }
  100% {
    transform: translateY(0px) rotate(var(--tilt));
  }
}

.pos1 {
  top: 10%;
  left: 5%;
  --tilt: -20deg;
  width: 120px;
}
.pos2 {
  top: 40%;
  left: 17%;
  --tilt: 10deg;
  width: 120px;
}
.pos3 {
  top: 12%;
  right: 17%;
  --tilt: 12deg;
  width: 110px;
}
.pos4 {
  bottom: 37%;
  right: 8%;
  --tilt: -10deg;
  width: 170px;
}
.pos5 {
  bottom: 10%;
  left: 10%;
  --tilt: -20deg;
  width: 190px;
}
.pos6 {
  bottom: 10%;
  right: 20%;
  --tilt: -10deg;
  width: 130px;
}
.pos7 {
  top: 15%;
  left: 20%;
  --tilt: -10deg;
  width: 60px;
}
.pos8 {
  bottom: 20%;
  left: 32%;
  --tilt: 5deg;
  width: 65px;
}
.pos9 {
  bottom: 17%;
  right: 10%;
  --tilt: 10deg;
  width: 70px;
}
.pos10 {
  bottom: 50%;
  right: 23%;
  --tilt: -5deg;
  width: 50px;
}
.pos11 {
  top: 20%;
  right: 7%;
  --tilt: -10deg;
  width: 60px;
}
.pos12 {
  bottom: 40%;
  left: 7%;
  --tilt: -2deg;
  width: 50px;
}
.pos13 {
  bottom: 13%;
  right: 32%;
  --tilt: -5deg;
  width: 55px;
}
