/* ==========================================================================
   EXCELSIOR RESEARCH UNIFIED — COMPONENTS, RIGHT NEWSLETTER DRAWER & WIDGETS (LIGHT)
   ========================================================================== */

/* 1. Floating Right-Side Corner Newsletter Button */
.floating-newsletter-badge {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 995;
  background: linear-gradient(135deg, #0ea5e9 0%, #0f172a 100%);
  color: #ffffff;
  padding: 0.85rem 0.65rem 0.85rem 0.85rem;
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  box-shadow: -4px 6px 20px rgba(14, 165, 233, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform var(--trans-spring), box-shadow var(--trans-fast);
}

.floating-newsletter-badge:hover {
  transform: translateY(-50%) translateX(-4px);
  box-shadow: -6px 8px 30px rgba(14, 165, 233, 0.55);
}

.floating-newsletter-badge .badge-vertical-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.floating-newsletter-badge .badge-icon {
  font-size: 1.15rem;
}

/* 2. Newsletter & Vertical Database Hubs Drawer (Clean Light Canvas) */
.newsletter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans-normal);
}

.newsletter-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.newsletter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 440px);
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -20px 0 50px rgba(15, 23, 42, 0.18);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--trans-normal);
}

.newsletter-drawer.active {
  transform: translateX(0);
}

.newsletter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.newsletter-drawer-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.newsletter-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--trans-fast);
}

.newsletter-drawer-close:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
}

/* Database Intelligence Hubs List */
.data-hubs-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.data-hub-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  transition: all var(--trans-fast);
}

.data-hub-link-card:hover {
  background: #ffffff;
  border-color: #0ea5e9;
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.18);
}

.data-hub-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.data-hub-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.data-hub-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.data-hub-count {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #0284c7;
  font-weight: 600;
}

/* Newsletter Subscription Form & Enterprise Card */
.newsletter-subscribe-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.newsletter-cta-card {
  background: linear-gradient(135deg, #091e42 0%, #0f172a 60%, #0369a1 100%);
  border-radius: 20px;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(2, 132, 199, 0.28), 0 10px 30px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.newsletter-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.newsletter-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 1rem;
  border-radius: 30px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.newsletter-chip-label:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}

.newsletter-chip-label input[type="checkbox"]:checked + span {
  color: #38bdf8;
}

.newsletter-chip-label:has(input[type="checkbox"]:checked) {
  background: rgba(14, 165, 233, 0.22);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
}

.newsletter-form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  max-width: 580px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  min-width: 260px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 0.95rem 1.25rem;
  font-size: 0.98rem;
  font-family: inherit;
  border: 2px solid transparent;
  outline: none;
  transition: all 0.2s ease;
}

.newsletter-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.newsletter-submit-btn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  border: none;
  padding: 0.95rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  font-family: inherit;
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.newsletter-submit-btn:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.55);
}

.newsletter-trust-row {
  margin-top: 2.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
}

.newsletter-success-toast {
  display: none;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

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

/* 3. Solution Cards Grid & Symmetrical 3x2 Architecture */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.solutions-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1040px) {
  .solutions-grid-3x2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .solutions-grid-3x2 {
    grid-template-columns: 1fr;
  }
}

.solution-card-wrapper {
  perspective: 1200px;
  min-height: 420px;
  position: relative;
  transition: transform 0.2s ease-out;
  cursor: pointer;
}

.solution-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
}

.solution-card-wrapper.flipped .solution-card-inner {
  transform: rotateY(180deg);
}

@media (hover: hover) {
  .solution-card-wrapper:hover .solution-card-inner {
    transform: rotateY(180deg);
  }
}

.solution-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.solution-card-face::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  opacity: 0.9;
}

.solution-card-back {
  transform: rotateY(180deg);
  background: #f8fafc;
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 16px 36px -4px rgba(14, 165, 233, 0.18);
}

.card-header-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #0284c7;
  margin-bottom: 1.15rem;
}

.card-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}

.card-feature-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #334155;
  font-weight: 500;
}

.card-feature-item svg {
  color: #0ea5e9;
  flex-shrink: 0;
}

.card-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.btn-card-scope {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0284c7;
  background: rgba(14, 165, 233, 0.1);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(14, 165, 233, 0.25);
  transition: all var(--trans-fast);
}

.btn-card-scope:hover {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #ffffff;
}

/* 4. Interactive B2B ROI & Pipeline Estimator */
.roi-calculator-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.slider-val-badge {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0284c7;
}

.custom-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #0f172a);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.5);
  border: 2px solid #ffffff;
  transition: transform var(--trans-fast);
}

.custom-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calc-pill-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  transition: all var(--trans-fast);
}

.calc-pill-btn.active, .calc-pill-btn:hover {
  background: rgba(14, 165, 233, 0.15);
  border-color: #0ea5e9;
  color: #0284c7;
  font-weight: 700;
}

.calc-metrics-dashboard {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.calc-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.calc-metric-card {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.calc-metric-card.highlight {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.4);
}

.calc-metric-number {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.35rem;
}

.calc-metric-number.orange, .calc-metric-number.sky {
  color: #38bdf8;
}

.calc-metric-number.emerald {
  color: #34d399;
}

/* 5. Smart 3-Step RFP Proposal Wizard */
.rfp-wizard-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.rfp-step-indicators {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.rfp-step-indicators::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.step-indicator-item {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: #64748b;
  transition: all var(--trans-fast);
}

.step-indicator-item.active {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.step-indicator-item.completed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.service-chip, .budget-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.service-chip:hover, .budget-chip:hover {
  background: #ffffff;
  border-color: #0ea5e9;
}

.service-chip.active, .budget-chip.active {
  background: rgba(14, 165, 233, 0.12);
  border-color: #0ea5e9;
  color: #0284c7;
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.2);
}

.form-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.25);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

/* 6. Modal Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: all var(--trans-normal);
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--trans-fast);
}

.modal-close-btn:hover {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
}

/* 7. Floating Quick Action Buttons — Direct Email Button */
.floating-actions {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.18);
  transition: transform var(--trans-spring), box-shadow var(--trans-fast);
}

.floating-btn:hover {
  transform: scale(1.1);
}

.floating-btn.email-direct {
  background: linear-gradient(135deg, #0ea5e9, #0f172a);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.floating-btn.back-to-top {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0284c7;
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}
