/* ==========================================================================
   MODERN MEMBERSHIP APPLICATION PORTAL - STYLESHEET
   Sankat Mochan Ramdarbar Charitable Trust (SMRCT)
   ========================================================================== */

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

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-navy: #082f49;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body {
  background: #091e3a;
  color: #0f172a;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ==========================================================================
   KEN BURNS ANIMATED SLIDESHOW BACKGROUND
   ========================================================================== */
.bg-slideshow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: kenBurnsSlide 24s infinite linear;
  transform: scale(1.05);
}

.bg-slide:nth-child(1) {
  background-image: url('../images/activity-1.jpg'), url('/images/activity-1.jpg'), url('./images/activity-1.jpg');
  animation-delay: 0s;
}
.bg-slide:nth-child(2) {
  background-image: url('../images/activity-2.jpg'), url('/images/activity-2.jpg'), url('./images/activity-2.jpg');
  animation-delay: 6s;
}
.bg-slide:nth-child(3) {
  background-image: url('../images/activity-3.jpg'), url('/images/activity-3.jpg'), url('./images/activity-3.jpg');
  animation-delay: 12s;
}
.bg-slide:nth-child(4) {
  background-image: url('../images/activity-4.jpg'), url('/images/activity-4.jpg'), url('./images/activity-4.jpg');
  animation-delay: 18s;
}

@keyframes kenBurnsSlide {
  0% { opacity: 0; transform: scale(1.02) translate(0, 0); }
  6% { opacity: 1; }
  25% { opacity: 1; }
  31% { opacity: 0; transform: scale(1.15) translate(-1.5%, -1%); }
  100% { opacity: 0; transform: scale(1.02); }
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: 
    radial-gradient(circle at 15% 20%, rgba(2, 132, 199, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.28) 0%, transparent 45%),
    linear-gradient(135deg, rgba(8, 26, 50, 0.90) 0%, rgba(15, 23, 42, 0.94) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  animation: floatOrb 20s ease-in-out infinite alternate;
}
.orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.28) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */
.top-nav-modern {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 18px 24px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.back-link-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}
.back-link-modern:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  transform: translateX(-3px);
}

.trust-badge-modern {
  display: inline-flex;
  align-items: center;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 16px;
  border-radius: 20px;
}

.login-quick-pill {
  display: flex;
  align-items: center;
}

.btn-login-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transition: all 0.25s ease;
}
.btn-login-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #0369a1, #0284c7);
}

/* ==========================================================================
   MAIN APPLICATION CARD
   ========================================================================== */
.reg-wrapper {
  position: relative;
  z-index: 5;
  min-height: calc(100vh - 70px);
  padding: 40px 15px 60px;
}

.reg-card {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: 28px !important;
  box-shadow: 0 30px 80px -15px rgba(2, 44, 95, 0.38), 0 0 50px rgba(2, 132, 199, 0.12) !important;
  position: relative !important;
  max-width: 960px !important;
  margin: auto !important;
  overflow: visible !important;
  animation: cardSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Card Header */
.reg-header {
  background: linear-gradient(135deg, #082f49 0%, #0369a1 55%, #0284c7 100%) !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  padding: 60px 25px 26px !important;
  border-radius: 28px 28px 0 0 !important;
  text-align: center !important;
  color: #fff !important;
  position: relative !important;
}

.reg-header-img {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  background: #fff !important;
  border: 3px solid #ffffff !important;
  position: absolute !important;
  top: -48px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 99 !important;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.35), 0 0 0 3px #0284c7 !important;
  transition: transform 0.3s ease;
}
.reg-header-img:hover {
  transform: translateX(-50%) scale(1.05);
}
.reg-header-img img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.reg-header h4 {
  font-family: var(--font-heading) !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
  margin-top: 8px !important;
  margin-bottom: 6px !important;
  color: #ffffff !important;
}

.reg-header p {
  font-size: 0.92rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  margin-bottom: 12px !important;
}

.verified-pill-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #f8fafc;
}

/* Form Body */
.reg-body {
  padding: 36px 36px 45px !important;
  border-bottom: none !important;
  border-radius: 0 0 28px 28px !important;
  background: transparent !important;
}

/* Section Title Ribbons */
.section-title {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%) !important;
  border: 1.5px solid rgba(2, 132, 199, 0.2) !important;
  color: #0369a1 !important;
  padding: 13px 20px !important;
  border-radius: 14px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  margin: 28px 0 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.05) !important;
}
.section-title i {
  color: #0284c7 !important;
  font-size: 1.05rem !important;
  width: 22px;
  text-align: center;
}

/* Form Labels & Inputs */
.form-label {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin-bottom: 7px !important;
}

.input-group {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  border-radius: 12px;
}

.input-group-text {
  background: #f1f5f9 !important;
  border: 1.5px solid #cbd5e1 !important;
  border-right: none !important;
  border-radius: 12px 0 0 12px !important;
  color: #0284c7 !important;
  font-size: 14px !important;
  padding: 0 16px !important;
}

.form-control,
.form-select {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0 12px 12px 0 !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-control:not(.input-group .form-control),
.form-select:not(.input-group .form-select) {
  border-radius: 12px !important;
}

.form-control:focus,
.form-select:focus {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15) !important;
  outline: none !important;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #0284c7 !important;
  border-radius: 16px !important;
  padding: 28px 20px !important;
  text-align: center !important;
  background: rgba(2, 132, 199, 0.03) !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.upload-area:hover {
  background: rgba(2, 132, 199, 0.08) !important;
  border-color: #0369a1 !important;
  transform: translateY(-2px) !important;
}

.upload-area i {
  font-size: 2.2rem !important;
  color: #0284c7 !important;
  margin-bottom: 10px !important;
}

.photo-preview {
  width: 100px !important;
  height: 100px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3.5px solid #0284c7 !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25) !important;
  display: none;
  margin: 15px auto 0 !important;
}

/* Date of Birth Group */
.dob-group {
  display: flex;
  gap: 8px;
}
.dob-group select {
  flex: 1;
}

/* Field Messages & Spinners */
.field-error {
  color: #ef4444;
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 5px;
  display: none;
}
.field-error.show {
  display: block;
}

.check-msg {
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 6px;
  display: none;
}
.check-msg.success { color: #10b981; display: block; }
.check-msg.error { color: #ef4444; display: block; }
.check-msg.loading { color: #64748b; display: block; }

.spinner-inline {
  width: 14px;
  height: 14px;
  border: 2px solid #cbd5e1;
  border-top-color: #0284c7;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Submit Button */
.btn-submit {
  width: 100% !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 16px 28px !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #10b981 100%) !important;
  background-size: 200% auto !important;
  color: #ffffff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.45) !important;
}

.btn-submit:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 15px 35px -5px rgba(2, 132, 199, 0.55) !important;
  background-position: right center !important;
}

/* ==========================================================================
   PREVIEW MODAL
   ========================================================================== */
.preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.preview-overlay.active { display: flex; }

.preview-box {
  background: #ffffff !important;
  border-radius: 24px !important;
  max-width: 780px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(2, 132, 199, 0.15) !important;
}

.preview-box-header {
  background: linear-gradient(135deg, #082f49 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  padding: 22px 28px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.preview-body { padding: 28px !important; }

.preview-section-title {
  font-weight: 800 !important;
  color: #0284c7 !important;
  font-size: 0.88rem !important;
  text-transform: uppercase !important;
  border-bottom: 2px solid #e0f2fe !important;
  padding-bottom: 6px !important;
  margin: 22px 0 12px !important;
  letter-spacing: 0.5px !important;
}

.preview-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}
.preview-row .label {
  min-width: 190px;
  color: #64748b;
  font-weight: 500;
  font-size: 13.5px;
}
.preview-row .value {
  font-weight: 600;
  color: #0f172a;
  font-size: 14px;
}

.preview-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid #0284c7;
  display: block;
  margin: auto;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25);
}

.btn-preview-submit {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 13px 30px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35) !important;
  transition: all 0.25s ease !important;
}
.btn-preview-submit:hover { transform: translateY(-1px); }

.btn-preview-back {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 13px 28px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .reg-wrapper { padding: 30px 12px 50px; }
  .reg-card { border-radius: 22px !important; }
  .reg-header { padding: 55px 18px 20px !important; border-radius: 22px 22px 0 0 !important; }
  .reg-header h4 { font-size: 1.15rem !important; }
  .reg-header-img { width: 84px !important; height: 84px !important; top: -42px !important; }
  .reg-body { padding: 22px 18px 30px !important; }
  .dob-group { flex-direction: column; }
  .preview-row { flex-direction: column; gap: 4px; }
  .preview-row .label { min-width: auto; }
}


.reg-card .p-4,
.reg-card > .p-4 {
  padding: 36px 36px 45px !important;
  background: transparent !important;
}

@media (max-width: 768px) {
  .reg-card .p-4,
  .reg-card > .p-4 {
    padding: 22px 18px 30px !important;
  }
}
