.subject-panels {
  padding: 0 clamp(1rem, 4vw, 3rem);
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.subject-panels-inner {
  display: flex;
  flex-direction: column;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gold);
}

.subject-panel {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.subject-panel-header {
  position: relative;
  height: 40vh;
  flex-shrink: 0;
  cursor: pointer;
  transition: height 0.4s ease;
}


.subject-panel-header video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject-panel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.4s ease;
}

.subject-panel-hint {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.subject-panel:hover .subject-panel-overlay {
  background: rgba(0, 0, 0, 0.05);
}

.subject-panel.active .subject-panel-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.subject-panel-label {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0,0,0,0.9), 0 2px 20px rgba(0,0,0,0.7);
  pointer-events: none;
  white-space: nowrap;
}

.subject-panel:nth-child(3) .subject-panel-label {
  font-family: 'Inter', sans-serif;
}

.subject-panel-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background: var(--navy);
}

.subject-panel.active .subject-panel-body {
  max-height: 2400px;
}

.subject-panel-blurb {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  padding: 1.75rem 2rem 1.25rem;
  margin: 0;
  opacity: 0.85;
}

.subject-panel-links {
  display: flex;
  flex-direction: column;
}

.subject-panel-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease,
              color 0.3s ease;
}

.subject-panel-links a:last-child {
  border-bottom: none;
}

.subject-panel-links a:hover {
  padding: 1.4rem 2rem;
  background: rgba(0, 0, 0, 0.04);
  color: var(--white);
}

@media (max-width: 600px) {
  .subject-panel {
    height: auto;
  }

  .subject-panel-header {
    height: 280px;
  }
}

.tutoring-also-available {
  text-align: center;
  padding: 2rem clamp(1.5rem, 5vw, 3rem);
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

.tutoring-also-available a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.tutoring-also-available a:hover {
  text-decoration: underline;
}

/* --- Service accordions within panels --- */
.service-list {
  margin: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid var(--navy-light);
}

.service-item {
  border-bottom: 1px solid var(--navy-light);
}

.service-item-header {
  width: 100%;
  margin: 0;
  padding: 0.8rem 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.service-item-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--gold);
  line-height: 1;
  transition: transform 0.25s ease;
}

.service-item.active .service-item-icon {
  transform: rotate(45deg);
}

.service-item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.service-item.active .service-item-body {
  max-height: 600px;
}

.service-item-body p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin: 0;
  padding-bottom: 1rem;
}

.service-item-body a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.service-item-body a:hover {
  text-decoration: underline;
}
