/* local-authority.css - Styles for Local Authority Summary Page */

/* LA Header */
.la-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 0;
}

.la-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.la-meta {
  font-size: 1.125rem;
  opacity: 0.95;
}

.meta-separator {
  margin: 0 0.75rem;
  opacity: 0.7;
}

/* Summary Section */
.summary-section {
  padding: 2rem 0;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.3;
}

/* Ratings Section */
.ratings-section {
  padding: 3rem 0;
}

.section-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.info-icon {
  font-size: 1.25rem;
  color: #9ca3af;
  cursor: help;
}

/* Rating Distribution Bars */
.ratings-distribution {
  margin-bottom: 2rem;
}

.rating-bar {
  display: grid;
  grid-template-columns: 150px 1fr 60px;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.rating-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.rating-track {
  height: 32px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.rating-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease-out;
  position: relative;
}

.rating-fill.outstanding {
  background: linear-gradient(90deg, #10b981, #059669);
}

.rating-fill.good {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.rating-fill.requires-improvement {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.rating-fill.inadequate {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

.rating-percent {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  text-align: right;
}

.rating-summary {
  padding: 1rem;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
}

.rating-summary p {
  margin: 0;
  color: #1e40af;
  font-size: 0.875rem;
}

/* Top Schools Section */
.top-schools-section {
  padding: 3rem 0;
  background: #f9fafb;
}

.section-main-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: #6b7280;
  margin-bottom: 2rem;
}

/* School Tabs */
.school-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e5e7eb;
}

.school-tab {
  padding: 1rem 2rem;
  background: none;
  border: none;
  color: #6b7280;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.school-tab:hover {
  color: #374151;
}

.school-tab.active {
  color: #2563eb;
}

.school-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: #2563eb;
}

/* School Lists */
.schools-content {
  max-width: 1000px;
  margin: 0 auto;
}

.school-list {
  display: none;
}

.school-list.active {
  display: block;
}

.school-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.school-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.school-rank {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.school-details {
  flex: 1;
}

.school-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.school-info {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.school-info-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.school-metrics {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.metric {
  text-align: center;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.metric-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.125rem;
}

.ofsted-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ofsted-badge.outstanding {
  background: #d1fae5;
  color: #065f46;
}

.ofsted-badge.good {
  background: #dbeafe;
  color: #1e40af;
}

.ofsted-badge.requires-improvement {
  background: #fed7aa;
  color: #92400e;
}

.ofsted-badge.inadequate {
  background: #fee2e2;
  color: #991b1b;
}

/* Performance Section */
.performance-section {
  padding: 3rem 0;
}

.performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.performance-card {
  text-align: center;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
}

.performance-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.performance-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}

.performance-comparison {
  font-size: 0.75rem;
  color: #6b7280;
}

.performance-comparison.positive {
  color: #10b981;
}

.performance-comparison.negative {
  color: #ef4444;
}

/* View All Section */
.view-all-section {
  padding: 3rem 0;
  background: #f9fafb;
}

.view-all-card {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.view-all-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #111827;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
  .la-header h1 {
    font-size: 1.75rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .rating-bar {
    grid-template-columns: 120px 1fr 50px;
  }
  
  .school-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .school-rank {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .school-metrics {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .performance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}