/* ============================================================
   INDEX2 - responsywny układ kafelków
   ============================================================ */
* { box-sizing: border-box; }

html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { margin: 0; }

#container {
    width: 98%;
    max-width: 1600px;
    margin: 0 auto;
}

#zawartosc {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

#srodek {
    float: none;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}

#lewa {
    display: none;
    float: none;
    width: 220px;
    flex: 0 0 220px;
}

#body_srodek { width: 100%; }

.skroty-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.skroty-head h2 {
    margin: 0;
}

.skroty-szukaj {
    width: 180px;
    max-width: 42vw;
    height: 28px;
    padding: 3px 8px;
    border: 1px solid #aaa;
    border-radius: 3px;
    background: #fff;
    font: 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

.skroty-szukaj:focus {
    outline: 2px solid #1d4ed8;
    outline-offset: 1px;
}

.skroty-grupa {
    display: block;
    width: 100%;
    margin: 12px 0 0;
    clear: both;
}

.skroty-grupa-tytul {
    margin: 0;
    padding: 6px 8px;
    color: #fff;
    font: bold 12px Verdana, Geneva, Arial, Helvetica, sans-serif;
    background: #4a4a4a;
    border: 1px solid #777;
    border-bottom: 0;
}

.skroty-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    border-top: 1px solid #777;
    border-left: 1px solid #999;
}

.skrot-kafelek {
    min-width: 0;
    background: #fff;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
}

.skrot-tytul {
    min-height: 33px;
    padding: 7px 6px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #333;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.25;
    font-weight: bold;
    background: #d9d9d9;
}

.skrot-logo {
    height: 98px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.skrot-logo a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skrot-logo img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 88%;
    max-height: 62px;
    object-fit: contain;
}

.skrot-logo a:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: -3px;
}

/* Tablet */
@media (max-width: 1000px) {
    #container { width: 100%; padding: 0 8px; }
    #lewa { width: 190px; flex-basis: 190px; }
    .skroty-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Telefon / mały tablet */
@media (max-width: 768px) {
    body { font-size: 14px; }
    #container { width: 100%; padding: 0; }

    #naglowek {
        height: auto;
        overflow: visible;
    }

    #logo_napis {
        margin: 0;
        padding: 10px 8px;
    }

    #logo_flash { display: none; }

    #logo_menu {
        margin: 0;
        padding: 11px 14px;
        min-height: 42px;
        font-size: 14px;
    }

    #logo_menu a {
        display: inline-block;
        padding: 5px 3px;
    }

    #zawartosc {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    #srodek {
        order: 1;
        width: 100%;
    }

    #lewa {
        order: 2;
        width: 100%;
        flex: 0 0 auto;
        margin-top: 8px;
    }

    #menu_bok {
        float: none;
        width: 100%;
        border-right: 0;
    }

    .skroty-head {
        align-items: stretch;
    }

    .skroty-szukaj {
        width: 150px;
        max-width: 45vw;
    }

    .skroty-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-left: 0;
    }

    .skrot-tytul {
        min-height: 40px;
        padding: 7px 5px;
        font-size: 12px;
    }

    .skrot-logo {
        height: 92px;
        padding: 8px;
    }

    .skrot-logo img {
        max-width: 92%;
        max-height: 58px;
    }

    .menu_tytul { font-size: 12px; padding: 6px; }
    .menu_pozycja { font-size: 12px; padding: 8px 12px; }
    #stopka { margin-top: 8px; padding: 10px 5px; }
}

/* Bardzo wąski telefon */
@media (max-width: 420px) {
    .skroty-grid { grid-template-columns: 1fr; }
    .skrot-tytul { min-height: 34px; font-size: 13px; }
    .skrot-logo { height: 84px; }
    .skrot-logo img { max-height: 54px; }
}

/* ============================================================
   MENU GŁÓWNE
   ============================================================ */
#logo_menu.kms-menu {
    position: relative;
    margin-top: 2px;
    padding: 0;
    min-height: 40px;
    background: url('/images/tlo.jpg') repeat;
    border-bottom: 2px solid #ff6a61;
    overflow: visible !important;
    z-index: 200;
}

.kms-menu-top {
    min-height: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 4px 48px 4px 10px;
    box-sizing: border-box;
}

.kms-menu-top.kms-menu-no-toggle {
    padding-right: 8px;
}

.kms-menu-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
}

.kms-menu-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.kms-menu-icon:hover,
.kms-menu-icon:focus-visible {
    color: #f2f2f2 !important;
    outline: none;
}

.kms-menu-toggle {
    position: absolute;
    top: 5px;
    right: 8px;
    width: 34px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 3px;
    background: rgba(255,255,255,.08);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.kms-menu-toggle-lines {
    width: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kms-menu-toggle-lines span {
    display: block;
    height: 2px;
    background: #fff;
}

.kms-menu-toggle:hover,
.kms-menu-toggle:focus-visible {
    background: rgba(255,255,255,.18);
    outline: none;
}


.kms-menu-toggle.kms-menu-toggle-visible {
    display: flex;
}

.kms-menu-links {
    display: none;
    position: absolute;
    right: 8px;
    top: 40px;
    z-index: 5000;
    width: 210px;
    background: url('/images/tlo.jpg') repeat;
    box-shadow: 0 5px 15px rgba(0,0,0,.28);
}

.kms-menu.kms-menu-open .kms-menu-links {
    display: block;
}

.kms-menu-links a {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #fff !important;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,.16);
    box-sizing: border-box;
}

.kms-menu-links a:last-child {
    border-bottom: 0;
}

.kms-menu-links a:hover,
.kms-menu-links a:focus-visible {
    background: rgba(255,255,255,.12);
    color: #fff !important;
    outline: none;
}

@media (max-width: 768px) {
    #logo_menu.kms-menu {
        min-height: 40px;
    }

    .kms-menu-top {
        min-height: 40px;
        height: 40px;
        padding: 4px 48px 4px 10px;
        gap: 10px;
    }

    .kms-menu-top.kms-menu-no-toggle {
        padding-right: 8px;
    }

    .kms-menu-toggle {
        top: 5px;
        right: 8px;
    }

    .kms-menu-links {
        top: 40px;
        right: 8px;
        width: 220px;
    }
}

@media (max-width: 420px) {
    .kms-menu-top {
        padding-right: 48px;
    }

    .kms-menu-top.kms-menu-no-toggle {
        padding-right: 8px;
    }

    .kms-menu-toggle {
        right: 8px;
    }

    .kms-menu-links {
        right: 8px;
        width: calc(100% - 16px);
    }
}

/* ============================================================
   SEO / WIZYTÓWKA FIRMY
   ============================================================ */
.seo-wizytowka {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    margin: 18px 0 22px;
    padding: 26px 28px;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-top: 5px solid #ff6a61;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    color: #222;
}

.seo-kicker {
    margin: 0 0 7px;
    color: #666;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.seo-wizytowka h1 {
    margin: 0 0 12px;
    color: #252525;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 700;
}

.seo-lead {
    max-width: 900px;
    margin: 0;
    color: #4a4a4a;
    font-size: 16px;
    line-height: 1.65;
}

.seo-uslugi {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.seo-uslugi span {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #f6f6f6;
    color: #333;
    font-size: 12px;
    font-weight: bold;
}

.seo-kontakt {
    padding: 18px;
    background: #f6f6f6;
    border-left: 4px solid #555;
    line-height: 1.55;
}

.seo-kontakt h2 {
    margin: 0 0 10px;
    color: #222;
    font-size: 18px;
}

.seo-kontakt address {
    margin: 0 0 12px;
    font-style: normal;
}

.seo-kontakt p {
    margin: 0;
}

.seo-kontakt a {
    color: #1b4f8a;
    text-decoration: none;
}

.seo-kontakt a:hover,
.seo-kontakt a:focus-visible {
    text-decoration: underline;
}

.skroty-section {
    margin: 0 0 8px;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}

.skroty-section h2 {
    margin: 0;
    padding: 0 2px;
    color: #333;
    font-size: 18px;
    line-height: 1.3;
}

@media (max-width: 900px) {
    .seo-wizytowka {
        grid-template-columns: 1fr;
        margin: 12px 8px 18px;
        padding: 20px;
    }

    .seo-kontakt {
        border-left: 0;
        border-top: 4px solid #555;
    }

    .skroty-section {
        margin-left: 8px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .seo-wizytowka {
        margin: 8px 0 14px;
        padding: 16px 14px;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
    }

    .seo-wizytowka h1 {
        font-size: 23px;
    }

    .seo-lead {
        font-size: 14px;
        line-height: 1.55;
    }
}


/* Numer wersji przy logo_napis */
.logo-wersja {
    font-size: 11px;
    font-weight: normal;
    opacity: 0.65;
    white-space: nowrap;
}


/* ============================================================
   NAGŁÓWEK / MENU - menu rozwijane musi wychodzić poza nagłówek
   ============================================================ */
#gora,
#naglowek,
#logo_menu.kms-menu {
    overflow: visible !important;
}

#gora,
#naglowek {
    position: relative;
    z-index: 100;
}

#logo_menu.kms-menu {
    z-index: 200;
}

.kms-menu-links {
    z-index: 5000;
}


/* ============================================================
   v1.12 - nagłówek/menu bez cieni i gradientów
   ============================================================ */

#logo_menu.kms-menu,
.kms-menu-top,
.kms-menu-links {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#logo_menu.kms-menu {
    background: #3f3f3f !important;
}

.kms-menu-top {
    background: #3f3f3f !important;
}

.kms-menu-links {
    background: #3f3f3f !important;
}

.kms-menu-toggle {
    box-shadow: none !important;
    text-shadow: none !important;
}



/* ============================================================
   v1.15 - tymczasowa diagnostyka responsywności w stopce
   ============================================================ */

.kms-responsive-debug {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid #777;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 1.4;
}

.kms-responsive-info,
.kms-responsive-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px 10px;
}

.kms-responsive-buttons {
    margin-top: 5px;
}

.kms-size-button {
    padding: 3px 7px;
    border: 1px solid #777;
    border-radius: 2px;
    background: #f2f2f2;
    color: #222;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 10px;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    text-shadow: none;
}

.kms-size-button:hover,
.kms-size-button:focus-visible {
    background: #fff;
    border-color: #333;
    outline: none;
}

@media (max-width: 480px) {
    .kms-responsive-debug {
        padding-left: 6px;
        padding-right: 6px;
    }

    .kms-responsive-info,
    .kms-responsive-buttons {
        gap: 4px 7px;
    }
}


/* ============================================================
   v1.15 - smartfon, viewport około 392 px
   Zmiany tylko dla małych ekranów.
   ============================================================ */

@media (max-width: 430px) {

    /* Wizytówka / SEO */
    .seo-wizytowka {
        margin: 8px 0 14px;
        padding: 14px 12px;
        gap: 16px;
    }

    .seo-wizytowka-main {
        text-align: center;
    }

    .seo-kicker {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .seo-wizytowka h1 {
        max-width: 360px;
        margin: 0 auto 12px;
        font-size: 25px;
        line-height: 1.08;
    }

    .seo-lead {
        max-width: 360px;
        margin: 0 auto;
        font-size: 14px;
        line-height: 1.48;
    }

    /* Usługi w dwóch kolumnach zamiast jednej długiej listy */
    .seo-uslugi {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        margin-top: 15px;
    }

    .seo-uslugi span {
        width: 100%;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 7px;
        text-align: center;
        font-size: 11px;
        line-height: 1.2;
    }

    /* Kontakt */
    .seo-kontakt {
        width: 100%;
        padding: 16px 12px;
        text-align: center;
    }

    .seo-kontakt h2 {
        font-size: 20px;
    }

    /* Serwisy: przy 392 px dwie kolumny */
    .skroty-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-left: 1px solid #999;
    }

    .skrot-tytul {
        min-height: 38px;
        padding: 6px 4px;
        font-size: 11px;
        line-height: 1.2;
    }

    .skrot-logo {
        height: 82px;
        padding: 6px;
    }

    .skrot-logo img {
        max-width: 94%;
        max-height: 56px;
    }

    .skroty-section {
        margin-left: 8px;
        margin-right: 8px;
    }

    .skroty-section h2 {
        font-size: 20px;
        line-height: 1.2;
    }
}

/* Bardzo wąskie telefony nadal jedna kolumna serwisów */
@media (max-width: 340px) {

    .seo-uslugi {
        grid-template-columns: 1fr;
    }

    .skroty-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   v1.15 - smartfon: symetryczne wyśrodkowanie sekcji serwisów
   ============================================================ */

@media (max-width: 430px) {

    .skroty-section {
        width: auto !important;
        max-width: none !important;
        margin-left: 12px !important;
        margin-right: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .skroty-section h2 {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: center;
    }

    .skroty-grid {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-left: 1px solid #999;
        border-right: 0;
    }

    .skrot-kafelek {
        width: auto !important;
        min-width: 0 !important;
    }
}


/* ============================================================
   v1.68 - równe marginesy całej strony na każdym viewportcie
   ============================================================ */

html,
body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

#container {
    width: calc(100% - 24px) !important;
    max-width: 1600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#gora,
#naglowek,
#zawartosc,
#srodek,
#body_srodek,
#stopka {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

#logo_menu.kms-menu {
    width: 100% !important;
    max-width: 100% !important;
}

.seo-wizytowka,
.skroty-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (max-width: 768px) {

    #container {
        width: calc(100% - 20px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (max-width: 430px) {

    #container {
        width: calc(100% - 16px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .seo-wizytowka,
    .skroty-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}



/* ============================================================
   v1.68 - popup logowania Fancybox
   ============================================================ */

.kms-login-popup {
    width: 92vw;
    max-width: 460px;
    padding: 0 !important;
    background: #fff;
}

.kms-login-popup-box {
    padding: 24px;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    color: #222;
    border-top: 5px solid #ff6a61;
}

.kms-login-popup-logo {
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: bold;
}

.kms-login-popup-logo span {
    font-size: 11px;
    font-weight: normal;
    color: #777;
}

.kms-login-popup h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.kms-login-popup-mode {
    margin-bottom: 12px;
    padding: 9px 10px;
    background: #f3f3f3;
    border-left: 4px solid #666;
    font-size: 11px;
}

.kms-login-popup-dev {
    margin-bottom: 12px;
    padding: 9px 10px;
    background: #fff4cc;
    border: 1px solid #e3c767;
    font-size: 12px;
}

.kms-login-popup-error {
    margin-bottom: 12px;
    padding: 9px 10px;
    background: #fff2f2;
    border: 1px solid #d9a0a0;
    color: #8d1e1e;
    font-size: 12px;
}

.kms-login-popup label {
    display: block;
    margin: 10px 0 5px;
    font-size: 12px;
    font-weight: bold;
}

.kms-login-popup input[type="text"],
.kms-login-popup input[type="password"] {
    width: 100%;
    height: 40px;
    padding: 7px 9px;
    border: 1px solid #aaa;
    font-size: 14px;
}

.kms-login-popup button[type="submit"] {
    width: 100%;
    min-height: 42px;
    margin-top: 16px;
    border: 0;
    background: #3f3f3f;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.kms-login-popup button[type="submit"]:hover {
    background: #505050;
}

.kms-login-popup button[type="submit"]:disabled {
    opacity: .55;
    cursor: default;
}

.kms-login-popup button[type="submit"] i {
    margin-right: 5px;
}

@media (max-width: 430px) {

    .kms-login-popup {
        width: calc(100vw - 24px);
    }

    .kms-login-popup-box {
        padding: 18px 14px;
    }
}



/* ============================================================
   v1.68 - delikatnie większe ikony Font Awesome w menu
   ============================================================ */



/* ============================================================
   v1.68 - delikatnie większe ikony Font Awesome 5 w menu
   ============================================================ */

.kms-menu-icon .fas {
    font-size: 17px;
}



/* ============================================================
   v1.68 - komunikat po zmianie hasła
   ============================================================ */

.kms-login-popup-success {
    margin-bottom: 12px;
    padding: 9px 10px;
    background: #effbea;
    border: 1px solid #8dbb7b;
    color: #2c6721;
    font-size: 12px;
}



/* ============================================================
   v1.68 - login i hasło mają identyczny wygląd
   ============================================================ */

.kms-login-popup input[type="text"],
.kms-login-popup input[type="password"] {
    width: 100%;
    height: 40px;
    padding: 7px 9px;
    border: 1px solid #aaa;
    background: #fff;
    color: #222;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: normal;
    border-radius: 0;
    box-sizing: border-box;
}



/* ============================================================
   v1.68 - MENU Z w_menu.json
   rightmenu = rozwijane menu
   mainmenu  = klocki na stronie
   ============================================================ */

.kms-right-group-title {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: #fff;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,.16);
    box-sizing: border-box;
    cursor: default;
}

.kms-right-group-items {
    padding-left: 12px;
}

.kms-mainmenu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.kms-mainmenu-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 72px;
    padding: 14px;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #222 !important;
    text-decoration: none;
    box-sizing: border-box;
}

.kms-mainmenu-block:hover,
.kms-mainmenu-block:focus-visible {
    background: #f5f5f5;
    outline: none;
}

.kms-mainmenu-block strong {
    font-size: 14px;
}

.kms-mainmenu-block span {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .kms-mainmenu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .kms-mainmenu-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   v1.68 - ikona wejścia do indexmain.php
   ============================================================ */

.kms-mainmenu-open {
    display: none;
}

.kms-mainmenu-open.kms-mainmenu-open-visible {
    display: inline-flex;
}



/* ============================================================
   v1.68 - login aktualnie zalogowanego użytkownika w pasku
   ============================================================ */

.kms-menu-user {
    margin-right: auto;
    padding-left: 4px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.kms-menu-user strong {
    font-weight: bold;
}

@media (max-width: 430px) {
    .kms-menu-user {
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/* ============================================================
   v1.68 - diagnostyka /dane/seo_wizytowka.json tylko dla admina
   ============================================================ */

.seo-json-error {
    margin: 0 0 12px 0;
    padding: 10px 12px;
    border: 1px solid #c9302c;
    background: #fff3f3;
    color: #a52622;
    font-size: 12px;
    box-sizing: border-box;
}


/* ============================================================
   v1.73 - skróty: jednolite nagłówki grup i tytułów
   ============================================================ */
