/* ============================================
   CitizenshipTestPro — Ultimate App Funnel
   ============================================ */

/* ===== COUNTRY SELECTOR MODAL ===== */
.funnel-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.funnel-modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.funnel-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.funnel-modal {
  position: relative;
  z-index: 2;
  max-width: 720px;
  width: 100%;
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.97), rgba(10, 74, 110, 0.95));
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.funnel-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.funnel-modal-close:hover {
  background: rgba(255, 80, 80, 0.3);
  border-color: rgba(255, 80, 80, 0.5);
}

.funnel-modal h2 {
  text-align: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.funnel-modal-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.funnel-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.funnel-country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.funnel-country-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.08), rgba(0, 217, 255, 0));
  opacity: 0;
  transition: opacity 0.3s;
}

.funnel-country-card:hover {
  border-color: rgba(0, 217, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 217, 255, 0.15);
}

.funnel-country-card:hover::before {
  opacity: 1;
}

.funnel-country-flag {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.funnel-country-card strong {
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.funnel-country-source {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  position: relative;
  z-index: 1;
}

.funnel-country-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 100px;
  margin-top: 0.5rem;
  transition: all 0.25s;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(0, 217, 255, 0.3);
}

.funnel-country-card:hover .funnel-country-btn {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 217, 255, 0.5);
}

/* ===== APP PROMO SECTION (Homepage) ===== */
.section-app-promo {
  padding: 5rem 0;
  background: linear-gradient(180deg, #060e1a 0%, #0a1628 50%, #060e1a 100%);
  position: relative;
  overflow: hidden;
}

.section-app-promo::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.06) 0%, transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.app-promo-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.app-promo-header {
  text-align: center;
  margin-bottom: 3rem;
}

.app-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 100px;
  color: #00d9ff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 217, 255, 0.2); }
  50% { box-shadow: 0 0 20px 4px rgba(0, 217, 255, 0.15); }
}

.app-promo-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.app-promo-header h2 span {
  background: linear-gradient(135deg, #00d9ff, #00ffaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-promo-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.app-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.app-feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.app-feature-card:hover {
  border-color: rgba(0, 217, 255, 0.25);
  background: rgba(0, 217, 255, 0.04);
  transform: translateY(-3px);
}

.app-feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.app-feature-card h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.app-feature-card p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  line-height: 1.5;
}

.app-country-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.app-country-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  text-decoration: none;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.app-country-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00d9ff, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.app-country-link:hover {
  border-color: rgba(0, 217, 255, 0.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 217, 255, 0.12);
}

.app-country-link:hover::after {
  opacity: 1;
}

.app-country-flag {
  font-size: 3rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s;
}

.app-country-link:hover .app-country-flag {
  transform: scale(1.15);
}

.app-country-link strong {
  font-size: 1rem;
}

.app-country-link small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
}

.app-country-start {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 100px;
  margin-top: 0.25rem;
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
  transition: all 0.3s;
}

.app-country-link:hover .app-country-start {
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.5);
  transform: scale(1.05);
}

/* ===== MINI QUIZ WIDGET (Homepage) ===== */
.section-quiz-teaser {
  padding: 5rem 0;
  background: linear-gradient(180deg, #0a1628, #0d1f35, #0a1628);
}

.quiz-teaser-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem;
}

.quiz-teaser-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 217, 255, 0.15);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.quiz-teaser-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d9ff, #00ffaa, #00d9ff);
}

.quiz-teaser-header {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-teaser-header h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.quiz-teaser-header p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.quiz-question-wrap {
  margin-bottom: 2rem;
}

.quiz-question-text {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.quiz-option:hover {
  border-color: rgba(0, 217, 255, 0.4);
  background: rgba(0, 217, 255, 0.06);
}

.quiz-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  color: #fff;
}

.quiz-option.wrong {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.quiz-option.correct .quiz-option-letter {
  background: #22c55e;
}

.quiz-option.wrong .quiz-option-letter {
  background: #ef4444;
}

.quiz-result {
  display: none;
  text-align: center;
  padding: 1.5rem;
  margin-top: 1rem;
  background: rgba(0, 217, 255, 0.05);
  border: 1px solid rgba(0, 217, 255, 0.15);
  border-radius: 16px;
}

.quiz-result.show {
  display: block;
  animation: fadeIn 0.4s ease;
}

.quiz-result h3 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.quiz-result p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.quiz-result-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
  transition: all 0.3s;
}

.quiz-result-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.5);
}

/* ===== INLINE ARTICLE CTA ===== */
.article-app-cta {
  margin: 2.5rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(10, 74, 110, 0.95), rgba(15, 30, 50, 0.95));
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.article-app-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #00d9ff, #00ffaa);
}

.article-app-cta-icon {
  font-size: 3rem;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.article-app-cta-body {
  flex: 1;
}

.article-app-cta-body h4 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.article-app-cta-body p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.article-app-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 217, 255, 0.25);
  transition: all 0.25s;
  white-space: nowrap;
}

.article-app-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 217, 255, 0.45);
}

/* ===== STICKY BOTTOM BAR ===== */
.funnel-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: linear-gradient(90deg, rgba(10, 74, 110, 0.97), rgba(15, 30, 50, 0.97));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 217, 255, 0.2);
  padding: 0.75rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

.funnel-sticky.visible {
  transform: translateY(0);
}

.funnel-sticky-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.funnel-sticky-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
}

.funnel-sticky-text .pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.funnel-sticky-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 217, 255, 0.3);
  transition: all 0.25s;
  white-space: nowrap;
}

.funnel-sticky-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 217, 255, 0.5);
}

.funnel-sticky-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.funnel-sticky-close:hover {
  color: #fff;
}

/* ===== EXIT INTENT POPUP ===== */
.funnel-exit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.funnel-exit-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.funnel-exit-card {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 100%;
  background: linear-gradient(135deg, rgba(15, 30, 50, 0.98), rgba(10, 74, 110, 0.96));
  border: 1px solid rgba(0, 217, 255, 0.25);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.funnel-exit-emoji {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.funnel-exit-card h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.funnel-exit-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.funnel-exit-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.5rem;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 6px 30px rgba(0, 217, 255, 0.4);
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.funnel-exit-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 217, 255, 0.6);
}

.funnel-exit-dismiss {
  display: block;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
  transition: color 0.2s;
}

.funnel-exit-dismiss:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== FLOATING ACTION BUTTON ===== */
.funnel-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 997;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  transition: all 0.3s;
  animation: fab-pulse 3s infinite;
  opacity: 0;
  transform: scale(0);
}

.funnel-fab.visible {
  opacity: 1;
  transform: scale(1);
}

.funnel-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(0, 217, 255, 0.6);
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 8px 30px rgba(0, 217, 255, 0.4); }
  50% { box-shadow: 0 8px 30px rgba(0, 217, 255, 0.6), 0 0 0 10px rgba(0, 217, 255, 0.1); }
}

/* ===== SOCIAL PROOF COUNTER ===== */
.social-proof-bar {
  text-align: center;
  padding: 0.75rem;
  background: rgba(0, 217, 255, 0.05);
  border-bottom: 1px solid rgba(0, 217, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

.social-proof-bar strong {
  color: #00d9ff;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .funnel-modal {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
    margin: 0.5rem;
  }

  .funnel-modal h2 {
    font-size: 1.3rem;
  }

  .funnel-modal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .funnel-country-card {
    padding: 1rem 0.75rem;
  }

  .funnel-country-flag {
    font-size: 2rem;
  }

  .app-features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .app-country-selector {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .app-country-link {
    padding: 1.25rem 0.75rem;
  }

  .article-app-cta {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .article-app-cta::before {
    width: 100%;
    height: 3px;
    top: 0;
    left: 0;
  }

  .funnel-sticky-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .funnel-sticky-text {
    font-size: 0.8rem;
    text-align: center;
  }

  .funnel-exit-card {
    padding: 2rem 1.5rem;
  }

  .funnel-exit-card h2 {
    font-size: 1.25rem;
  }

  .funnel-fab {
    width: 52px;
    height: 52px;
    bottom: 1.5rem;
    right: 1.25rem;
    font-size: 1.3rem;
  }

  .quiz-teaser-card {
    padding: 1.75rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .funnel-modal-grid {
    grid-template-columns: 1fr;
  }

  .app-country-selector {
    grid-template-columns: 1fr;
  }
}
