/* Блок “Интересы” */
.section_interests {
  padding-top: clamp(6.25rem, 5rem + 4.9vw, 7.5rem);
}

/* Заголовок */
.interests_card-title {
  padding-bottom: clamp(3.75rem, 5.95vw + 0.89rem, 6.25rem);
  text-align: center;
}

/* Сетка карточек */
.interests_card-list {
  display: grid;
  gap: clamp(0.5rem,  0.5vw + 0.2rem, 0.8rem);
}

/* Пятая и последняя карточки во всю строку */
.interests_card-list li:last-child {
  grid-column: 1 / -1;
}

/* Карточка */
.interests_card-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: clamp(15rem, 12rem + 5vw, 20rem);
  padding: clamp(0.75rem, 1vw + 0.5rem, 1.25rem);
  background-color: var(--card-color, rgba(255,255,255,0.08));
  border: 2px solid var(--card-border-color, rgba(255,255,255,0.01));
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Заголовок внутри карточки */
.interests_card-item-title {
  font-size: clamp(1rem, 0.5vw + 0.7rem, 1.5rem);
  font-variation-settings: "wght" var(--main-font-wght-accent,700);
  color: var(--font-main-color,#fff);
  margin-bottom: 1rem;
}

/* Кнопка “Подробнее” */
.interests_open-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: outline 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  /* на всякий случай */
  box-shadow: none;
}

/* .interests_open-button:focus-visible {
  outline: 2px solid var(--font-highlight-color,#4de1cd);
  outline-offset: 2px;
  border-radius: 20px;
} */


/* убираем системную рамку в любых фокус‑состояниях */
.interests_close-button:focus,
.interests_close-button:focus-visible,
.interests_close-button:focus-within {
  outline: none;
  box-shadow: none;
}

/* dialog тоже может рисовать outline в мобильных */
.interests_dialog:focus,
.interests_dialog:focus-visible {
  outline: none;
}


/* Контейнер кнопки */
.interests_button-container {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 41px;
  padding: 0 10px;
  background-color: var(--font-highlight-color,#4de1cd);
  border: 2px solid var(--font-highlight-color,#4de1cd);
  border-radius: 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Текст кнопки */
.interests_button-text {
  font-size: clamp(0.875rem, 0.7321rem + 0.2976vw, 1rem);
  color: var(--button-text-color,#000);
}

/* Диалоговое окно */
.interests_dialog:not([open]) {
  display: none;
}

.interests_dialog {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(90vw, 700px);
  max-width: min(90vw, 700px);
  background-color: var(--dialog-card-color, rgb(26, 26, 26, 0.98));
  border: 2px solid var(--card-border-color, rgba(255, 255, 255, 0.1));
  border-radius: 20px;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  max-height: min(90vh, calc(100vh - 2rem));
  overflow-y: auto;
  margin: 0;
  box-sizing: border-box;
}

body.services-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

.interests_dialog::backdrop {
  background-color: rgb(0, 0, 0, 0.4);
  animation: backdrop-fade-in 0.3s ease-out forwards;
  cursor: pointer;
  pointer-events: auto;
}

.interests_dialog[open] {
  animation: dialog-fade-in 0.3s ease-out forwards;
}

.interests_dialog[open].closing {
  animation: dialog-fade-out 0.3s ease-out forwards;
}

.dialog_title {
  color:var(--font-highlight-color,#4de1cd);
  font-size:clamp(1.5rem,0.9286rem +1.1905vw,2rem);
  padding-bottom:clamp(0.9375rem,0.2232rem +1.4881vw,1.5625rem);
}

.dialog_text {
  color:var(--font-main-color);
  font-size:clamp(1rem,0.4286rem +1.1905vw,1.5rem);
}

/* Скопированные из services.css ключевые кадры */
@keyframes backdrop-fade-in {
  from {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
  }
  to {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
  }
}

@keyframes backdrop-fade-out {
  from {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
  }
  to {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
  }
}

@keyframes dialog-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes dialog-fade-out {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
}


/* Кнопка закрытия */
.interests_close-button {
  position:absolute;
  top:1rem; right:1rem;
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px;
  background:none; border:none; cursor:pointer;
  transition:transform 0.3s ease;
}
.interests_close-button:hover {
  transform:rotate(90deg) scale(1.2);
}
.interests_close-button::before,
.interests_close-button::after {
  content:""; position:absolute;
  width:18px; height:2px;
  background:var(--font-main-color,#fff);
  border-radius:1px;
  transition:background 0.3s ease,transform 0.3s ease;
}
.interests_close-button::before { transform:rotate(45deg); }
.interests_close-button::after  { transform:rotate(-45deg); }
.interests_close-button:hover::before,
.interests_close-button:hover::after {
  background:var(--font-highlight-color,#4de1cd);
  width:20px; height:2.5px;
}

.interests_card-item:hover {
  background-color: rgba(255,255,255,0.12);
  border-color: rgba(77,225,205,0.4);
  transform: translateY(-4px); 
  box-shadow: 0 20px 40px rgba(77,225,205,0.15), 0 8px 32px rgba(0,0,0,0.3);
}




.interests_button-container:hover {
  background-color: transparent;
  border-color: var(--font-highlight-color,#4de1cd);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px rgba(77,225,205,0.4);
}
.interests_button-container:hover .interests_button-text {
  color: var(--font-highlight-color,#4de1cd);
}

@media (min-width: 1024px) {
  .interests_card-list { grid-template-columns: repeat(4, 1fr); }
}
/* @media (min-width: 768px) and (max-width: 1023px) {
  .interests_card-list { grid-template-columns: repeat(3, 1fr); }
} */
@media (max-width: 1024px) {
  .interests_card-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .interests_card-list { grid-template-columns: 1fr; }
}

  

