:root {
    --frontend-card-surface: #f6f8fb;
    --frontend-card-border: #e3e9f0;
    --frontend-card-shadow: 0 10px 28px rgba(27, 43, 65, 0.08);
}

/* Keep the page background as configured; cards get their own quiet surface. */
.course-single-grid-item,
.single-events-list-item.course-home,
.single-curriculum-item .card {
    background-color: var(--frontend-card-surface) !important;
    border: 1px solid var(--frontend-card-border);
    border-radius: 12px;
    box-shadow: var(--frontend-card-shadow);
}

.course-single-grid-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: calc(100% - 30px);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.course-single-grid-item .thumb {
    flex: 0 0 auto;
    padding: 0;
    overflow: hidden;
}

.course-single-grid-item .thumb > a {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.course-single-grid-item .thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-single-grid-item .content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.course-single-grid-item .content .title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 52px;
}

.course-single-grid-item .content .description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    min-height: 72px;
}

.course-single-grid-item .content .footer-part {
    margin-top: auto;
}

.course-single-grid-item:hover,
.single-events-list-item.course-home:hover,
.single-curriculum-item .card:hover {
    transform: translateY(-4px);
    border-color: #d3deea;
    box-shadow: 0 16px 34px rgba(27, 43, 65, 0.12);
}

.single-events-list-item.course-home {
    overflow: hidden;
    border-radius: 12px;
    padding: 18px;
}

.single-curriculum-item .card {
    overflow: hidden;
}

/* Equal-height cards for the Service Grid: 13 page-builder addon. */
.service-grid-thirteen .service-grid-thirteen-column {
    display: flex;
}

.service-grid-thirteen .service-grid-thirteen-card,
.what-we-cover:not(.bg-image) .single-what-we-cover-item-02 {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--frontend-card-surface);
    box-shadow: var(--frontend-card-shadow);
}

.service-grid-thirteen .service-grid-thirteen-card .single-what-img,
.what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .single-what-img {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.service-grid-thirteen .service-grid-thirteen-card .single-what-img img,
.what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .single-what-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-grid-thirteen .service-grid-thirteen-card .content,
.what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
}

.service-grid-thirteen .service-grid-thirteen-card .content .title,
.what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .content .title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 68px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.service-grid-thirteen .service-grid-thirteen-card .content p,
.what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .content p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 72px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.service-archive-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.service-archive-controls .search-form {
    position: relative;
    flex: 1 1 360px;
    width: auto;
    max-width: 620px;
    margin: 0;
}

.service-archive-controls .search-form .form-control {
    width: 100%;
    height: 46px;
    padding: 0 60px 0 16px;
    border: 1px solid var(--frontend-card-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.service-archive-controls .search-form button {
    position: absolute;
    top: 0;
    left: auto;
    right: 0;
    bottom: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 46px;
    padding: 0;
    -webkit-transform: none;
    transform: none;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: var(--main-color-one);
    color: #fff;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.service-archive-controls .search-form button:hover,
.service-archive-controls .search-form button:focus-visible {
    background: var(--main-color-two);
    color: #fff;
}

.service-archive-controls .product-sorting {
    flex: 0 0 auto;
}

.service-archive-controls .product-sorting select {
    min-width: 205px;
    height: 46px;
    border: 1px solid var(--frontend-card-border);
    border-radius: 8px;
    background-color: #fff;
}

@media (max-width: 575.98px) {
    .service-grid-thirteen .service-grid-thirteen-card .content .title,
    .service-grid-thirteen .service-grid-thirteen-card .content p,
    .what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .content .title,
    .what-we-cover:not(.bg-image) .single-what-we-cover-item-02 .content p {
        min-height: 0;
    }

    .service-archive-controls .search-form,
    .service-archive-controls .product-sorting,
    .service-archive-controls .product-sorting select {
        width: 100%;
        max-width: none;
    }
}

/* Homepage theme 21 uses its own service and article card components. */
.home-21 .service-area .row > .col-md-6 {
    display: flex;
}

.home-21 .single-service {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-height: 350px;
    height: 100%;
    padding: 28px;
    border: 1px solid var(--frontend-card-border);
    border-radius: 14px;
    background: var(--frontend-card-surface);
    box-shadow: var(--frontend-card-shadow);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.home-21 .single-service .service-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.home-21 .single-service .service-content .service-title {
    min-height: 60px;
    margin-top: 24px !important;
    font-size: 26px;
    line-height: 30px;
}

.home-21 .single-service .service-content .service-title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-21 .single-service .service-content .service-para {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    min-height: 84px;
    margin-top: 14px !important;
    line-height: 28px;
}

.home-21 .single-service .service-content .explore-btn {
    align-self: flex-start;
    margin-top: auto !important;
    padding-top: 18px;
}

.home-21 .single-service:hover {
    transform: translateY(-4px);
    border-color: #d3deea;
    box-shadow: 0 16px 34px rgba(27, 43, 65, 0.12);
}

.home-21 .blog-area .global-slick-init.slick-initialized .slick-track {
    display: flex;
}

.home-21 .blog-area .global-slick-init .slick-slide {
    display: flex;
    height: auto;
}

.home-21 .blog-area .slick-slider-items {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 0 10px 12px;
}

.home-21 .blog-area .single-blog {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    height: 100%;
    border: 1px solid var(--frontend-card-border);
    border-radius: 14px;
    background: var(--frontend-card-surface);
    box-shadow: var(--frontend-card-shadow);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.home-21 .blog-area .single-blog:hover {
    transform: translateY(-4px);
    border-color: #d3deea;
    box-shadow: 0 16px 34px rgba(27, 43, 65, 0.12);
}

.home-21 .blog-area .single-blog .blog-thumb {
    flex: 0 0 auto;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.home-21 .blog-area .single-blog .blog-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-21 .blog-area .single-blog .blog-contents {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0 22px 22px;
}

.home-21 .blog-area .single-blog .blog-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 72px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-21 .blog-area .single-blog .blog-bottom {
    margin-top: auto;
    padding-top: 20px;
}

.front-scroll-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 520ms ease var(--scroll-reveal-delay, 0ms),
        transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--scroll-reveal-delay, 0ms);
    will-change: opacity, transform;
}

.front-scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 575.98px) {
    .course-single-grid-item {
        height: auto;
    }

    .home-21 .single-service {
        min-height: 0;
        padding: 24px;
    }

    .home-21 .single-service .service-content .service-title,
    .home-21 .single-service .service-content .service-para {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .front-scroll-reveal,
    .course-single-grid-item,
    .single-events-list-item.course-home,
    .single-curriculum-item .card {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        transform: none !important;
    }
}
