@import url('shared.css');

/* =====================
   MAIN CONTENT
   ===================== */

.content {
  margin-top: 175px; margin-left: 10%; margin-right: 10%;
  color: var(--text-body); transition: color 0.3s ease;
}

.pagetitle {
  font-size: 70px; text-align: center; margin: 0 0 50px;
  color: var(--text-primary); font-weight: 600; transition: color 0.3s ease;
}

/* =====================
   ACCOMPLISHMENTS TABLE
   ===================== */

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 50px;
  font-size: 17px;
}

.info-table th {
  background-color: var(--accent-dark);
  color: white;
  padding: 14px 20px;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
}

.info-table th:first-child { border-radius: 10px 0 0 0; }
.info-table th:last-child { border-radius: 0 10px 0 0; }

.info-table td {
  padding: 12px 20px;
  vertical-align: top;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.info-table tr:last-child td { border-bottom: none; }

.info-table tr:nth-child(odd) td { background-color: rgba(0, 132, 255, 0.06); }
.info-table tr:nth-child(even) td { background-color: white; }

body.dark .info-table tr:nth-child(odd) td { background-color: rgba(0, 132, 255, 0.12); }
body.dark .info-table tr:nth-child(even) td { background-color: rgba(255, 255, 255, 0.04); }

.info-table td:first-child {
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
}

.accom-list,
.clubs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accom-list li,
.clubs-list li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.accom-list li:last-child,
.clubs-list li:last-child { border-bottom: none; }

/* =====================
   GRADES SECTION
   ===================== */

.grades-section { margin-bottom: 60px; }

.grades-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px;
  transition: color 0.3s ease;
}

.quarter-select-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.quarter-label-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.quarter-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--accent-dark);
  color: white;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  padding: 12px 44px 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1 1l6 7 6-7' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: background-color 0.2s ease;
}

.quarter-select:focus {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}

.quarter-select:hover { background-color: var(--accent); }

/* Grades table */
.grades-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.grades-table th {
  background-color: var(--accent);
  color: white;
  padding: 14px 24px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
}

.grades-table td {
  padding: 13px 24px;
  font-size: 17px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  color: var(--text-primary);
  transition: color 0.3s ease, background-color 0.3s ease;
}

.grades-table tr:last-child td { border-bottom: none; }

.grades-table tr:nth-child(odd) td { background-color: white; }
.grades-table tr:nth-child(even) td { background-color: rgba(0, 132, 255, 0.05); }

body.dark .grades-table tr:nth-child(odd) td { background-color: rgba(255, 255, 255, 0.05); }
body.dark .grades-table tr:nth-child(even) td { background-color: rgba(0, 132, 255, 0.1); }

.grade-value { font-weight: 700; text-align: right; }

.grade-a { color: var(--good); }
.grade-b { color: var(--warn); }
.grade-ex { color: var(--accent-dark); }

.empty-quarter {
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
  padding: 40px 0;
}

.section-divider {
  background-color: var(--accent-dark) !important;
  color: white !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 24px !important;
}

/* =====================
   FOOTER SPACING
   ===================== */

.footer { margin-top: 50px; }

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 768px) {
  .content { margin-top: 120px; margin-left: 5%; margin-right: 5%; }
  .pagetitle { font-size: 40px; }

  /* Accomplishments/Clubs table -> stacked cards instead of a squished
     table. Each row becomes a card; each cell gets a label (from column
     position, since every year page uses the same Grade/Accomplishments/
     Clubs order) instead of a real <table> row. */

  .info-table, .info-table tbody, .info-table tr {
    display: block;
    width: 100%;
  }

  .info-table thead { display: none; }

  .info-table tr {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
  }

  .info-table tr:last-child { margin-bottom: 0; }

  .info-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    border-bottom: 1px solid var(--card-border);
  }

  .info-table td:last-child { border-bottom: none; }

  /* Override the desktop odd/even striping now that cells are stacked
     full-width inside a card — same selectors, same specificity, later
     in the file, so this wins without !important. */
  .info-table tr:nth-child(odd) td,
  .info-table tr:nth-child(even) td,
  body.dark .info-table tr:nth-child(odd) td,
  body.dark .info-table tr:nth-child(even) td {
    background-color: transparent;
  }

  .info-table td::before {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
  }

  .info-table td:nth-child(1) { font-size: 17px; white-space: normal; }
  .info-table td:nth-child(1)::before { content: "Grade"; }
  .info-table td:nth-child(2)::before { content: "Accomplishments"; }
  .info-table td:nth-child(3)::before { content: "Clubs"; }

  /* Grades table stays a real table (only 2 columns) — just guard
     against long subject names overflowing on narrow phones */
  .grades-table th, .grades-table td { padding: 10px 14px; font-size: 15px; }
  .grades-table td:first-child { overflow-wrap: break-word; word-break: break-word; }

  .quarter-select { font-size: 15px; }
  .grades-title { font-size: 26px; }
}
