/**
 * DevArt Widgets - Clean Editorial Cards template
 * Fully scoped CSS. No generic Joomla/template selectors.
 */
.dw-template--clean-editorial-cards {
    --dw-accent: #c62828;
    --dw-bg: #ffffff;
    --dw-surface: #ffffff;
    --dw-text: #17202a;
    --dw-muted: rgba(23,32,42,.68);
    --dw-border: rgba(0,0,0,.095);
    --dw-shadow: 0 18px 44px rgba(0,0,0,.11);
    --dw-radius: 10px;
    --dw-gap: 18px;
    --dw-image-width: 600px;
    --dw-image-height: 400px;
    --dw-image-ratio: 3 / 2;
    --dw-title-size: 1.25rem;
    --dw-intro-size: .98rem;
    --dw-meta-size: .78rem;
    --dw-readmore-size: .86rem;
    --dw-cols-desktop: 3;
    --dw-cols-tablet: 2;
    --dw-cols-mobile: 1;
    width: 100%;
    margin: 0;
    color: var(--dw-text);
}

.dw-template--clean-editorial-cards.dw-theme--red { --dw-accent: #c62828; }
.dw-template--clean-editorial-cards.dw-theme--blue { --dw-accent: #1565c0; }
.dw-template--clean-editorial-cards.dw-theme--green { --dw-accent: #2e7d32; }
.dw-template--clean-editorial-cards.dw-theme--yellow { --dw-accent: #d99a00; }
.dw-template--clean-editorial-cards.dw-theme--grey { --dw-accent: #607d8b; }
.dw-template--clean-editorial-cards.dw-theme--light { --dw-accent: #1f2937; --dw-bg: #f7f8fa; --dw-surface: #ffffff; --dw-text: #17202a; --dw-muted: rgba(23,32,42,.68); --dw-border: rgba(0,0,0,.10); }
.dw-template--clean-editorial-cards.dw-theme--dark { --dw-accent: #f2c94c; --dw-bg: #111827; --dw-surface: #17212f; --dw-text: #f7f8fb; --dw-muted: rgba(255,255,255,.68); --dw-border: rgba(255,255,255,.12); --dw-shadow: 0 16px 38px rgba(0,0,0,.32); }

.dw-template--clean-editorial-cards,
.dw-template--clean-editorial-cards *,
.dw-template--clean-editorial-cards *::before,
.dw-template--clean-editorial-cards *::after { box-sizing: border-box; }

.dw-template--clean-editorial-cards .dw-widget-header,
.dw-template--clean-editorial-cards .dw-widget-footer {
    width: 100%;
    padding: .85rem 0;
    font-weight: 800;
    line-height: 1.2;
}
.dw-template--clean-editorial-cards .dw-widget-header { font-size: clamp(1.05rem, calc(var(--dw-title-size) * .95), 2.1rem); }
.dw-template--clean-editorial-cards .dw-widget-footer { font-size: var(--dw-readmore-size); }
.dw-template--clean-editorial-cards .dw-widget-header a,
.dw-template--clean-editorial-cards .dw-widget-footer a { color: var(--dw-accent); text-decoration: none; transition: color .22s ease, background-size .22s ease; background-image: linear-gradient(currentColor,currentColor); background-position: 0 100%; background-repeat: no-repeat; background-size: 0 2px; }
.dw-template--clean-editorial-cards .dw-widget-header a:hover,
.dw-template--clean-editorial-cards .dw-widget-footer a:hover { background-size: 100% 2px; }
.dw-template--clean-editorial-cards .dw-align--left { text-align: left; }
.dw-template--clean-editorial-cards .dw-align--center { text-align: center; }
.dw-template--clean-editorial-cards .dw-align--right { text-align: right; }

.dw-template--clean-editorial-cards .dw-cec-grid {
    display: grid;
    grid-template-columns: repeat(var(--dw-cols-desktop), minmax(0,1fr));
    gap: var(--dw-gap);
    width: 100%;
    background: var(--dw-bg);
}

.dw-template--clean-editorial-cards .dw-cec-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--dw-radius);
    background: var(--dw-surface);
    color: var(--dw-text);
    transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s cubic-bezier(.2,.8,.2,1), border-color .28s ease, background .28s ease;
}
.dw-template--clean-editorial-cards.dw-cec-style--soft-shadow .dw-cec-item { box-shadow: var(--dw-shadow); }
.dw-template--clean-editorial-cards.dw-cec-style--border .dw-cec-item { border: 1px solid var(--dw-border); }
.dw-template--clean-editorial-cards.dw-cec-style--flat .dw-cec-item { box-shadow: none; border: 0; }
.dw-template--clean-editorial-cards .dw-cec-item:hover { transform: translateY(-4px); }
.dw-template--clean-editorial-cards.dw-cec-style--soft-shadow .dw-cec-item:hover { box-shadow: 0 22px 56px rgba(0,0,0,.16); }

.dw-template--clean-editorial-cards .dw-cec-media {
    display: block;
    width: 100%;
    aspect-ratio: var(--dw-image-ratio);
    overflow: hidden;
    background: rgba(0,0,0,.06);
    text-decoration: none;
}
.dw-template--clean-editorial-cards .dw-cec-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.2,.8,.2,1), filter .55s cubic-bezier(.2,.8,.2,1);
}
.dw-template--clean-editorial-cards .dw-cec-media:hover .dw-cec-image { transform: scale(1.045); filter: saturate(1.05) contrast(1.02); }

.dw-template--clean-editorial-cards .dw-cec-body {
    display: flex;
    flex-direction: column;
    gap: .62rem;
    padding: clamp(1.05rem, 2.2vw, 1.45rem);
}
.dw-template--clean-editorial-cards .dw-cec-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .42rem;
    color: var(--dw-muted);
    font-size: clamp(.68rem, var(--dw-meta-size), .98rem);
    font-weight: 750;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
}
.dw-template--clean-editorial-cards .dw-cec-category {
    display: inline-flex;
    align-items: center;
    color: #fff;
    background: var(--dw-accent);
    padding: .22rem .55rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform .22s ease, filter .22s ease;
}
.dw-template--clean-editorial-cards a.dw-cec-category:hover { transform: translateY(-1px); filter: brightness(1.06); }
.dw-template--clean-editorial-cards .dw-cec-sep { color: var(--dw-muted); opacity: .5; }

.dw-template--clean-editorial-cards .dw-cec-title {
    display: block;
    color: var(--dw-text);
    font-size: clamp(1rem, var(--dw-title-size), 2.1rem);
    font-family: 'Oswald', sans-serif; /* Подключили Oswald */
    font-weight: 500; /* Полужирный стиль (Medium) */
    line-height: 1.16;
    letter-spacing: -.012em;
    text-decoration: none;
    transition: color .22s ease, transform .22s ease, text-shadow .22s ease;
}
.dw-template--clean-editorial-cards a.dw-cec-title:hover,
.dw-template--clean-editorial-cards a.dw-cec-title:focus { color: var(--dw-accent); transform: translateY(-1px); text-decoration: none; text-shadow: 0 0 0 rgba(0,0,0,0); }

.dw-template--clean-editorial-cards .dw-cec-intro {
    display: block;
    margin: 0;
    color: var(--dw-muted);
    font-size: clamp(.82rem, var(--dw-intro-size), 1.18rem);
    line-height: 1.5;
    text-decoration: none;
    transition: color .22s ease, transform .22s ease;
}
.dw-template--clean-editorial-cards a.dw-cec-intro:hover,
.dw-template--clean-editorial-cards a.dw-cec-intro:focus { color: var(--dw-text); text-decoration: none; transform: translateY(-1px); }

.dw-template--clean-editorial-cards .dw-cec-readmore {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .35rem;
    margin-top: .15rem;
    color: var(--dw-accent);
    font-size: clamp(.72rem, var(--dw-readmore-size), 1.05rem);
    font-weight: 850;
    letter-spacing: .035em;
    text-decoration: none;
    transition: color .22s ease, transform .22s ease, background .22s ease, padding .22s ease;
}
.dw-template--clean-editorial-cards .dw-cec-readmore::after { content: "›"; display: inline-block; font-size: 1.12em; transition: transform .22s ease; }
.dw-template--clean-editorial-cards .dw-cec-readmore:hover { color: var(--dw-text); text-decoration: none; transform: translateX(.08rem); }
.dw-template--clean-editorial-cards .dw-cec-readmore:hover::after { transform: translateX(.22rem); }

.dw-template--clean-editorial-cards.dw-cec-image--left .dw-cec-item,
.dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-item {
    display: grid;
    grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
}
.dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-media { order: 2; }
.dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-body { order: 1; }
.dw-template--clean-editorial-cards.dw-cec-image--bottom .dw-cec-item {
    display: flex;
    flex-direction: column;
}
.dw-template--clean-editorial-cards.dw-cec-image--bottom .dw-cec-media { order: 2; }
.dw-template--clean-editorial-cards.dw-cec-image--bottom .dw-cec-body { order: 1; }
.dw-template--clean-editorial-cards.dw-cec-image--left .dw-cec-media,
.dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-media { height: auto; min-height: 0; aspect-ratio: var(--dw-image-ratio); }

.dw-template--clean-editorial-cards.dw-cec-style--border .dw-cec-item:hover { border-color: color-mix(in srgb, var(--dw-accent) 40%, var(--dw-border)); }
.dw-template--clean-editorial-cards.dw-cec-style--flat .dw-cec-item:hover { background: color-mix(in srgb, var(--dw-surface) 94%, var(--dw-accent)); }
.dw-template--clean-editorial-cards.dw-theme--dark .dw-cec-media { background: rgba(255,255,255,.05); }
.dw-template--clean-editorial-cards.dw-theme--grey .dw-cec-category { color: #fff; }

.dw-template--clean-editorial-cards .dw-empty {
    width: 100%;
    padding: 1rem 1.15rem;
    border: 1px dashed var(--dw-border);
    border-radius: 12px;
    background: var(--dw-surface);
    color: var(--dw-text);
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.dw-template--clean-editorial-cards .dw-empty strong { font-size: 1rem; }
.dw-template--clean-editorial-cards .dw-empty span { font-size: .9rem; color: var(--dw-muted); }

@media (max-width: 1024px) {
    .dw-template--clean-editorial-cards .dw-cec-grid { grid-template-columns: repeat(var(--dw-cols-tablet), minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .dw-template--clean-editorial-cards { --dw-gap: max(14px, var(--dw-gap)); }
    .dw-template--clean-editorial-cards.dw-cec-image--left .dw-cec-item,
    .dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-item { display: flex; }
    .dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-media { order: 0; }
    .dw-template--clean-editorial-cards.dw-cec-image--right .dw-cec-body { order: 1; }

    .dw-template--clean-editorial-cards .dw-cec-media { height: auto; min-height: 0; aspect-ratio: var(--dw-image-ratio); }
}
@media (max-width: 640px) {
    .dw-template--clean-editorial-cards .dw-cec-grid { grid-template-columns: repeat(var(--dw-cols-mobile), minmax(0,1fr)); }
    .dw-template--clean-editorial-cards .dw-cec-body { gap: .55rem; padding: 1rem; }
    .dw-template--clean-editorial-cards .dw-cec-title { line-height: 1.18; }
}


/* v1.5.0 template hardening */
.dw-template--clean-editorial-cards .dw-title,
.dw-template--clean-editorial-cards .dw-intro,
.dw-template--clean-editorial-cards .dw-meta,
.dw-template--clean-editorial-cards .dw-readmore,
.dw-template--clean-editorial-cards [class*="title"],
.dw-template--clean-editorial-cards [class*="intro"],
.dw-template--clean-editorial-cards [class*="meta"] {
    overflow-wrap: anywhere;
    word-break: normal;
}

.dw-template--clean-editorial-cards img {
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .dw-template--clean-editorial-cards *,
    .dw-template--clean-editorial-cards *::before,
    .dw-template--clean-editorial-cards *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}




