/* ==========================================================================
   Boekestyn Greenhouses — plant care section (care.html only).
   Added 2026-08-20.

   Scoped entirely under .care-app, so it cannot reach the navbar or the
   footer. Nothing here overrides a Bootstrap or boeks.css rule globally.

   The shape language: rounded frames with the top-right corner cut off at
   45 degrees, with a green wedge sitting in the cut. One custom property,
   --notch, controls the size everywhere.
   ========================================================================== */

.care-app {
    --c-green:  #66BD30;
    --c-plum:   #8a2c79;
    --c-ink:    #212529;
    --c-muted:  #6b6d70;
    --c-line:   #e6e8e9;
    --c-soft:   #f6f7f7;
    --notch:    34px;

    background: #fff;
    padding: 0 0 90px;
    color: var(--c-ink);
    font-family: 'Noto Sans JP', sans-serif;
}

/* ------------------------------------------------------------- the frame --
   Two elements do the work: the clip-path cuts the corner off the box, and
   the ::after draws the green wedge into the space the cut opened up. */
.care-frame {
    position: relative;
    background: #fff;
    border: 1.5px solid var(--c-line);
    border-radius: 18px;
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.care-frame::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: var(--notch); height: var(--notch);
    background: var(--c-green);
    /* the frame's cut runs corner-to-corner across this box; fill the half
       that survives it, which puts a solid wedge on the diagonal */
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    transition: background .25s ease;
    pointer-events: none;
}
.care-card:hover .care-frame {
    border-color: #cfd2d3;
    box-shadow: 0 10px 30px rgba(0,0,0,.07);
    transform: translateY(-2px);
}
.care-card:hover .care-frame::after { background: var(--c-plum); }

/* -------------------------------------------------------------- the head -- */
.care-head { padding: 64px 0 26px; }
.care-head h1 {
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0 0 10px;
}
.care-head p {
    color: var(--c-muted);
    font-size: 1.02rem;
    max-width: 54ch;
    margin: 0;
}

/* ------------------------------------------------------------ search bar -- */
.care-search-wrap { position: relative; margin: 26px 0 16px; max-width: 620px; }
.care-search {
    width: 100%;
    font-family: inherit;
    font-size: 1.02rem;
    color: var(--c-ink);
    background: var(--c-soft);
    border: 1.5px solid var(--c-line);
    border-radius: 999px;
    padding: 15px 46px 15px 50px;
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.care-search::placeholder { color: #9a9c9e; }
.care-search:focus {
    background: #fff;
    border-color: var(--c-green);
    box-shadow: 0 0 0 4px rgba(102,189,48,.14);
}
.care-search-icon,
.care-search-clear {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: var(--c-muted); line-height: 1; pointer-events: none;
}
.care-search-icon  { left: 20px;  font-size: 1.05rem; }
.care-search-clear {
    right: 8px; pointer-events: auto; cursor: pointer;
    background: none; border: 0; padding: 8px 12px;
    font-size: 1.3rem; opacity: 0; visibility: hidden; transition: opacity .15s ease;
}
.care-search-clear.is-on { opacity: 1; visibility: visible; }
.care-search-clear:hover { color: var(--c-ink); }

/* ----------------------------------------------------------------- chips -- */
.care-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.care-chip {
    font-family: inherit;
    font-size: .78rem; font-weight: 700;
    letter-spacing: .4px; text-transform: uppercase;
    color: var(--c-muted); background: #fff;
    border: 1.4px solid var(--c-line); border-radius: 999px;
    padding: 8px 15px; cursor: pointer;
    transition: all .18s ease;
}
.care-chip:hover { border-color: #c9cccd; color: var(--c-ink); }
.care-chip.is-on {
    color: #fff; background: var(--c-ink); border-color: var(--c-ink);
}
.care-count { font-size: .86rem; color: var(--c-muted); margin: 0 0 30px; }
.care-count b { color: var(--c-ink); }

/* ------------------------------------------------------------- the cards -- */
.care-grid { display: flex; flex-direction: column; gap: 26px; }
.care-card { scroll-margin-top: 90px; }
.care-card[hidden] { display: none; }

.care-inner { display: flex; gap: 0; align-items: stretch; }
.care-photo {
    flex: 0 0 40%; position: relative; overflow: hidden;
    border-radius: 16px 0 0 16px; background: var(--c-soft);
}
.care-photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    /* The photos are cropped 4:3 with the canopy at the top. Wherever the card
       box is wider than 4:3 — every phone, and short desktop cards — cover has
       to trim height, and by default it takes that off the top. Anchor it. */
    object-position: top center;
    transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.care-card:hover .care-photo img { transform-origin: top center; }
.care-card:hover .care-photo img { transform: scale(1.035); }

.care-body { flex: 1 1 auto; padding: 28px 30px 26px; min-width: 0; }
.care-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 3px; }
.care-title h2 { font-size: 1.7rem; font-weight: 900; margin: 0; letter-spacing: -.4px; }
.care-latin { font-style: italic; color: var(--c-muted); font-size: .95rem; }
.care-blurb { color: #4c4e50; margin: 12px 0 20px; font-size: .97rem; line-height: 1.62; }

/* ------------------------------------------------------------ stat cards --
   Four across on desktop, two on a phone: Light and the Tip. */
.care-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin-bottom: 18px;
}
.care-stat {
    background: var(--c-soft); border: 1.2px solid var(--c-line);
    border-radius: 12px; padding: 12px 13px;
    --notch: 14px;
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.care-stat dt {
    font-size: .66rem; font-weight: 700; letter-spacing: 1.1px;
    text-transform: uppercase; color: var(--c-muted); margin-bottom: 4px;
}
.care-stat dd { font-size: .86rem; font-weight: 700; margin: 0; line-height: 1.35; }

/* The fourth card is the one that survives on a phone, so it carries the tip
   worth knowing rather than a repeat of the numbers above. Tinted just enough
   to read as advice, never as a warning. */
.care-stat.is-tip     { background: #f5faf0; border-color: #dceace; }
.care-stat.is-tip dt  { color: #4a7a2b; }
.care-stat.is-tip dd  { color: #2f4d1b; font-weight: 600; }

/* ------------------------------------------------------------------ tags -- */
.care-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.care-tag {
    font-size: .7rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
    color: var(--c-plum); background: #faf4f8;
    border: 1px solid #eedbe8; border-radius: 999px; padding: 4px 11px;
}

/* ---------------------------------------------------------------- the CTA -- */
.care-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.care-dl {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: .88rem; font-weight: 700; letter-spacing: .3px;
    color: #fff; background: var(--c-ink);
    border: 0; border-radius: 10px; padding: 13px 20px;
    text-decoration: none;
    --notch: 12px;
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
    transition: background .2s ease;
}
.care-dl:hover  { background: var(--c-plum); color: #fff; }
.care-dl:focus-visible { outline: 3px solid rgba(102,189,48,.5); outline-offset: 2px; }
.care-dl-note { font-size: .78rem; color: var(--c-muted); }

/* --------------------------------------------------------- the empty state -- */
.care-empty { display: none; padding: 60px 4px; text-align: center; color: var(--c-muted); }
.care-empty.is-on { display: block; }
.care-empty strong { display: block; color: var(--c-ink); font-size: 1.2rem; margin-bottom: 6px; }
.care-empty button {
    margin-top: 14px; font: inherit; font-size: .85rem; font-weight: 700;
    color: var(--c-ink); background: none; border: 1.4px solid var(--c-line);
    border-radius: 999px; padding: 9px 18px; cursor: pointer;
}
.care-empty button:hover { border-color: var(--c-ink); }

/* highlight for matched text inside a card */
.care-hit { background: rgba(102,189,48,.26); border-radius: 3px; padding: 0 1px; }

/* ======================================================== TABLET / MOBILE ==
   Below 992px the photo goes on top. Below 768px the card sheds weight:
   the blurb and the tag row come off, and the four stat cards drop to two — Light and the Tip. */
@media screen and (max-width: 991px) {
    .care-inner  { flex-direction: column; }
    .care-photo  { flex: none; width: 100%; height: 230px; border-radius: 16px 16px 0 0; }
    .care-body   { padding: 22px 22px 22px; }
}

@media screen and (max-width: 767px) {
    .care-app     { --notch: 24px; padding-bottom: 60px; }
    .care-head    { padding: 40px 0 18px; }
    .care-grid    { gap: 16px; }

    .care-photo   { height: 200px; }
    .care-body    { padding: 17px 17px 18px; }
    .care-title h2 { font-size: 1.28rem; }
    .care-latin   { font-size: .82rem; }

    /* fewer words on a phone: the blurb and the tag row come off, and the four
       stat cards drop to two — Light and the Tip, which are what people scan */
    .care-blurb   { display: none; }
    .care-tags    { display: none; }

    .care-stats   { grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 15px; }
    .care-stat    { padding: 10px 11px; --notch: 12px; }
    .care-stat.is-hide-sm { display: none; }
    .care-stat dt { font-size: .6rem; }
    .care-stat dd { font-size: .8rem; }

    .care-dl      { width: 100%; justify-content: center; padding: 14px 18px; }
    .care-dl-note { display: none; }

    .care-search  { font-size: .95rem; padding: 13px 42px 13px 44px; }
    .care-chips   {
        flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .care-chips::-webkit-scrollbar { display: none; }
    .care-chip    { flex: 0 0 auto; font-size: .72rem; padding: 7px 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .care-frame, .care-photo img { transition: none; }
    .care-card:hover .care-frame { transform: none; }
    .care-card:hover .care-photo img { transform: none; }
}
