/**
 * Card alignment fix — равные высоты карточек + CTA внизу
 * Применяется одинаково для desktop и mobile (Flexbox viewport-agnostic).
 *
 * Затрагивает 4 страницы:
 *   /             (главная, секция "Наши услуги": .services-grid > .service-card)
 *   /uslugi/      (.content-section > .service-detail)
 *   /ekskursii/   (.excursions-grid > .excursion-card > .excursion-card-content)
 *   /news/        (.news-grid > .news-card)
 *
 * Добавлено: 2026-04-27
 */

/* ============================================================
   1. /ekskursii/ — архив экскурсий
   ============================================================ */
.excursions-grid {
    align-items: stretch;
}
.excursion-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.excursion-card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.excursion-card-content > h3 {
    flex: 0 0 auto;
}
.excursion-card-content > p {
    flex: 1 1 auto;
}
.excursion-card-content > a.btn,
.excursion-card-content > .btn {
    margin-top: auto;
}

/* ============================================================
   2. /news/ — архив постов (после правки home.php)
   ============================================================ */
.news-grid {
    align-items: stretch;
}
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.news-card > div:last-child {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.news-card > div:last-child > p {
    flex: 1 1 auto;
}
.news-card > div:last-child > a:last-child {
    margin-top: auto;
    align-self: flex-start;
}

/* ============================================================
   3. /uslugi/ — page-services
   ============================================================ */
.content-section {
    align-items: stretch;
}
.service-detail {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.service-detail > div {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
}
.service-detail > div > div {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.service-detail ul {
    flex: 1 1 auto;
}
.service-detail .mt-3 {
    flex: 0 0 auto;
}
.service-detail .btn,
.service-detail button.btn {
    margin-top: auto;
    align-self: flex-start;
}

/* ============================================================
   4. / главная — секция "Наши услуги"
   ============================================================ */
.services-grid {
    align-items: stretch;
}
.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.service-card > .service-icon {
    flex: 0 0 auto;
}
.service-card > h3 {
    flex: 0 0 auto;
}
.service-card > p {
    flex: 1 1 auto;
}
.service-card > .service-price {
    flex: 0 0 auto;
    margin-top: auto;
}
.service-card > .service-link {
    flex: 0 0 auto;
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

/* ============================================================
   Fix для длинных заголовков в .service-card (главная):
   слова "Корпоративные" / "Предрейсовый" / "микроавтобуса"
   не помещались в 220px при font-size: 32px и выезжали за края.
   Добавлено 2026-04-27.
   ============================================================ */
.service-card h3 {
    font-size: clamp(16px, 1.6vw, 22px) !important;  /* перебивает h3{clamp(20px,3vw,32px)} темы — слова умещаются без переносов */
    line-height: 1.25;
}
