/* ===========================================================
   Product detail pages — graphical redesign unified with the
   rest of the site (white rounded cards, section-head + accent
   line, per-product accent, framed screenshots, icon chips).

   Purely visual: it restyles the EXISTING markup
   (.blog_info / .function-block / .list / .blog_list). No text
   or translation keys are touched. Hover uses shadow only (no
   transform) so Safari never re-samples the logos.
   =========================================================== */

/* ---- page shell ------------------------------------------------ */
.product_detail {
    background: #f5f7fb;
    padding-bottom: 40px;
}
.product_detail .container { position: relative; }

/* back arrow (to the products listing) */
/* nudge the back arrow a little to the right so it isn't cramped against the
   viewport edge */
.product_detail .position-absolute { transform: translateX(24px); }
/* the arrow carries the product's own colour (beats the .c-text-dark utility
   on the element) */
.product_detail .position-absolute .fa-arrow-circle-left {
    color: var(--accent, var(--evo-blue, #2f55b8));
    transition: filter 0.2s ease;
}
/* brightness-only hover — ANY transform (translate/scale) slid the arrow past
   the viewport's left edge where it got clipped, so we don't move it at all,
   and the resting colour is already the accent */
.product_detail .position-absolute a:hover .fa-arrow-circle-left {
    filter: brightness(1.15);
}

.blog-sp { padding: 44px 0 10px; }
.productDetail .blog-x { margin: 0; }

/* ---- per-product accent --------------------------------------- */
/* The product carries its class on .blog_info, but the map is declared on the
   page shell so that siblings of .blog_info — the back arrow — inherit it too.
   Single source of truth for the product colour on the whole page. */
.product_detail { --accent: var(--evo-blue, #2f55b8); }
.product_detail:has(.blog_info.galaxii)     { --accent: #560591; }
.product_detail:has(.blog_info.dwh)         { --accent: #0c5b9e; }
.product_detail:has(.blog_info.flexii)      { --accent: #21b184; }
.product_detail:has(.blog_info.flexiiguard) { --accent: #14a098; }
.product_detail:has(.blog_info.athena)      { --accent: #2f55b8; }
.product_detail:has(.blog_info.redmine)     { --accent: #b0130d; }

/* ---- hero panel: logo + top screenshot(s) --------------------- */
.product_top_imgs {
    position: relative;
    background:
        radial-gradient(130% 150% at 100% 0, color-mix(in srgb, var(--accent) 8%, #fff), #fff 62%);
    border: 1px solid #e3ebf6;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 45, 70, 0.05);
    padding: 22px 40px;
    /* same gap as between two consecutive blocks (.function-block margin-bottom)
       so the hero -> icon chips -> first card rhythm is uniform */
    margin-bottom: 24px;
    overflow: hidden;
}
/* NB: .top-images is also a .row, so all these hero-row rules use the DIRECT
   child combinator to avoid leaking onto the screenshot grid */
.product_top_imgs > .row { align-items: center; }
.product_top_imgs .py-5 { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; }
.product_top_imgs .img-vertical-center { display: none; }

/* the logo always sits in the first column of the hero row — centre it and
   underline it with the product's accent bar (site design language) */
.product_top_imgs > .row > div:first-child {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.product_top_imgs > .row > div:first-child img {
    width: auto !important;
    max-width: 260px;
    max-height: 104px;
    height: auto;
    object-fit: contain;
}
.product_top_imgs > .row > div:first-child::after {
    content: "";
    width: 54px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
}

/* every screenshot framed as a browser window (three dots + address pill),
   matching the homepage flagship .app-frame. The frame lives on the wrapping
   <a light-href>; images without a lightbox link use an .app-window box. */
:is(.blog_info, .athena-intro) a[light-href],
.blog_info .app-window {
    display: block;
    position: relative;
    padding-top: 30px;
    border: 1px solid #e3ebf6;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 45, 70, 0.12);
    cursor: zoom-in;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
:is(.blog_info, .athena-intro) a[light-href]::before,
.blog_info .app-window::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background:
        radial-gradient(circle 4px at 17px 15px, #ccd5e2 98%, transparent) no-repeat,
        radial-gradient(circle 4px at 32px 15px, #ccd5e2 98%, transparent) no-repeat,
        radial-gradient(circle 4px at 47px 15px, #ccd5e2 98%, transparent) no-repeat,
        linear-gradient(#eef2f8, #eef2f8) 68px 10px / calc(100% - 130px) 11px no-repeat,
        #f5f7fb;
    border-bottom: 1px solid #e3ebf6;
}
:is(.blog_info, .athena-intro) a[light-href] > img,
.blog_info .app-window > img {
    display: block;
    width: 100% !important;
    height: auto;
    max-width: 100%;
    margin: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}
:is(.blog_info, .athena-intro) a[light-href]:hover,
.blog_info .app-window:hover {
    box-shadow: 0 18px 44px rgba(15, 45, 70, 0.18);
    border-color: #cdddf3;
}

/* hero showcase: one large primary screenshot on the left with two smaller
   previews stacked on the right (all these products ship 3 shots). Replaces
   the old 2+1 grid / width:120% zoom behaviour. */
.top-images {
    display: grid;
    grid-template-columns: minmax(0, 60%) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 20px;
    row-gap: 18px;
    align-items: center;
    margin: 6px 0;
    padding: 18px 8px;
}
.top-images > [class*="col-md-"] {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none;
    width: auto;
    min-width: 0;
    top: auto;
    left: auto;
}
.top-images > [class*="col-md-"] > a { display: block; }
.top-images > [class*="col-md-"] img { position: static !important; }

.top-images > [class*="col-md-"]:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.top-images > [class*="col-md-"]:nth-child(2) { grid-column: 2; grid-row: 1; }
.top-images > [class*="col-md-"]:nth-child(3) { grid-column: 2; grid-row: 2; }

/* (hero screenshots now carry their shadow on the window frame, not the img) */

@media (max-width: 767px) {
    .top-images {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
    .top-images > [class*="col-md-"]:nth-child(1) { grid-column: 1; grid-row: auto; }
    .top-images > [class*="col-md-"]:nth-child(2),
    .top-images > [class*="col-md-"]:nth-child(3) { grid-column: 1; grid-row: auto; }
}

/* athena / single big hero shot spans the column nicely */
.athena-app { max-width: 100%; }

/* ---- intro lead (paragraphs before the first card) ------------ */
.blog_info > p {
    color: var(--evo-text, #44546a);
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 0 0 16px;
}
.blog_info > p:first-of-type,
.blog_info > p > b:only-child {
    color: var(--evo-navy, #11213a);
}
.blog_info > p:first-of-type {
    font-size: 1.22rem;
    line-height: 1.6;
}
.blog_info > p a { color: var(--accent); font-weight: 600; }

/* the last lead paragraph before a card keeps the standard block gap so the
   intro -> first card step matches the card-to-card rhythm */
.blog_info > p:has(+ .function-block) { margin-bottom: 24px; }

/* loose intro heading + chevron lines that live directly in
   .blog_info (e.g. redmine) — give them room to breathe */
.blog_info > h2 { margin: 26px 0 18px; }

/* ---- section cards (.function-block) -------------------------- */
.function-block {
    background: #ffffff;
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 45, 70, 0.05);
    padding: 34px 40px;
    margin: 0 0 24px;
}

/* every heading rendered as the site's section-head (navy title
   + short accent underline) */
.blog_info h2 {
    position: relative;
    margin: 0 0 24px;
    padding-bottom: 16px;
    color: var(--evo-navy, #11213a);
    font-size: 1.7rem;
    font-weight: 700;
    text-transform: none;
}
.blog_info h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 46px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
}
.function-block > p:first-of-type:not(.list) {
    margin-top: -6px;
    color: var(--evo-text, #44546a);
    font-size: 1.06rem;
    line-height: 1.65;
}

/* ---- feature / list rows -------------------------------------- */
.blog_info p.list,
.blog_info .what-is-galaxii p {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin: 0 0 12px;
    color: var(--evo-text, #44546a);
    line-height: 1.6;
}
.blog_info p.list > span,
.blog_info .what-is-galaxii p > span { flex: 1 1 auto; }

/* accent icons in front of list items / paragraphs */
.blog_info .fad {
    color: var(--accent);
}
.blog_info p.list > .fad,
.blog_info .what-is-galaxii p > .fad {
    flex: 0 0 auto;
    margin-top: 0.28em;
    font-size: 0.9em;
}
/* redmine-style loose "<p><i>text</i></p>" rows (no .list/span) */
.function-block > p .fad,
.blog_info > p > .fad { margin-right: 0.55rem; }

/* inline label emphasised (galaxii data labels) */
.blog_info .list label,
.function-block label {
    display: inline;
    margin-right: 0.35rem;
    color: var(--evo-navy, #11213a);
    font-weight: 700;
}

/* nested sub-lists inside a feature row */
.blog_info .function-block ul,
.blog_info .what-is-galaxii ul {
    margin: 0.5rem 0 0.2rem;
    padding-left: 1.1rem;
}
.blog_info .function-block ul li,
.blog_info .what-is-galaxii ul li {
    margin-bottom: 6px;
    color: var(--evo-text, #44546a);
}
.blog_info .function-block ul li::marker { color: var(--accent); }

.blog_info .protocol {
    display: block;
    margin-top: 0.75rem;
    color: #6b7a90;
    font-size: 0.96rem;
}

/* ---- galaxii "what is" block + solution callout --------------- */
[class*="what-is-"] {
    background: #ffffff;
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 45, 70, 0.05);
    padding: 30px 40px;
    margin: 0 0 24px;
}
[class*="what-is-"] > p:first-child { color: var(--evo-navy, #11213a); font-size: 1.1rem; }

/* lead paragraphs inside the card get the same rhythm as the intro lead — they
   are plain <p> (not .list rows), so without this they collapse into one dense
   block of text. Scoped to flexii: galaxii's paragraphs are icon rows already. */
.blog_info .what-is-flexii > p:not(.list):not(.product-lead) {
    color: var(--evo-text, #44546a);
    font-size: 1.08rem;
    line-height: 1.7;
    margin: 0 0 16px;
}

/* ---- product foreword ----------------------------------------- */
/* The opening statement that frames the product. Reuses the page's own
   vocabulary — the product accent, the hero panel's soft gradient and the
   card radii — so it reads as an overture rather than a pasted-in callout.
   Deliberately medium weight, not bold: the tinted callouts (.solution,
   .galaxii-statement) are closing punchlines, this one opens. */
/* Works in either card type: the what-is block (flexiicrm) and a plain
   section card (evoDWH). The selector carries a class per level so it
   outranks `[class*="what-is-"] > p:first-child`, `> p:not(.list)` and
   `.function-block > p:first-of-type:not(.list)` above. */
.blog_info :is([class*="what-is-"], .function-block) > p.product-lead {
    margin: 0 0 24px;
    padding: 26px 32px;
    border-left: 4px solid var(--accent);
    border-radius: 4px 14px 14px 4px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent) 11%, #fff),
            color-mix(in srgb, var(--accent) 3%, #fff) 70%);
    color: var(--evo-navy, #11213a);
    font-size: 1.34rem;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: -0.005em;
    text-wrap: pretty;
}
/* a heading that follows body copy inside a card needs room above it —
   whether it comes straight after the lead panel or after the lead's
   trailing paragraphs */
.blog_info :is([class*="what-is-"], .function-block) > p + h2 { margin-top: 32px; }

.blog_info .solution {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 1.4rem 0 0;
    padding: 18px 22px;
    background: color-mix(in srgb, var(--accent) 8%, #fff);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    line-height: 1.5;
}
.blog_info .solution b { color: var(--evo-navy, #11213a); }
.blog_info .solution u { text-decoration: none; color: var(--accent); font-weight: 700; }

/* ---- in-section screenshots ----------------------------------- */
.function-block .proj_gallery_grid {
    margin-top: 26px;
    text-align: center;
}
.function-block .proj_gallery_grid a { display: inline-block; max-width: 720px; width: 100%; }

/* ---- feature legend → icon chips ------------------------------ */
.blog_list.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    /* no extra top margin: the hero already provides the standard 24px gap, and
       the bottom one matches it so the chips sit in the same rhythm as the cards */
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

/* a closing statement merged into a section card (e.g. galaxii "Proč Galaxii") */
.blog_info .galaxii-statement {
    margin: 22px 0 0;
    padding: 18px 24px;
    background: color-mix(in srgb, var(--accent) 8%, #fff);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    color: var(--evo-navy, #11213a);
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.4;
}

/* highlighted "web presentation" line (link to the product's own site) */
.blog_info .product-web {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 22px 0 0;
    padding: 16px 22px;
    background: color-mix(in srgb, var(--accent) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, #fff);
    border-radius: 12px;
    font-size: 1.06rem;
    color: var(--evo-text, #44546a);
}
.blog_info .product-web > i {
    flex: 0 0 auto;
    position: relative;
    width: 1.6em;
    text-align: center;
    line-height: 1;
    color: var(--accent);
    font-size: 1.4rem;
}

/* make the link an unmistakable clickable pill/button */
.blog_info .product-web a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.35rem;
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 34%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.blog_info .product-web a:hover {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent);
}
.blog_info .product-web a i { color: #fff; font-size: 0.9em; }
.blog_list.nav .nav-item {
    width: auto;
    flex: 1 1 0;
}
.blog_list.nav .nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 24px 16px;
    background: #ffffff;
    border: 1px solid #e3ebf6;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 45, 70, 0.05);
    color: var(--evo-navy, #11213a);
    font-weight: 600;
    font-size: 0.98rem;
    text-align: center;
    text-decoration: none;
    cursor: default;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.blog_list.nav .nav-item a:hover {
    box-shadow: 0 16px 40px rgba(15, 45, 70, 0.13);
    border-color: #cdddf3;
}
.blog_list.nav .nav-item .fad {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    color: var(--accent);
    font-size: 1.55rem;
}

/* ---- illustrative-data disclaimer ----------------------------- */
/* label.warning is styled in style-products.css, which product pages never
   load, so the rule lives here — muted footnote under the last card, aligned
   with the cards' inner padding and using the standard block gap above it */
.productDetail label.warning {
    display: block;
    float: none;
    width: 100%;
    /* no own top margin — the preceding card already contributes the standard
       24px gap, and clear:both on the .clearfix stops the two from collapsing */
    margin: 0;
    padding: 0 40px;
    color: #6b7a90;
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.6;
}

/* keep every product image within the page width */
.product_detail img { max-width: 100%; }

/* ---- responsive ----------------------------------------------- */
@media (max-width: 767px) {
    .function-block { padding: 26px 22px; }
    .product_top_imgs { padding: 12px 18px; }
    .top-images > [class*="col-md-"] {
        flex-basis: 100%;
        max-width: 100%;
    }
    .blog_info h2 { font-size: 1.45rem; }
    .blog_list.nav .nav-item { flex-basis: 132px; }
    /* keep the disclaimer aligned with the cards' narrower mobile padding */
    .productDetail label.warning { padding: 0 22px; }
    .blog_info :is([class*="what-is-"], .function-block) > p.product-lead {
        padding: 20px 22px;
        font-size: 1.16rem;
    }
}

/* ===========================================================
   Flexii CRM + Galaxii — section-level polish (.flexii + .galaxii)
   - feature rows get a rounded accent "badge" marker with a
     hanging indent so wrapped lines and sub-lists align cleanly
   - sub-lists use accent dot markers instead of default discs
   - every section that ships a screenshot becomes a two-column
     layout: the copy on the left, the screenshot pinned right
   Purely visual — the markup and every text stay unchanged.
   =========================================================== */

/* -- feature bullets ------------------------------------------- */
:is(.blog_info.flexii, .blog_info.galaxii) .function-block p.list,
:is(.blog_info.flexii, .blog_info.galaxii) .function-block > p:has(> .fa-chevron-right) {
    display: block;
    position: relative;
    padding-left: 2.1rem;
    margin: 0 0 12px;
    line-height: 1.6;
}
:is(.blog_info.flexii, .blog_info.galaxii) .function-block p.list > .fad,
:is(.blog_info.flexii, .blog_info.galaxii) .function-block > p > .fa-chevron-right {
    position: absolute;
    left: 0;
    top: 0.12em;
    width: 22px;
    height: 22px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: color-mix(in srgb, var(--accent) 14%, #fff);
    color: var(--accent);
    font-size: 0.72rem;
}

/* sub-lists: clean accent dots. NB the browser auto-closes the <p> before a
   nested <ul>, so the list is actually a sibling of its feature row — indent
   it to line up under the parent copy (badge width) rather than the row icon. */
:is(.blog_info.flexii, .blog_info.galaxii) .function-block ul {
    list-style: none;
    margin: 0.35rem 0 0.7rem 2.1rem;
    padding-left: 0;
}
/* the stray </p> after each sub-list leaves an empty paragraph — hide it */
:is(.blog_info.flexii, .blog_info.galaxii) .function-block p:empty { display: none; }
:is(.blog_info.flexii, .blog_info.galaxii) .function-block ul li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 6px;
    color: var(--evo-text, #44546a);
}
:is(.blog_info.flexii, .blog_info.galaxii) .function-block ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* -- screenshot pinned to the right of its section ------------- */
:is(.blog_info.flexii, .blog_info.galaxii) .function-block:has(.proj_gallery_grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
    column-gap: 44px;
    align-items: start;
}
:is(.blog_info.flexii, .blog_info.galaxii) .function-block:has(.proj_gallery_grid) > h2 {
    grid-column: 1 / -1;
}
:is(.blog_info.flexii, .blog_info.galaxii) .function-block:has(.proj_gallery_grid) > *:not(h2):not(.proj_gallery_grid) {
    grid-column: 1;
}
/* the image spans many rows so the row it starts on is never
   forced to the full image height (which would gap the copy);
   empty spanned rows collapse to 0 */
:is(.blog_info.flexii, .blog_info.galaxii) .function-block > .proj_gallery_grid {
    grid-column: 2;
    grid-row: 2 / span 40;
    align-self: start;
    margin: 4px 0 0;
    text-align: center;
}
:is(.blog_info.flexii, .blog_info.galaxii) .function-block > .proj_gallery_grid a {
    display: inline-block;
    max-width: 100%;
}

/* stack again on tablets / phones */
@media (max-width: 991px) {
    :is(.blog_info.flexii, .blog_info.galaxii) .function-block:has(.proj_gallery_grid) { display: block; }
    :is(.blog_info.flexii, .blog_info.galaxii) .function-block > .proj_gallery_grid {
        grid-row: auto;
        margin-top: 24px;
    }
    :is(.blog_info.flexii, .blog_info.galaxii) .function-block > .proj_gallery_grid a { max-width: 560px; width: 100%; }
}

/* Exception: a tall screenshot (e.g. Galaxii UNIVERSE architecture diagram)
   reads better full-width BELOW the copy than squeezed into the right column.
   Higher specificity (extra class + :has) so it wins over the two-column grid. */
.blog_info .function-block.fb-shot-below:has(.proj_gallery_grid) {
    display: block;
}
.blog_info .function-block.fb-shot-below > .proj_gallery_grid {
    grid-column: auto;
    grid-row: auto;
    margin: 28px 0 0;
    text-align: center;
}
.blog_info .function-block.fb-shot-below > .proj_gallery_grid a {
    display: inline-block;
    max-width: 520px;
    width: 100%;
}

/* opt-in two-column layout for a single block on a product that isn't fully
   two-column: copy on the left, screenshot pinned to the right (e.g.
   flexiiGuard "Funkce a agendy"). Same mechanics as the flexii/galaxii grid. */
.blog_info .function-block.fb-two-col:has(.proj_gallery_grid) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 40%);
    column-gap: 44px;
    align-items: start;
}
.blog_info .function-block.fb-two-col > h2 { grid-column: 1 / -1; }
.blog_info .function-block.fb-two-col > *:not(h2):not(.proj_gallery_grid) { grid-column: 1; }
.blog_info .function-block.fb-two-col > .proj_gallery_grid {
    grid-column: 2;
    grid-row: 2 / span 40;
    align-self: start;
    margin: 4px 0 0;
    text-align: center;
}
.blog_info .function-block.fb-two-col > .proj_gallery_grid a {
    display: inline-block;
    max-width: 100%;
}
@media (max-width: 991px) {
    .blog_info .function-block.fb-two-col:has(.proj_gallery_grid) { display: block; }
    .blog_info .function-block.fb-two-col > .proj_gallery_grid { grid-row: auto; margin-top: 24px; }
}

