/* KP Footer */
:root { --kp-f-orange: #e95e23; }

/* Divi footer wrapper — nullimine ja positsioneerimine */
.et-l--footer {
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    z-index: 1 !important;
    display: block !important;
    width: 100% !important;
}
.et-l--footer .et_builder_inner_content,
.et-l--footer .et_pb_section,
.et-l--footer .et_pb_row,
.et-l--footer .et_pb_column,
.et-l--footer .et_pb_module {
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
}

.kp-footer {
    font-family: 'Dosis', sans-serif;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.kp-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    box-sizing: border-box;
}

/* ── ÜKSAINUS RIDA ── */
.kp-footer-container { position: relative; }
.kp-footer-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 0 !important;
    flex-wrap: wrap !important;
    row-gap: 0 !important;
    gap: 0 !important;
}

/* Menüü */
.kp-footer-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.kp-footer-menu li { margin: 0; }
.kp-footer-menu a {
    display: inline-block;
    padding: 5px 14px;
    color: #fff;
    text-decoration: none;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 5px;
    transition: color .18s, background .18s;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,.12);
}
.kp-footer-menu li:first-child a { padding-left: 0; }
.kp-footer-menu li:last-child a  { border-right: none; }
.kp-footer-menu a:hover,
.kp-footer-menu .current-menu-item a {
    color: #fff;
    background: rgba(255,255,255,.08);
}

/* Eraldaja */
.kp-footer-sep {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,.15);
    margin: 0 16px;
    flex-shrink: 0;
}

/* Andmekirje */
.kp-footer-item {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 23px;
    font-weight: 500;
    white-space: nowrap;
    margin-right: 16px;
    padding: 5px 8px;
    border-radius: 6px;
    transition: color .18s, background .18s;
}
a.kp-footer-item:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}
.kp-footer-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(233,94,35,.25);
    border: 1px solid rgba(233,94,35,.45);
    color: var(--kp-f-orange);
    flex-shrink: 0;
    transition: background .18s, border-color .18s, transform .18s;
}
a.kp-footer-item:hover .kp-footer-item-icon {
    background: var(--kp-f-orange);
    border-color: var(--kp-f-orange);
    color: #fff;
    transform: scale(1.1);
}
.kp-footer-item--muted { color: #fff; font-size: 23px; }

/* Privaatsus */
.kp-footer-privacy { color: #fff; }
.kp-footer-privacy:hover { color: var(--kp-f-orange); }

/* Sotsiaal */
.kp-footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    text-decoration: none;
    margin-right: 6px;
    transition: background .2s, border-color .2s;
    flex-shrink: 0;
}
.kp-footer-social-link:hover {
    background: var(--kp-f-orange);
    border-color: var(--kp-f-orange);
}

/* Tagasi üles — paremas alumises nurgas */
.kp-footer-totop {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #e95e23;
    border: none;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    box-shadow: 0 4px 18px rgba(233,94,35,.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s, visibility .25s, transform .25s, background .2s;
}
.kp-footer-totop.kp-totop-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.kp-footer-totop:hover {
    background: #c94e18;
}


@media (max-width: 768px) {
    .kp-footer-sep    { display: none; }
    .kp-footer-menu a { font-size: 11px; padding: 3px 8px; }
    .kp-footer-item   { font-size: 11px; margin-right: 10px; }
    .kp-footer-container { padding: 0 16px; }
}

/* ── STICKY FOOTER — jalus alati lehe allservas ── */
html {
    height: 100%;
}
body {
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}
/* Divi peamine ümbris täidab ülejäänud kõrguse */
#page-container {
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}
#et-main-area {
    flex: 1 0 auto !important;
}
.et-l--footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

/* ── DIVI VISUAL BUILDER ── */
body.et_pb_preview .kp-footer,
body.et_fb_root_ancestor .kp-footer {
    position: static !important;
}
body.et_pb_preview .et-l--footer,
body.et_fb_root_ancestor .et-l--footer {
    height: auto !important;
    display: block !important;
}
/* VB: sticky footer keelamine, et drag-and-drop töötaks */
body.et_pb_preview,
body.et_fb_root_ancestor {
    display: block !important;
    min-height: unset !important;
}
body.et_pb_preview #page-container,
body.et_fb_root_ancestor #page-container {
    flex: unset !important;
    display: block !important;
}
body.et_pb_preview #et-main-area,
body.et_fb_root_ancestor #et-main-area {
    flex: unset !important;
}
