@font-face {
  font-family: "Satoshi";
  src: url("../../fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../../fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../../fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-black: #010309;
  --color-white: #ffffff;
  --color-primary: #2da54b;
  --color-bg-action: #eaeaea;
  --color-text-dim: #d1d1d1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Satoshi", sans-serif;
  background-color: var(--color-black);
  color: var(--color-white);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-container {
  width: 100%;
  max-width: 500px;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--color-black);
  display: flex;
  flex-direction: column;
}

.home-page.app-container {
    overflow: hidden;
    height: 100dvh;
}

.home-page .bg-media {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.home-page .bg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.home-page .bg-media::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(1, 3, 9, 0.4) 0%,
    rgba(1, 3, 9, 0.2) 30%,
    rgba(1, 3, 9, 0.8) 60%,
    rgba(1, 3, 9, 0.8) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 25px 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block-start: 0;
}

.logo {
  height: 35px;
  width: auto;
}

.lang-switch {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.lang-switch:hover {
  color: var(--color-primary);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.form-content {
  justify-content: flex-start;
  margin-block-start: 32px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-block-end: 30px;
}

.hero-text h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.2px;
}

.hero-text p {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-dim);
  letter-spacing: 0px;
}

.action-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.select-dept {
  width: 100%;
  padding: 24px 24px;
  background-color: var(--color-bg-action);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-black);
  transition: background-color 0.2s ease;
  appearance: none;
  border-radius: 0;
  outline: none;
  padding-inline-end: 56px;
}

.select-dept:hover {
  background-color: var(--color-white);
}

.custom-select-wrapper .icon-plus {
  position: absolute;
  inset-inline-end: 24px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 24px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cross-line {
  position: absolute;
  background-color: var(--color-black);
}

.cross-h {
  width: 100%;
  height: 1.5px;
}

.cross-v {
  height: 100%;
  width: 1.5px;
}

/* --- Form Page Styles --- */
.header-select-wrapper {
  position: relative;
  width: 100%;
  margin-block-end: 24px;
}

.selected-dept-header {
  width: 100%;
  padding: 20px;
  background-color: var(--color-black);
  border: 1px solid hsl(0deg 0% 100% / 30%);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  appearance: none;
  outline: none;
  cursor: pointer;
  padding-inline-end: 48px;
}

.selected-dept-header option {
  color: var(--color-black);
}

.header-select-wrapper .icon-chevron-down {
  position: absolute;
  inset-inline-end: 24px;
  inset-block-start: 50%;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.icon-chevron-down {
  border: solid var(--color-white);
  border-width: 0 1px 1px 0;
  display: inline-block;
  padding: 4px;
  transform: rotate(45deg);
}

.form-title {
  color: var(--color-primary);
  font-size: 18px;
  font-weight: 700;
  margin-block-end: 24px;
  letter-spacing: -0.5px;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-block-end: 24px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
}

.form-control {
  width: 100%;
  background-color: transparent;
  border: 1px solid hsl(0deg 0% 100% / 30%);
  color: var(--color-white);
  padding: 16px;
  font-family: inherit;
  font-size: 16px;
  border-radius: 0;
  outline: none;
  min-height: 55px;
  transition: border-color 0.2s;
}

.form-control[aria-invalid="true"] {
  border-color: #ff4d4f;
}

.form-control:focus {
  border-color: var(--color-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-select-wrapper {
  position: relative;
  width: 100%;
}

.form-select-wrapper .icon-chevron-down {
  position: absolute;
  inset-inline-end: 20px;
  inset-block-start: 50%;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

.form-select {
  appearance: none;
  padding-inline-end: 48px;
}

.form-select.form-control {
  color: #888888;
}

.form-select.form-control option {
  color: var(--color-black);
}

.btn-primary {
  width: 100%;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 24px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition:
    background-color 0.2s,
    opacity 0.2s;
}

.btn-primary:active {
  opacity: 0.9;
}

/* Error States */
.form-group .error-msg {
  display: none;
  color: #ff4d4f;
  font-size: 12px;
}

.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid var(--color-white);
  border-radius: 50%;
  animation: spin 0.5s linear infinite;
}

.btn-primary.loading .btn-spinner {
  display: block;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid hsl(0deg 0% 100% / 30%);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- Success Page Styles --- */
.success-page.app-container {
  background-color: var(--color-black);
  overflow: hidden;
}

.success-page.app-container::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(45, 165, 75, 0.45) 0%, rgba(1, 3, 9, 0) 60%);
  opacity: 0;
  animation: glowBg 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes glowBg {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.success-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block-end: 32px;
  position: relative;
  z-index: 2;
}

.success-wrapper {
  flex: 1;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin-block-end: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon img {
  width: 100%;
  height: 100%;
  opacity: 0;
  animation:
    popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards,
    pulseIcon 2s ease-in-out 0.8s infinite;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseIcon {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.success-title {
  font-size: 32px;
  font-weight: 700;
  margin-block-end: 16px;
}

.success-subtitle {
  font-size: 16px;
  color: var(--color-text-dim);
  line-height: 1.5;
}

.success-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  margin-block-start: auto;
  padding-block-start: 32px;
  position: relative;
  z-index: 2;
}

.success-footer p {
  font-size: 13px;
  color: #888888;
  line-height: 1.5;
  padding-inline: 16px;
}

.btn-secondary {
  display: block;
  text-align: center;
  text-decoration: none;
  width: 100%;
  background-color: #1a1c23;
  color: var(--color-white);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 24px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #262833;
}

/* --- Error Page Styles --- */
.error-page.app-container {
  background-color: var(--color-black);
  overflow: hidden;
}

.error-page.app-container::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 77, 79, 0.3) 0%, rgba(1, 3, 9, 0) 60%);
  opacity: 0;
  animation: glowBg 1.5s ease-out forwards;
  pointer-events: none;
  z-index: 1;
}

.error-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block-end: 32px;
  position: relative;
  z-index: 2;
}

.error-wrapper {
  flex: 1;
}

.error-icon {
  width: 72px;
  height: 72px;
  margin-block-end: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon svg {
  width: 100%;
  height: 100%;
  opacity: 0;
  animation:
    popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards,
    pulseIcon 2s ease-in-out 0.8s infinite;
}

.error-title {
  font-size: 32px;
  font-weight: 700;
  margin-block-end: 16px;
}

.error-subtitle {
  font-size: 16px;
  color: var(--color-text-dim);
  line-height: 1.5;
  padding-inline: 16px;
}

.error-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  margin-block-start: auto;
  padding-block-start: 32px;
  position: relative;
  z-index: 2;
}

.error-footer p {
  font-size: 13px;
  color: #888888;
  line-height: 1.5;
  padding-inline: 16px;
}

/* Add responsive break for very specific low height screens just in case */
@media (max-width: 360px) {
  .content {
    padding: 16px 20px;
  }
  .hero-text h1 {
    font-size: 38px;
  }
}
