/* =========================================================
   Boiron homepage (astra-child/front-page.php)
   Values measured from the Elementor homepage (Nov 2026).
   Breakpoints match Elementor: tablet ≤1024px, mobile ≤767px.
   ========================================================= */

.boiron-home {
    --bh-blue: #0033ab;
    --bh-green: #4f7a0c;
    --bh-text: #4b4f58;
    --bh-heading: #3a3a3a;
    --bh-light: #f5f5f5;
    --bh-shadow: 0 0 10px rgba(0, 0, 0, 0.5);

    font-family: Montserrat, sans-serif;
    overflow-x: hidden;
}

/* Resets apply to our own sections only, NOT the hero slider
   (the slider shortcode has its own spacing for title/text/button). */
.boiron-home > :where(:not(.bh-hero)) *,
.boiron-home > :where(:not(.bh-hero)) *::before,
.boiron-home > :where(:not(.bh-hero)) *::after {
    box-sizing: border-box;
}

/* :where() keeps specificity at .boiron-home + tag, so the section rules
   below (e.g. .bh-targeted__text p) still win. */
.boiron-home > :where(:not(.bh-hero)) h2,
.boiron-home > :where(:not(.bh-hero)) p {
    margin: 0;
}

.boiron-home > :where(:not(.bh-hero)) img {
    max-width: 100%;
    height: auto;
}

.bh-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ---------- Buttons ---------- */

.boiron-home .bh-btn {
    display: inline-block;
    border-radius: 30px;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.3s, color 0.3s, filter 0.3s;
}

.boiron-home .bh-btn:hover{
    background-color: #D9321A !important;
}

.boiron-home .bh-btn--solid {
    padding: 20px 50px;
    background-color: var(--bh-blue);
    border: 0;
    color: #fff;
}

.boiron-home .bh-btn--small {
    padding: 15px 25px;
}

.boiron-home .bh-btn--outline,
.boiron-home .bh-btn--dark {
    padding: 20px 40px;
    border: 2px solid var(--bh-light);
    box-shadow: var(--bh-shadow);
    color: #fff;
    background-color: transparent;
}

.boiron-home .bh-btn--dark {
    background-color: rgba(2, 1, 1, 0.49);
    text-transform: none;
}

.boiron-home .bh-btn:hover,
.boiron-home .bh-btn:focus-visible {
    color: #fff;
    background-color: #D9321A;
}

/* ---------- 2. Categories ---------- */

.bh-cats {
    max-width: 1140px;
    margin: 30px auto;
    padding: 10px;
}

.bh-cats ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bh-cats__grid {
    display: grid;
    grid-template-columns: repeat(4, 280px);
    justify-content: space-between;
    row-gap: 24px;
}

.bh-cats__item a {
    display: block;
    text-align: center;
    text-decoration: none;
}

.bh-cats__item img {
    display: block;
    width: 100%;
    margin: 0 0 12.8px;
}

.bh-cats__title {
    display: block;
    color: var(--bh-heading);
    font-size: 14.4px;
    font-weight: 700;
    line-height: 21.6px;
    text-transform: uppercase;
    margin-top: -30px;
}

.bh-cats__pills {
    display: none;
}

/* ---------- 3. Targeted Relief ---------- */

.bh-targeted {
    margin: 20px 0;
}

.bh-targeted__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.bh-targeted__text {
    padding: 10px;
    margin-top: 100px;
}

.bh-targeted__title {
    margin-bottom: 20px !important;
    color: var(--bh-heading);
    font-size: 35px;
    font-weight: 600;
    line-height: 45px;
}

.bh-targeted__text p {
    margin: 0 80px 20px 0;
    color: var(--bh-text);
    font-size: 18px;
    line-height: 27px;
}

.bh-targeted__media {
    padding: 10px;
}

.bh-targeted__media img {
    display: block;
    width: 500px;
    margin-left: 50px;
}

/* ---------- 4. Finders ---------- */

.bh-finders {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.bh-finder {
    display: grid;
    grid-template-columns: 60% 40%;
    align-items: start;
    min-height: 330px;
    padding: 30px 10px;
    color: #fff;
}

.bh-finder--blue  { background-color: var(--bh-blue); }
.bh-finder--green { background-color: var(--bh-green); }

.bh-finder__text {
    padding: 10px 10px 10px 90px;
}

.bh-finder--green .bh-finder__text {
    padding-left: 54px;
}

.bh-finder__title {
    margin-bottom: 20px !important;
    color: #fff;
    font-size: 35px;
    font-weight: 600;
    line-height: 45px;
    text-transform: uppercase;
}

.bh-finder__text p {
    margin-bottom: 20px;
    color: var(--bh-light);
    font-size: 18px;
    line-height: 27px;
}

.bh-finder--blue .bh-btn--outline  { background-color: var(--bh-blue); }
.bh-finder--green .bh-btn--outline { background-color: var(--bh-green); }

.bh-finder__media {
    padding: 10px;
    text-align: center;
}

.bh-finder__media img {
    width: 250px;
}

/* ---------- 5. Medicines of the Month ---------- */

.bh-motm {
    margin: 40px 0;
    background: url('https://cdn.boironusa.com/uploads/2023/03/green-scratched-circle-overlay.webp') no-repeat;
    background-size: 35% auto;
    background-position: 124px -7px;
}

.bh-motm__inner {
    display: grid;
    grid-template-columns: 254px 1fr;
    align-items: start;
}

.bh-motm__intro {
    padding: 10px;
}

.bh-motm__title {
    margin-bottom: 20px !important;
    color: #231f20;
    font-size: 35px;
    font-weight: 600;
    line-height: 50px;
}

.bh-motm__month {
    margin-bottom: 30px !important;
    color: #000;
    font-size: 20px;
    font-weight: 600;
    line-height: 24px;
}

.bh-motm__carousel {
    position: relative;
    min-width: 0;
    padding: 10px;
}

.bh-motm__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 40px 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bh-motm__card {
    overflow: hidden;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
}

.bh-motm__img {
    display: block;
}

.bh-motm__img img {
    display: block;
    width: 100%;
    height: 300px;
    padding: 8px 0;
    object-fit: contain;
}

.bh-motm__body {
    padding: 0 19.2px 12px;
    text-align: left;
}

.bh-motm__stock {
    display: block;
    margin-bottom: 10px;
    color: #2a8700;
    font-size: 16px;
    font-weight: 600;
    line-height: 27px;
    text-transform: uppercase;
}

.bh-motm__stock--out {
    color: #b71d1d;
}

.bh-motm__name {
    display: block;
    color: #2a3d93;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
}

.bh-motm__arrow,
.bh-motm__dots {
    display: none;
}

/* ---------- 6 & 7. Split blocks ---------- */

.bh-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.bh-split__text {
    padding: 30px 100px 50px 50px;
    color: #fff;
}

.bh-split__text--green { background-color: var(--bh-green); }
.bh-split__text--blue  { background-color: var(--bh-blue); }

.bh-split__title {
    margin-bottom: 20px !important;
    color: #fff;
    font-size: 31px;
    font-weight: 600;
    line-height: 45px;
    text-transform: uppercase;
}

.bh-split__text p {
    margin: 10px 0 20px;
    color: var(--bh-light);
    font-size: 18px;
    line-height: 27px;
}

.bh-split__text--green .bh-btn--outline { background-color: var(--bh-green); }
.bh-split__text--blue .bh-btn--outline  { background-color: var(--bh-blue); }

.bh-split__video {
    position: relative;
    display: block;
    width: 100%;
    min-height: 350px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: #000;
    background-position: 50% 50%;
    background-size: cover;
    cursor: pointer;
}

/* YouTube play button (86x60, same as the old Elementor trigger) */
.bh-split__video::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 60px;
    transform: translate(-50%, -50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 86 60'%3E%3Crect width='86' height='60' rx='14' fill='%23ff0000'/%3E%3Cpath d='M35 19v22l19-11z' fill='%23fff'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.2s;
}

.bh-split__video:hover::after,
.bh-split__video:focus-visible::after {
    transform: translate(-50%, -50%) scale(1.08);
}

.bh-split__video:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
}

.bh-split--story {
    min-height: 440px;
}

.bh-split__image {
    background-position: 0 0;
    background-size: cover;
}

/* Video modal (built by home.js) */
.bh-video-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
}

.bh-video-modal__frame {
    position: relative;
    width: min(1000px, 100%);
    aspect-ratio: 16 / 9;
}

.bh-video-modal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.bh-video-modal__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

/* ---------- 8. Wellness Tips ---------- */

.bh-tips {
    margin-top: 20px;
    padding: 10px 0;
}

.bh-tips__title {
    margin-bottom: 20px !important;
    color: #000;
    font-size: 35px;
    font-weight: 600;
    line-height: 45px;
    text-align: center;
}

.bh-tips__intro {
    margin-bottom: 20px !important;
    color: var(--bh-text);
    font-size: 16px;
    font-weight: 500;
    line-height: 27px;
    text-align: center;
}

.bh-tips__desktop {
    margin-bottom: 20px;
}

.bh-tips__mobile {
    display: none;
}

.bh-tips__cta {
    margin: 30px 0 50px;
    text-align: center;
}

.boiron-home .bh-tips__btn {
    padding: 20px 40px;
    font-family: Roboto, sans-serif;
    font-size: 18px;
    font-weight: 500;
}

/* ---------- 9. HCP / Retailer ---------- */

.bh-pro {
    position: relative;
    background-color: #424242;
}

.bh-pro::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--bh-pro-bg);
    background-position: 50% 0;
    background-size: cover;
    opacity: 0.5;
}

.bh-pro__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 400px;
}

.bh-pro__col {
    padding: 10px;
    color: #fff;
    text-align: center;
    padding-bottom: 20px;
}

.bh-pro__col--hcp {
    border-right: 2px solid var(--bh-text);
}

.bh-pro__title {
    margin: 25px 0 20px !important;
    color: #fff;
    font-size: 40px;
    font-weight: 600;
    line-height: 45px;
}

.bh-pro__col p {
    margin-bottom: 20px;
    color: #fff;
    font-size: 16px;
    line-height: 27px;
}

/* =========================================================
   TABLET (≤1024px)
   ========================================================= */

@media (max-width: 1024px) {
    .bh-cats__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        column-gap: 20px;
    }

    .bh-targeted__text {
        margin-top: 40px;
    }

    .bh-targeted__text p {
        margin-right: 0;
    }

    .bh-targeted__media img {
        width: 100%;
        margin-left: 0;
    }

    .bh-finders {
        grid-template-columns: 1fr;
    }

    .bh-motm__inner {
        grid-template-columns: 1fr;
    }

    .bh-motm__list {
        grid-template-columns: repeat(5, minmax(150px, 1fr));
        overflow-x: auto;
    }

    .bh-split__text {
        padding: 30px 40px 40px;
    }

    .bh-pro__title {
        font-size: 32px;
        line-height: 40px;
    }
}

/* =========================================================
   MOBILE (≤767px)
   ========================================================= */

@media (max-width: 767px) {

    /* Categories: coloured pill buttons, 2 per row */
    .bh-cats {
        margin: 0;
        padding: 10px 0;
    }

    .bh-cats__grid {
        display: none;
    }

    .bh-cats__pills {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .bh-cats__pills li {
        padding: 10px;
    }

    .bh-cats__pills a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 15px 25px;
        border-radius: 30px;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
        text-decoration: none;
    }

    /* Targeted Relief */
    .bh-targeted__inner {
        grid-template-columns: 1fr;
    }

    .bh-targeted__text {
        margin-top: 0;
    }

    .bh-targeted__title {
        font-size: 32px;
    }

    .boiron-home .bh-targeted__btn {
        display: block;
        padding: 20px 30px;
        line-height: 17px;
    }

    /* Finders */
    .bh-finder {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 30px 10px 20px;
    }

    .bh-finder__text,
    .bh-finder--green .bh-finder__text {
        padding: 10px 20px;
    }

    .bh-finder__title {
        font-size: 34px;
        line-height: 1.1;
    }

    .bh-finder__text .bh-btn {
        display: table;
        margin: 0 auto;
    }

    .bh-finder__media img {
        width: 138px;
    }

    /* Buttons inside coloured blocks use a smaller font on mobile (as live) */
    .boiron-home .bh-btn--outline,
    .boiron-home .bh-btn--dark {
        font-size: 10px;
    }

    /* Medicines of the Month: one card at a time, arrows + dots */
    .bh-motm {
        margin: 20px 0;
        background-size: 365px auto;
        background-position: 0 0;
    }

    .bh-motm__title {
        line-height: 50px;
    }

    .bh-motm__intro .bh-btn {
        font-size: 17px;
        margin-bottom: 30px;
    }

    .bh-motm__carousel {
        padding: 0 40px 40px;
    }

    .bh-motm__list {
        display: flex;
        gap: 0;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        scrollbar-width: none;
    }

    .bh-motm__list::-webkit-scrollbar {
        display: none;
    }

    .bh-motm__card {
        flex: 0 0 100%;
        scroll-snap-align: start;
        border-width: 0 0 1px;
        border-radius: 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
    }

    .bh-motm__img img {
        height: 300px;
    }

    .bh-motm__body {
        padding: 12px 10px 16px;
        text-align: center;
    }

    .bh-motm__stock {
        display: none;
    }

    .bh-motm__name {
        color: #3a3a3a;
        font-size: 18px;
        font-weight: 500;
    }

    .bh-motm__arrow {
        position: absolute;
        top: 150px;
        display: block;
        width: 36px;
        height: 48px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #231f20;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }

    .bh-motm__arrow--prev { left: 0; }
    .bh-motm__arrow--next { right: 0; }

    .bh-motm__dots {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 16px;
    }

    .bh-motm__dots button {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #000;
        opacity: 0.3;
        cursor: pointer;
    }

    .bh-motm__dots button[aria-current="true"] {
        opacity: 1;
    }

    /* Split blocks: text first, media below */
    .bh-split {
        grid-template-columns: 1fr;
    }

    .bh-split__text {
        padding: 30px 30px 20px;
    }

    .bh-split__title {
        font-size: 31px;
        line-height: 1;
    }

    .bh-split__text .bh-btn {
        display: table;
        margin: 20px auto 10px;
    }

    .bh-split__video {
        min-height: 200px;
    }

    .bh-split--story {
        min-height: 0;
    }

    .bh-split--story .bh-split__image {
        order: 2;
        min-height: 230px;
    }

    /* Wellness Tips: carousel instead of grid */
    .bh-tips__title {
        line-height: 1;
    }

    .bh-tips__desktop {
        display: none;
    }

    .bh-tips__mobile {
        display: block;
        margin-bottom: 20px;
    }

    .bh-tips__cta {
        margin: 5px 0 20px;
    }

    .boiron-home .bh-tips__btn {
        display: block;
    }

    /* HCP / Retailer stacked */
    .bh-pro__inner {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 20px 10px;
    }

     /* Stacked on mobile: the desktop vertical divider becomes a horizontal line
       (same 2px colour) between Health Care Professionals and Retailer. */
    .bh-pro__col--hcp {
        border-right: 0;
        margin-bottom: -30px;
        padding-bottom: 30px;
    }

     /* Centered line with space on both sides (the text keeps its full width).
       Adjust the 15% to make the line longer / shorter. */
    .bh-pro__col--hcp::after {
        content: "";
        display: block;
        height: 2px;
        margin: 30px 15% 0;
        background: var(--bh-text);
    }

    .bh-pro__title {
        margin: 20px 0 !important;
        font-size: 40px;
        line-height: 40px;
    }

    .bh-pro__col p {
        font-size: 14.6px;
    }
}
