/* home-photos.css — фотографии на главной: блок «Как проходят занятия», обложки курсов,
   фон «Почему выбирают» и «Как нас найти». Фото — Unsplash (бесплатная лицензия),
   их легко заменить своими: адреса собраны в одном месте в начале index.php ($PH). */

/* ── Как проходят занятия ── */
.life-section { position: relative; padding: 88px 0 96px; background: linear-gradient(180deg, var(--jd-page, #eef3ef) 0%, #fff 100%); overflow: hidden; }
.life-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.life-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--jd-green-d, #1f9a45); background: var(--jd-green-s, #e2f2e6); padding: 6px 12px; border-radius: 999px; }
.life-text h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.12; font-weight: 800; color: var(--jd-ink, #15241b); margin: 16px 0 16px; letter-spacing: -.02em; }
.life-text h2 em { font-style: normal; background: linear-gradient(90deg, #1f9a45, #2fbf57 60%, #9be15d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.life-text > p { font-size: 17px; line-height: 1.65; color: var(--jd-ink-2, #435449); max-width: 520px; }
.life-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.life-list li { display: flex; gap: 14px; align-items: flex-start; }
.life-list i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: #fff; color: var(--jd-green-d, #1f9a45); box-shadow: var(--jd-shadow); font-size: 16px; }
.life-list b { display: block; font-size: 15px; color: var(--jd-ink, #15241b); }
.life-list span { font-size: 14px; color: var(--jd-ink-3, #6f8176); line-height: 1.5; }
.life-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.life-stat { background: #fff; border: 1px solid var(--jd-border, #dde6df); border-radius: 16px; padding: 12px 18px; min-width: 120px; box-shadow: var(--jd-shadow); }
.life-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--jd-green-d, #1f9a45); line-height: 1.1; }
.life-stat span { font-size: 12.5px; color: var(--jd-ink-3, #6f8176); font-weight: 600; }

.life-mosaic { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 230px 190px; gap: 16px; }
.ph { position: relative; margin: 0; border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, #cfe9d6, #e9f4ec); box-shadow: 0 18px 40px -18px rgba(16, 40, 24, .35); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.ph:hover img { transform: scale(1.05); }
.ph.broken img { display: none; }   /* фото не загрузилось — остаётся мягкий зелёный фон */
.ph-a { grid-row: 1 / span 2; }
.ph-cap { position: absolute; left: 14px; bottom: 14px; right: 14px; color: #fff; font-weight: 700; font-size: 14px; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 24, 14, .55)); pointer-events: none; }
.ph-cap { z-index: 1; }
.life-badge { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .7); border-radius: 16px; padding: 10px 14px; box-shadow: 0 14px 30px -12px rgba(16, 40, 24, .35); font-size: 13px; color: var(--jd-ink, #15241b); animation: lifeFloat 6s ease-in-out infinite; }
.life-badge i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #1f9a45, #2fbf57); flex-shrink: 0; }
.life-badge b { display: block; font-size: 14px; }
.life-badge small { color: var(--jd-ink-3, #6f8176); font-size: 12px; }
.life-badge.b1 { left: -26px; top: 36px; }
.life-badge.b2 { right: -18px; bottom: 150px; animation-delay: -2s; }
.life-badge.b2 i { background: linear-gradient(135deg, #f59e0b, #f97316); }
.life-badge.b3 { left: 34%; bottom: -22px; animation-delay: -4s; }
.life-badge.b3 i { background: linear-gradient(135deg, #3b82f6, #6366f1); }
@keyframes lifeFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.life-credit { margin-top: 30px; font-size: 11px; color: #9aaba0; text-align: right; }
.life-credit a { color: inherit; text-decoration: underline; }

/* ── Обложки курсов ── */
.course-card.has-photo { padding-top: 0 !important; overflow: hidden; }
.course-cover { position: relative; height: 150px; margin: 0 -1.75rem 18px; background: linear-gradient(135deg, #cfe9d6, #e9f4ec); overflow: hidden; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.course-card:hover .course-cover img { transform: scale(1.06); }
.course-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(8, 24, 14, .55)); }
.course-cover.broken img { display: none; }
.course-cover-tag { position: absolute; left: 14px; bottom: 12px; z-index: 1; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 6px; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }

/* ── «Почему выбирают» — фото на фоне ── */
.why-section.has-photo { background-size: cover !important; background-position: center !important; }
.why-photo { position: absolute; inset: 0; z-index: 0; }
.why-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: saturate(.8); }
.why-section.has-photo .benefit-card { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ── «Как нас найти» — горы Кыргызстана ── */
.find-photo { position: relative; padding: 110px 0 !important; overflow: hidden; color: #fff; }
.find-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.find-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10, 30, 18, .55), rgba(10, 30, 18, .78)); }
.find-photo > div { position: relative; z-index: 2; }
.find-photo h2 { color: #fff !important; }
.find-photo p { color: rgba(255, 255, 255, .88) !important; }

/* ── Телефон и планшет ── */
@media (max-width: 1023px) {
  .life-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .life-mosaic { margin: 0 6px; }
  .life-badge.b1 { left: -6px; }
  .life-badge.b2 { right: -6px; }
}
@media (max-width: 640px) {
  .life-section { padding: 64px 0 72px; }
  .life-mosaic { grid-template-rows: 170px 140px; gap: 10px; }
  .ph { border-radius: 16px; }
  .life-badge { padding: 8px 10px; font-size: 12px; }
  .life-badge i { width: 28px; height: 28px; font-size: 12px; }
  .life-badge b { font-size: 12.5px; }
  .life-badge small { display: none; }
  .life-badge.b1 { top: 14px; }
  .life-badge.b2 { bottom: 110px; }
  .life-badge.b3 { left: 20%; bottom: -16px; }
  .life-stat { min-width: 0; flex: 1 1 30%; padding: 10px 12px; }
  .life-stat b { font-size: 21px; }
  .course-cover { height: 130px; }
  .find-photo { padding: 80px 0 !important; }
}
@media (prefers-reduced-motion: reduce) { .life-badge { animation: none; } .ph img, .course-cover img { transition: none; } }
