/* maksoftbg theme - presentation only. Ported from the demo at
   themes/ms/base/maksoftbg/demo/*.html, retargeted at the block/hook markup
   the CMS actually renders (see pages/*.php, blocks/*.php). */

:root {
    --mk-red: var(--ms-color-primary, #d71920);
    --mk-ink: #25282d;
    --mk-soft: #f7f8fa;
    --mk-line: #e8eaed;
}

body.maksoftbg-theme {
    color: var(--mk-ink);
    background: #fff;
}

.mk-wrap {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.text-mk, body.maksoftbg-theme a.text-mk { color: var(--mk-red) !important; }
.bg-soft { background: var(--mk-soft); }

.btn-mk, a.btn-mk {
    background: var(--mk-red);
    border-color: var(--mk-red);
    color: #fff;
}
.btn-mk:hover, a.btn-mk:hover {
    background: #b91218;
    border-color: #b91218;
    color: #fff;
}

.mk-section-kicker, .mk-section-title small {
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--mk-red);
}

/* ---------- Header ---------- */

.mk-topbar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--mk-line);
    font-size: .875rem;
    padding: .45rem 0;
}
.mk-topbar__links a { color: #5f6368; text-decoration: none; margin-right: .25rem; }
.mk-topbar__links a:hover { color: var(--mk-red); }
.mk-topbar__social a { color: #5f6368; text-decoration: none; font-size: 1rem; }
.mk-topbar__social a:hover { color: var(--mk-red); }

.mk-header .navbar-brand.mk-logo img { max-height: 44px; }

.mk-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mk-line);
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    background: #fff;
    font-size: 1rem;
}
.mk-icon-btn:hover { color: var(--mk-red); border-color: #f2b8ba; }

.mk-primary-menu .nav-link { color: var(--mk-ink); font-weight: 600; }
.mk-primary-menu .nav-link:hover { color: var(--mk-red); }
.mk-primary-menu .dropdown-item:hover,
.mk-primary-menu .dropdown-item:focus { color: var(--mk-red); background: var(--mk-soft); }

/*
 * Top-level menu links stay real <a href> links - no data-bs-toggle="dropdown"
 * on them (see layout/header.php) - so a click navigates to the parent page.
 * The submenu opens on hover/focus (desktop) through the caret-only
 * .mk-dropdown-toggle button (mobile, no hover) below, same split
 * themes/ms/base/flatdesign uses (.flat-dropdown-toggle).
 */
.mk-dropdown-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.mk-dropdown-toggle::after {
    content: "";
    display: inline-block;
    width: .5em;
    height: .5em;
    border-right: .12em solid currentColor;
    border-bottom: .12em solid currentColor;
    transform: rotate(45deg);
    transition: transform .15s ease;
}
.mk-primary-menu .nav-item.open > .mk-dropdown-toggle::after { transform: rotate(-135deg); }

@media (min-width: 992px) {
    .mk-primary-menu .nav-item.dropdown:hover > .dropdown-menu,
    .mk-primary-menu .nav-item.dropdown:focus-within > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

@media (max-width: 991.98px) {
    .mk-primary-menu .nav-item.dropdown {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
    .mk-primary-menu .nav-item.dropdown .nav-link { flex: 1 1 auto; }
    .mk-dropdown-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 auto;
    }
    .mk-primary-menu .dropdown-menu {
        display: none;
        position: static;
        float: none;
        width: 100%;
        margin: 0;
        padding: 0 0 .5rem 1rem;
        border: 0;
        box-shadow: none;
        background: transparent;
    }
    .mk-primary-menu .nav-item.open > .dropdown-menu { display: block; }
}

.mk-search-panel .btn-mk { border: 0; }

/* User-actions partial (cart/liked/favorites/compare) restyled to the
   theme's circular outline look. */
.ms-user-actions { gap: 8px !important; }
.ms-user-action {
    width: 38px !important;
    height: 38px !important;
    border: 1px solid var(--mk-line);
    border-radius: 50%;
    color: #333 !important;
}
.ms-user-action:hover, .ms-user-action-active { color: var(--mk-red) !important; border-color: #f2b8ba; }
.ms-user-actions-bootstrap-icons .ms-user-action-icon { font-size: 20px !important; }
.ms-user-action-count { background: var(--mk-red) !important; }

/* ---------- Page hero / main image ---------- */

.mk-page-title { font-weight: 700; }

.mk-main-image {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #f1f3f5;
    min-height: 300px;
}
.mk-main-image img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; display: block; }
.mk-image-like {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .94);
    border: 0;
    box-shadow: 0 .3rem 1rem rgba(0, 0, 0, .12);
    color: #333;
}
.mk-image-like:hover, .mk-image-like.active { color: var(--mk-red); }

/* page.breadcrumbs.html (get_pNavigation()) is a flat run of <a> links
   joined by "&nbsp;/&nbsp;", not a Bootstrap <ol class="breadcrumb"> list -
   styled as plain inline text/links rather than assuming that markup. When
   logged in with edit rights it also carries " [ Add | Edit ] Name, Logout"
   appended to the same string - the bold tag around the name is legacy
   markup, kept as-is rather than restyled, so it stays recognisable as the
   same admin affordance across every Maksoft theme. */
.mk-breadcrumb { color: #6c757d; }
.mk-breadcrumb a { color: #6c757d; text-decoration: none; }
.mk-breadcrumb a:hover { color: var(--mk-red); text-decoration: underline; }
.mk-breadcrumb a.selected { color: var(--mk-ink); font-weight: 600; }
.mk-breadcrumb b { color: var(--mk-ink); }

/* ---------- PageFlow blocks ---------- */

.mk-pageflow { border-radius: 1.25rem; padding: 1.4rem 1.5rem; }
.mk-pf-problem { background: #fff5f5; border-left: 4px solid #dc3545; }
.mk-pf-solution { background: #f3f7ff; border-left: 4px solid #4f74c8; }
.mk-pf-benefits { background: #f6fbf7; border-left: 4px solid #4b9a66; }
.mk-pf-proof { background: #fffaf0; border-left: 4px solid #d5a43c; }
.mk-pf-action { background: linear-gradient(135deg, #fff4f4, #fff); border: 1px solid #f4c8ca; }

/* ---------- Subpages grid (rendered by hook('sub_pages') through this
   theme's own blocks/subpages.php - a flat, photo-less tile grid matching
   demo/maksoft_homepage.html's div#products, since real subpages on this
   site carry no photo). ---------- */

.mk-product-tile {
    display: block;
    background: var(--mk-soft);
    border: 1px solid var(--mk-line);
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    color: var(--mk-ink);
    text-decoration: none;
    transition: .2s;
}
.mk-product-tile:hover { transform: translateY(-2px); border-color: #f0b7b9; color: var(--mk-ink); }
.mk-product-tile strong { display: block; font-size: 1rem; }
.mk-product-tile small { font-size: .82rem; }

/* ---------- Calculator (web/admin/Templates/maksoft.net/code/print.php +
   print_calc.php - legacy markup, given a presentable frame here) ---------- */

.mk-calculate-anchor { scroll-margin-top: 110px; }
.mk-calculator-section { background: var(--mk-soft); border-radius: 1.25rem; }
.mk-calculator-section #page_prices { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.mk-calculator-section #page_prices th,
.mk-calculator-section #page_prices td { padding: .5rem .65rem; border-bottom: 1px solid var(--mk-line); text-align: left; }
.mk-calculator-section select,
.mk-calculator-section input[type="number"],
.mk-calculator-section input[type="text"],
.mk-calculator-section input[type="email"] {
    border: 1px solid var(--mk-line);
    border-radius: .5rem;
    padding: .5rem .65rem;
    margin-bottom: .5rem;
}
.mk-calculator-section .slider { width: 100%; }

/* ---------- Home: swiper card rail (featured-default.php) ---------- */

.mk-card { border: 1px solid var(--mk-line); border-radius: 1.1rem; background: #fff; overflow: hidden; height: 100%; }
.mk-card__image { height: 190px; overflow: hidden; }
.mk-card__image img { width: 100%; height: 100%; object-fit: cover; }
.mk-card__body { padding: 1rem 1.1rem; }
.mk-card__title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.mk-card__title a { color: inherit; text-decoration: none; }
.mk-card__excerpt { color: #6c757d; font-size: .875rem; margin-bottom: .5rem; }
.mk-card__cta { color: var(--mk-red); font-weight: 600; text-decoration: none; font-size: .875rem; }
.mk-card-swiper { padding-bottom: 2.5rem; }
.mk-card-swiper .swiper-button-next,
.mk-card-swiper .swiper-button-prev { color: var(--mk-red); }

/* ---------- Home: funnel hero / vision (featured-page-funnel.php) --- */

.mk-hero { background: linear-gradient(135deg, #fff 0%, #f8f9fb 70%, #fff6f6 100%); }
.mk-hero-min { min-height: 520px; }
.mk-hero-visual {
    min-height: 360px;
    border-radius: 1.5rem;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
}
.mk-result-strip { border-radius: 1.5rem; background: linear-gradient(135deg, #fff, #f5f7fa); }
.mk-vision-media img, .mk-vision-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }

/* ---------- Home: pain / selectable cards (featured-page-listing.php) ---- */

.mk-pain-swiper .swiper-slide { height: auto; }
.mk-select-card {
    cursor: pointer;
    border: 1px solid var(--mk-line);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: .2s;
    display: block;
}
.mk-select-card:hover { border-color: #f0a4a7; }
.mk-select-card.active { background: var(--mk-red); border-color: var(--mk-red); color: #fff; }
.mk-select-card.active .text-secondary { color: rgba(255, 255, 255, .78) !important; }

/* ---------- Home: shop masonry (featured-shop-listing.php) -------------- */

.mk-masonry { columns: 1; column-gap: 1rem; }
.mk-masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    min-height: 220px;
    background: #ddd;
    display: block;
}
.mk-masonry-item img,
.mk-masonry-item__link { width: 100%; height: 100%; display: block; }
.mk-masonry-item img { object-fit: cover; min-height: 220px; }
.mk-masonry-item--tall img { min-height: 340px; }
.mk-masonry-item--short img { min-height: 180px; }
.mk-masonry-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.1rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .8) 70%);
    color: #fff;
}

/* ---------- Home: shop catalog card + sub-rail (featured-shop-listing.php,
   [SHOP_LISTING] variant - children with both a photo and their own
   children) ---------- */

.mk-catalog-card { border: 1px solid var(--mk-line); border-radius: 1.2rem; background: #fff; overflow: hidden; }
.mk-catalog-hero { height: 170px; object-fit: cover; width: 100%; display: block; }
.mk-sub-swiper { padding-bottom: 1.5rem; }
.mk-sub-item { display: block; text-decoration: none; color: inherit; background: var(--mk-soft); border-radius: .9rem; overflow: hidden; border: 1px solid var(--mk-line); }
.mk-sub-item img { width: 100%; height: 82px; object-fit: cover; }
.mk-sub-item__label { padding: .55rem .65rem; font-size: .78rem; font-weight: 700; }

/* ---------- Home: testimonials (featured-testimonial-listing.php) ------- */

.mk-quote-panel { border-radius: 1.25rem; }
.mk-quote { font-size: 1.2rem; line-height: 1.55; }

/* ---------- Home: CTA goal band (featured-offer-funnel.php) -------- */

.mk-cta-band { background: linear-gradient(135deg, #fff4f4, #fff); }
.mk-goal-btn.active { background: var(--mk-red) !important; color: #fff !important; border-color: var(--mk-red) !important; }

/* ---------- Footer ---------- */

.mk-footer-cta { background: #202124; color: #fff; }
.mk-footer-cta a { color: #fff; }

.mk-contact-toggle { flex-shrink: 0; }
.mk-contact-toggle[aria-expanded="true"] { background: #fff; color: var(--mk-ink); }

/*
 * web/forms/main_form.php's Bootstrap-styled branch (Template > 215) is
 * written against Bootstrap 3/4 classes - .form-group, .input-group-addon -
 * this theme runs Bootstrap 5, which dropped both (.form-group is gone,
 * .input-group-addon became .input-group-text). Rather than fork that
 * shared, already-working form include for one theme, these rules just
 * give the old classes the Bootstrap 5 look directly.
 */
.mk-contact-form .bootstrapform { max-width: 560px; }
.mk-contact-form .form-group { margin-bottom: .85rem; }
.mk-contact-form .input-group-addon {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    background: #fff;
    border: 1px solid #fff;
    border-right: 0;
    border-radius: .5rem 0 0 .5rem;
    color: var(--mk-ink);
}
.mk-contact-form .input-group .form-control {
    border-radius: 0 .5rem .5rem 0;
    border: 1px solid #fff;
}
.mk-contact-form .form-control,
.mk-contact-form textarea.form-control { background: #fff; border-radius: .5rem; border: 1px solid #fff; }
.mk-contact-form .btn-success {
    background: var(--mk-red);
    border-color: var(--mk-red);
}
.mk-contact-form .btn-success:hover { background: #b91218; border-color: #b91218; }
.mk-contact-form .g-recaptcha { margin: .75rem 0; transform-origin: left top; }
.mk-contact-form em { color: rgba(255, 255, 255, .65); font-size: .8rem; }
.mk-call-mobile { color: #fff; text-decoration: none; font-weight: 600; }
.mk-footer-link { color: #6c757d; text-decoration: none; }
.mk-footer-link:hover { color: var(--mk-red); }

/*
 * Footer columns - accordion on mobile, plain columns on desktop.
 * Mirrors flatdesign's .flat-footer-col pattern (assets/css/theme.css),
 * renamed to .mk-footer-col. initFooterAccordion() in theme.js only marks a
 * column .is-collapsible once JS has actually run and the column has real
 * panel content - without JS, or with an empty panel, everything just stays
 * visible, exactly the flatdesign fallback.
 */
.mk-footer-col__head {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.mk-footer-col__toggle {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: left;
}

.mk-footer-col__toggle:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.mk-footer-col__label { display: block; min-width: 0; }

/* Three-line marker, drawn in CSS so the footer needs no icon font. */
.mk-footer-col__icon {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    margin-top: -1px;
    width: 22px;
    height: 2px;
    background: currentColor;
}
.mk-footer-col__icon:before,
.mk-footer-col__icon:after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
}
.mk-footer-col__icon:before { top: -6px; }
.mk-footer-col__icon:after { top: 6px; }

.mk-footer-col__panel > *:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
    /* The heading is a button only so mobile can toggle it. */
    .mk-footer-col__toggle { cursor: default; pointer-events: none; }
}

@media (max-width: 767.98px) {
    .mk-footer-cols { --bs-gutter-y: 0; }
    .mk-footer-cols > [class*="col-"] { padding-top: 0; }

    .mk-footer-col { border-bottom: 1px solid var(--mk-line); }
    .mk-footer-col:first-child { border-top: 1px solid var(--mk-line); }

    .mk-footer-col__head { margin: 0; padding: 15px 0; }
    .mk-footer-col.is-collapsible .mk-footer-col__head { padding-right: 38px; }
    .mk-footer-col.is-collapsible .mk-footer-col__toggle { cursor: pointer; }
    .mk-footer-col.is-collapsible .mk-footer-col__icon { display: block; }

    .mk-footer-col__panel { padding-bottom: 18px; }

    /* Collapsed only once the runtime has taken the column over. */
    .mk-footer-col.is-collapsible .mk-footer-col__panel { display: none; }
    .mk-footer-col.is-collapsible.is-open .mk-footer-col__panel { display: block; }
}

@media (min-width: 768px) {
    .mk-masonry { columns: 2; }
}
@media (min-width: 1200px) {
    .mk-masonry { columns: 3; }
}

@media (max-width: 767.98px) {
    .mk-main-image, .mk-main-image img { min-height: 220px; }
    .mk-subpages-section .subpage-image-wrap { height: 150px; }
    .mk-hero-min { min-height: auto; }
    .mk-hero-visual { min-height: 260px; }
}
