#education {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 5%;
}

#education h2,
#education h3 {
  color: #b74b4b;
  font-size: clamp(1.75rem, 4vw, 2rem);
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

#education h2::after,
#education h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #b74b4b, transparent);
  border-radius: 2px;
}

#education h3 {
  font-size: clamp(1.5rem, 3.5vw, 1.75rem);
  margin-top: 3rem;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 700px;
  width: 100%;
}

.wrapper details {
  width: 100%;
  background-color: rgba(183, 75, 75, 0.05);
  border: 2px solid rgba(183, 75, 75, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.wrapper details:hover {
  background-color: rgba(183, 75, 75, 0.1);
  border-color: rgba(183, 75, 75, 0.4);
  box-shadow: 0 5px 20px rgba(183, 75, 75, 0.2);
  transform: translateY(-3px);
}

.wrapper details summary {
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  cursor: pointer;
  color: #b74b4b;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.wrapper details summary::-webkit-details-marker {
  display: none;
}

.wrapper details summary::before {
  content: '▶';
  margin-right: 12px;
  transition: transform 0.3s ease;
  display: inline-block;
  font-size: 0.9em;
}

.wrapper details[open] summary::before {
  transform: rotate(90deg);
}

.wrapper details summary:hover {
  color: #ff7f7f;
  text-shadow: 0 0 12px rgba(255, 127, 127, 0.5);
}

.wrapper details[open] summary {
  color: #74b4bb;
  margin-bottom: 1.25rem;
}

.wrapper p {
  color: #aad68c;
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin: 0.5rem 0;
  line-height: 1.6;
}

.wrapper details a {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1.25rem;
  color: #74b4bb;
  border: 2px solid #74b4bb;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.wrapper details a:hover {
  background-color: rgba(116, 180, 187, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(116, 180, 187, 0.3);
  text-decoration: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  #education {
    padding: 1.5rem 3%;
  }

  #education h2,
  #education h3 {
    margin-bottom: 1.5rem;
  }

  #education h3 {
    margin-top: 2.5rem;
  }

  .wrapper {
    gap: 1.25rem;
  }

  .wrapper details {
    padding: 1.25rem;
  }

  .wrapper details summary {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  #education {
    padding: 1rem 3%;
  }

  #education h2,
  #education h3 {
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
  }

  #education h3 {
    margin-top: 2rem;
  }

  .wrapper {
    gap: 1rem;
  }

  .wrapper details {
    padding: 1rem;
  }

  .wrapper details summary {
    font-size: 1rem;
    padding: 0.5rem;
  }

  .wrapper p {
    font-size: 0.85rem;
  }

  .wrapper details a {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}
