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

:root {
  --primary-color: #0d235c;
  --primary-light: #1e3a8a;
  --secondary-color: #e28743;
  --accent-color: #d97706;
  --bg-gradient: linear-gradient(135deg, rgba(79, 70, 229, 0.9) 0%, rgba(59, 130, 246, 0.85) 50%, rgba(139, 92, 246, 0.9) 100%);
  --dark-blue-badge: #1b265c;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-hover-shadow: 0 15px 40px rgba(13, 35, 92, 0.12);
  --body-font: 'Inter', sans-serif;
  --title-font: 'Outfit', sans-serif;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --light-gray: #f3f4f6;
  --white: #ffffff;
  --transition-speed: 0.3s;
  --font-multiplier: 1;
}

body {
  font-family: var(--body-font);
  color: var(--text-primary);
  background-color: #f8fafc;
  font-size: calc(1rem * var(--font-multiplier));
  line-height: 1.6;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--title-font);
  color: var(--primary-color);
  font-weight: 700;
}

/* Accessibility classes */
.font-scale-down {
  --font-multiplier: 0.85;
}
.font-scale-normal {
  --font-multiplier: 1;
}
.font-scale-up {
  --font-multiplier: 1.15;
}
.font-scale-up-2 {
  --font-multiplier: 1.3;
}

/* Top bar styles */
.top-header {
  background-color: #1e293b;
  color: #f8fafc;
  font-size: 0.85rem;
  padding: 6px 0;
}
.top-header a {
  color: #e2e8f0;
  text-decoration: none;
}
.top-header a:hover {
  color: var(--secondary-color);
}
.accessibility-btn {
  background: transparent;
  border: 1px solid #475569;
  color: #f8fafc;
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 5px;
  transition: all var(--transition-speed);
}
.accessibility-btn:hover {
  background-color: #475569;
}
.accessibility-btn.active {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Main Navbar */
.main-nav {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  background: var(--white);
  padding: 15px 0;
}
.nav-link {
  font-weight: 500;
  color: var(--primary-color) !important;
  margin: 0 10px;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--secondary-color);
  transition: width var(--transition-speed) ease;
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}
.emblem-img {
  height: 60px;
  width: auto;
}
.committee-logo {
  height: 60px;
  width: auto;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: var(--bg-gradient);
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  padding: 40px 0;
}
.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.leaders-img-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
}
.leaders-img {
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
}
.leaders-badge {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--dark-blue-badge);
  border-radius: 40px 40px 0 0;
  padding: 41px 20px 20px 20px;
  width: 103%;
  box-shadow: 0 -5px 67px rgba(0,0,0,0.2);
  border-top: 0px solid rgba(255,255,255,0.1);
}
.leader-info-col {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.leader-info-col:last-child {
  border-right: none;
}

/* Hero Suggestions Call-to-action */
.suggestion-title {
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.suggestion-divider {
  height: 2px;
  background-color: rgba(255, 255, 255, 0.3);
  width: 100%;
  margin: 25px 0;
}
.cta-pill-btn {
  background-color: var(--white);
  color: var(--primary-color);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 50px;
  border: 2px solid var(--white);
  transition: all var(--transition-speed) ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.cta-pill-btn:hover {
  background-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
}
.cta-pill-btn i {
  font-size: 1.1rem;
}

/* Members Section */
.members-section {
  padding: 80px 0;
  background-color: var(--white);
}
.section-title {
  position: relative;
  text-align: center;
  margin-bottom: 50px;
  color: var(--primary-color);
  font-weight: 700;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--secondary-color);
}
.member-card {
  border: none;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed) ease;
  height: 100%;
}
.member-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-hover-shadow);
}
.member-img-wrapper {
  position: relative;
  height: 260px;
  overflow: hidden;
  background-color: #f3f4f6;
}
.member-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--transition-speed) ease;
}
.member-card:hover .member-img {
  transform: scale(1.05);
}
.member-body {
  padding: 20px;
  text-align: center;
}
.member-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 4px;
}
.member-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Forms & Suggestions Flow */
.form-step-container {
  max-width: 800px;
  margin: 0 auto;
}
.step-indicator {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
}
.step-indicator::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #e2e8f0;
  z-index: 1;
}
.step-indicator-bar {
  position: absolute;
  top: 18px;
  left: 0;
  height: 3px;
  background-color: var(--primary-color);
  z-index: 1;
  transition: width 0.4s ease;
  width: 0%;
}
.step-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f1f5f9;
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-weight: 600;
  color: #64748b;
  transition: all 0.4s ease;
}
.step-dot.active {
  background-color: var(--white);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 10px rgba(13, 35, 92, 0.2);
}
.step-dot.completed {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

.suggestion-card {
  border: none;
  box-shadow: var(--card-shadow);
  border-radius: 16px;
  background-color: var(--white);
}
.form-section-title {
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 12px;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 1.25rem;
}
.form-label {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.25rem rgba(13, 35, 92, 0.15);
}

/* Toggle Buttons for Individual/Organisation */
.suggestion-toggle-container {
  display: flex;
  background-color: #f1f5f9;
  padding: 5px;
  border-radius: 30px;
  max-width: 380px;
  margin: 0 auto 30px auto;
  border: 1px solid #e2e8f0;
}
.suggestion-toggle-btn {
  flex: 1;
  text-align: center;
  padding: 10px 15px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: none;
  background: transparent;
}
.suggestion-toggle-btn.active {
  background-color: var(--white);
  color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Custom OTP Modal styling */
.otp-digit-input {
  width: 45px;
  height: 45px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  border: 2px solid #cbd5e1;
  margin: 0 5px;
}
.otp-digit-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 35, 92, 0.15);
}

/* Admin Dashboard styles */
.dashboard-stat-card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: transform var(--transition-speed);
  background: var(--white);
}
.dashboard-stat-card:hover {
  transform: translateY(-4px);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-count {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 10px;
  margin-bottom: 2px;
  color: var(--primary-color);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* High Contrast Mode CSS Overrides */
body.high-contrast-mode {
  --primary-color: #ffff00 !important;
  --primary-light: #ffff00 !important;
  --secondary-color: #00ffff !important;
  --accent-color: #00ffff !important;
  --text-primary: #ffffff !important;
  --text-secondary: #00ff00 !important;
  --light-gray: #121212 !important;
  --white: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff !important;
}

body.high-contrast-mode .top-header {
  background-color: #000000 !important;
  border-bottom: 2px solid #ffffff;
}
body.high-contrast-mode .main-nav {
  background-color: #000000 !important;
  border-bottom: 2px solid #ffffff;
}
body.high-contrast-mode .nav-link {
  color: #ffffff !important;
}
body.high-contrast-mode .nav-link:hover,
body.high-contrast-mode .nav-link.active {
  color: #ffff00 !important;
}
body.high-contrast-mode .hero-section {
  background: #000000 !important;
  border-bottom: 3px double #ffffff;
}
body.high-contrast-mode .member-card,
body.high-contrast-mode .suggestion-card,
body.high-contrast-mode .dashboard-stat-card {
  background-color: #000000 !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}
body.high-contrast-mode .member-name,
body.high-contrast-mode .member-role,
body.high-contrast-mode .stat-count,
body.high-contrast-mode .stat-label {
  color: #ffffff !important;
}
body.high-contrast-mode .cta-pill-btn {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
body.high-contrast-mode .cta-pill-btn:hover {
  background-color: #ffff00 !important;
  color: #000000 !important;
}
body.high-contrast-mode .form-control,
body.high-contrast-mode .form-select {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}
body.high-contrast-mode .form-control:focus,
body.high-contrast-mode .form-select:focus {
  border-color: #ffff00 !important;
}
body.high-contrast-mode .form-label {
  color: #ffffff !important;
}
body.high-contrast-mode .suggestion-toggle-container {
  background-color: #000000 !important;
  border: 1px solid #ffffff !important;
}
body.high-contrast-mode .suggestion-toggle-btn {
  color: #ffffff !important;
}
body.high-contrast-mode .suggestion-toggle-btn.active {
  background-color: #ffffff !important;
  color: #000000 !important;
}
body.high-contrast-mode footer {
  background-color: #000000 !important;
  border-top: 2px solid #ffffff;
}

/* Footer styles */
footer {
  background-color: #0b132b;
  color: #94a3b8;
  padding: 50px 0 20px 0;
  font-size: 0.9rem;
}
footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color var(--transition-speed);
}
footer a:hover {
  color: var(--secondary-color);
}
footer h5 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: 20px;
}
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  margin-top: 40px;
  font-size: 0.8rem;
}

/* Miscellaneous UI enhancements */
.badge-category {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.badge-individual {
  background-color: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}
.badge-organisation {
  background-color: rgba(16, 185, 129, 0.1);
  color: #059669;
}
.badge-marriage {
  background-color: rgba(236, 72, 153, 0.1);
  color: #db2777;
}
.badge-divorce {
  background-color: rgba(245, 158, 11, 0.1);
  color: #d97706;
}
.badge-succession {
  background-color: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}
.badge-adoption {
  background-color: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}
.badge-others {
  background-color: rgba(107, 114, 128, 0.1);
  color: #4b5563;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animated-fade-in {
  animation: fadeIn 0.5s ease forwards;
}
