/**
 * KD-Kit – Color Palettes
 *
 * Global stylesheet for the Renk Paleti system.
 * 8 corporate palettes × 7 CSS custom properties.
 *
 * Architecture
 * ─────────────
 *  • .kd-palette-{N}  → defines --kd-primary … --kd-active on the
 *                        Elementor widget wrapper (via prefix_class).
 *  • Override rules    → map those vars to concrete widget selectors.
 *  • Scope selector    → [class*="kd-palette-"]:not(.kd-palette-none)
 *  • Uses !important   → guarantees override over all preset rules
 *                        regardless of specificity order.
 */

/* ═══════════════════════════════════════════════════════════════
 *  1. PALETTE DEFINITIONS
 * ═══════════════════════════════════════════════════════════════ */

.kd-palette-1 {
    --kd-primary:   #0F172A;
    --kd-secondary: #1E3A8A;
    --kd-title:     #111827;
    --kd-desc:      #6B7280;
    --kd-bg:        #F8FAFC;
    --kd-hover:     #1D4ED8;
    --kd-active:    #0B1220;
}

.kd-palette-2 {
    --kd-primary:   #0F4C5C;
    --kd-secondary: #1B6B7A;
    --kd-title:     #0F172A;
    --kd-desc:      #667085;
    --kd-bg:        #F7FAFC;
    --kd-hover:     #146C7E;
    --kd-active:    #0B3B47;
}

.kd-palette-3 {
    --kd-primary:   #1F2937;
    --kd-secondary: #374151;
    --kd-title:     #111827;
    --kd-desc:      #6B7280;
    --kd-bg:        #F9FAFB;
    --kd-hover:     #4B5563;
    --kd-active:    #0F172A;
}

.kd-palette-4 {
    --kd-primary:   #1D3557;
    --kd-secondary: #457B9D;
    --kd-title:     #0B1320;
    --kd-desc:      #5B6472;
    --kd-bg:        #F8FAFC;
    --kd-hover:     #2C5282;
    --kd-active:    #13263F;
}

.kd-palette-5 {
    --kd-primary:   #14532D;
    --kd-secondary: #1F7A4C;
    --kd-title:     #111827;
    --kd-desc:      #6B7280;
    --kd-bg:        #F7FDF9;
    --kd-hover:     #15803D;
    --kd-active:    #0F3D22;
}

.kd-palette-6 {
    --kd-primary:   #111111;
    --kd-secondary: #2B2B2B;
    --kd-title:     #171717;
    --kd-desc:      #737373;
    --kd-bg:        #FAFAFA;
    --kd-hover:     #3F3F46;
    --kd-active:    #000000;
}

.kd-palette-7 {
    --kd-primary:   #5B2333;
    --kd-secondary: #7A3147;
    --kd-title:     #1F2937;
    --kd-desc:      #6B7280;
    --kd-bg:        #FCFAFB;
    --kd-hover:     #8B3A54;
    --kd-active:    #451A26;
}

.kd-palette-8 {
    --kd-primary:   #1E2A38;
    --kd-secondary: #C2A878;
    --kd-title:     #111827;
    --kd-desc:      #6B7280;
    --kd-bg:        #F8F5F0;
    --kd-hover:     #2A3B4F;
    --kd-active:    #111C27;
}

/* ═══════════════════════════════════════════════════════════════
 *  2. WIDGET OVERRIDES  (!important to beat all preset rules)
 *
 *  Scope:  [class*="kd-palette-"]:not(.kd-palette-none)
 * ═══════════════════════════════════════════════════════════════ */

/* ── 2-A  TITLE / HEADING ───────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero__heading,
    .kdkit-heading__title,
    .kdkit-cta__heading,
    .kdkit-sb__title,
    .kdkit-pt__plan,
    .kdkit-ib__title,
    .kdkit-tm__name,
    .kdkit-tc__name,
    .kdkit-team__name,
    .kdkit-as__heading,
    .kdkit-bn__title,
    .kdkit-acc__title,
    .kdkit-blog-card__title,
    .kdkit-cf__title,
    .kdkit-alert__title,
    .kdkit-info-box__title,
    .kdkit-is__heading,
    .kdkit-counter__title,
    .kdkit-image-box__title,
    .kdkit-oc__title,
    .kdkit-pie__title,
    .kdkit-pf__title,
    .kdkit-pf-card__title,
    .kdkit-pb__title,
    .kdkit-svc-card__title,
    .kdkit-sm__header-title,
    .kdkit-slider__title,
    .kdkit-vg__title,
    .kdkit-gallery__title,
    .kdkit-wcg__title,
    .kdkit-cs__title,
    .kdkit-mc__header-title,
    .kdkit-mc__item-title,
    .kdkit-wpc__title,
    .kdkit-wg__title,
    .kdkit-pl__title,
    .kdkit-pt__heading,
    .kdkit-nav__link-text
) {
    color: var(--kd-title) !important;
}

/* ── 2-B  DESCRIPTION / BODY TEXT + inner p/span/li ─────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero__subheading,
    .kdkit-heading__desc,
    .kdkit-cta__desc,
    .kdkit-sb__desc,
    .kdkit-pt__desc,
    .kdkit-ib__desc,
    .kdkit-tm__text,
    .kdkit-tc__text,
    .kdkit-team__bio,
    .kdkit-as__desc,
    .kdkit-bn__desc,
    .kdkit-acc__body-inner,
    .kdkit-blog-card__excerpt,
    .kdkit-cf__desc,
    .kdkit-alert__message,
    .kdkit-info-box__desc,
    .kdkit-is__desc,
    .kdkit-counter__desc,
    .kdkit-image-box__desc,
    .kdkit-pie__desc,
    .kdkit-pf-card__desc,
    .kdkit-pb__desc,
    .kdkit-svc-card__desc,
    .kdkit-slider__desc,
    .kdkit-wcg__desc,
    .kdkit-pl__desc,
    .kdkit-wg__excerpt,
    .kdkit-icon-list__text,
    .kdkit-vbtn__label
) {
    color: var(--kd-desc) !important;
}

/* Desc inner p/span/li elements (beat preset rules like .preset .desc p) */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero__subheading,
    .kdkit-heading__desc,
    .kdkit-cta__desc,
    .kdkit-sb__desc,
    .kdkit-pt__desc,
    .kdkit-ib__desc,
    .kdkit-tm__text,
    .kdkit-tc__text,
    .kdkit-team__bio,
    .kdkit-as__desc,
    .kdkit-bn__desc,
    .kdkit-acc__body-inner,
    .kdkit-blog-card__excerpt,
    .kdkit-cf__desc,
    .kdkit-alert__message,
    .kdkit-info-box__desc,
    .kdkit-is__desc,
    .kdkit-counter__desc,
    .kdkit-image-box__desc,
    .kdkit-pie__desc,
    .kdkit-pf-card__desc,
    .kdkit-pb__desc,
    .kdkit-svc-card__desc,
    .kdkit-slider__desc,
    .kdkit-wcg__desc,
    .kdkit-pl__desc,
    .kdkit-wg__excerpt
) :is(p, span, li) {
    color: var(--kd-desc) !important;
}

/* ── 2-C  SUBTITLE / SECONDARY TEXT ─────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-heading__subtitle,
    .kdkit-as__subtitle,
    .kdkit-bn__subtitle,
    .kdkit-is__subtitle,
    .kdkit-slider__subtitle,
    .kdkit-tm__title,
    .kdkit-tc__title,
    .kdkit-team__pos,
    .kdkit-pf__sub,
    .kdkit-pf-card__sub,
    .kdkit-blog-card__meta,
    .kdkit-blog-card__cat,
    .kdkit-as__feature-text,
    .kdkit-is__feat-text,
    .kdkit-svc-card__number,
    .kdkit-heading__number,
    .kdkit-pt__period,
    .kdkit-cd__label,
    .kdkit-pb__label,
    .kdkit-pb__percent,
    .kdkit-vg__cat,
    .kdkit-vg__duration,
    .kdkit-wcg__count,
    .kdkit-ic__label,
    .kdkit-cl__name
) {
    color: var(--kd-secondary) !important;
}

/* ── 2-D  BACKGROUND ────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero,
    .kdkit-cta,
    .kdkit-as,
    .kdkit-is,
    .kdkit-slider__slide,
    .kdkit-sb,
    .kdkit-ib,
    .kdkit-info-box,
    .kdkit-image-box,
    .kdkit-alert,
    .kdkit-blog-card__body,
    .kdkit-svc-card,
    .kdkit-pf-card,
    .kdkit-tabs__panel,
    .kdkit-cf,
    .kdkit-oc__panel,
    .kdkit-sm__panel
) {
    background-color: var(--kd-bg) !important;
}

/* ── 2-E  BUTTONS / CTA – Normal ───────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero__btn,
    .kdkit-cta__btn,
    .kdkit-as__btn,
    .kdkit-bn__btn,
    .kdkit-is__btn,
    .kdkit-info-box__btn,
    .kdkit-image-box__btn,
    .kdkit-pt__btn,
    .kdkit-svc-card__btn,
    .kdkit-slider__btn,
    .kdkit-blog-card__read-more,
    .kdkit-ib__readmore,
    .kdkit-btn,
    .kdkit-dual-btn__item,
    .kdkit-atc__btn,
    .kdkit-cs__cart-btn,
    .kdkit-wpc__cart-btn,
    .kdkit-wg__cart-btn,
    .kdkit-pl__cart-btn,
    .kdkit-mc__btn,
    .kdkit-pb__btn,
    .kdkit-nav__toggle
) {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
    border-color: var(--kd-primary) !important;
}

/* ── 2-F  BUTTONS / CTA – Hover ────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero__btn,
    .kdkit-cta__btn,
    .kdkit-as__btn,
    .kdkit-bn__btn,
    .kdkit-is__btn,
    .kdkit-info-box__btn,
    .kdkit-image-box__btn,
    .kdkit-pt__btn,
    .kdkit-svc-card__btn,
    .kdkit-slider__btn,
    .kdkit-blog-card__read-more,
    .kdkit-ib__readmore,
    .kdkit-btn,
    .kdkit-dual-btn__item,
    .kdkit-atc__btn,
    .kdkit-cs__cart-btn,
    .kdkit-wpc__cart-btn,
    .kdkit-wg__cart-btn,
    .kdkit-pl__cart-btn,
    .kdkit-mc__btn,
    .kdkit-pb__btn,
    .kdkit-nav__toggle
):hover {
    background-color: var(--kd-hover) !important;
    border-color: var(--kd-hover) !important;
    color: #fff !important;
}

/* ── 2-G  ACTIVE STATES ─────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-tabs__nav-item,
    .kdkit-gallery__filter-btn,
    .kdkit-pf__filter-btn,
    .kdkit-vg__filter
).is-active {
    background-color: var(--kd-active) !important;
    color: #fff !important;
    border-color: var(--kd-active) !important;
}

/* Accordion – header hover */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__header:hover {
    color: var(--kd-hover) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__header:hover .kdkit-acc__title {
    color: var(--kd-hover) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__header:hover .kdkit-acc__indicator {
    color: var(--kd-hover) !important;
}

/* Accordion – item hover border */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__item:hover {
    border-color: var(--kd-hover) !important;
}

/* Accordion – active item */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__item.is-active {
    border-color: var(--kd-active) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__item.is-active .kdkit-acc__title,
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-acc__item.is-active .kdkit-acc__indicator {
    color: var(--kd-active) !important;
}

/* ── 2-H  ICONS / ACCENT (text-based) ──────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sb__icon,
    .kdkit-info-box__icon,
    .kdkit-svc-card__icon,
    .kdkit-cta__icon,
    .kdkit-counter__icon,
    .kdkit-icon-list__icon,
    .kdkit-as__feature-icon,
    .kdkit-is__feat-icon,
    .kdkit-alert__icon,
    .kdkit-heading__deco,
    .kdkit-cf__info-icon
) {
    color: var(--kd-primary) !important;
}

/* Icon containers */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sb__icon-wrap,
    .kdkit-info-box__icon-wrap,
    .kdkit-svc-card__icon-wrap
) {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

/* ── 2-I  BADGES ─────────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-hero__badge,
    .kdkit-as__badge,
    .kdkit-is__badge,
    .kdkit-bn__badge,
    .kdkit-sb__badge,
    .kdkit-ib__badge,
    .kdkit-pt__badge,
    .kdkit-blog-card__cat-badge,
    .kdkit-wg__badge,
    .kdkit-wpc__badge,
    .kdkit-pl__badge,
    .kdkit-cs__badge,
    .kdkit-pb__badge,
    .kdkit-image-box__badge
) {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

/* ── 2-J  PRICES / NUMBERS / ACCENT VALUES ──────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-pt__amount,
    .kdkit-pt__currency,
    .kdkit-counter__number,
    .kdkit-cd__num,
    .kdkit-pie__percent,
    .kdkit-as__badge-num,
    .kdkit-is__badge-num,
    .kdkit-atc__price,
    .kdkit-pb__price,
    .kdkit-pl__price,
    .kdkit-wg__price,
    .kdkit-wpc__price,
    .kdkit-cs__price,
    .kdkit-mc__total-amount
) {
    color: var(--kd-primary) !important;
}

/* ── 2-K  PROGRESS & CHART FILLS ───────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-pb__fill {
    background-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-pie__bar {
    stroke: var(--kd-primary) !important;
}

/* ── 2-L  LINKS / READ-MORE TEXT ───────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sb__link,
    .kdkit-alert__link,
    .kdkit-sm__social-link,
    .kdkit-team__social a,
    .kdkit-pf-card__link
) {
    color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sb__link,
    .kdkit-alert__link,
    .kdkit-pf-card__link
):hover {
    color: var(--kd-hover) !important;
}

/* ── 2-M  TABS NAV ─────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-tabs__nav-item {
    color: var(--kd-desc) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-tabs__nav-item:hover {
    color: var(--kd-hover) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-tabs__nav-item.is-active {
    color: var(--kd-primary) !important;
    border-color: var(--kd-primary) !important;
}

/* ── 2-N  CONTACT FORM ─────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-cf__input,
    .kdkit-cf__textarea
):focus {
    border-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-cf__form button[type="submit"] {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
    border-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-cf__form button[type="submit"]:hover {
    background-color: var(--kd-hover) !important;
    border-color: var(--kd-hover) !important;
}

/* ── 2-O  SLIDER / CAROUSEL ARROWS & DOTS ──────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-slider__dot.is-active,
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-tc__dots .is-active {
    background-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-slider__arrow,
    .kdkit-tc__arrow,
    .kdkit-wpc__arrow,
    .kdkit-tm__nav
) {
    color: var(--kd-primary) !important;
    border-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-slider__arrow,
    .kdkit-tc__arrow,
    .kdkit-wpc__arrow,
    .kdkit-tm__nav
):hover {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

/* ── 2-P  PRICING TABLE HEADER ─────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-pt__header {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-pt__features .kdkit-pt__feat-icon {
    color: var(--kd-primary) !important;
}

/* ── 2-Q  VIDEO BUTTON ─────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-vbtn__play {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-vbtn__play:hover {
    background-color: var(--kd-hover) !important;
}

/* ── 2-R  SOCIAL SHARE ─────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-social__item {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-social__item:hover {
    background-color: var(--kd-hover) !important;
}

/* ── 2-S  OVERLAYS ─────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-bn__overlay,
    .kdkit-pf__overlay,
    .kdkit-pf-card__overlay,
    .kdkit-gallery__overlay,
    .kdkit-image-box__overlay,
    .kdkit-team__overlay
) {
    background-color: var(--kd-primary) !important;
}

/* ── 2-T  PROGRESS BAR TRACK / COUNTDOWN ───────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-pb__track {
    background-color: var(--kd-bg) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-cd__item {
    background-color: var(--kd-bg) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-cd__num {
    color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-cd__sep {
    color: var(--kd-secondary) !important;
}

/* ── 2-U  SIDE MENU / OFF-CANVAS ──────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sm__link-text,
    .kdkit-oc__body a
) {
    color: var(--kd-title) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sm__link-text,
    .kdkit-oc__body a,
    .kdkit-nav__link-text
):hover {
    color: var(--kd-hover) !important;
}

/* ── 2-V  MINI CART ────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-mc__toggle {
    color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-mc__count {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

/* ── 2-W  RIBBONS ──────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) :is(
    .kdkit-sb__ribbon,
    .kdkit-ib__ribbon,
    .kdkit-cta__ribbon
) {
    background-color: var(--kd-secondary) !important;
    color: #fff !important;
}

/* ── 2-X  NAV MENU ─────────────────────────────────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-nav__indicator {
    color: var(--kd-secondary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kdkit-nav__hamburger-line {
    background-color: var(--kd-primary) !important;
}

/* ── 2-Y  WOO PRODUCT IMAGES (kd-pi-* prefix) ─────────────── */
[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-badge {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-nav {
    color: var(--kd-primary) !important;
    border-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-nav:hover {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-thumb.is-active {
    border-color: var(--kd-primary) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-lb-trigger {
    background-color: var(--kd-primary) !important;
    color: #fff !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-lb-trigger:hover {
    background-color: var(--kd-hover) !important;
}

[class*="kd-palette-"]:not(.kd-palette-none) .kd-pi-oos {
    color: var(--kd-secondary) !important;
}
