/* ============================================================
   old-detail.css — incremental clean-up of detail header.
   Loaded after the parent theme so selectors here win on equal
   specificity. Scoped under .nazovkurzu to avoid bleed.
   ============================================================ */


/* -------------------------------------------------------------
   1) Hero header layout — float → flex
   Image sits left at its natural top, content fills the rest.
   No more reflow underneath the image when text is short.
   ------------------------------------------------------------- */
.nazovkurzu {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* Kill .clearfix's ::before / ::after — they become anonymous flex items
   in a flex container and create extra free-space we don't want. */
.nazovkurzu::before,
.nazovkurzu::after {
    content: none !important;
    display: none !important;
}

.nazovkurzu .paddetailikona {
    flex: 0 0 400px;
    width: 400px;
    float: none !important;     /* kill any leftover .pull-left */
    margin: 0 !important;
    padding: 0 !important;
    align-self: flex-start;
    line-height: 0;             /* eat the inline-baseline gap under <img> */
}

.nazovkurzu .paddetailikona img {
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
    margin: 0 !important;       /* override Bootstrap .center-block auto margins */
    padding: 0;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
}

.nazovkurzu__body {
    flex: 1 1 0;                /* basis 0 forces fill of all remaining space */
    min-width: 0;               /* allow long words/URLs to wrap */
    max-width: 100%;
    margin: 0;
    padding: 0;
}


/* -------------------------------------------------------------
   2) Title + subtitle — minor breathing-room reset
   ------------------------------------------------------------- */
.nazovkurzu__body > h1 {
    margin: 0 0 6px !important;
    line-height: 1.08;
}

.nazovkurzu .podnazovkk {
    margin: 0 0 16px;
    color: #555;
    font-weight: 400;
    line-height: 1.35;
}


/* -------------------------------------------------------------
   3) Badge / button row (rating, reviews, terms)
   .mcenter holds badges AND the AEO description. Make it a flex
   row with wrap so the pills align on a single horizontal axis
   (align-items: center) — sidesteps inline-baseline jitter that
   was dropping .bt-reviews-badge a few px below the others.
   The description block snaps to a new row via flex-basis: 100%.
   ------------------------------------------------------------- */
.nazovkurzu .mcenter {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 10px;
    text-align: left !important;
    margin: 0;
}

/* Visual row of pills: rating + reviews + terms */
.nazovkurzu .mcenter .podnadpisomd,
.nazovkurzu .mcenter .bt-reviews-badge,
.nazovkurzu .mcenter .btnterm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    margin: 0;
    position: static !important;        /* kill inline `position: relative; top: -10px` */
    top: auto !important;
    box-sizing: border-box;
    transition: background .2s ease, color .2s ease,
                transform .2s ease, box-shadow .2s ease;
}

/* Rating pill — gold outline, soft fill */
.nazovkurzu .mcenter .podnadpisomd {
    background: #FFFBE6;
    border: 1px solid #F0D24A;
    color: #5A4500;
}
.nazovkurzu .mcenter .podnadpisomd b {
    color: #1A1614;
    font-weight: 700;
}
.nazovkurzu .mcenter .podnadpisomd svg {
    position: static !important;
    top: 0 !important;
    height: 14px;
    width: auto;
    flex-shrink: 0;
}

/* Reviews badge — solid gold, override the in-page .bt-reviews-badge
   (use .nazovkurzu prefix to win the specificity battle against the
   inline <style> block in page-detail.php) */
.nazovkurzu .mcenter .bt-reviews-badge {
    top: 0 !important;
    background: #FFD700;
    border: 1px solid #E2BC00;
    color: #1A1614;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset;
}
.nazovkurzu .mcenter .bt-reviews-badge:hover {
    background: #FFCB00;
    color: #1A1614;
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .55) inset,
        0 8px 16px -6px rgba(226, 188, 0, .55);
    text-decoration: none;
}
.nazovkurzu .mcenter .bt-reviews-badge svg {
    position: static !important;
    top: 0 !important;
    width: 14px;
    height: 14px;
    fill: #1A1614 !important;
    stroke: #1A1614 !important;
    flex-shrink: 0;
}

/* Terms button — primary CTA, dark */
.nazovkurzu .mcenter .btnterm {
    background: #1A1614;
    border: 1px solid #1A1614;
    color: #fff;
    text-decoration: none;
}
.nazovkurzu .mcenter .btnterm:hover {
    background: #2D2520;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(26, 22, 20, .45);
    text-decoration: none;
}
.nazovkurzu .mcenter .btnterm svg {
    position: static !important;
    top: 0 !important;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Kill any <br> that's a direct child of .mcenter. With .mcenter being
   a flex container, stray <br> tags become anonymous flex items that
   take up a full row's worth of vertical space. We don't need them —
   flex-wrap handles line breaks. (The .br-mobile class is one of them.) */
.nazovkurzu .mcenter > br {
    display: none;
}


/* -------------------------------------------------------------
   4) AEO description — quiet typography, accent on "celý popis"
   ------------------------------------------------------------- */
.nazovkurzu .course-summary-popis {
    flex: 1 0 100%;             /* break to its own row inside .mcenter flex */
    margin: 10px 0 0;
    color: #494949;
    font-size: 13px;
    line-height: 1.4;
}
.nazovkurzu .course-summary-popis .course-summary {
    margin: 0;
    padding: 0;
}
.nazovkurzu .course-summary-popis a[href="#anotacia"] {
    color: #DD5A3C;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: color .15s ease;
    margin-left: 2px;
    white-space: nowrap;
}
.nazovkurzu .course-summary-popis a[href="#anotacia"]:hover {
    color: #B43F26;
}


/* -------------------------------------------------------------
   5) Hero meta row — sits below .mcenter, holds balík strip
   (and later: lektori strip). Inline blocks side-by-side; wraps
   on narrow viewports.
   ------------------------------------------------------------- */
.hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin-top: 0;
    flex: 1 0 100%;             /* break to its own row inside .mcenter flex */
}


/* -------------------------------------------------------------
   6) Balík (bundle) strip — only renders when $isBalik = true.
   Stacked-package SVG mark, lead text, overlapping round chips
   for bundle courses, savings on two lines.
   ------------------------------------------------------------- */
.balik-strip {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px 8px 12px;
    background: #FFFAEC;
    border: 1px solid #F0D24A;
    border-radius: 12px;
    color: #3A322D;
    font-size: 13px;
    line-height: 1.3;
    box-sizing: border-box;
    max-width: 100%;
}

.balik-strip__icon {
    flex-shrink: 0;
    color: #B58B00;
    display: grid;
    place-items: center;
}
.balik-strip__icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.balik-strip__lead {
    flex-shrink: 0;
    color: #6E665E;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
}
.balik-strip__lead strong {
    display: block;
    color: #1A1614;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
}

.balik-strip__stack {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.balik-strip__chip {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #FFFAEC;
    margin-left: -10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(26, 22, 20, .12);
    display: block;
    position: relative;
    z-index: 1;
    transition: transform .2s ease;
}
.balik-strip__chip:first-child {
    margin-left: 0;
}
.balik-strip__chip:hover {
    transform: translateY(-2px) scale(1.06);
    z-index: 5;
}
.balik-strip__chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.balik-strip__save {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.25;
    color: #6E665E;
    text-align: left;
    padding-left: 12px;
    border-left: 1px solid #F0D24A;
}
.balik-strip__save strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #B58B00;
    margin-top: 2px;
    white-space: nowrap;
}


/* -------------------------------------------------------------
   7) Lektori strip — sibling of balík strip in .hero-meta-row.
   White-on-white palette, faces overlap with white separator borders.
   The whole strip is a single link to #lektori.
   ------------------------------------------------------------- */
.lektori-strip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #3A322D;
    font-size: 13px;
    line-height: 1.3;
    box-sizing: border-box;
    max-width: 100%;
    text-decoration: none;
    transition: opacity .2s ease;
}
.lektori-strip:hover {
    text-decoration: none;
    color: #3A322D;
    opacity: .85;
}
.lektori-strip:hover .lektori-strip__chip {
    transform: translateY(-1px);
}

/* icon + count are hidden — strip is now naked: lead + faces only */
.lektori-strip__icon,
.lektori-strip__count {
    display: none;
}

.lektori-strip__lead {
    flex-shrink: 0;
    color: #6E665E;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
}
.lektori-strip__lead strong {
    display: block;
    color: #1A1614;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
}

.lektori-strip__stack {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.lektori-strip__chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    margin-left: -12px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(26, 22, 20, .12);
    display: block;
    position: relative;
    z-index: 1;
    transition: transform .2s ease;
}
.lektori-strip__chip:first-child {
    margin-left: 0;
}
.lektori-strip__chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* -------------------------------------------------------------
   8) Mobile / small tablets — stack vertically, image centered
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .nazovkurzu {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .nazovkurzu .paddetailikona {
        flex: 0 0 auto;
        width: 192px;
        align-self: center;
    }

    .nazovkurzu__body > h1 {
        text-align: center;
        margin-top: 0 !important;
    }

    .nazovkurzu .podnazovkk {
        text-align: center;
    }

    .nazovkurzu .mcenter {
        justify-content: center;
        text-align: center !important;
    }

    .hero-meta-row {
        justify-content: center;
    }

    .balik-strip,
    .lektori-strip {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 10px 14px;
    }
    .balik-strip__lead,
    .lektori-strip__lead {
        order: 2;
        flex-basis: 100%;
    }
    .balik-strip__icon,
    .lektori-strip__icon {
        order: 1;
    }
    .balik-strip__stack,
    .lektori-strip__stack {
        order: 3;
    }
    .balik-strip__save,
    .lektori-strip__count {
        order: 4;
        border-left: 0;
        padding-left: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nazovkurzu .paddetailikona {
        width: 156px;
    }
    .nazovkurzu .mcenter .podnadpisomd,
    .nazovkurzu .mcenter .bt-reviews-badge,
    .nazovkurzu .mcenter .btnterm {
        height: 32px;
        padding: 0 12px;
        font-size: 12px;
    }
}
