/* Exam Results Page Styles */
.exam-results-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Section */
.results-header {
  text-align: center;
  margin-bottom: 3rem;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
}

.main-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.intro-text {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #64748b;
  margin: 0;
}

/* Message Section */
.message-section {
  margin-bottom: 3rem;
}

.message-card {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-blue-dark) 100%);
  border-radius: 16px;
  padding: 2rem;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 31, 77, 0.15);
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-yellow) 0%, #fbbf24 100%);
}

.message-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.message-icon {
  background: var(--brand-yellow);
  color: var(--brand-dark);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.message-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: white;
}

.message-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-highlight {
  background: rgba(254, 207, 7, 0.1);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--brand-yellow);
  font-weight: 500;
}

/* Ceremony Section */
.ceremony-section {
  margin-bottom: 3rem;
}

.ceremony-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  position: relative;
}

.ceremony-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
  border-radius: 16px 16px 0 0;
}

.ceremony-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.ceremony-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.ceremony-subtitle {
  font-size: 1.125rem;
  color: var(--brand-blue);
  font-weight: 500;
  margin: 0;
}

.ceremony-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #64748b;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

/* Results Section */
.results-section {
  margin-top: 3rem;
}

.results-header-section {
  text-align: center;
  margin-bottom: 2rem;
}

.results-main-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.results-year {
  font-size: 1.125rem;
  color: var(--brand-blue);
  font-weight: 500;
  margin: 0;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

/* Result Cards */
.result-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.result-card-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.result-card-header:hover {
  background: #f1f5f9;
}

.result-card-title {
  display: flex;
  align-items: center;
}

.result-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.ssc-icon {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
  color: white;
}

.hssc-icon {
  background: linear-gradient(135deg, var(--brand-yellow) 0%, #fbbf24 100%);
  color: var(--brand-dark);
}

.result-card-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0 0 0.25rem 0;
}

.result-card-title p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.result-toggle {
  color: var(--brand-blue);
  transition: transform 0.3s ease;
}

.result-card.active .result-toggle {
  transform: rotate(180deg);
}

.toggle-icon {
  transition: transform 0.3s ease;
}

/* Result Content - Fixed version */
.result-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: white;
}

.result-content.active {
    max-height: 2000px; /* Large enough value for most content */
    transition: max-height 0.3s ease-in;
}

.result-data {
    padding: 1.5rem;
    background: white;
}

/* Ensure the cards are clickable */
.result-card-header {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.result-card-header:focus {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Make sure the toggle icon rotates properly */
.result-card.active .toggle-icon {
    transform: rotate(180deg);
}

.toggle-icon {
    transition: transform 0.3s ease;
}




/* Style the result tables */
.result-data table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.result-data th {
  background: var(--brand-dark);
  color: white;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
}

.result-data td {
  padding: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  color: #374151;
}

.result-data tr:hover {
  background: #f8fafc;
}

.result-data tr:nth-child(even) {
  background: #f9fafb;
}

.result-data tr:nth-child(even):hover {
  background: #f1f5f9;
}

/* Loading Animation */
.result-card.loading .result-content {
  padding: 2rem;
  text-align: center;
  color: #64748b;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  border-top-color: var(--brand-blue);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .exam-results-container {
    padding: 1rem;
  }

  .main-title {
    font-size: 2rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .message-card,
  .ceremony-card {
    padding: 1.5rem;
  }

  .message-header {
    flex-direction: column;
    text-align: center;
  }

  .message-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .result-card-header {
    padding: 1rem;
  }

  .result-data {
    padding: 1rem;
  }

  .result-data table {
    font-size: 0.75rem;
  }

  .result-data th,
  .result-data td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 1.75rem;
  }

  .ceremony-title {
    font-size: 1.5rem;
  }

  .results-main-title {
    font-size: 1.75rem;
  }

  .result-card-title h3 {
    font-size: 1.125rem;
  }
}

/* Print Styles */
@media print {
  .result-toggle {
    display: none;
  }

  .result-content
    max-height: none !important;
    overflow: visible !important;
  }

  .result-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}





