/* courses.css — компактная и корректная версия: без full-bleed хака,
   без лишних вертикальных отступов у секции, песочно‑оранжевая палитра и анимация кнопки внутри карточек
   Фон сделан монотонным, без нижнего затемнения/градиентов */

/* Секция на всю ширину контейнера (без лишних внешних/внутренних отступов) */
.courses-section {
  width: 100%;           /* вместо 100vw */
  position: relative;
  margin: 0;             /* убраны внешние отступы */
  padding: 0;            /* убраны вертикальные внутренние отступы */
  background: #fff8f0;   /* монотонный песочный фон */
  overflow: hidden;      /* прячем фоновые псевдо-элементы */
  font-family: 'Montserrat', sans-serif;
}

/* Абстрактные формы на фоне отключены — чтобы не было нижнего затемнения/градиента */
.courses-section::before,
.courses-section::after {
  content: '';
  position: absolute;
  display: none; /* монотонный фон без декоративных пятен */
}

/* Заголовок секции (песочно‑оранжевый градиент) */
.courses-section-title {
  text-align: center;
  font-size: 2.8rem;
  font-weight: 800;
  margin: 0 0 48px; /* компактный нижний отступ */
  background: linear-gradient(120deg, #5a4736, #a9793b, #e0b15a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.4px;
  position: relative;
  z-index: 2;
}

/* Сетка карточек (горизонтальные поля внутри, без вертикальных) */
.courses-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px; /* только горизонтальные отступы */
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* Карточка курса */
.courses-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(199, 140, 67, 0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateY(30px);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(230, 210, 180, 0.7);
}

/* Появление карточек с задержкой */
.courses-card:nth-child(1) { animation: courses-fadeInUp 0.7s ease-out 0.1s forwards; }
.courses-card:nth-child(2) { animation: courses-fadeInUp 0.7s ease-out 0.2s forwards; }
.courses-card:nth-child(3) { animation: courses-fadeInUp 0.7s ease-out 0.3s forwards; }

@keyframes courses-fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.courses-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(199, 140, 67, 0.16);
  border-color: rgba(199, 140, 67, 0.25);
}

.courses-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.courses-card:hover img { transform: scale(1.03); }

.courses-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 24px 24px 12px;
  line-height: 1.3;
}
.courses-card p {
  font-size: 1rem;
  color: #4a5568;
  margin: 0 24px 16px;
  line-height: 1.6;
}
.courses-card .courses-info {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 24px 16px;
  font-style: italic;
  display: block;
}
.courses-card .courses-price {
  font-weight: 600;
  color: #df8b2b;
  display: block;
  margin-top: 4px;
}

/* Кнопка в карточке — янтарный градиент + шиммер */
.courses-btn {
  position: relative;
  display: block;
  padding: 14px 20px;
  background: linear-gradient(135deg, #df8b2b, #f0b85a);
  color: #fff !important;
  text-decoration: none;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 10px 24px rgba(199, 140, 67, 0.26), inset 0 -2px 6px rgba(0,0,0,0.12);
  text-align: center;
  margin: 0 24px 24px;
  width: calc(100% - 48px);
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.courses-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(199, 140, 67, 0.34), inset 0 -2px 8px rgba(0,0,0,0.14);
  background: linear-gradient(135deg, #f0b85a, #df8b2b);
}
/* Блик по кнопке */
.courses-btn::after {
  content: '';
  position: absolute;
  top: -140%;
  left: -30%;
  width: 60%;
  height: 320%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 45%, rgba(255,255,255,0) 100%);
  transform: rotate(25deg);
  transition: transform 0.6s ease;
  opacity: 0.75;
}
.courses-btn:hover::after { transform: translateX(260%) rotate(25deg); }
.courses-btn:focus-visible {
  outline: 3px solid rgba(240, 184, 90, 0.55);
  outline-offset: 2px;
}

/* ================== АДАПТИВНОСТЬ ================== */
@media (max-width: 992px) {
  .courses-section-title { font-size: 2.3rem; margin-bottom: 44px; }
  .courses-cards-grid { padding: 0 30px; gap: 32px; }
  .courses-card img { height: 220px; }
  .courses-card h3 { font-size: 1.3rem; }
}

@media (max-width: 768px) {
  .courses-section-title { font-size: 2.1rem; margin-bottom: 36px; }
  .courses-cards-grid { padding: 0 24px; grid-template-columns: 1fr; gap: 28px; }
  .courses-card img { height: 200px; }
  .courses-btn { font-size: 1rem; }
}

@media (max-width: 576px) {
  .courses-section-title { font-size: 1.9rem; margin-bottom: 28px; }
  .courses-cards-grid { padding: 0 16px; gap: 24px; }
  .courses-card img { height: 180px; }
  .courses-card h3 { font-size: 1.25rem; margin: 20px 16px 10px; }
  .courses-card p,
  .courses-card .courses-info { margin: 0 16px 14px; font-size: 0.95rem; }
  .courses-btn { padding: 12px 0; margin: 0 16px 20px; width: calc(100% - 32px); }
}

/* Предпочтение уменьшенного движения */
@media (prefers-reduced-motion: reduce) {
  .courses-btn { transition: none; }
  .courses-btn::after { display: none; }
}

/* Внутренний отступ снизу внутри секции курсов */
#courses.courses-section {
  padding-bottom: clamp(40px, 10vw, 60px);
}
