@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik-VariableFont_wght.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #295c8b;
  --primary-light: #719cc8;
  --primary-soft: #eef4fa;

  --text-dark: #354452;
  --text-muted: #35445296;
  --text-light: #ffffff;

  --bg-light: #f6f9fc;
  --border-light: #e3e9f2;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Rubik", system-ui, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

html {
  font-size: 100%;
}

h1 {
  margin-top: 6%;
  font-size: clamp(2.5rem, 6vw, 6rem);
  color: var(--primary);
  font-weight: 700;
  text-shadow: 0.15rem 0.15rem 0 var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 2rem;
  text-decoration-thickness: 0.15rem;
}

h2 {
  font-weight: 500;
}

h3 {
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--primary);
  letter-spacing: 0.25rem;
}

p {
  font-weight: 400;
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.spacer {
  margin-top: 7rem;
}

.landing-text {
  margin-left: 8%;
}

.landing-subtitle {
  text-align: left;
  width: 30%;
}

.section-title {
  text-align: center;
  color: var(--text-dark);
  text-decoration: none;
  text-shadow: none;
  font-size: 3rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.loader-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader {
  width: 40px;
  height: 26px;
  --c: no-repeat linear-gradient(var(--primary) 0 0);
  background:
    var(--c) 0 100%,
    var(--c) 50% 100%,
    var(--c) 100% 100%;
  background-size: 8px calc(100% - 4px);
  position: relative;
}

.loader:before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  left: 0;
  top: 0;
  animation:
    l3-1 1.5s linear infinite alternate,
    l3-2 0.75s cubic-bezier(0, 200, 0.8, 200) infinite;
}

@keyframes l3-1 {
  100% {
    left: calc(100% - 8px);
  }
}

@keyframes l3-2 {
  100% {
    top: -0.1px;
  }
}

.topnav {
  position: relative;
  z-index: 1000;
  background-color: var(--primary);
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.topnav a {
  color: var(--text-light);
  text-align: center;
  padding: 0.75rem 0.9rem;
  text-decoration: none;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  transition: 0.25s ease;
}

.topnav a:hover {
  background-color: #ddd;
  color: black;
}

.topnav a.active {
  background-color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

.topnav-left {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  margin-right: auto;
  gap: 0.5rem;
}

.search {
  display: flex;
  align-items: center;
  padding: 0.75rem;
}

.search-input {
  font-size: clamp(0.9rem, 1vw, 1rem);
  color: var(--text-light);
  margin-left: 0.75rem;
  outline: none;
  border: none;
  background: transparent;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-icon {
  color: var(--text-light);
}

.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: var(--primary-light);
  border-radius: 0.5rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  display: none;
}

.search-results a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
}

.search-results a:hover {
  background: var(--primary-soft);
  text-decoration: underline;
}

.landing-page {
  background-image: url("Images/LandingBackground.png");
  background-size: cover;
  background-position: center;
  height: 100vh;
  position: relative;
}

.template-page {
  background-image: url("Images/LandingBackground.png");
  background-size: cover;
  background-position: center;
  height: 100vh;
  position: relative;
}

.place-card,
.resource-card {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/10;
  perspective: 1200px;
  padding: 1rem;
  box-sizing: border-box;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition:
    transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1),
    box-shadow 0.25s ease;
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.place-card:hover .card-inner,
.resource-card:hover .card-inner {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  transform: translateY(-0.1rem) scale(1.025);
}

.place-card.flipped .card-inner,
.resource-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
}

.card-front {
  background: #000;
  overflow: visible;
  transition: transform 0.5s ease;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.card-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.12);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.card-bar h3 {
  margin: 0;
  flex: 1;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0;
}

.filters {
  display: flex;
  gap: 10px;
}

.icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--primary);
  transition: 0.2s ease;
  cursor: pointer;
  position: relative;
}

.icon:hover {
  transform: scale(1.08);
  background: #e2edf7;
}

.icon-label {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--text-light);
  font-size: 0.7rem;
  padding: 4px 7px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.icon:hover .icon-label {
  opacity: 1;
}

.card-open {
  position: absolute;
  top: 12px;
  right: 12px;
  text-decoration: none;
}

.card-back {
  background: var(--bg-light);
  padding: 26px;
  transform: rotateY(180deg);
  border: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
}

.card-back h3 {
  margin-bottom: 12px;
  text-align: center;
  font-size: clamp(0.9rem, 1.5vw, 1.4rem);
  letter-spacing: 0;
}

.card-back p {
  line-height: 1.55;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  justify-content: center;
  gap: 1.5rem;
  max-width: 90%;
  margin: 0 auto;
}

.footer {
  background: var(--primary);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  margin-top: auto;
}

.footer a {
  color: var(--text-light);
  text-decoration: none;
}

.footer-title {
  font-weight: bold;
}

.footer-subtitle {
  font-size: 12px;
}

.ca3-scroll-down-link {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  font-size: 3rem;
  color: white;
  text-decoration: none;
  animation: bounce 2s ease-in-out infinite;
}

.ca3-scroll-down-link .material-symbols-outlined {
  font-size: 4rem;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 14px);
  }
}

@media (max-width: 768px) {
  .landing-subtitle {
    width: 85%;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(1%);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.active-filter {
  background: #295c8b;
  color: white;
  border-radius: 6px;
}

.resource-search {
  position: relative;
  width: 100%;
  margin-bottom: 2rem;
}

.resource-search input {
  width: 100%;
  padding: 12px 48px 12px 12px;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  background: #719cc8;
  color: #fff;
  outline: none;
  box-sizing: border-box;
}

.resource-search input::placeholder {
  color: #fff;
  opacity: 1;
}

.resource-search .material-symbols-outlined {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 1.25rem;
  pointer-events: none;
}

.resource-count {
  font-size: 0.9rem;
  color: #295c8b;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.resource-card {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.resource-card.hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.resource-count {
  font-size: 0.9rem;
  color: #295c8b;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.resource-card {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.resource-card.hiding {
  opacity: 0;
  transform: scale(0.96);
}

.resource-card.hidden {
  display: none;
}

.resource-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0 0.5rem 0;
  padding: 10px;
  background: #f2f6fb;
  border-radius: 12px;
  width: 85%;
  margin: 0 auto;
}

.filter-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-button .material-symbols-outlined {
  font-size: 18px;
}

.filter-button:hover {
  background: #e6eff8;
}

.filter-button.active-filter {
  background: #295c8b;
  color: white;
}

.filter-button.active-filter .material-symbols-outlined {
  color: white;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.5rem 0;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #295c8b;
  color: white;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.filter-chip span {
  font-size: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: #295c8b;
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.25s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.button:hover {
  background: #1f4668;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.button:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.button:focus-visible {
  outline: 2px solid #719cc8;
  outline-offset: 2px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  width: min(420px, 90%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.9);
  opacity: 0;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.modal h2 {
  margin-top: 0;
  color: var(--primary);
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal input,
.modal textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  font-family: "Rubik", system-ui, sans-serif;
}

.modal textarea {
  resize: vertical;
  min-height: 90px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-overlay.active .modal {
  transform: scale(1);
  opacity: 1;
}

#requestThankYou img {
  max-width: 120px;
  width: 100%;
}
