/* =====================================================
   PrimingToolbox - Main Stylesheet
   Version: 1.0
   Based on v30 design by Dr. Shir Sivroni
   Colors: Teal #169999, Pink #ff4db8, Wine #990f23
   ===================================================== */

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

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  color: #e5e7eb;
  /* background, min-height, overflow-x and position: css/background.css */
}

/* The animated background, the waves, the particles and the centre glow
   moved to css/background.css on 2026-08-14, so the build pages and the
   article can share the one the front page uses instead of each carrying
   its own flat colour. Load background.css alongside this file. */

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding-bottom: 280px;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(8px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar-header {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 30px;
  line-height: 1.6;
}

.sidebar-header span {
  display: block;
}

.sidebar-header .copyright {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 10px;
}

.sidebar-footer {
  margin-top: 620px;
  padding-top: 20px;
}

.sidebar-footer .copyright {
  display: block;
  font-size: 0.85rem;
  color: #ffffff;
  opacity: 0.7;
  line-height: 1.6;
}

.sidebar h3 {
  color: #ff4db8;
  font-size: 1rem;
  margin: 25px 0 15px 0;
}

.sidebar label {
  display: block;
  color: #e5e7eb;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.sidebar select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e5e7eb;
  font-family: inherit;
  margin-bottom: 15px;
}


/* Main content */
.main {
  flex: 1;
  padding: 30px 40px;
  max-width: 1400px;
}

h1 {
  font-size: 2.2rem;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  color: #9aa6b2;
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Module Cards Layout - 3 column grid + ABCD sidebar.
   Column 4 went 320px -> 400px on 2026-08-14. The ABCD card used to span BOTH
   rows of column 4, which left the timeline card with nowhere to go: it wrapped
   onto a third row on its own, below the fold and underneath the docked
   timeline strip, where nobody found it. Freeing row 2 of column 4 puts it
   beside Build From Scratch. The extra 80px is what lets the ABCD text fit the
   height of one row instead of two - "Modulation (A changes outcome from C to
   D)" was wrapping mid-phrase at 320px. */
.modules-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 400px;
  gap: 28px;
  margin-bottom: 30px;
}

.modules-left {
  display: contents;
}

/* Module Cards Grid */
.modules-grid {
  display: contents;
}

/* ABCD Framework Sidebar - row 1 of column 4 only */
.abcd-sidebar {
  grid-row: 1;
  grid-column: 4;
  align-self: stretch;      /* match the height of the cards beside it */
  padding: 30px;
}

/* Build With The Timeline - row 2 of column 4, under the ABCD card and beside
   Build From Scratch. Placed explicitly rather than left to auto-flow, so it
   cannot drift back onto a row of its own when a card is added or removed. */
#card-build-timeline {
  grid-row: 2;
  grid-column: 4;
}

/* The four-column grid was fixed at every width. A 400px sidebar leaves the
   three flexible columns about 170px each on a 1366 laptop, which is not a
   card. Two columns first, then one. */
@media (max-width: 1400px) {
  .modules-layout { grid-template-columns: repeat(2, 1fr); }
  .abcd-sidebar,
  #card-build-timeline { grid-row: auto; grid-column: auto; }
}

@media (max-width: 900px) {
  .modules-layout { grid-template-columns: 1fr; }
}

/* Module Card */
.module-card {
  padding: 35px;
  border-radius: 18px;
  border: 1px solid rgba(255, 77, 184, 0.3);
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  background: rgba(17, 24, 39, 0.5);
  cursor: pointer;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ff4db8;
  opacity: 0.05;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.module-card:hover::before {
  opacity: 0.12;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 77, 184, 0.6);
}

.module-card.coming-soon {
  opacity: 0.7;
}

.module-card.coming-soon:hover {
  transform: none;
  cursor: default;
}

.module-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-icon {
  font-size: 2.5rem;
  margin-bottom: 18px;
}

.module-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #ffffff;
  font-weight: 600;
}

.module-description {
  font-size: 1.1rem;
  color: #9aa6b2;
  line-height: 1.6;
  flex: 1;
}

.module-options {
  list-style: none;
  margin-top: 18px;
  padding: 0;
}

.module-options li {
  font-size: 1rem;
  color: #a78bfa;
  padding: 5px 0;
  padding-left: 18px;
  position: relative;
}

.module-options li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #ff4db8;
  border-radius: 50%;
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 12px;
  margin-left: 10px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Original cards (for Quick Start section) */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.cards-row-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 77, 184, 0.3);
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  background: rgba(17, 24, 39, 0.5);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ff4db8;
  opacity: 0.05;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.card:hover::before {
  opacity: 0.1;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 77, 184, 0.5);
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #ffffff;
}

/* Form elements */
label {
  display: block;
  color: #e5e7eb;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 77, 184, 0.5);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #9aa6b2;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

/* Checkboxes */
.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  accent-color: #667eea;
  cursor: pointer;
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Radio buttons */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.radio-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
  font-size: 0.85rem;
}

.radio-group input[type="radio"] {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  accent-color: #667eea;
  cursor: pointer;
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.btn-export {
  width: 100%;
  padding: 12px 20px;
  background: rgba(22, 153, 153, 0.2);
  border: 1px solid rgba(22, 153, 153, 0.5);
  color: #169999;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-export:hover {
  background: rgba(22, 153, 153, 0.3);
  border-color: #169999;
}

/* Messages */
.success-message {
  background: rgba(22, 153, 153, 0.2);
  border-left: 4px solid #169999;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
  color: #e5e7eb;
}

.error-message {
  background: rgba(153, 15, 35, 0.2);
  border-left: 4px solid #990f23;
  padding: 15px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 10px;
  color: #e5e7eb;
}

.warning-message {
  background: rgba(255, 77, 184, 0.2);
  border-left: 4px solid #ff4db8;
  padding: 12px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 10px;
  color: #e5e7eb;
}

/* Progress */
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #ff4db8);
  transition: width 0.3s ease;
}

.progress-text {
  color: #9aa6b2;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* Feedback colors */
.feedback-correct {
  color: #169999;
}

.feedback-incorrect {
  color: #990f23;
}

/* Results */
.results {
  margin-top: 30px;
  display: none;
}

.results.show {
  display: block;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.summary-box {
  color: #9aa6b2;
  line-height: 1.8;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 25px 0;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-pink {
  color: #ff4db8;
}

.text-teal {
  color: #169999;
}

.text-muted {
  color: #9aa6b2;
}

/* =====================================================
   Collapsible Sections - Clean Accordion Design
   ===================================================== */

.collapsible-section {
  margin-bottom: 15px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.collapsible-section:hover {
  border-color: rgba(255, 77, 184, 0.3);
}

.collapsible-section.expanded {
  border-color: rgba(255, 77, 184, 0.5);
  background: rgba(17, 24, 39, 0.6);
}

.collapsible-header {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.collapsible-header:hover {
  background: rgba(255, 77, 184, 0.08);
}

.collapsible-step {
  background: linear-gradient(135deg, #ff4db8, #667eea);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  margin-right: 15px;
  flex-shrink: 0;
}

.collapsible-title {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.collapsible-subtitle {
  font-size: 0.85rem;
  color: #9aa6b2;
  margin-top: 2px;
}

.collapsible-arrow {
  font-size: 1.2rem;
  color: #9aa6b2;
  transition: transform 0.3s ease;
  margin-left: 15px;
}

.collapsible-section.expanded .collapsible-arrow {
  transform: rotate(180deg);
  color: #ff4db8;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 24px;
}

.collapsible-section.expanded .collapsible-content {
  max-height: 2000px;
  padding: 0 24px 24px 24px;
}

.collapsible-inner {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Status indicator for completed sections */
.collapsible-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.2);
  border: 2px solid rgba(74, 222, 128, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.collapsible-section.completed .collapsible-status {
  opacity: 1;
}

.collapsible-status::after {
  content: '✓';
  color: #4ade80;
  font-size: 12px;
}
