/* Subject area pages — high-fidelity, welcoming academic styling */

:root {
  --subject-accent: #0d9488;
  --subject-accent-soft: rgba(13, 148, 136, 0.12);
  --subject-deep: #0f766e;
}

.subject-page {
  --subject-accent: #0d9488;
  --subject-accent-soft: rgba(13, 148, 136, 0.12);
  --subject-deep: #0f766e;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.subject-page.subject-biology {
  --subject-accent: #0d9488;
  --subject-accent-soft: rgba(13, 148, 136, 0.12);
  --subject-deep: #0f766e;
}

.subject-page.subject-chemistry {
  --subject-accent: #2563eb;
  --subject-accent-soft: rgba(37, 99, 235, 0.12);
  --subject-deep: #1d4ed8;
}

.subject-page.subject-inquiry {
  --subject-accent: #7c3aed;
  --subject-accent-soft: rgba(124, 58, 237, 0.12);
  --subject-deep: #6d28d9;
}

.subject-page.subject-earth {
  --subject-accent: #c2410c;
  --subject-accent-soft: rgba(194, 65, 12, 0.1);
  --subject-deep: #9a3412;
}

.subject-page.subject-physics {
  --subject-accent: #d97706;
  --subject-accent-soft: rgba(217, 119, 6, 0.12);
  --subject-deep: #b45309;
}

/* Base Utility Styles */
.tentative-note {
  font-size: 0.9rem;
  color: #57534e;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tentative-note i {
  color: #d97706;
  font-size: 1.1rem;
}

/* Subject Hero */
.subject-hero {
  border-radius: 24px;
  padding: 3rem 2.5rem 2.5rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(
    135deg,
    var(--subject-deep) 0%,
    var(--subject-accent) 50%,
    color-mix(in srgb, var(--subject-accent) 80%, white) 100%
  );
  color: #fff;
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.15);
  position: relative;
  overflow: hidden;
}

.subject-hero::after {
  content: "";
  position: absolute;
  inset: -50% 50% auto -20%;
  height: 150%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.25) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.subject-hero-inner {
  position: relative;
  z-index: 2;
}

.subject-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.subject-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.subject-tagline {
  font-size: 1.15rem;
  line-height: 1.6;
  opacity: 0.95;
  max-width: 48rem;
  margin: 0 0 1.5rem;
}

.director-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Subject Introduction Card */
.subject-intro-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e7e5e4;
  padding: 2.25rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.subject-intro-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1c1917;
  margin-top: 0;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.subject-intro-card h2 i {
  color: var(--subject-accent);
}

.subject-intro-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .subject-intro-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

.subject-intro-text {
  font-size: 1.05rem;
  color: #44403c;
  line-height: 1.7;
}

.subject-intro-text p:last-child {
  margin-bottom: 0;
}

.expectations-box {
  background: var(--subject-accent-soft);
  border-left: 4px solid var(--subject-accent);
  padding: 1.5rem;
  border-radius: 0 16px 16px 0;
}

.expectations-box h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--subject-deep);
  margin-top: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expectations-box ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #44403c;
  line-height: 1.6;
}

.expectations-box li {
  margin-bottom: 0.5rem;
}

.expectations-box li:last-child {
  margin-bottom: 0;
}

/* Event Detail Section Header */
.events-section-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #e7e5e4;
  padding-bottom: 1rem;
}

.events-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1c1917;
  margin: 0;
}

.events-section-subtitle {
  font-size: 1rem;
  color: #6c6a65;
  margin: 0.25rem 0 0;
}

/* Events Grid & Event Cards */
.events-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

.event-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e7e5e4;
  padding: 2.25rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.04);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.event-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--subject-accent);
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--subject-accent) 30%, #e7e5e4);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.event-title-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.event-title-area i {
  font-size: 1.5rem;
  color: var(--subject-accent);
}

.event-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1c1917;
  margin: 0;
}

.event-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--subject-accent-soft);
  color: var(--subject-deep);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
}

.event-tagline-lead {
  font-size: 1.05rem;
  color: #57534e;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #e7e5e4;
}

/* Dynamic Tab Component Library */
.event-tabs {
  background: #fafaf9;
  border-radius: 14px;
  border: 1px solid #e7e5e4;
  overflow: hidden;
}

.tab-header {
  display: flex;
  background: #f5f5f4;
  border-bottom: 1px solid #e7e5e4;
  overflow-x: auto;
  scrollbar-width: none; /* Hide standard Firefox scrollbar */
}

.tab-header::-webkit-scrollbar {
  display: none; /* Hide Chrome/Safari scrollbars */
}

.tab-btn {
  flex: 1;
  min-width: 110px;
  background: none;
  border: none;
  padding: 1rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #57534e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  outline: none;
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  color: var(--subject-deep);
}

.tab-btn.active {
  background: #fff;
  color: var(--subject-deep);
  border-bottom: 3px solid var(--subject-accent);
}

/* Override global style.css rule that hides .tab-content outside .tabs-container */
.event-tabs > .tab-content {
  display: block;
}

.tab-content {
  background: #fff;
  padding: 1.5rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
  display: block;
}

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

/* Content Styles inside Tab Panes */

/* 1. Overview Tab */
.overview-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .overview-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.overview-list-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--subject-deep);
  margin-top: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.overview-list-title i {
  color: var(--subject-accent);
}

.overview-ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #44403c;
  line-height: 1.6;
  font-size: 0.95rem;
}

.overview-ul li {
  margin-bottom: 0.6rem;
}

.overview-ul li:last-child {
  margin-bottom: 0;
}

.big-questions-box {
  background: #fcfcfb;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
}

.question-prompt {
  font-size: 0.95rem;
  color: #44403c;
  margin-bottom: 0.75rem;
  font-style: italic;
  display: flex;
  gap: 0.5rem;
  line-height: 1.5;
}

.question-prompt i {
  color: var(--subject-accent);
  margin-top: 0.2rem;
}

/* 2. Topic Catalogue Tab (Season Comparison) */
.season-split {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .season-split {
    grid-template-columns: 1fr 1fr;
  }
}

.season-column {
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.season-column.active-season {
  border-color: color-mix(in srgb, var(--subject-accent) 40%, #e7e5e4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.season-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.season-header-badge.past {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.season-header-badge.future {
  background: var(--subject-accent-soft);
  color: var(--subject-deep);
  border: 1px solid color-mix(in srgb, var(--subject-accent) 30%, transparent);
}

.season-topics-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #292524;
  margin-bottom: 0.75rem;
}

.topic-list-ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #44403c;
  line-height: 1.55;
  font-size: 0.9rem;
}

.topic-list-ul li {
  margin-bottom: 0.5rem;
}

.topic-list-ul li strong {
  color: #1c1917;
}

/* 3. Academic Path Tab */
.pathway-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .pathway-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.textbook-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.textbook-card:last-child {
  margin-bottom: 0;
}

.textbook-icon {
  font-size: 1.75rem;
  color: var(--subject-accent);
  background: var(--subject-accent-soft);
  padding: 0.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.textbook-info h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 0.25rem;
}

.textbook-info .author {
  font-size: 0.85rem;
  color: #6c6a65;
  margin: 0 0 0.5rem;
}

.textbook-info .scope-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f5f5f4;
  color: #57534e;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.courses-box {
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
}

.course-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.course-tag {
  font-size: 0.8rem;
  font-weight: 600;
  background: #fff;
  color: #44403c;
  border: 1px solid #e7e5e4;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.course-tag i {
  color: var(--subject-accent);
  font-size: 0.75rem;
}

/* 4. Resource Hub Tab */
.resources-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .resources-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.resource-item {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.resource-item:hover {
  border-color: var(--subject-accent);
  background: var(--subject-accent-soft);
  transform: translateX(2px);
}

.resource-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.resource-type-icon {
  font-size: 1.5rem;
  color: var(--subject-accent);
  background: var(--subject-accent-soft);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-item:hover .resource-type-icon {
  background: #fff;
}

.resource-item-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c1917;
  margin: 0 0 0.15rem;
}

.resource-item-info p {
  font-size: 0.8rem;
  color: #6c6a65;
  margin: 0;
}

.resource-arrow {
  color: #a8a29e;
  transition: transform 0.2s ease;
}

.resource-item:hover .resource-arrow {
  color: var(--subject-accent);
  transform: translateX(2px);
}

/* Full Width Featured Events (write it do it, etc) styling */
.event-card.full-width {
  grid-column: 1 / -1;
}

@media (max-width: 767px) {
  .event-card.full-width {
    grid-column: auto;
  }
}
