/* Free Passage Reader Page Styles */

.free-passage-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #2a2a3e;
  line-height: 1.6;
  background: #f8f9fa;
}

.free-passage-page .container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.free-passage-header {
  padding: 20px 0;
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  color: #6c757d;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.back-link:hover {
  color: #667eea;
}

/* Passage Section */
.passage-section {
  padding: 40px 0;
}

/* Two Column Layout */
.passage-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}

.passage-main {
  min-width: 0; /* Prevents overflow issues */
}

.passage-sidebar {
  position: sticky;
  top: 20px;
}

.thumbnail-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.sidebar-thumbnail-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Passage Card */
.passage-card {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.free-passage-page .passage-header {
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: block;
}

.free-passage-page .passage-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 1rem;
}

.free-passage-page .passage-meta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  flex-wrap: nowrap;
}

.free-passage-page .grade-badge,
.free-passage-page .focus-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
}

.free-passage-page .grade-badge {
  background: #667eea;
  color: white;
}

.free-passage-page .focus-badge {
  background: #e7f3ff;
  color: #667eea;
}

.free-passage-page .word-count {
  color: #6c757d;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Passage Text */
.passage-text {
  font-size: 1.3rem;
  line-height: 2;
  color: #2a2a3e;
  margin-bottom: 2rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.passage-text p {
  margin-bottom: 1.5rem;
}

.passage-text p:last-child {
  margin-bottom: 0;
}

/* Passage Actions (in sidebar) */
.passage-sidebar .passage-actions {
  text-align: center;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.passage-sidebar .download-section {
  width: 100%;
  display: flex;
  justify-content: center;
}

.passage-sidebar .download-hint {
  margin: 0;
  color: #6c757d;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0 0.5rem;
}

/* Upsell Section */
.upsell-section {
  margin: 3rem 0;
}

.upsell-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
}

.upsell-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.upsell-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.upsell-description {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* Upsell Comparison */
.upsell-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  text-align: left;
}

.comparison-side {
  background: rgba(255, 255, 255, 0.15);
  padding: 2rem;
  border-radius: 8px;
}

.comparison-side.adaptive {
  background: rgba(255, 210, 63, 0.2);
  border: 2px solid #ffd23f;
}

.comparison-side h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.comparison-side ul {
  list-style: none;
  padding: 0;
}

.comparison-side li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.comparison-side li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 1.5rem;
}

.comparison-side.static li::before {
  color: rgba(255, 255, 255, 0.5);
}

.comparison-side.adaptive li::before {
  color: #ffd23f;
}

/* Upsell CTA */
.upsell-cta {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.upsell-cta h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.upsell-cta p {
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.pricing-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Usage Guide */
.usage-guide {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.usage-guide h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #1a1a2e;
}

.usage-steps {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.usage-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.usage-step .step-number {
  background: #667eea;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.usage-step .step-content h3 {
  font-size: 1.3rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.usage-step .step-content p {
  color: #6c757d;
  line-height: 1.6;
}

.usage-callout {
  background: #e7f3ff;
  border-left: 4px solid #667eea;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.usage-callout strong {
  color: #667eea;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .passage-layout {
    grid-template-columns: 1fr;
  }

  .passage-sidebar {
    position: static;
    order: -1; /* Move thumbnail above content on mobile */
  }

  .thumbnail-card {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .passage-card {
    padding: 2rem 1.5rem;
  }

  .passage-title {
    font-size: 1.5rem;
  }

  .passage-text {
    font-size: 1.1rem;
    padding: 1.5rem;
  }

  .upsell-card {
    padding: 2rem 1.5rem;
  }

  .upsell-card h2 {
    font-size: 1.5rem;
  }

  .upsell-comparison {
    grid-template-columns: 1fr;
  }

  .usage-guide {
    padding: 2rem 1.5rem;
  }

  .usage-step {
    flex-direction: column;
  }

  .usage-step .step-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}
