@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .page-load-animation {
    @apply opacity-0 translate-y-4 transition duration-700 ease-out;
  }

  .modal {
    @apply fixed inset-0 z-50 hidden items-center justify-center bg-black/70 backdrop-blur-sm p-4 transition-all duration-500 ease-out opacity-0 scale-95;
  }

  .modal.active {
    @apply flex opacity-100 scale-100;
  }

  .no-scroll {
    overflow: hidden;
  }

  .product-card {
    @apply opacity-0 translate-y-6 transition duration-700 ease-out flex flex-col justify-between min-h-[300px] hover:shadow-xl hover:scale-[1.02] border border-transparent hover:border-[#66FF92]/20;
  }

  .product-card.animate {
    @apply opacity-100 translate-y-0;
  }

  .mobile-menu-button.is-active svg {
    @apply rotate-90 transition duration-300;
  }

  nav a.active,
    .mobile-menu a.active {
      @apply text-[#93FDC3] relative;
    }

  nav a.active::after,
    .mobile-menu a.active::after {
      content: '';
        @apply absolute bottom-0 left-0 w-full h-0.5 bg-[#93FDC3];
    }

    .fade-in {
      @apply opacity-0 translate-y-2 transition-all duration-700 ease-out;
    }

    .fade-in.show {
      @apply opacity-100 translate-y-0;
    }
      
/* Анимация загрузки страницы */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
      
  .page-load {
    animation: fadeIn 0.8s ease-out forwards;
  }
      
  /* Анимация наведения на карточку */
  .product-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }
      
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
      
  /* Фиксированная высота для описания и кнопки */
  .product-description-container {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
      
  .product-description {
    flex-grow: 1;
  }
      
  .buy-button-container {
    margin-top: auto;
    padding-top: 1rem;
  }
}

/* Анимация загрузки страницы */
@keyframes pageLoad {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Стили для кнопки "Приобрести" */
.buy-button {
    display: flex;
    justify-content: flex-start;
    text-align: left;
    padding-left: 0;
    width: 100%;
    margin-top: auto;
}

/* Анимация карточек товаров */
.product-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.product-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.modal {
    display: none !important;
}

.modal.active {
    display: flex !important;
}

html {
  scroll-behavior: smooth;
}
section h2[id]::before {
  display: block;
  content: "";
  height: 80px;
  margin-top: -80px;
  visibility: hidden;
}
.toc-link.active {
  color: #66FF92;
}

/* Стили для правил */
.rules-container {
  counter-reset: section-counter;
}
.section-title {
  counter-increment: section-counter;
  counter-reset: rule-counter;
  scroll-margin-top: 15rem;
}
.section-title::before {
  content: counter(section-counter) ". ";
  color: #fff;
  font-weight: 500;
}
.rule-item {
  counter-increment: rule-counter;
  counter-reset: sub-rule-counter;
}
.rule-item::before {
  content: counter(section-counter) "." counter(rule-counter) " ";
  color: #CCCCCC;
  font-weight: 500;
}
.sub-rule-item {
  counter-increment: sub-rule-counter;
}
.sub-rule-item::before {
  content: counter(section-counter) "." counter(rule-counter) "." counter(sub-rule-counter) " ";
  color: #CCCCCC;
  font-weight: 500;
}
.rules-container ol {
  list-style: none;
  padding-left: 0;
}
.rule-item, .sub-rule-item {
  padding-left: 1.5em;
  text-indent: -1.5em;
}
.mobile-rules-nav {
  display: none;
}
@media (max-width: 1023px) {
  .mobile-rules-nav {
    display: block;
  }
}