@charset "utf-8";
/* =====================================================================
   Mobile / tablet layout for niproruda.com
   Applies only below 980px - the desktop site (960px) is unchanged.
   Loaded after style.css. Some rules need !important because the old
   scripts.js writes widths and backgrounds as inline styles.
   ===================================================================== */

/* the menu button exists only on small screens */
.menuToggle {
    display: none;
}

@media (max-width: 979px) {

    html {
        overflow-y: auto;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    *, *::before, *::after {
        box-sizing: border-box;
    }
    body {
        background: #fff;
        font-size: 15px;
        line-height: 1.5;
    }
    h1 { font-size: 20px; }
    h2 { font-size: 17px; }

    /* ---------- page frame: one column, sensible order ---------- */
    .site {
        width: auto;
        padding: 0 12px;
        display: flex;
        flex-direction: column;
    }
    .site > * { order: 10; }
    .site > .header      { order: 1; }
    .site > .topImage    { order: 2; }
    .site > .leftMenu    { order: 3; }
    .site > .content     { order: 4; }
    .site > .rightMenu   { order: 5; }
    .site > a:not(.smarkethink) { order: 6; }   /* LinkedIn bar */
    .site > .smarkethink { order: 7; }
    .site > .clear { display: none; }

    /* ---------- header: logo + menu button, slogan, search ---------- */
    .header {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        padding: 10px 0 8px;
        border-bottom: 1px solid #ddd;
    }
    .header > a:first-child {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
    .logo {
        position: static;
        width: 230px;
        max-width: 100%;
        height: 63px;
        background: url('/template/images/logo.jpg') left center / contain no-repeat;
    }
    .menuToggle {
        order: 2;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 14px;
        font: bold 15px Arial, Tahoma, Verdana, sans-serif;
        color: #fff;
        background: linear-gradient(#7fb02c, #3f6f1d);
        border: 1px solid #36611a;
        border-radius: 6px;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }
    .menuToggle .bars,
    .menuToggle .bars::before,
    .menuToggle .bars::after {
        display: block;
        width: 18px;
        height: 2px;
        background: #fff;
        border-radius: 1px;
        content: "";
        position: relative;
    }
    .menuToggle .bars::before { position: absolute; top: -6px; }
    .menuToggle .bars::after  { position: absolute; top: 6px; }
    .menuToggle:focus-visible {
        outline: 2px solid #f0a000;
        outline-offset: 2px;
    }
    .slogan {
        order: 3;
        position: static;
        width: 100%;
        max-width: 493px;
        height: auto;
        aspect-ratio: 493 / 29;
        background-size: contain;
    }
    .search {
        order: 4;
        position: static;
        width: 100%;
    }
    .searchForm form {
        display: flex;
        flex-direction: row-reverse;   /* the submit input comes first in the HTML */
    }
    .search input {
        border: 1px solid #bbb;
    }
    .search input[name="searchWord"] {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        height: 40px;
        padding: 0 10px;
        font-size: 16px;                /* 16px stops iOS from zooming in */
        background: #fff;
        border-radius: 6px 0 0 6px;
        border-right: 0;
    }
    .search input[type="submit"] {
        flex: 0 0 46px;
        height: 40px;
        cursor: pointer;
        border-radius: 0 6px 6px 0;
        border-color: #36611a;
        background: #4f8a22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='M15 15l6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    }

    /* ---------- main menu: collapsible ---------- */
    .menu {
        order: 5;
        position: static;
        display: none;
        width: 100%;
        height: auto;
        line-height: 1.4;
        border: 1px solid #ddd;
        border-radius: 6px;
        overflow: hidden;
    }
    .menu.open {
        display: block;
    }
    .menuButton,
    .menuButton:hover {
        float: none;
        width: auto;
        height: auto;
        margin: 0;
        padding: 0;
        text-align: left;
        font-size: 16px;
        line-height: 1.4;
        border: 0;
        border-bottom: 1px solid #e3e3e3;
        border-radius: 0;
        background: #f6f6f6;
    }
    .menuButton:last-child {
        border-bottom: 0;
    }
    .menuButton > a {
        display: block;
        padding: 12px 14px;
        color: #444;
    }
    .menuButton > a[href="#"] {        /* section with a sub menu */
        font-weight: bold;
        color: #3f6f1d;
        cursor: default;
    }
    .subMenu {
        display: block !important;      /* always open on phones (hover does not exist) */
        position: static;
        min-width: 0;
        white-space: normal;
        border: 0;
        padding: 0 0 6px;
        background: #fff;
    }
    .subMenu a {
        display: block;
    }
    .subMenu li {
        list-style: none;
        padding: 9px 14px 9px 28px;
        font-size: 15px;
        border-top: 1px solid #f0f0f0;
    }

    /* ---------- top image + home page slider ---------- */
    .topImage {
        margin-top: 12px;
    }
    .topImage img {
        width: 100%;
        height: auto;
        display: block;
    }
    .topImage .mimg {
        width: 100% !important;
        height: auto;
        aspect-ratio: 960 / 363;
        background-size: 100% auto !important;
    }
    /* click areas of the slider, converted from px to % of 960x363 */
    .topImage .gotourl     { left: 4.79%;  top: 22%; width: 47.9%;  height: 30.3%; }
    .topImage .prevB       { left: 0;      top: 22%; width: 4.17%;  height: 31.7%; }
    .topImage .nextB       { left: 52.08%; top: 22%; width: 4.17%;  height: 31.7%; }
    .topImage .staticButton1, .topImage .staticButton2, .topImage .staticButton3, .topImage .staticButton4,
    .topImage .staticButton5, .topImage .staticButton6, .topImage .staticButton7 {
        width: 14.17%;
        height: 22.3%;
        bottom: 2.75%;
    }
    .topImage .staticButton1 { left: 0; }
    .topImage .staticButton2 { left: 14.27%; }
    .topImage .staticButton3 { left: 28.65%; }
    .topImage .staticButton4 { left: 42.92%; }
    .topImage .staticButton5 { left: 57.29%; }
    .topImage .staticButton6 { left: 71.56%; }
    .topImage .staticButton7 { left: auto; right: 0; }

    /* ---------- section menu (left column) ---------- */
    .leftMenu {
        position: static;
        float: none;
        width: auto;
        margin-top: 12px;
        padding: 4px 14px 12px;
        background: #f6f6f6;
        border: 1px solid #e3e3e3;
        border-radius: 8px;
    }
    .leftMenu li {
        margin-top: 10px;
    }

    /* ---------- content ---------- */
    .content {
        width: auto !important;
        padding-left: 0 !important;
        float: none;
        margin-top: 12px;
    }
    .cinfo,
    .homeInfo {
        padding: 14px;
        border-radius: 10px;
        overflow-wrap: break-word;
    }
    .cinfo img,
    .homeInfo img {
        max-width: 100% !important;
        height: auto !important;
    }
    .cinfo img[align],
    .cinfo img[style*="float"] {
        float: none !important;
        display: block;
        margin: 8px auto !important;
    }
    .cinfo table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .cinfo iframe,
    .cinfo video,
    .cinfo embed,
    .cinfo object {
        max-width: 100% !important;
    }
    .osm-map iframe {
        width: 100% !important;
    }

    /* home page news + anniversary boxes */
    .hform,
    .hform2,
    .hformh2 {
        position: static;
        float: none;
        width: auto;
        margin: 0 0 15px;
    }

    /* ---------- right column: contact form, anniversary ---------- */
    .rightMenu {
        float: none;
        width: auto;
        margin-top: 15px;
    }
    .cform .ccontent input,
    .cform .ccontent textarea {
        width: 100%;
        font-size: 16px;
        padding: 8px;
        border: 1px solid #bbb;
        border-radius: 4px;
    }
    .cform .ccontent textarea {
        min-height: 110px;
    }
    .cform .cf-turnstile {
        transform: none;
        margin-bottom: 0;
    }
    .cform .ccontent input.cform-submit {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
    .hform2 {
        height: auto;
    }
    .hform2 .ccontent {
        height: auto;
    }

    /* ---------- LinkedIn bar + footer ---------- */
    .linedin {
        width: 100%;
    }
    .footer {
        margin: 15px 12px 20px;
    }
    .footer img {
        max-width: 100%;
        height: auto;
    }
    .smarkethink {
        position: static;
        display: block;
        margin: 15px 0 0;
        text-align: center;
    }
    .smarkethink img {
        filter: brightness(0.45);       /* white logo -> grey, visible on white */
    }
}
