/* =Theme customization starts here
-------------------------------------------------------------- */

/* Disable animations/transitions on mobile */
@media (max-width: 768px) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .elementor-motion-effects-element,
    .elementor-sticky,
    .animated,
    .wow,
    .fadeIn,
    .fadeInUp,
    .fadeInDown,
    .slideInUp,
    .slideInLeft,
    .slideInRight {
        animation: none !important;
        transform: none !important;
    }
}

/* Related Projects Grid */
.sm-project-grid-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 48px 20px;
    font-family: inherit;
}

.sm-project-grid-header {
    max-width: 1140px;
    margin: 0 auto 32px;
    text-align: left;
}

/* Qi Animated Text title wrapper */
.sm-project-grid-title-wrap {
    display: block;
    margin: 0 0 12px;
}

/* Related grid title */
.sm-project-grid-header .sm-project-grid-title {
    margin: 0;
    padding: 0;
}

/* Match Qi Animated Text title structure */
.sm-project-grid-header .qodef-qi-animated-text .qodef-m-title {
    color: #000000;
}

.sm-project-grid-header .qodef-e-word-holder {
    display: inline-block;
    white-space: nowrap;
}

.sm-project-grid-header .qodef-e-character {
    display: inline-block;
}

/*
   Visual match for the existing Qode/Qi animated text title.
   The PHP must output:
   .qodef-e-word-holder > .qodef-e-character
*/
.sm-project-grid-header .qodef-qi-animated-text .qodef-m-title,
.sm-project-grid-header .sm-project-grid-title {
    color: var(--e-global-color-bc6fe76);
    font-size: 116px;
    font-weight: 700;
    line-height: 1.1em;
    letter-spacing: -0.04em;
    text-transform: none;
}

.sm-project-grid-header p {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: #434343;
    font-family: 'Jost';
    font-weight: bolder;
}

.sm-project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.sm-project-card {
    background: #ffffff;
    border: 1px solid #e5e1dc;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.055);
}

.sm-project-card > a {
    display: block;
    margin: 0;
    line-height: 0;
}

.sm-project-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.sm-project-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sm-project-card-content span {
    display: block;
    margin-bottom: 7px;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: #9b1c1c;
}

.sm-project-card-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.25;
    color: #1f2933;
    font-weight: 700;
}

.sm-project-card-content p {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
}

.sm-project-card-content a {
    margin-top: auto;
    font-size: 14px;
    font-weight: 700;
    color: #9b1c1c;
    text-decoration: none;
    line-height: 1.4;
}

.sm-project-card-content a:hover {
    text-decoration: underline;
}

/* Header logo fix */
.site-title img {
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Relevant Service Page link */
.sm-project-service-link {
    max-width: 1140px;
    margin: 40px auto 0;
    padding: 28px 32px;
    border-left: 4px solid var(--e-global-color-bc6fe76);
    background: #f7f4ef;
    color: #1f2933;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 400;
}

.sm-project-service-link a {
    color: var(--e-global-color-bc6fe76);
    font-weight: 700;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 2px;
    transition: background-size 0.25s ease;
}

.sm-project-service-link a:hover {
    background-size: 100% 3px;
}

@media (max-width: 640px) {
    .sm-project-service-link {
        margin-top: 32px;
        padding: 22px 20px;
        font-size: 17px;
        line-height: 1.55;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .sm-project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sm-project-grid-wrap {
        max-width: 760px;
    }

    .sm-project-grid-header {
        max-width: 760px;
    }

    .sm-project-grid-header .qodef-qi-animated-text .qodef-m-title,
    .sm-project-grid-header .sm-project-grid-title {
        font-size: 72px;
    }
}

@media (max-width: 640px) {
    .sm-project-grid-wrap {
        padding: 40px 16px;
    }

    .sm-project-grid {
        grid-template-columns: 1fr;
    }

    .sm-project-card-content {
        padding: 18px;
    }

    .sm-project-grid-header {
        max-width: 100%;
        margin-bottom: 28px;
    }

    .sm-project-grid-header .qodef-qi-animated-text .qodef-m-title,
    .sm-project-grid-header .sm-project-grid-title {
        font-size: 46px;
        line-height: 1.05em;
        letter-spacing: -0.03em;
    }
}

