/* ===== CSS Variables ===== */
:root {
  --color-primary-900: #21093d;
  --color-primary-700: #58479d;
  --color-primary-500: #76638d;
  --color-primary-transparent: rgba(33, 9, 61, 0.15); /* 15% */
  --color-error: #e05555;

  --font-montserrat-alternates: "Montserrat Alternates", sans-serif;
  --font-onest: "Onest", sans-serif;

  --spacing-desktop: 64px;
  --spacing-tablet: 32px;
  --spacing-mobile: 24px;
}

/* ===== Base Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-onest);
  font-weight: 400;
  line-height: 1.5;
  background-color: white;
  color: var(--color-primary-900);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-montserrat-alternates);
  font-weight: 700;
}

a {
  text-decoration: none;
  /* color: var(--color-primary-900); */
}

li a {
  text-decoration: none;
  /* font-family: "Onest", sans-serif; */
  /* font-weight: 500; */
  /* color: #21093d; */
  color: var(--color-primary-900);
  font-family: var(--font-onest);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

li a:hover {
  color: var(--color-primary-500);
}

li a:active,
li a.active,
li a[aria-current="page"] {
  color: var(--color-primary-700);
  text-decoration: underline;
}

ol,
ul {
  list-style-position: inside; /* This brings the numbers inside the paragraph */
  padding-left: 0; /* Optional: removes default left padding */
}
ol > li {
  padding: 16px 0; /* Ensures numbers are used for ordered lists */
}

ol li p {
  display: inline; /* Makes the paragraph flow inline with the number */
  margin-left: 0.5em; /* Adds a small space between number and text */
}

.font-medium {
  font-weight: 500;
}

.font-bold {
  font-weight: 700;
}
/* 
button {
  cursor: pointer;
  font-family: inherit;
} */

/* ===== Layout Spacing ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--spacing-desktop);
  padding-right: var(--spacing-desktop);
}

/* === Header Layout === */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(33, 9, 61, 0.15); /* primary.transparent */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--spacing-desktop);
  flex-wrap: wrap;
}

.logo-wrapper {
  flex: 1;
  display: flex;
  justify-content: start;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 0;
  margin: 0;
}

.nav-list li a {
  text-decoration: none;
  /* font-family: "Onest", sans-serif; */
  /* font-weight: 500; */
  /* color: #21093d; */
  color: var(--color-primary-900);
  font-family: var(--font-onest);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-list li a:hover {
  color: var(--color-primary-500);
}

.nav-list li a:active,
.nav-list li a[aria-current="page"] {
  color: var(--color-primary-700);
  text-decoration: underline;
}

.social-icons {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-social {
  justify-content: end;
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Footer Styles - Desktop First */
.footer {
  background-color: #fff;
  color: var(--color-primary-500);
}

.footer-content {
  display: flex;
  flex-direction: row;
  gap: 96px;
  width: 100%;

  padding-top: 54px;
  padding-bottom: 54px;
}

.footer-conf-link {
  color: var(--color-primary-transparent);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.footer-title {
  font-family: "Onest", sans-serif;
  font-weight: bold;
  font-size: 24px;
  line-height: 1.45;
  color: #21093d;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-right {
  display: flex;
  flex-direction: row;
  gap: 96px;
}

.footer-menu ul {
  list-style: none;
}
/* .footer-menu ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
} */

.footer-contact > * {
  display: block;
  color: var(--color-primary-500);
  /* line-height: 145%; */
  /* margin-bottom: 12px;  */
}

/* Remove margin from last item */
/* .footer-contact > *:last-child {
  margin-bottom: 0;
} */

/* Maintain hover effects */
.footer-contact a:hover {
  color: var(--color-primary-700);
}

/* Base icon color */
.social-icons a svg {
  fill: var(--color-primary-500); /* #76638D */
  transition: fill 0.2s ease;
}
/* Hover state */
.social-icons a:hover svg {
  fill: var(--color-primary-700); /* #58479D */
}

/* Clicked (active) state */
.social-icons a:active svg {
  fill: var(--color-primary-900); /* #21093D */
}

.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}

.grid > .column {
  margin-bottom: var(--gutter);
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

/* .text figure {
  margin: 3rem 0;
}
.text figcaption {
  padding-top: 0.75rem;
  color: var(--color-text-grey);
}
.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.text figure ul li {
  list-style: none;
} */
img {
  width: 100%;
}

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-black);
}
.img img,
.video iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.img[data-contain] img {
  object-fit: contain;
}
.img-caption,
.video-caption {
  padding-top: 0.75rem;
  line-height: 1.5em;
}

/* Section background */
.form-section {
  background-color: var(--color-primary-700); /* primary-700 */
}

/* Container padding */
.form-container {
  /* width: 100%; */
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Grid layout */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

/* Heading styles */
.form-title {
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 48px;
  font-weight: bold;
  color: white;
  line-height: 1.1;
  display: grid;
  gap: 0.5em;
}

/* Form column */
.form-column form {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Message display (hidden by default) */
.form-message {
  margin-top: 1rem;
}

.hidden {
  display: none;
}

.custom-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 500px;
}

/* Shared input and textarea styles */
.form-group {
  position: relative;
  width: 100%;
}

.input-rounded,
.textarea-rounded {
  /* Layout */
  width: 100%;
  background-color: white;

  /* Typography */
  font-family: "Onest", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 145%;
  letter-spacing: -0.5%;

  /* Visual Style */
  border: none;
  transition: all 200ms;
}

/* Remove focus outline */
.input-rounded:focus,
.textarea-rounded:focus {
  outline: none;
}

/* Placeholder styling */
.input-rounded::placeholder,
.textarea-rounded::placeholder {
  color: var(--color-primary-transparent);
  /* color: rgba(var(--color-primary-500), 0.5); Assuming primary-500 is a CSS variable */
}

/* Input specific styles */
.input-rounded {
  height: 55px;
  border-radius: 100px;
  padding: 0 30px;
}

/* Textarea specific styles */
.textarea-rounded {
  min-height: 100px;
  border-radius: 20px;
  padding: 16px 30px; /* py-4 = 16px */
  resize: none;
}

/* Filled State (when not empty) */
.input-rounded:not(:placeholder-shown),
.textarea-rounded:not(:placeholder-shown) {
  border: 1px solid var(--color-primary-500);
  color: var(--color-primary-900);
}

/* Error State */
.input-rounded.error,
.textarea-rounded.error {
  border-style: solid;
  border-width: 1px;
  border-color: var(--color-error);
  color: var(--color-error);
}

/* Focus State */
.input-rounded:focus,
.textarea-rounded:focus {
  box-shadow: 0 0 0 2px var(--color-primary-700);
}

/* Error message styling */
.input-error-msg {
  position: absolute;
  top: 33px;
  color: var(--color-error);
  font-size: 11px;
  line-height: 145%;
  letter-spacing: -0.5%;
  padding: 4px 30px;
}

/* Custom checkbox styles */
.checkbox-holder {
  display: flex;
  align-items: center;
  gap: 12px;
}
.checkbox-holder a {
  display: flex;
}
.checkbox-holder a svg {
  fill: var(--color-primary-500); /* #76638D */
  transition: fill 0.2s ease;
}
/* Hover state */
.checkbox-holder a:hover svg {
  fill: white;
}

/* Clicked (active) state */
.checkbox-holder a:active svg {
  fill: var(--color-primary-900); /* #21093D */
}
.custom-checkbox {
  /* Base styling */
  height: 17px;
  width: 17px;
  appearance: none;
  border-radius: 0;
  border: 1px solid white;
  background-color: var(--color-primary-700);
  cursor: pointer;
}

.custom-checkbox:checked {
  background-color: var(--color-primary-700);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

/* Checkbox label */
.checkbox-label {
  color: white;
  cursor: pointer;
}

.alert.success {
  background: #d1fae5;
  color: #065f46;
  padding: 12px;
  border-radius: 8px;
}

.alert.error {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px;
  border-radius: 8px;
}

/* .honeypot {
  display: none;
} */

.submit-button {
  /* Layout */
  width: 220px;
  height: 50px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  /* Visual Style */
  background-color: var(--color-primary-700);
  color: white;
  border-radius: 100px;
  border: 2px solid white;

  /* Typography */
  font-family: var(--font-onest);
  font-weight: 500;
  font-size: 18px;
  line-height: 145%;
  letter-spacing: -0.5%;
  text-align: center;

  /* States */
  transition: all 200ms;
}

.submit-button:hover {
  border-color: var(--primary-900);
  color: var(--primary-900);
}

.submit-button:active {
  background-color: var(--color-primary-500);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Focus styles */
/*
.submit-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-700);
  box-shadow: 0 0 0 2px rgba(var(--primary-700), 0.5);
}
*/

.uniform__potty {
  position: absolute;
  left: -9999px;
}

.error-message {
  /* Layout */
  position: absolute;
  top: 33px;
  padding: 4px 30px;

  /* Typography */
  color: var(--color-error);
  font-size: 11px;
  line-height: 145%;
  letter-spacing: -0.5%;
}
.checkbox-group .error-message {
  top: 20px;
}
.purple {
  background-color: var(--color-primary-700); /* #58479D */
  color: #fff;
}
.section {
  /* background-color: var(--color-primary-700); */
  padding: 40px 0 80px;
}
.section-title {
  font-family: var(--font-montserrat-alternates);
  color: var(--color-primary-900);
  font-weight: 700;
  font-size: 48px;
  line-height: 120%;
  letter-spacing: -2%;
  vertical-align: middle;
  padding-top: 30px;
  padding-bottom: 30px;
}
.cards-container {
  display: grid;
  gap: 48px;
  /* max-width: 1200px; */
  margin: 0 auto;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  border-top: 1px solid #ccc;
  /* padding: 20px 0; */
  padding-top: 24px;
  margin-top: 30px;
}

.text-line-1 {
  color: #58479d;
  /* font-family: var(--font-onest); */
  font-weight: 700;
  font-size: 36px;
  line-height: 100%;
  letter-spacing: -0.02em;
  margin-bottom: 12px;

  display: inline-block;
  position: relative;
  /* color: #58479d;  */
  /* font-weight: bold; */
  transition: all 0.3s ease;

  /* display: inline-block;
  position: relative; */
}

/* Gradient Underline Animation */
.text-line-1::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(90deg, #58479d, #ff6b6b, #feca57);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.4s ease-out;
}

/* Gradient Text + Underline on Hover */
.card:hover .text-line-1 {
  background: linear-gradient(90deg, #58479d, #ff6b6b, #feca57);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card:hover .text-line-1::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}
/* .text-line-1::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  bottom: -5px;
  left: 0;
  background: #4a00e0;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.card:hover .text-line-1::after {
  transform: scaleX(1);
  transform-origin: bottom left;
} */

.text-line-2 {
  color: #76638d;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: -0.005em;
  vertical-align: middle;
}

/* //////////////////////////////////////////// */

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-feedback {
  margin-top: 1rem;
  font-weight: bold;
}

.text-success {
  color: #28a745;
}

/* this one is used */
.text-danger {
  color: white;
  background: #e05555;
  padding: 20px;
}

/********************** Popup Overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  display: flex;
  opacity: 1;
}

/* Popup Container */
.popup-container {
  position: relative;
  background: white;
  /* border-radius: 12px; */
  /* padding: 40px; */
  max-width: 600px;
  width: 90%;
  margin: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.4s ease;
}

/* Close Button */
.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.2s ease;
}

.popup-close:hover {
  transform: scale(1.1);
}

.popup-close svg {
  display: block;
}

/* Content Styles */
.popup-content {
  padding: var(--spacing-desktop);
}

.popup-heading {
  text-align: center;
  font-family: var(--font-montserrat-alternates);
  font-weight: 700;
  font-size: 48px;
  line-height: 120%;
  letter-spacing: -2%;
  color: var(--color-primary-900);
  margin-bottom: 20px;
}

.popup-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-primary-500);
}

.popup-text-bold {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 15px;
}

.default-container {
  margin-bottom: 30px;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (min-width: 60rem) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .grid > .column {
    grid-column: span var(--columns);
  }
}

@media (max-width: 1279px) {
  .container {
    padding-left: var(--spacing-tablet);
    padding-right: var(--spacing-tablet);
  }
  .header-inner {
    padding: 40px var(--spacing-tablet);
  }

  .footer-container {
    padding: var(--spacing-tablet);
  }

  .footer-content,
  .footer-right {
    gap: var(--spacing-tablet);
  }
}

/* Mobile - up to 799px (1 column) */
@media (max-width: 799px) {
  .container {
    padding-left: var(--spacing-mobile);
    padding-right: var(--spacing-mobile);
  }
  .header-inner {
    flex-direction: column;
    padding: 20px var(--spacing-mobile);
  }

  .logo-wrapper {
    margin-bottom: 20px;
  }

  .main-nav {
    margin-bottom: 20px;
  }

  .header-inner .social-icons {
    display: none;
  }

  .footer-content {
    flex-direction: column;
  }
  .footer-right {
    flex-direction: column;
  }

  .cards-container {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* /// TEPM remove after hiding cases (projects) from home  */
.projects-holder {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 60px;
}

.filter-menu {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 40px;
}

/* NOT Masonry Layout */
.projects-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  padding-bottom: 60px;
}

.project-item {
  height: 500px;
  position: relative;
  overflow: hidden;
}

.project-item img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
}

/* Mobile: 1 column */
@media (max-width: 799px) {
  .projects-list {
    gap: 12px;
    grid-template-columns: 1fr;
  }
  .filter-menu {
    flex-direction: column;
    gap: 20px; /* You can adjust this gap as needed for mobile */
  }
}
