/* ==========================================================================
   components.css
   Reusable building blocks used across many pages: buttons, labels, lists,
   cards, accordions, form fields, tabs, badges. Page sections are in sections.css.
   ========================================================================== */

/* ---------- Buttons ----------
   .ks-btn            gold pill (main call to action)
   .ks-btn--soft      blush with wine outline
   .ks-btn--dark      wine with white text (form submit buttons)
   .ks-btn--white     white
   .ks-btn--wine      wine with white text */
.ks-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 15px 30px;
    border: 1px solid transparent;
    border-radius: 50px;
    background: var(--ks-gold);
    color: var(--ks-black);
    font-family: var(--ks-font-ui);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.ks-btn:hover { background: var(--ks-wine); color: var(--ks-white); }
.ks-btn--soft { background: var(--ks-wine-pale); border-color: var(--ks-wine); }
.ks-btn--soft:hover { background: var(--ks-wine); }
.ks-btn--dark { background: var(--ks-wine); color: var(--ks-white); }
.ks-btn--dark:hover { background: var(--ks-wine-dark); }
.ks-btn--white { background: var(--ks-white); }
.ks-btn--white:hover { background: var(--ks-gold); color: var(--ks-black); }
.ks-btn--wine { background: var(--ks-wine); color: var(--ks-white); }
.ks-btn--wine:hover { background: var(--ks-gold); color: var(--ks-black); }

/* Long pill link with a round arrow on the right ("Learn more", "Read more") */
.ks-arrow-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 6px 6px 6px 20px;
    border-radius: 50px;
    background: var(--ks-white);
    font-family: var(--ks-font-ui);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.ks-arrow-link__icon {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--ks-wine-pale);
    color: var(--ks-wine-text);
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}
.ks-arrow-link:hover .ks-arrow-link__icon { background: var(--ks-wine); color: var(--ks-white); }
.ks-arrow-link--gold { background: var(--ks-gold); }
.ks-arrow-link--gold .ks-arrow-link__icon { background: var(--ks-white); }

/* Phone number in a white pill with a gold round icon */
.ks-phone-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 4px 22px 4px 4px;
    border-radius: 50px;
    background: var(--ks-white);
    font-family: var(--ks-font-ui);
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
}
.ks-phone-pill__icon {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--ks-gold);
    font-size: 18px;
}
.ks-phone-pill:hover { background: var(--ks-wine-pale); }
.ks-phone-pill--outline { border: 1px solid var(--ks-line); }

/* ---------- Eyebrow label with a small gold line-and-diamond ornament ---------- */
.ks-eyebrow {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    padding-right: 34px;
    font-family: var(--ks-font-ui);
    font-size: 12px;
    font-weight: 500;
    color: var(--ks-wine-text);
    line-height: 1.7;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.ks-eyebrow::after {             /* short line ending in a diamond, our own inline SVG */
    content: "";
    position: absolute;
    right: 0; top: 50%;
    width: 26px; height: 8px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 8'%3E%3Cpath d='M0 4h17' stroke='%23b8890b' stroke-width='1.2'/%3E%3Cpath d='M21.5 0.5 25 4l-3.5 3.5L18 4z' fill='%23b8890b'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ks-panel--wine .ks-eyebrow { color: var(--ks-gold); }

/* Section heading block: eyebrow + title (+ optional text) */
.ks-head { margin-bottom: 50px; }
.ks-head--center { text-align: center; max-width: 620px; margin-inline: auto; }
.ks-head__title { max-width: 560px; }
.ks-head--center .ks-head__title { max-width: 620px; margin-inline: auto; }
.ks-head__text { margin-top: 20px; color: var(--ks-muted); }

/* Two-column heading: title left, text right (used on many inner pages) */
.ks-split-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 140px;
    align-items: start;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--ks-line);
}
.ks-split-head__text { padding-top: 36px; color: var(--ks-muted); }
.ks-split-head__text .ks-btn { margin-top: 20px; }
.ks-split-head--plain { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 1024px) { .ks-split-head { gap: 20px 40px; } }
@media (max-width: 767px) {
    .ks-split-head { grid-template-columns: 1fr; }
    .ks-split-head__text { padding-top: 0; }
}

/* ---------- Check list (wine round tick + text) ---------- */
.ks-checks { list-style: none; display: grid; gap: 16px; }
.ks-checks__item {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--ks-font-ui);
    font-size: 15px;
    line-height: 1.4;
}
.ks-tick {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--ks-wine);
    color: var(--ks-white);
    font-size: 13px;
}
.ks-tick .ks-icon { stroke-width: 3; }
.ks-tick--soft { background: var(--ks-wine-pale); color: var(--ks-wine-text); }
.ks-checks--muted .ks-checks__item { font-family: var(--ks-font-body); font-weight: 300; color: var(--ks-muted); }

/* ---------- Tilted-top card ----------
   Cards with rounded corners and a top edge that slopes slightly.
   We draw the background on a ::before layer that is skewed; the card clips the
   overflow so the bottom stays flat. --ks-tilt sets the angle (negative = right side higher). */
.ks-tilt {
    --ks-tilt: 2.5deg;
    --ks-card-bg: var(--ks-wine-pale);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--ks-radius-lg);
}
.ks-tilt::before {
    content: "";
    position: absolute;
    inset: 0 0 -60px 0;
    z-index: -1;
    border-radius: var(--ks-radius-lg);
    background: var(--ks-card-bg);
    transform: skewY(var(--ks-tilt));
    transform-origin: 0 0;
}
.ks-tilt--reverse::before { transform-origin: 100% 0; transform: skewY(calc(var(--ks-tilt) * -1)); }
.ks-tilt--soft { --ks-tilt: 1.1deg; }
.ks-tilt--cream { --ks-card-bg: var(--ks-cream); }
.ks-tilt--white { --ks-card-bg: var(--ks-white); }
.ks-tilt--gold { --ks-card-bg: var(--ks-gradient-gold); }
.ks-tilt--wine { --ks-card-bg: var(--ks-wine); }

/* ---------- Button sitting in a cut-out at the bottom edge of a panel ---------- */
.ks-notch-wrap { position: relative; }
.ks-notch {
    --ks-notch-bg: var(--ks-white);
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    transform: translateX(-50%);
    padding: 10px 10px 0;
    border-radius: 40px 40px 0 0;
    background: var(--ks-notch-bg);
}
.ks-notch::before, .ks-notch::after {   /* concave corners joining the panel edge */
    content: "";
    position: absolute;
    bottom: 0;
    width: 20px; height: 20px;
}
.ks-notch::before { left: -20px; background: radial-gradient(circle at 0 0, transparent 20px, var(--ks-notch-bg) 20.5px); }
.ks-notch::after { right: -20px; background: radial-gradient(circle at 100% 0, transparent 20px, var(--ks-notch-bg) 20.5px); }
.ks-notch--top { bottom: auto; top: 0; padding: 0 10px 10px; border-radius: 0 0 40px 40px; }
.ks-notch--top::before, .ks-notch--top::after { bottom: auto; top: 0; }
.ks-notch--top::before { background: radial-gradient(circle at 0 100%, transparent 20px, var(--ks-notch-bg) 20.5px); }
.ks-notch--top::after { background: radial-gradient(circle at 100% 100%, transparent 20px, var(--ks-notch-bg) 20.5px); }

/* ---------- Icon box (white rounded square holding an illustration) ---------- */
.ks-icon-box {
    display: grid;
    place-items: center;
    width: 60px; height: 60px;
    border-radius: 16px;
    background: var(--ks-white);
}
.ks-icon-box img { width: 40px; height: 40px; object-fit: contain; }

/* ---------- Feature card (icon + title + text) ---------- */
.ks-feature {
    padding: 40px 20px 40px;
    height: 100%;
}
.ks-feature__title { margin: 30px 0 18px; font-size: var(--ks-h4); line-height: 1.4; }
.ks-feature__text { font-size: 15px; color: var(--ks-muted); }
.ks-feature__text strong { font-weight: 400; color: var(--ks-black); }
.ks-feature__rows { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; font-size: 15px; color: var(--ks-muted); }

/* ---------- Accordion (native <details>, works without JS) ---------- */
.ks-accordion { display: grid; gap: 10px; }
.ks-accordion__item {
    border-radius: var(--ks-radius-md);
    background: var(--ks-cream);
}
.ks-accordion__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 84px;
    padding: 20px 20px;
    font-family: var(--ks-font-ui);
    font-size: var(--ks-h5);
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
}
.ks-accordion__q::-webkit-details-marker { display: none; }
.ks-accordion__icon {
    position: relative;
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--ks-white);
}
.ks-accordion__icon::before, .ks-accordion__icon::after {  /* plus sign that turns into minus */
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 12px; height: 1.5px;
    background: var(--ks-black);
    transform: translate(-50%, -50%);
    transition: transform 0.3s;
}
.ks-accordion__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.ks-accordion__item[open] .ks-accordion__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.ks-accordion__a {
    padding: 0 74px 26px 20px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ks-muted);
}
.ks-accordion__a ul { margin: 0 0 1em 18px; }
@media (max-width: 767px) { .ks-accordion__a { padding-right: 20px; } }

/* Smooth open/close. interpolate-size lets height animate to "auto";
   browsers without it simply open instantly, so nothing breaks. */
.ks-accordion__item { interpolate-size: allow-keywords; }
.ks-accordion__item::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition: block-size 0.4s ease, opacity 0.4s ease, content-visibility 0.4s allow-discrete;
}
.ks-accordion__item[open]::details-content { block-size: auto; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .ks-accordion__item::details-content { transition: none; }
}

/* ---------- Form fields ---------- */
.ks-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ks-field { display: grid; gap: 8px; min-width: 0; }      /* lets grid cells shrink below the date/select default width */
.ks-field--full { grid-column: 1 / -1; }
.ks-field__label { font-size: 14px; font-weight: 400; color: var(--ks-muted); }
.ks-input {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid var(--ks-line);
    border-radius: 6px;
    background: var(--ks-white);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    transition: border-color 0.2s;
}
.ks-input::placeholder { color: rgba(0, 0, 0, 0.5); }
.ks-input:focus { outline: none; border-color: var(--ks-wine); box-shadow: 0 0 0 3px var(--ks-wine-soft); }
textarea.ks-input { min-height: 104px; resize: vertical; }
select.ks-input {
    appearance: none;
    padding-right: 44px;
    background: var(--ks-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z'/%3E%3C/svg%3E") no-repeat right 20px center / 11px 7px;
}
.ks-field.has-error .ks-input { border-color: #c62828; }
.ks-field__error { font-size: 13px; color: #b71c1c; font-weight: 400; }
.ks-consent {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--ks-muted);
}
.ks-consent input { accent-color: var(--ks-wine); width: 13px; height: 13px; margin-top: 6px; flex-shrink: 0; }
.ks-consent a { text-decoration: underline; }
.ks-form__submit { grid-column: 1 / -1; justify-self: start; }
.ks-form__notice {
    grid-column: 1 / -1;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--ks-white);
    font-weight: 400;
}
.ks-honeypot { position: absolute; left: -9999px; }   /* spam trap, hidden from people */
@media (max-width: 767px) { .ks-form { grid-template-columns: 1fr; } }

/* ---------- Pill tabs / filter buttons (gallery page) ---------- */
.ks-tabs__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 60px;
}
.ks-tabs__tab {
    min-height: 40px;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 40px;
    background: var(--ks-white);
    font-family: var(--ks-font-ui);
    font-size: 15px;
    transition: background-color 0.3s, border-color 0.3s;
}
.ks-tabs__tab:hover { background: var(--ks-wine-pale); }
.ks-tabs__tab[aria-selected="true"], .ks-tabs__tab[aria-pressed="true"] { background: var(--ks-wine-pale); border-color: var(--ks-wine); }

/* ---------- Testimonial card ---------- */
.ks-review {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;                    /* reset <figure> default margin */
    padding: 50px 40px 70px;
    border-radius: var(--ks-radius-lg);
    background: var(--ks-white);
}
.ks-review__quote { width: 22px; height: 17px; margin-bottom: 36px; fill: var(--ks-gold-deep); }
.ks-review__stars { display: flex; gap: 2px; margin-bottom: 30px; color: var(--ks-gold-deep); font-size: 16px; }
.ks-review__stars .ks-icon { fill: currentColor; }
.ks-review__text {
    flex-grow: 1;
    margin: 0 0 40px;             /* reset <blockquote> default margin */
    font-family: var(--ks-font-head);
    font-size: 18px;
    line-height: 1.6;
}
.ks-review__person { display: flex; align-items: center; gap: 10px; }
.ks-review__avatar {          /* initials in a wine circle (no customer photos yet) */
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--ks-wine);
    color: var(--ks-white);
    font-family: var(--ks-font-head);
    font-size: 14px;
    font-weight: 500;
}
.ks-review__name { font-family: var(--ks-font-ui); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.ks-review__role { font-size: 12px; font-weight: 400; color: var(--ks-muted); }
@media (max-width: 767px) { .ks-review { padding: 40px 24px 50px; } }

/* ---------- Rating badge (star + average score) ---------- */
.ks-rating { display: flex; align-items: center; gap: 15px; }
.ks-rating__logo {
    display: grid;
    place-items: center;
    width: 55px; height: 55px;
    border-radius: 16px;
    background: var(--ks-cream);
}
.ks-rating__logo { color: var(--ks-gold-deep); font-size: 26px; }
.ks-rating__logo .ks-icon { fill: currentColor; }
.ks-rating__score { font-family: var(--ks-font-ui); font-size: 15px; font-weight: 500; line-height: 1.3; }
.ks-rating__label { font-size: 12px; font-weight: 400; }

/* ---------- Icon box holding a Lucide line icon (wine on white) ---------- */
.ks-icon-box .ks-icon { width: 28px; height: 28px; color: var(--ks-wine); stroke-width: 1.5; }

/* ---------- Gold ornament: line, diamond, line (our own SVG, see partials/ornament.php) ---------- */
.ks-ornament { display: block; width: 120px; height: 16px; margin: 24px auto 0; color: var(--ks-gold-deep); pointer-events: none; }
.ks-ornament--light { color: var(--ks-gold); }

/* Big faint diamond marks on wine and cream panels (replace the template's leaves) */
.ks-bg-mark { position: absolute; pointer-events: none; color: rgba(217, 171, 28, 0.14); }
.ks-bg-mark--light { color: rgba(110, 18, 48, 0.06); }

/* ---------- Floating WhatsApp button (every page) ---------- */
.ks-whatsapp {
    position: fixed;
    right: 20px; bottom: 20px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #1b7f45;            /* darker than WhatsApp green so the white icon passes contrast */
    color: var(--ks-white);
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s var(--ks-ease);
}
.ks-whatsapp .ks-icon { fill: currentColor; }
.ks-whatsapp:hover { transform: scale(1.08); }
@media (max-width: 767px) { .ks-whatsapp { right: 16px; bottom: 16px; width: 52px; height: 52px; } }
