.speaker-card {
  padding-top: 25px;
  padding-bottom: 20px;
  max-width: 1200px;
  display: flex;
  flex-direction: row;
  gap: 1.2rem;
  background: white;
  overflow: hidden;
  border-left: 5px solid var(--secondary-color);
  transition: transform 0.3s ease;
}

.speaker-card:not(:last-child) {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #ebeaea;
}

.card-header {
  background: var(--primary-color);
  color: white;
  padding: 25px 30px;
}

.card-header h2 {
  font-size: 1.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.contact-info {
  background-color: var(--light-gray);
  border-bottom: 1px solid var(--border-color);
}

.contact-detail {
  display: flex;
  margin-bottom: 8px;
}

.contact-detail:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-weight: 600;
  min-width: 70px;
  color: var(--primary-color);
}

.speaker-name {
  padding-left: 15px;
  margin: -7px 0 5px 0;
  color: var(--primary-color);
  font-size: 1.32rem;
  font-weight: 700;
}

.speaker-position {
  margin: 0;
  padding-left: 15px;
  font-size: 1.1rem;
}

.speaker-region {
  font-size: 1.1rem;
  color: #666464;
  margin-top: 0px;
  margin-bottom: 0px;
  padding-left: 15px;
  font-style: italic;
}

.lecture-title {
  font-size: 1.32rem;
  margin: 15px 0 8px 0;
  padding-left: 15px;
  color: var(--secondary-color);
  font-weight: 600;
}

.title {
  font-size: 1.2rem;
  margin: 5px 0 0 0;
  padding-left: 15px;
}

details {
  margin-top: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
}

details:hover {
  border-color: var(--secondary-color);
}

details[open] {
  border-color: var(--primary-color);
}

details[open] summary {
  background-color: #f5f5f5;
  color: var(--primary-color);
  border-radius: 8px 8px 0 0;
}

details[open] summary::after {
  content: "−";
  color: var(--primary-color);
  transform: rotate(0deg);
}

summary {
  padding: 0 15px;
  font-weight: 500;
  font-size: 1.24rem;
  cursor: pointer;
  color: var(--primary-color);
  position: relative;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  border-radius: 8px;
}

summary:hover {
  scale: 1.01;
  color: var(--secondary-color);
}

summary:active {
  transform: translateY(0px);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  transition: all 0.3s ease;
  color: var(--primary-color);
  margin-left: 10px;
  flex-shrink: 0;
}

details:hover summary::after {
  color: var(--secondary-color);
  transform: scale(1.1);
}

.abstract-content {
  background: #fafafa;
  border-top: 1px solid var(--border-color);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.abstract-text {
  font-size: 0.91rem;
  line-height: 1.7;
  padding: 15px 0 0 0;
}

.abstract-text p:first-child {
  margin-top: 0;
}

.abstract-text p:last-child {
  margin-bottom: 0;
}

hr.divider {
  border: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--secondary-color),
    transparent
  );
  margin: 30px 0;
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
  .speaker-card {
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .card-header {
    padding: 20px 25px;
  }

  .card-header h2 {
    font-size: 1.5rem;
  }

  .speaker-name {
    font-size: 1.3rem;
  }

  .speaker-position {
    font-size: 1rem;
  }

  .speaker-region {
    font-size: 1rem;
  }

  .lecture-title {
    font-size: 1.3rem;
  }

  summary {
    padding: 15px;
    font-size: 1.1rem;
  }

  summary::after {
    content: "︾";
    font-size: 1.3rem;
  }

  details[open] summary::after {
    content: "︽";
  }

  .speaker-image-wrapper {
    justify-content: center;
  }
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
  .speaker-card {
    padding: 15px;
    margin: 10px 0;
  }

  .card-header {
    padding: 15px 20px;
  }

  .card-header h2 {
    font-size: 1.3rem;
  }

  .speaker-name {
    font-size: 1.2rem;
    margin: -5px 0 5px 0;
  }

  .speaker-position {
    font-size: 0.95rem;
  }

  .speaker-region {
    font-size: 1rem;
  }

  .lecture-title {
    font-size: 1.2rem;
    margin: 12px 0 6px 0;
  }

  .title {
    font-size: 1rem;
  }

  summary {
    font-size: 1rem;
    padding: 12px;
  }

  .abstract-text {
    padding: 12px;
    font-size: 0.875rem;
  }

  .speaker-image {
    width: 140px;
  }
}

/* Стили для изображения */
.speaker-image-wrapper {
  display: flex;
  justify-content: start;
  align-items: flex-start;
}

.speaker-image {
  width: 200px;
  border-radius: 8%;
  object-fit: cover;
  background-color: #ccc;
  border: 3px solid white;

  transition: transform 0.3s ease;
}

/* Анимация при открытии details */
details[open] {
  animation: expand 0.3s ease;
}

@media (max-width: 480px) {
  .speaker-image {
    width: 140px;
  }
}

@keyframes expand {
  0% {
    max-height: 50px;
  }
  100% {
    max-height: 500px;
  }
}

/* Состояние фокуса для доступности */
summary:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Убираем стандартный маркер в Firefox */
summary::-moz-list-bullet {
  list-style-type: none;
}

/* Плавное закрытие */
details:not([open]) .abstract-content {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}
