/* Shared by the Services and Projects listing pages (.dmw-listing). */

.dmw-project-page-body {
    background: var(--whiteColor);
}

/* The navbar is position:fixed on inner pages, so clear it explicitly (template's sp_top_* padding
   left only ~2px between the bar and the heading). */
.dmw-listing .container.sp_top_120 {
    padding-top: 140px;
}
@media (max-width: 991px) {
    .dmw-listing .container.sp_top_120 {
        padding-top: 120px;
    }
}

/* The page heading is an <h1> for SEO, styled like the template's section h3 it replaced. */
.dmw-listing .dmw-listing__title {
    color: var(--blackColor);
    font-size: 37px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    text-align: start;
}
@media (max-width: 991px) {
    .dmw-listing .dmw-listing__title {
        font-size: 29px;
    }
}
@media (max-width: 767px) {
    .dmw-listing .dmw-listing__title {
        font-size: 24px;
    }
}

/* Cards: every image gets the same 4:3 frame so rows line up whatever size the uploads are. */
.dmw-listing .project__single {
    height: calc(100% - 27px);
    display: flex;
    flex-direction: column;
}
.dmw-listing .project__img {
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--borderRadius);
}
.dmw-listing .project__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dmw-listing .project__content {
    gap: 16px;
    margin-top: auto;
}
.dmw-listing .project__heading {
    max-width: none;
    flex: 1;
}
.dmw-listing .project__heading h3 {
    margin: 0;
    line-height: 1.3;
}
/* Block so the line box follows the link's font size, not the h3's larger inherited strut. */
.dmw-listing .project__heading h3 a {
    display: block;
    line-height: 1.3;
}
.dmw-listing .project__icon {
    flex-shrink: 0;
}

/* Loading placeholders (Shared/Components/_ListingSkeleton.cshtml). */
.dmw-listing__skeleton .project__img,
.dmw-listing__skeleton-line {
    background: linear-gradient(90deg, rgba(10, 6, 36, .06) 25%, rgba(10, 6, 36, .12) 50%, rgba(10, 6, 36, .06) 75%);
    background-size: 200% 100%;
    animation: dmw-listing-shimmer 1.4s ease-in-out infinite;
}
.dmw-listing__skeleton-line {
    height: 22px;
    width: 60%;
    border-radius: 6px;
}
@keyframes dmw-listing-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .dmw-listing__skeleton .project__img,
    .dmw-listing__skeleton-line {
        animation: none;
    }
}

/* ---- Card polish (shared by Services / Projects listings) ---- */
.dmw-listing .dmw-listing__head {
    margin-bottom: 40px;
}
.dmw-listing .dmw-listing__title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 14px;
    border-radius: 4px;
    background: var(--primaryColor, var(--branch-main-color, #0a0624));
}
.dmw-listing .project__single {
    background: #fff;
    border: 1px solid rgba(10, 6, 36, .08);
    border-radius: 18px;
    padding: 12px 12px 20px;
    box-shadow: 0 6px 22px rgba(20, 30, 60, .06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.dmw-listing .project__single:hover {
    transform: translateY(-6px);
    border-color: var(--primaryColor, rgba(10, 6, 36, .2));
    box-shadow: 0 18px 42px rgba(20, 30, 60, .14);
}
.dmw-listing .project__img img {
    transition: transform .5s ease;
}
.dmw-listing .project__single:hover .project__img img {
    transform: scale(1.05);
}
.dmw-listing .dmw-listing__summary {
    margin: 14px 6px 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(10, 6, 36, .65);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    flex-shrink: 0; /* card is a column flex box; without this the text is squeezed to one clipped line */
    max-height: 3.2em;
    overflow: hidden;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}
.dmw-listing .project__content {
    padding: 0 6px;
    margin-top: auto;
    padding-top: 14px;
}
.dmw-listing > .dmw-project-page-body > .container {
    padding-bottom: 80px;
}
@media (prefers-reduced-motion: reduce) {
    .dmw-listing .project__single,
    .dmw-listing .project__img img { transition: none; }
    .dmw-listing .project__single:hover { transform: none; }
    .dmw-listing .project__single:hover .project__img img { transform: none; }
}

/* Whole card is clickable: the title link stretches over the card (image, summary, arrow). */
.dmw-listing .project__single {
    position: relative;
    cursor: pointer;
}
.dmw-listing .project__heading h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 18px;
}
.dmw-listing .project__heading h3 a:focus-visible::after {
    outline: 2px solid var(--primaryColor, #0a0624);
    outline-offset: 2px;
}
