/* ============================================================
   BRADESCO SAÚDE — FORMULÁRIO DE COTAÇÃO
   Design Premium | Glassmorphism | Responsivo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bradesco-red:    #CC0000;
  --bradesco-red-2:  #E8001C;
  --bradesco-blue:   #003087;
  --bradesco-blue-2: #001F5E;
  --glass-bg:        rgba(255, 255, 255, 0.10);
  --glass-border:    rgba(255, 255, 255, 0.20);
  --input-bg:        rgba(255, 255, 255, 0.95);
  --input-border:    rgba(255, 255, 255, 0.40);
  --text-dark:       #1A1A2E;
  --text-mid:        #4A4A6A;
  --text-light:      #F0F4FF;
  --shadow-card:     0 32px 64px rgba(0, 0, 0, 0.35);
  --shadow-input:    0 4px 16px rgba(0, 48, 135, 0.12);
  --radius-card:     24px;
  --radius-input:    14px;
  --radius-btn:      16px;
  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #001F5E 0%, #003087 40%, #6B0000 80%, #CC0000 100%);
  overflow-x: hidden;
}

/* ─── Animated Background Orbs ─────────────────────────────── */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

body::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #CC0000, transparent);
  top: -150px; right: -150px;
}

body::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #003087, transparent);
  bottom: -150px; left: -150px;
  animation-delay: -6s;
}

@keyframes floatOrb {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.2) translate(30px, -30px); }
}

/* ─── Page Layout ───────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px 12px;
}

/* ─── Header ────────────────────────────────────────────────── */
.header {
  width: 100%;
  max-width: 560px;
  text-align: center;
  margin-bottom: 10px;
  animation: fadeDown 0.6s ease both;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.header-badge .dot {
  width: 8px; height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ADE80;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.3); }
}

.header img.logo {
  height: 52px;
  max-width: 240px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4)) brightness(1.05);
}

.header h1 {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.header h1 span {
  background: linear-gradient(90deg, #FF6B6B, #FFD93D);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p.subtitle {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

/* ─── Card ──────────────────────────────────────────────────── */
.card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.2);
  padding: 16px 24px;
  animation: fadeUp 0.7s 0.1s ease both;
}

/* ─── Form Rows ─────────────────────────────────────────────── */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.form-group.inline {
  margin-bottom: 0;
}

/* ─── Labels ────────────────────────────────────────────────── */
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-group label .required {
  color: #FF6B6B;
}

/* ─── Inputs ────────────────────────────────────────────────── */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-input);
}

.form-group input::placeholder {
  color: #A0A8C0;
  font-weight: 400;
}

.form-group input:focus {
  border-color: var(--bradesco-red);
  box-shadow: 0 0 0 4px rgba(204, 0, 0, 0.15), var(--shadow-input);
  transform: translateY(-1px);
}

.form-group input.error {
  border-color: #FF4444;
  box-shadow: 0 0 0 4px rgba(255, 68, 68, 0.15);
}

.form-group .error-msg {
  font-size: 11px;
  color: #FF8080;
  margin-top: 4px;
  display: none;
  animation: fadeIn 0.2s ease;
}

.form-group.has-error .error-msg {
  display: block;
}

/* ─── Divider ───────────────────────────────────────────────── */
.row-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  padding-top: 20px;
  flex-shrink: 0;
  width: 32px;
}

/* ─── Radio Groups ──────────────────────────────────────────── */
.radio-group-wrapper {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 8px;
}

.radio-group-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-group-label svg {
  flex-shrink: 0;
}

.radio-options {
  display: flex;
  gap: 12px;
}

.radio-option {
  flex: 1;
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.radio-option input[type="radio"]:checked + label {
  background: rgba(204, 0, 0, 0.2);
  border-color: var(--bradesco-red);
  color: #fff;
  box-shadow: 0 0 16px rgba(204, 0, 0, 0.2);
}

.radio-option label:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.radio-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: var(--transition);
}

.radio-option input[type="radio"]:checked + label .radio-dot {
  background: var(--bradesco-red);
  box-shadow: 0 0 6px var(--bradesco-red);
}

/* ─── Textarea (info adicional) ─────────────────────────────── */
.textarea-wrapper {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-bottom: 0;
}

.textarea-wrapper.open {
  max-height: 160px;
  opacity: 1;
  margin-bottom: 16px;
}

.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--input-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-dark);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-input);
  resize: none;
  height: 100px;
}

.form-group textarea:focus {
  border-color: var(--bradesco-red);
  box-shadow: 0 0 0 4px rgba(204, 0, 0, 0.15), var(--shadow-input);
}

.form-group textarea::placeholder {
  color: #A0A8C0;
}

/* ─── Submit Button ─────────────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, #E8001C 0%, #CC0000 50%, #A80000 100%);
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(204, 0, 0, 0.45), 0 2px 8px rgba(0,0,0,0.2);
  margin-top: 2px;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(204, 0, 0, 0.55), 0 4px 12px rgba(0,0,0,0.25);
}

.btn-submit:active {
  transform: translateY(0px);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-submit .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit .spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .btn-icon { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Trust Badges ──────────────────────────────────────────── */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
}

.trust-item svg {
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* ─── Success Screen ─────────────────────────────────────────── */
.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  animation: fadeUp 0.5s ease both;
}

.success-screen.active {
  display: flex;
}

.success-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #4ADE80, #22C55E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(74, 222, 128, 0.4);
  animation: popIn 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

.success-screen h2 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.success-screen p {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  max-width: 380px;
}

.success-screen p strong {
  color: #4ADE80;
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer-note {
  display: none;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {

  .card {
    padding: 14px 16px;
    border-radius: 20px;
  }

  /* Logo menor no mobile */
  .header img.logo {
    height: 42px;
    margin-bottom: 6px;
  }

  /* Esconde subtítulo — economiza ~30px */
  .header p.subtitle {
    display: none;
  }

  /* Reduz margem do header */
  .header {
    margin-bottom: 8px;
  }

  /* Campos menores no mobile */
  .form-group {
    margin-bottom: 6px;
  }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"] {
    padding: 9px 12px;
    font-size: 14px;
  }

  /* Mantém Cidade/CEP lado a lado */
  .form-row {
    gap: 8px;
    margin-bottom: 6px;
  }

  .row-divider {
    padding-top: 16px;
    width: 24px;
    font-size: 11px;
  }

  /* Radio groups mais compactos */
  .radio-group-wrapper {
    padding: 8px 12px;
    margin-bottom: 6px;
  }

  .radio-group-label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  /* Mantém SIM/NÃO em linha (não empilha) */
  .radio-options {
    flex-direction: row;
    gap: 8px;
  }

  .radio-option label {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Botão levemente menor */
  .btn-submit {
    padding: 12px 24px;
    font-size: 15px;
  }

  .trust-badges {
    gap: 10px;
    margin-top: 6px;
  }

  .trust-item {
    font-size: 10px;
  }
}

