/* Vivancar - additions on top of the exported Duda CSS (things the Duda runtime used to do in JS). */

/* Entrance animations: elements are revealed by site.js when they scroll into view. */
.anim-in {
    visibility: visible !important;
    animation: vcFadeIn .7s ease-out both;
}
@keyframes vcFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .anim-in { animation: none; }
}

/* Contact forms */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-feedback {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.4;
}
.form-feedback.is-ok    { color: #2e7d32; }
.form-feedback.is-error { color: #c62828; }
form[data-site-form].is-sending input[type="submit"] {
    opacity: .6;
    pointer-events: none;
}
form[data-site-form] .dmforminput.has-error input,
form[data-site-form] .dmforminput.has-error select,
form[data-site-form] .dmforminput.has-error textarea {
    border-color: #c62828 !important;
}

/* Blog search (the Duda widget had no real form) */
.dmBlogSearch .dmBlogSearchWrapper { position: relative; }
.dmBlogSearch .dmBlogSearchIcon {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.blog-empty {
    padding: 20px 0;
    text-align: center;
}

/* Blog post body (rendered from Markdown) */
.post-body p { margin: 0 0 1em; }
.post-body p:last-child { margin-bottom: 0; }
.post-body h2, .post-body h3 { margin: 1.4em 0 .5em; line-height: 1.25; }
.post-body ul, .post-body ol { margin: 0 0 1em 1.4em; }
.post-body img { max-width: 100%; height: auto; display: block; margin: 1em auto; }
.post-body blockquote { margin: 1em 0; padding: .5em 1em; border-left: 4px solid var(--color_4); background: #f6f6f6; }
.post-body a { color: var(--color_4); text-decoration: underline; }
.post-body table { border-collapse: collapse; margin: 1em 0; width: 100%; }
.post-body td, .post-body th { border: 1px solid #ddd; padding: 6px 10px; }

/* 404 */
.not-found { min-height: 50vh; display: flex; align-items: center; justify-content: center; padding: 60px 4%; text-align: center; }
.not-found__inner h1 { margin-bottom: 12px; }
.not-found__inner p { margin-bottom: 24px; }

/* Blog cards: Duda's runtime used to size the image box in JS. */
.mainBlog.layout4 .blogImg { height: 190px; }
.mainBlog.layout4[posts-per-row="2"] .blogImg { height: 250px; }
@media (max-width: 767px) {
    .mainBlog.layout4 .blogImg, .mainBlog.layout4[posts-per-row="2"] .blogImg { height: 200px; }
}

/* Mobile drawer: Duda's runtime toggled visibility in JS; CSS alone leaves it hidden. */
.runtime-module-container .layout-drawer[open],
.runtime-module-container.layout-drawer_open .layout-drawer-overlay {
    visibility: visible !important;
}
.runtime-module-container .layout-drawer:not([open]) {
    visibility: hidden !important;
}
.hamburger-drawer li.has-sub-nav > ul {
    display: none !important;
}
.hamburger-drawer li.has-sub-nav.sub-nav-open > ul {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    visibility: visible !important;
    position: static !important;
    transform: none !important;
}
.hamburger-drawer li.has-sub-nav.sub-nav-open > a .icon-angle-down {
    transform: rotate(180deg);
    display: inline-block;
}
.layout-drawer_open ~ .floating-icons,
body:has(.layout-drawer_open) .floating-icons { display: none; }

/* Keep platform shortcuts clear of the page heading on small screens. */
@media (max-width: 767px) {
    .floating-icons {
        display: flex;
        gap: 8px;
        top: auto;
        right: auto;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: calc(12px + env(safe-area-inset-left));
        transform: none;
    }

    .floating-icons .icon-container {
        width: 72px;
        height: 56px;
        margin: 0;
        padding: 4px;
        line-height: 12px;
    }

    .floating-icons .icon-container img {
        width: 19px;
        height: 19px;
        margin-bottom: 2px;
    }

    .floating-icons .icon-container a {
        font-size: 10px;
    }
}
