/* ============ APPLY MODAL ============ */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalPopupIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(0.8);
  }
}

.popup-ovl {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 20, 39, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  animation: modalFadeIn 0.3s ease;
}

.popup-ovl.active {
  display: flex;
}

.popup-card {
  background: #ffffff;
  border: 1px solid rgba(7, 20, 39, 0.08);
  border-radius: 28px;
  padding: 38px 30px;
  max-width: 440px;
  width: 100%;
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
  color: #111827;
  box-shadow: 0 34px 90px rgba(7, 20, 39, 0.28);
  animation: modalPopupIn 0.4s ease;
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(248, 244, 236, 0.08);
  border: none;
  color: #8a98a8;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  background: #C89B2C;
  color: #F8F4EC;
  transform: rotate(90deg);
}

.popup-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(31, 78, 168, 0.08);
  border: 1px solid rgba(31, 78, 168, 0.2);
  border-radius: 20px;
  font-size: 0.62rem;
  color: #1F4EA8;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
}

.popup-eyebrow-dot {
  width: 6px;
  height: 6px;
  background: #1F4EA8;
  border-radius: 50%;
  animation: modalPulse 1.5s ease infinite;
}

.popup-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #071427;
  line-height: 1.15;
  margin-bottom: 6px;
}

.popup-title em {
  font-style: italic;
  color: #B11217;
}

.popup-sub {
  color: #5a6b7e;
  font-size: 0.78rem;
  margin-bottom: 20px;
}

.popup-card input,
.popup-card select,
.popup-card select#p-dob-year,
.popup-card select#p-dob-month,
.popup-card select#p-dob-day {
  width: 100%;
  padding: 13px 14px;
  background: #F7F9FC;
  border: 1.5px solid #E3E8EF;
  border-radius: 12px;
  color: #111827;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s;
}

.popup-card input::placeholder {
  color: #9aa6b4;
}

.popup-card input:focus,
.popup-card select:focus {
  border-color: #1F4EA8;
  box-shadow: 0 0 0 4px rgba(31, 78, 168, 0.13);
}

.popup-card select {
  cursor: pointer;
}

.popup-card option {
  background: #fff;
  color: #111827;
}

.popup-card input.field-invalid,
.popup-card select.field-invalid,
.apply-page-form input.field-invalid,
.apply-page-form select.field-invalid,
.cpf input.field-invalid,
.cpf select.field-invalid {
  border-color: #B11217;
  box-shadow: 0 0 0 3px rgba(177, 18, 23, 0.12);
}

.popup-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popup-btn {
  width: 100%;
  padding: 14px 22px;
  background: linear-gradient(135deg, #B11217, #d8262c);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 24px rgba(177, 18, 23, 0.3);
  margin-top: 4px;
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(177, 18, 23, 0.4);
}

.popup-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
  margin-top: 4px;
}

.popup-consent input {
  width: auto;
  min-width: 14px;
  height: 14px;
  accent-color: #C89B2C;
  margin-top: 3px;
  cursor: pointer;
}

.popup-consent span {
  color: #5a6b7e;
  font-size: 0.66rem;
  line-height: 1.55;
}

.popup-consent a {
  color: #C89B2C;
  text-decoration: underline;
}

.popup-field-error {
  display: none;
  font-size: 0.72rem;
  color: #B11217;
  margin-top: 4px;
  line-height: 1.35;
  font-weight: 500;
}

.popup-field-error.visible {
  display: block;
}

.popup-age-ok {
  font-size: 0.78rem;
  color: #1F4EA8;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.3;
}

/* ============ APP DOWNLOAD MODAL ============ */
.appdl-ovl {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 20, 39, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px;
}

.appdl-ovl.active {
  display: flex;
  animation: modalFadeIn 0.4s ease;
}

.appdl-card {
  background: linear-gradient(145deg, #0B2240, #071427);
  border: 1px solid rgba(200, 155, 44, 0.4);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  animation: modalPopupIn 0.4s ease;
}

.appdl-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(200, 155, 44, 0.3), transparent 65%);
  filter: blur(36px);
  pointer-events: none;
}

.appdl-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(200, 155, 44, 0.2), transparent 65%);
  filter: blur(36px);
  pointer-events: none;
}

.appdl-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(248, 244, 236, 0.08);
  border: none;
  color: #F8F4EC;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.appdl-close:hover {
  background: #C89B2C;
  transform: rotate(90deg);
}

.appdl-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.appdl-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, #C89B2C, #C89B2C);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 2rem;
  box-shadow: 0 12px 30px rgba(200, 155, 44, 0.4);
}

.appdl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(31, 78, 168, 0.12);
  border: 1px solid rgba(31, 78, 168, 0.3);
  border-radius: 20px;
  font-size: 0.64rem;
  color: #4A74C4;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 16px;
}

.appdl-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: #F8F4EC;
  line-height: 1.35;
  margin-bottom: 8px;
  font-style: italic;
}

.appdl-quote em {
  font-style: italic;
  color: #C89B2C;
  font-weight: 600;
}

.appdl-attr {
  color: rgba(248, 244, 236, 0.55);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.appdl-features {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 26px;
  padding: 16px 18px;
  background: rgba(248, 244, 236, 0.04);
  border: 1px solid rgba(248, 244, 236, 0.08);
  border-radius: 16px;
}

.appdl-feat {
  text-align: center;
}

.appdl-feat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #C89B2C;
  line-height: 1;
}

.appdl-feat-lbl {
  font-size: 0.6rem;
  color: rgba(248, 244, 236, 0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 600;
}

.appdl-divider {
  width: 1px;
  background: rgba(248, 244, 236, 0.12);
}

.appdl-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.appdl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 20px;
  color: white;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: all 0.3s;
  flex: 1;
  min-width: 150px;
  justify-content: center;
}

.appdl-btn-android {
  background: linear-gradient(135deg, #1F4EA8, #173F86);
  box-shadow: 0 8px 22px rgba(31, 78, 168, 0.35);
}

.appdl-btn-android:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(31, 78, 168, 0.5);
}

.appdl-btn-ios {
  background: linear-gradient(135deg, #C89B2C, #C89B2C);
  color: #071427;
  box-shadow: 0 8px 22px rgba(200, 155, 44, 0.35);
}

.appdl-btn-ios:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(200, 155, 44, 0.5);
}

.appdl-skip {
  display: block;
  margin-top: 20px;
  color: rgba(248, 244, 236, 0.45);
  font-size: 0.78rem;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'Sora', sans-serif;
}

.appdl-skip:hover {
  color: #C89B2C;
}

/* Trigger button (optional — style your own anywhere) */
.app-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 28px;
  background: rgba(248, 244, 236, 0.08);
  border: 1.5px solid rgba(248, 244, 236, 0.25);
  border-radius: 32px;
  color: #F8F4EC;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

.app-download-btn:hover {
  background: rgba(200, 155, 44, 0.15);
  border-color: rgba(200, 155, 44, 0.45);
  transform: translateY(-2px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 520px) {

  .popup-card,
  .appdl-card {
    padding: 22px 18px;
  }

  .popup-grid2 {
    grid-template-columns: 1fr;
  }

  .appdl-buttons {
    flex-direction: column;
  }

  .appdl-features {
    gap: 10px;
  }

  .appdl-quote {
    font-size: 1.15rem;
  }
}