/* ============================================
   PROBABILITY AND STATISTICS TA WEBSITE
   Modern Professional Styling
   ============================================ */

:root {
  --primary-color: #003b7e;
  --secondary-color: #0066cc;
  --accent-color: #ff6b35;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;

  /* Font Sizes */
  --font-size-base: 0.95rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.2rem;
  --font-size-xl: 1.8rem;
  --font-size-2xl: 2.2rem;
  --font-size-3xl: 2.8rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
  padding: 1rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-centered {
  align-items: center;
  text-align: center;
  flex: 1;
}

.logo h1 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
}

.logo .subtitle {
  font-size: var(--font-size-base);
  opacity: 0.9;
  margin-top: 0.25rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
  font-size: var(--font-size-base);
}

.nav-link:hover,
.nav-link.active {
  opacity: 0.8;
  text-decoration: underline;
}

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

.main-content {
  min-height: calc(100vh - 100px);
}

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.section:last-of-type {
  border-bottom: none;
}

.section h2 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-align: center;
  padding: 5rem 0;
}

.hero h2 {
  color: white;
  font-size: var(--font-size-3xl);
  margin-bottom: 1rem;
}

.hero p {
  font-size: var(--font-size-lg);
  opacity: 0.95;
  margin-bottom: 3rem;
}

/* ============================================
   TIMELINE STYLING
   ============================================ */

.timeline-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.8rem 2.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  margin-top: 1rem;
}

.timeline-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.timeline-label {
  font-size: var(--font-size-md);
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 0.8rem;
}

.timeline-start,
.timeline-end {
  text-align: center;
  flex-shrink: 0;
}

.timeline-date {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.timeline-label-small {
  font-size: var(--font-size-base);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-progress-bar {
  flex: 1;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.timeline-progress-fill {
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.timeline-info {
  text-align: center;
  font-size: var(--font-size-base);
  opacity: 0.95;
  font-weight: 500;
  margin-top: 0.3rem;
}
/* ============================================
   SCHEDULE SECTION
   ============================================ */

.schedule {
  background-color: var(--bg-light);
}

.schedule-table-wrapper {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}

.schedule-table thead {
  background-color: var(--primary-color);
  color: white;
}

.schedule-table th {
  padding: 1rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schedule-table th.col-week {
  width: 100px;
  text-align: center;
}

.schedule-table th.col-dates {
  width: 160px;
}

.schedule-table th.col-topic {
  flex: 1;
  min-width: 280px;
}

.schedule-table th.col-lesson {
  width: 180px;
  text-align: center;
}

.schedule-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
  height: auto;
}

.schedule-table tbody tr:hover {
  background-color: rgba(0, 102, 204, 0.05);
}

.schedule-table tbody tr:last-child {
  border-bottom: none;
}

.schedule-table td {
  padding: 1rem 1rem;
  font-size: var(--font-size-base);
  vertical-align: middle;
}

.schedule-table td.col-week {
  color: var(--text-light);
  font-size: var(--font-size-base);
  text-align: center;
}

.schedule-table td.col-dates {
  color: var(--text-light);
  font-size: var(--font-size-base);
  white-space: nowrap;
}

.schedule-table td.col-topic {
  color: var(--text-dark);
  font-size: var(--font-size-base);
}

.schedule-table td.col-lesson {
  text-align: center;
  color: var(--text-light);
  font-size: var(--font-size-base);
  font-weight: 600;
}

/* Material links inherit color from row status */
.schedule-table tbody tr.past td.col-lesson {
  color: var(--text-dark);
}

.schedule-table tbody tr.current td.col-lesson {
  color: var(--secondary-color);
}

.schedule-table tbody tr.upcoming td.col-lesson {
  color: var(--text-light);
}

/* Material cell content with direct links */
.material-cell-content {
  position: relative;
  display: inline-block;
  min-height: 1.5em;
  min-width: 1.2em;
}

.material-separator {
  margin: 0 0.5rem;
  color: var(--text-light);
}



/* Material links (preview/download) */
.schedule-table .material-link {
  display: inline;
  padding: 0;
  margin: 0;
  background-color: transparent;
  color: inherit;
  text-decoration: none;
  border-radius: 0;
  font-size: var(--font-size-base);
  font-weight: inherit;
  transition: color 0.2s ease;
  cursor: pointer;
}

.schedule-table .material-link.available {
  font-weight: 600;
  color: inherit;
}

.schedule-table .material-link.unavailable {
  color: var(--text-light);
  font-weight: 400;
  cursor: not-allowed;
  opacity: 0.6;
}

.schedule-table .material-link.available:hover {
  opacity: 0.8;
}

/* Spacing for line breaks in material cells */
.schedule-table .material-link br {
  line-height: 1.8;
}

/* Week status styling */
.schedule-table tbody tr.past {
  background: linear-gradient(90deg, 
    rgba(0, 102, 204, 0.08) 0%, 
    rgba(0, 102, 204, 0.04) 100%);
}

.schedule-table tbody tr.past td.col-topic {
  color: var(--text-dark);
  font-weight: 500;
}

.schedule-table tbody tr.past td.col-week {
  color: var(--text-dark);
  font-weight: 700;
}

.schedule-table tbody tr.current {
  background-color: rgba(0, 102, 204, 0.15);
  border: 1px solid var(--secondary-color);
}

.schedule-table tbody tr.current td.col-week {
  color: var(--secondary-color);
  font-weight: 700;
}

.schedule-table tbody tr.current td.col-topic {
  color: var(--secondary-color);
  font-weight: 600;
}

.schedule-table tbody tr.upcoming td.col-topic {
  color: var(--text-light);
  font-weight: 400;
}

.schedule-table tbody tr.upcoming td.col-week {
  color: var(--text-light);
  font-weight: 400;
}

/* Easter break styling */
.schedule-table tbody tr.easter-break {
  background-color: rgba(76, 175, 80, 0.12);
}

.schedule-table tbody tr.easter-break td {
  color: #388e3c;
  font-weight: 600;
}

.schedule-table tbody tr.easter-break td.col-week {
  color: #388e3c;
  font-weight: 700;
}

.schedule-table tbody tr.easter-break:hover {
  background-color: rgba(76, 175, 80, 0.18);
}

/* Easter break that has passed - keep light green but make text gray like past weeks */
.schedule-table tbody tr.easter-break.past {
  background: linear-gradient(90deg, 
    rgba(76, 175, 80, 0.08) 0%, 
    rgba(76, 175, 80, 0.04) 100%);
}

.schedule-table tbody tr.easter-break.past td {
  color: var(--text-light);
  font-weight: 400;
}

.schedule-table tbody tr.easter-break.past td.col-week {
  color: var(--text-light);
  font-weight: 400;
}

.schedule-table tbody tr.easter-break.past:hover {
  background: linear-gradient(90deg, 
    rgba(76, 175, 80, 0.12) 0%, 
    rgba(76, 175, 80, 0.08) 100%);
}

/* ============================================
   EXPANDABLE ROWS - INTERACTIVE TABLE
   ============================================ */

.schedule-table tbody tr.expandable-row {
  cursor: pointer;
  user-select: none;
}

.schedule-table tbody tr.expandable-row:hover .col-week::before {
  opacity: 1;
}

/* Week toggle indicator */
.week-toggle {
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.3s ease, color 0.2s ease;
  color: var(--text-light);
  font-weight: 700;
  transform-origin: center;
}

/* Arrow color based on row status */
.schedule-table tbody tr.past .week-toggle {
  color: var(--text-dark);
  font-weight: 700;
}

.schedule-table tbody tr.current .week-toggle {
  color: var(--secondary-color);
  font-weight: 700;
}

.schedule-table tbody tr.upcoming .week-toggle {
  color: var(--text-light);
  font-weight: 700;
}

.schedule-table tbody tr.easter-break .week-toggle {
  color: #388e3c;
  font-weight: 700;
}

.schedule-table tbody tr.expandable-row.expanded .week-toggle {
  transform: rotate(180deg);
}

/* Expansion details row */
.expansion-details-row {
  display: none;
  background-color: #f5f5f5;
  border-bottom: none;
}

.schedule-table tbody tr.expandable-row.expanded + tr.expansion-details-row {
  display: table-row;
  animation: expandDown 0.3s ease-out;
}

/* Expansion content styling */
.expansion-content {
  padding: 1.5rem;
  border-left: 4px solid var(--secondary-color);
  background: white;
  margin: 0.5rem 0;
  border-radius: 4px;
  display: grid;
  gap: 1rem;
}

.details-description {
  line-height: 1.6;
}

.details-description strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--font-size-md);
}

.details-description p {
  color: var(--text-dark);
  font-size: var(--font-size-base);
  margin: 0;
}

.details-keywords {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.details-keywords strong {
  color: var(--primary-color);
  display: block;
  font-size: var(--font-size-base);
  margin-bottom: 0.25rem;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.keyword-tag {
  display: inline-block;
  background-color: rgba(0, 102, 204, 0.1);
  color: var(--secondary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: var(--font-size-base);
  font-weight: 500;
  border: 1px solid var(--secondary-color);
}

.details-exercises {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exercises-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.exercises-header strong {
  color: var(--primary-color);
  font-size: var(--font-size-base);
}

.exercises-download {
  display: flex;
  justify-content: flex-end;
}

.exercises-download .exercise-download-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: opacity 0.2s ease;
  cursor: pointer;
}

.exercises-download .exercise-download-link:hover {
  opacity: 0.8;
}

.exercises-download .exercise-download-link.unavailable {
  color: var(--text-light);
  font-weight: 400;
  cursor: not-allowed;
  opacity: 0.6;
}

.details-exercises strong {
  color: var(--primary-color);
  display: block;
  font-size: var(--font-size-base);
  margin-bottom: 0.25rem;
}

.details-exercises ul {
  margin: 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.details-exercises li {
  color: var(--text-dark);
  font-size: var(--font-size-base);
  margin-bottom: 0.25rem;
}

/* Animation for expansion */
@keyframes expandDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* Responsive expansion content */
@media (max-width: 768px) {
  .expansion-content {
    padding: 1rem;
    grid-template-columns: 1fr;
  }
  
  .keyword-tags {
    flex-direction: column;
  }
  
  .keyword-tag {
    width: 100%;
  }
}

/* ============================================
   RESOURCES SECTION
   ============================================ */

.resources {
  background-color: var(--bg-white);
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 2rem;
}

.resource-card {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 1fr) minmax(150px, 1fr);
  align-items: center;
  gap: 1.5rem;
}

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

.resource-card h3 {
  color: var(--primary-color);
  margin: 0;
  font-size: var(--font-size-md);
  white-space: nowrap;
}

.resource-desc {
  color: var(--text-light);
  font-size: var(--font-size-base);
  text-align: left;
}

.resource-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.resource-link {
  display: inline;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  font-size: var(--font-size-base);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.resource-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

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

.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 0;
}

.footer p {
  font-size: var(--font-size-base);
  opacity: 0.9;
}

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

@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
    font-size: 0.85rem;
  }

  .logo h1 {
    font-size: 1.3rem;
  }

  .section h2 {
    font-size: 1.8rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .timeline {
    gap: 0.5rem;
  }

  .timeline-progress-bar {
    min-width: 60px;
  }


}

@media (max-width: 700px) {
  .resource-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .resource-card h3 {
    white-space: normal;
  }

  .resource-desc {
    text-align: left;
    font-size: 0.9rem;
  }

  .resource-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 0.5rem;
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  .section {
    padding: 2rem 0;
  }

}



.material-item {
  animation: fadeIn 0.6s ease-out forwards;
}