/* Luxury Data Visualization Styles */
/* Sophisticated editorial design inspired by premium publications */

.data-section {
  margin: 4rem 0;
  padding: 0;
}

.data-section + .data-section {
  border-top: 1px solid #e5e5e5;
  padding-top: 4rem;
}

/* Hero Statistics Block */
.stat-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 0;
  border-top: 3px solid #1a1a1a;
  border-bottom: 1px solid #e5e5e5;
  margin: 3rem 0;
}

.stat-primary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-number {
  font-size: 4.5rem;
  font-weight: 300;
  line-height: 0.9;
  color: #1a1a1a;
  letter-spacing: -2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.stat-label {
  font-size: 1.1rem;
  color: #666;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

.stat-secondary {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1;
}

.stat-desc {
  font-size: 0.9rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Visualization Headers */
.viz-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.viz-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.5px;
}

.viz-header p {
  font-size: 1rem;
  color: #666;
  margin: 0;
  font-weight: 400;
}

/* Grade Distribution Bars */
.grade-bars {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.grade-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.bar-label {
  font-size: 1rem;
  color: #1a1a1a;
  font-weight: 500;
}

.bar-percent {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
}

.bar-track {
  height: 8px;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a1a1a 0%, #666 100%);
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.bar-fill.animated {
  animation: barSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes barSlide {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Disability Grid */
.disability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
}

.disability-item {
  padding: 1.5rem 0;
  text-align: center;
  border-top: 2px solid #f0f0f0;
  transition: border-color 0.3s ease;
}

.disability-item.primary {
  border-top-color: #1a1a1a;
}

.disability-item:hover {
  border-top-color: #666;
}

.disability-number {
  font-size: 2.5rem;
  font-weight: 300;
  color: #1a1a1a;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.disability-item.primary .disability-number {
  font-weight: 600;
}

.disability-label {
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* District Rankings */
.district-summary {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border-radius: 8px;
}

.summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.summary-item {
  font-size: 0.9rem;
  color: #666;
}

.summary-item strong {
  color: #1a1a1a;
  font-weight: 600;
}

.district-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.district-item {
  display: grid;
  grid-template-columns: 2rem 1fr 4rem;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f5f5f5;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.district-item.zero-incidents {
  opacity: 0.6;
}

.district-item.zero-incidents .district-name {
  color: #999;
}

.district-item.redacted .district-name {
  font-style: italic;
}

.district-item.redacted .district-count {
  color: #999;
}

.expand-controls {
  margin-top: 2rem;
  text-align: center;
}

.expand-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.expand-button:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
  color: #1a1a1a;
}

.expand-button ion-icon {
  font-size: 1rem;
}

.data-notes {
  margin-top: 2rem;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid #e5e5e5;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

.data-notes p {
  margin: 0;
}

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

.district-rank {
  font-size: 1.1rem;
  font-weight: 600;
  color: #999;
  text-align: center;
}

.district-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.district-name {
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
}

.district-count {
  font-size: 0.85rem;
  color: #666;
}

.district-bar {
  height: 4px;
  background: #f5f5f5;
  border-radius: 2px;
  overflow: hidden;
}

.district-fill {
  height: 100%;
  background: #1a1a1a;
  border-radius: 2px;
  transition: width 1s ease;
}

/* Key Insight Block */
.insight-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 3rem;
  background: #fafafa;
  border-left: 4px solid #1a1a1a;
  margin: 3rem 0;
}

.insight-stat {
  font-size: 5rem;
  font-weight: 300;
  color: #1a1a1a;
  line-height: 0.8;
  letter-spacing: -3px;
  flex-shrink: 0;
}

.insight-text h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  letter-spacing: -0.5px;
}

.insight-text p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}

/* Newsletter Signup Section */
.newsletter-signup-section {
  margin: 3rem 0;
  padding: 0;
}

.signup-container {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  padding: 3rem;
}

.signup-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.5px;
}

.signup-content p {
  font-size: 1rem;
  color: #666;
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

.signup-form {
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0;
  max-width: 500px;
}

.email-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e5e5;
  border-right: none;
  border-radius: 0;
  font-size: 1rem;
  color: #1a1a1a;
  background: white;
  transition: border-color 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: #1a1a1a;
}

.email-input::placeholder {
  color: #999;
}

.signup-button {
  padding: 1rem 2rem;
  background: #1a1a1a;
  color: white;
  border: 2px solid #1a1a1a;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-button:hover {
  background: #333;
  border-color: #333;
}

.signup-button:disabled {
  background: #999;
  border-color: #999;
  cursor: not-allowed;
}

.signup-message {
  margin-top: 1rem;
  padding: 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.signup-message.success {
  color: #27ae60;
}

.signup-message.error {
  color: #e74c3c;
}

.signup-note {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .signup-container {
    padding: 2rem;
  }
  
  .input-group {
    flex-direction: column;
    max-width: none;
  }
  
  .email-input {
    border-right: 2px solid #e5e5e5;
    border-bottom: none;
  }
  
  .email-input:focus {
    border-color: #1a1a1a;
  }
  
  .viz-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  .stat-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
  }
  
  .stat-secondary {
    width: 100%;
    justify-content: space-between;
    gap: 2rem;
  }
  
  .stat-item {
    align-items: flex-start;
    text-align: left;
  }
  
  .stat-number {
    font-size: 3.5rem;
  }
  
  .disability-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .district-item {
    grid-template-columns: 1.5rem 1fr 3rem;
    gap: 0.75rem;
  }
  
  .summary-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .insight-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
  }
  
  .insight-stat {
    font-size: 4rem;
  }
}

@media (max-width: 480px) {
  .data-section {
    margin: 3rem 0;
  }
  
  .stat-number {
    font-size: 3rem;
  }
  
  .stat-secondary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  
  .disability-grid {
    grid-template-columns: 1fr;
  }
  
  .viz-header h3 {
    font-size: 1.2rem;
  }
}
