/*
 * Crafto theme for Maksoft CMS - overrides on top of the Crafto package.
 *
 * The design itself (Bootstrap 5, Crafto style.css, icon fonts) is loaded
 * from /Templates/crafto and is not repeated here. This file only adds what
 * the CMS pipeline needs that the static Crafto template never had: the
 * shared user actions and login modal in the header, CMS-prepared images of
 * arbitrary size inside Crafto cards, the block wrappers.
 */

/* ---------- Header ---------- */

.crafto-brand-text {
    display: inline-block;
    font-size: 24px;
    line-height: 1.1;
}

.header-icon .crafto-user-actions,
.header-icon .crafto-login {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.header-icon .crafto-user-actions:empty {
    display: none;
}

.header-icon .ms-login-trigger {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    line-height: 1;
    cursor: pointer;
}

.header-icon .ms-login-trigger i {
    font-size: 17px;
}

/* ---------- Page ---------- */

.crafto-page-content img {
    max-width: 100%;
    height: auto;
}

.crafto-page-content table {
    max-width: 100%;
}

.crafto-page-image {
    position: relative;
    z-index: 2;
}

.crafto-main-image img {
    max-width: 100%;
    height: auto;
}

.crafto-page-tail {
    padding-top: 0;
}

/* ---------- Home features ---------- */

.crafto-feature-icon img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

/* ---------- Cards and blocks ---------- */

.block.crafto-featured,
.block.crafto-subpages {
    margin-top: 0;
    margin-bottom: 0;
}

.crafto-subpages .blog-image img,
.crafto-subpages .subpage-image-link img {
    display: block;
    width: 100%;
    height: auto;
}

.crafto-subpages .subpage-image-link {
    position: relative;
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.crafto-subpages .crafto-subpage-row .subpage-image-link img {
    border-radius: 6px;
}

.crafto-card-media img {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 440;
    object-fit: cover;
}

.crafto-card-media .subpage-image-link {
    display: block;
    position: relative;
}

/* Whole picture in an ellipse, as the legacy theme drew it: the images often carry their own caption, which a square crop cuts off. */
.crafto-team-photo {
    width: 255px;
    max-width: 100%;
}

.crafto-team-photo img {
    display: block;
    width: 255px;
    max-width: 100%;
    height: auto;
    border-radius: 50%;
}

.crafto-featured .client-box img {
    max-width: 100%;
    height: auto;
}

/* ---------- Footer ---------- */

.crafto-footer-blocks,
.crafto-footer-blocks a {
    color: #fff;
}

.footer-demo .pbmit-footer-copyright-text-area {
    padding-top: 10px;
}

/* ---------- Search results (hook: search_results) ---------- */

.ms-search-results {
    margin-bottom: 40px;
}

/* Page portrait: the CMS responsive markup carries no classes of its own. */

.crafto-page-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 9px solid #fff;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.crafto-hero-description > :last-child {
    margin-bottom: 0;
}
