@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563eb;
  --primary-gradient: linear-gradient(135deg, #ec4899 0%, #8b5cf6 30%, #3b82f6 60%, #10b981 85%, #f59e0b 100%);
  --reni-rainbow: linear-gradient(90deg, #ff007f 0%, #a855f7 25%, #3b82f6 50%, #10b981 75%, #facc15 100%);
  --bg-gradient: linear-gradient(160deg, #eff6ff 0%, #fdf4ff 40%, #ecfdf5 100%);
  --surface: #ffffff;
  --surface-card: rgba(255, 255, 255, 0.94);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: rgba(226, 232, 240, 0.8);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 35px -5px rgba(37, 99, 235, 0.12), 0 10px 15px -5px rgba(236, 72, 153, 0.08);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Background floating decorative elements constrained */
.ambient-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  max-width: 100vw;
  overflow: hidden;
}
.glow-1 {
  top: -40px;
  left: -40px;
  background: #ec4899;
}
.glow-2 {
  top: 30%;
  right: -40px;
  background: #3b82f6;
}
.glow-3 {
  bottom: -40px;
  left: 10%;
  background: #10b981;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 40px;
  box-sizing: border-box;
}

/* Header */
.header-hero {
  text-align: center;
  margin-bottom: 24px;
}

.logo-container {
  display: inline-block;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}
.logo-container:hover {
  transform: scale(1.03);
}

.logo-img {
  max-width: 250px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.1));
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(236, 72, 153, 0.2);
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #db2777;
  margin-bottom: 12px;
  max-width: 100%;
}

.event-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.15;
  color: #1e1b4b;
  margin-bottom: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rainbow-text {
  background: var(--reni-rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.event-slogan {
  font-size: 1.05rem;
  font-weight: 600;
  color: #64748b;
  font-style: italic;
  margin-bottom: 18px;
  word-wrap: break-word;
}

/* Event Info Highlights Bar */
.event-info-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.info-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.info-chip i {
  font-size: 1.1rem;
}
.info-chip.date i { color: #db2777; }
.info-chip.time i { color: #2563eb; }
.info-chip.place i { color: #059669; }

/* Main Card */
.registration-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-xl);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.registration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--reni-rainbow);
}

.card-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 6px;
  text-align: center;
}

.card-subtext {
  font-size: 0.92rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: #1e293b;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 1.15rem;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 13px 16px 13px 44px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Radio Choice Chips */
.radio-chips-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.radio-chip-option {
  position: relative;
  cursor: pointer;
}

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

.chip-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-weight: 600;
  font-size: 0.92rem;
  color: #475569;
  transition: all 0.2s ease;
  user-select: none;
}

.radio-chip-option input[type="radio"]:checked + .chip-content {
  border-color: #ec4899;
  background: #fdf2f8;
  color: #be185d;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.15);
}

/* Sub-card conditional family selection */
.family-details-card {
  margin-top: 14px;
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px dashed #cbd5e1;
  animation: fadeIn 0.3s ease;
}

.parentesco-select {
  padding-left: 14px;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  margin-top: 10px;
  padding: 15px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.35);
}

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

/* Success Modal / State */
.success-screen {
  text-align: center;
  padding: 20px 10px;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
  font-size: 2.5rem;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.1);
}

.success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: #065f46;
  margin-bottom: 8px;
}

.dorsal-badge {
  display: inline-block;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #facc15;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.dorsal-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  display: block;
}

.dorsal-sub {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #cbd5e1;
}

.participant-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0 24px;
  text-align: left;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.summary-row:last-child {
  margin-bottom: 0;
}
.summary-label {
  color: #64748b;
  font-weight: 600;
}
.summary-val {
  color: #0f172a;
  font-weight: 700;
}

.btn-whatsapp-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #25d366;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.btn-whatsapp-share:hover {
  transform: translateY(-2px);
  background: #20ba59;
}

.btn-new-reg {
  background: none;
  border: none;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  font-size: 0.92rem;
}
.btn-new-reg:hover {
  color: #0f172a;
  text-decoration: underline;
}

/* Footer / Sponsors */
.site-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.sponsors-preview {
  margin-top: 14px;
  font-weight: 600;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Comprehensive Mobile & Tablet Responsive Adjustments */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 16px 12px 30px;
  }
  .logo-img {
    max-width: 210px;
  }
  .event-title {
    font-size: 1.65rem;
    line-height: 1.2;
  }
  .event-slogan {
    font-size: 0.95rem;
    margin-bottom: 14px;
  }
  .event-info-strip {
    gap: 8px;
    margin-bottom: 18px;
  }
  .info-chip {
    padding: 6px 12px;
    font-size: 0.82rem;
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
  .info-chip.place {
    flex: 1 1 100%;
  }
  .registration-card {
    padding: 22px 16px;
    border-radius: 18px;
  }
  .card-heading {
    font-size: 1.3rem;
  }
  .card-subtext {
    font-size: 0.85rem;
    margin-bottom: 18px;
  }
  .radio-chips-container {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .chip-content {
    padding: 11px 12px;
    font-size: 0.88rem;
  }
  .form-control {
    font-size: 0.95rem;
    padding: 12px 14px 12px 40px;
  }
  .btn-submit {
    padding: 13px 18px;
    font-size: 1.02rem;
  }
  .dorsal-number {
    font-size: 1.9rem;
  }
  .participant-summary {
    padding: 12px 14px;
  }
  .summary-row {
    font-size: 0.88rem;
  }
}

@media (max-width: 360px) {
  .logo-img {
    max-width: 180px;
  }
  .event-title {
    font-size: 1.45rem;
  }
  .info-chip {
    flex: 1 1 100%;
  }
}
