/* ============================================================
   dusha-guides — «Гайды и статьи» (сетка 3 колонки), стиль «Душа».
   Префикс .dg-*. Карточки согласованы с .dr-card листинга маршрутов.
   ============================================================ */
.dg, .dg * { box-sizing: border-box; }

.dg {
    max-width: var(--max-content, 1280px);
    margin: 0 auto 56px;
    padding: 0 var(--side-margin, 32px);
}
.dg__head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    padding-top: 36px; margin: 0 0 24px;
    border-top: 1px solid var(--ink-100, #ECEFF3);
}
.dg__overline {
    display: block;
    font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--amber-600, #D85F05);
    margin-bottom: 8px;
}
.dg__title {
    font-family: var(--font-display, 'Unbounded', system-ui, sans-serif);
    font-weight: 600; font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.15; letter-spacing: -0.02em;
    color: var(--sky-900, #0F2F44);
    margin: 0;
}
.dg__all {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
    font-size: 14px; font-weight: 600;
    color: var(--sky-700, #175E82);
    text-decoration: none; white-space: nowrap;
    padding-bottom: 4px;
}
.dg__all:hover { color: var(--amber-600, #D85F05); }
.dg__all svg { width: 16px; height: 16px; }

.dg__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.dg-card {
    position: relative;
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform var(--dur-med, 250ms) cubic-bezier(0.22, 1, 0.36, 1), box-shadow var(--dur-med, 250ms);
}
.dg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.dg-card__link {
    display: flex; flex-direction: column; flex: 1;
    color: inherit; text-decoration: none;
}
.dg-card__link:hover, .dg-card__link:focus { color: inherit; text-decoration: none; }
.dg-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--sky-100, #DDF0FA);
}
.dg-card__img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dg-card:hover .dg-card__img { transform: scale(1.04); }
.dg-card__media--ph {
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 124, 24, 0.22) 0, transparent 40%),
        linear-gradient(135deg, var(--sky-600, #1A74A0) 0%, var(--sky-900, #0F2F44) 100%);
}
.dg-card__ph-icon { width: 72px; height: 72px; color: rgba(255, 255, 255, 0.55); }
.dg-card__ph-icon svg { display: block; width: 100%; height: 100%; }
.dg-card__chip {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
    color: var(--sky-900, #0F2F44);
    font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 5px 11px; border-radius: var(--radius-pill, 999px);
}
.dg-card__body {
    padding: 18px 20px 22px;
    display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.dg-card__title {
    font-family: var(--font-display, 'Unbounded', system-ui, sans-serif);
    font-weight: 600; font-size: 17px; line-height: 1.28;
    letter-spacing: -0.01em; color: var(--sky-900, #0F2F44);
    margin: 0; padding: 0;
}
/* Тема сайта переопределяет display/padding у p — поэтому !important. */
.dg-card .dg-card__lead {
    font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
    font-size: 14px; line-height: 1.5;
    color: var(--ink-500, #4A5462);
    margin: 0; padding: 0 !important;
    display: -webkit-box !important; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.dg-card__meta {
    margin-top: auto; padding-top: 6px;
    display: flex; align-items: center; gap: 6px;
    font-family: var(--font-body, 'Manrope', system-ui, sans-serif);
    font-size: 12px; font-weight: 600;
    color: var(--ink-400, #6B7685);
}
.dg-card__sep { color: var(--ink-300, #9AA5B3); }
.dg__pager { margin-top: 24px; }

@media (max-width: 1100px) {
    .dg__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .dg { padding: 0 16px; margin-bottom: 40px; }
    .dg__head { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 24px; margin-bottom: 18px; }
    .dg__grid { grid-template-columns: 1fr; gap: 18px; }
}
