/* =========================================================
   ToolZen Hub
   Related Content
========================================================= */


/* =========================================================
   SECTION
========================================================= */

.related-section {
    width: 100%;
    margin-top: 42px;
}


/* =========================================================
   SECTION HEADING
========================================================= */

.related-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.related-section__heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
}

.related-section__heading a {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.related-section__heading a:hover {
    text-decoration: underline;
}


/* =========================================================
   RELATED CALCULATORS
========================================================= */

.related-calculators-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.related-calculator-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    min-height: 92px;
    padding: 16px;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;

    text-decoration: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.related-calculator-card:hover {
    transform: translateY(-2px);

    border-color: #bfdbfe;

    box-shadow:
        0 8px 24px
        rgba(15, 23, 42, .08);
}

.related-calculator-icon {
    display: grid;
    place-items: center;

    flex: 0 0 auto;

    width: 42px;
    height: 42px;

    border-radius: 10px;

    background: #eff6ff;
    color: #2563eb;

    font-size: 20px;
    font-weight: 600;
}

.related-calculator-content {
    min-width: 0;
}

.related-calculator-content strong {
    display: block;

    color: #1e293b;

    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
}

.related-calculator-content span {
    display: block;

    margin-top: 5px;

    color: #64748b;

    font-size: 11px;
    line-height: 1.45;
}


/* =========================================================
   RELATED ARTICLES
========================================================= */

.related-articles-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.related-article-card {
    min-width: 0;

    overflow: hidden;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.related-article-card:hover {
    transform: translateY(-2px);

    border-color: #bfdbfe;

    box-shadow:
        0 8px 24px
        rgba(15, 23, 42, .08);
}


/* =========================================================
   ARTICLE IMAGE
========================================================= */

.related-article-image {
    width: 100%;
    height: 150px;

    overflow: hidden;

    background: #eff6ff;
}

.related-article-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .3s ease;
}

.related-article-card:hover
.related-article-image img {
    transform: scale(1.03);
}


/* =========================================================
   ARTICLE CONTENT
========================================================= */

.related-article-content {
    padding: 16px;
}

.related-article-content h3 {
    margin: 0 0 8px;

    color: #1e293b;

    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.related-article-content p {
    margin: 0;

    color: #64748b;

    font-size: 12px;
    line-height: 1.55;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .related-calculators-grid,
    .related-articles-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .related-section {
        margin-top: 34px;
    }

    .related-section__heading {
        align-items: flex-start;
    }

    .related-section__heading h2 {
        font-size: 20px;
    }

    .related-calculators-grid,
    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .related-calculator-card {
        min-height: 86px;
    }

    .related-article-image {
        height: 180px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .related-section__heading {
        gap: 10px;
    }

    .related-section__heading h2 {
        font-size: 18px;
    }

    .related-section__heading a {
        font-size: 12px;
    }

    .related-calculator-card {
        padding: 13px;
    }

    .related-calculator-icon {
        width: 38px;
        height: 38px;
    }

    .related-article-content {
        padding: 14px;
    }

}
