/*
 * Werstok.pl — pierwszy, zachowawczy etap responsywności.
 * Plik ładować po pozostałych arkuszach stylów.
 */

/* Przewidywalne obliczanie szerokości elementów */
*, *::before, *::after {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
}

img {
    height: auto;
}

/* Kontenery dopasowują się do ekranu */
.main {
    width: min(100% - 32px, 1000px);
}

.mainKS {
    width: auto;
    max-width: 1000px;
}

/* Mapy i osadzone materiały */
figure {
    max-width: 100%;
}

figure iframe {
    width: 100%;
    max-width: 100%;
}

/* Tablet i mniejsze laptopy */
@media screen and (max-width: 1000px) {
    body {
        min-width: 0;
    }

    .main {
        width: calc(100% - 32px);
    }

    .mainKS {
        margin-left: 16px;
        margin-right: 16px;
    }

    .container_12 {
        width: 100%;
        max-width: 960px;
    }

    .contentKS {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Telefony */
@media screen and (max-width: 680px) {
    body {
        min-width: 0;
        font-size: 14px;
        line-height: 1.55;
    }

    .main {
        width: calc(100% - 24px);
    }

    .mainKS {
        margin: 12px;
        font-size: 15px;
    }

    header {
        margin-top: 0;
        margin-bottom: 16px;
    }

    header h1 {
        float: none;
        min-width: 0;
        margin-left: 0;
        bottom: auto;
        text-align: center;
    }

    header h1 a {
        font-size: clamp(27px, 7vw, 40px);
        line-height: 1.15;
    }

    .menu {
        float: none;
        max-width: 100%;
    }

    .contentKS {
        padding: 16px;
        font-size: 16px;
        line-height: 1.6;
    }

    h2 {
        padding-top: 22px;
        padding-bottom: 12px;
    }

    .block2 {
        float: none;
        width: 100%;
    }

    .img_inner1 {
        float: none;
        display: block;
        margin: 6px 0 16px;
    }

    figure {
        width: 100%;
        height: auto;
    }

    figure iframe {
        width: 100%;
        height: 320px;
    }

    #form1 {
        padding-left: 0;
    }

    #form1 input,
    #form1 textarea {
        float: none;
        width: 100%;
        max-width: 100%;
    }

    #form1 label {
        float: none;
        width: 100%;
    }

    table {
        max-width: 100%;
    }

    td, th {
        overflow-wrap: anywhere;
    }

    footer {
        height: auto;
        min-height: 35px;
        padding: 8px 0;
    }

    footer .social {
        float: none;
        margin-top: 8px;
    }
}

/* =========================================
   WERSTOK — GALERIE POKOJÓW
   ========================================= */

@media screen and (max-width: 680px) {

    .contentKS center > a.gallery {
        display: inline-block;
        vertical-align: middle;
        max-width: 100%;
        margin: 4px 0;
    }

    .contentKS center > a.gallery > img {
        display: block;
        width: auto;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .contentKS center > br {
        display: none;
    }

    .contentKS center {
        max-width: 100%;
        margin: 12px auto 24px;
    }
}

/* =========================================
   WERSTOK — ZAMYKANIE GALERII
   ========================================= */

@media screen and (max-width: 680px) {

    .compsoul-gallery-mask-before-button {
        position: fixed;
        top: 12px;
        right: 12px;
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 8px;
        z-index: 2;
    }

    .compsoul-gallery-mask-before:after {
        position: fixed;
        content: "×";
        top: 36px;
        right: 36px;
        transform: translate(50%, -50%);
        font-family: Arial, sans-serif;
        font-size: 36px;
        font-weight: normal;
        line-height: 1;
        letter-spacing: 0;
        color: #fff;
        z-index: 3;
        pointer-events: none;
    }

    .compsoul-gallery-mask {
        z-index: 2000;
    }
}

/* =========================================
   WERSTOK — STRZAŁKI GALERII
   ========================================= */

@media screen and (max-width: 680px) {

    .compsoul-gallery-prev,
    .compsoul-gallery-next {
        position: fixed;
        width: 44px;
        height: 52px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.65);
        border-radius: 6px;
        z-index: 3;
    }

    .compsoul-gallery-prev {
        left: 4px;
        right: auto;
    }

    .compsoul-gallery-next {
        right: 4px;
        left: auto;
    }

    .compsoul-gallery-prev:before,
    .compsoul-gallery-next:before {
        display: block;
        width: 44px;
        height: 52px;
        font-family: Arial, sans-serif;
        font-size: 32px;
        font-weight: normal;
        line-height: 52px;
        text-align: center;
        color: #fff;
    }

    .compsoul-gallery-prev:before {
        content: "‹";
    }

    .compsoul-gallery-next:before {
        content: "›";
    }
}

/* =========================================
   WERSTOK — NAGŁÓWKI DNI KALENDARZA
   ========================================= */

@media screen and (max-width: 680px) {

    .availability-calendar th {
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
        font-size: 12px;
        letter-spacing: -0.2px;
        padding-left: 2px;
        padding-right: 2px;
    }
}

/* =========================================
   WERSTOK — SZEROKOŚĆ KALENDARZY
   ========================================= */

@media screen and (max-width: 680px) {

    .availability-calendar {
        width: 100%;
        max-width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }

    .availability-calendar th,
    .availability-calendar td {
        width: 14.2857%;
        box-sizing: border-box;
        text-align: center;
    }

    .availability-calendar td {
        font-size: 14px;
    }
}

/* Kontenery kalendarzy */
@media screen and (max-width: 680px) {

    .availability-calendar-toolbar,
    .availability-calendar {
        width: 100%;
        max-width: 100%;
    }

    td:has(> .availability-calendar),
    td:has(> .availability-calendar-toolbar) {
        width: 100%;
        max-width: 100%;
    }
}

/* =========================================
   WERSTOK — TABELA OTACZAJĄCA KALENDARZ
   ========================================= */

.calendar-wrapper {
    width: 60%;
    max-width: 100%;
    border-collapse: collapse;
}

.calendar-wrapper > tbody > tr > td {
    padding: 10px;
    vertical-align: top;
}

@media screen and (max-width: 680px) {

    .calendar-wrapper {
        width: 100%;
        table-layout: fixed;
    }

    .calendar-wrapper > tbody > tr > td {
        padding: 0;
    }

    #calendar,
    #calendar2,
    #calendar3,
    #calendar4 {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* =========================================
   WERSTOK — MOBILNE MENU
   Jedna wspólna definicja
   ========================================= */

@media screen and (max-width: 680px) {

    /* Zachowujemy odstęp nad treścią */
    .contentKS {
        padding-top: 34px;
    }

    /* Tytuł nie wchodzi pod przycisk */
    .tytul {
        font-size: clamp(21px, 5.4vw, 29px);
        line-height: 1.2;
        padding-right: 54px;
        overflow-wrap: normal;
    }

    /* Przycisk menu */
    .button_container,
    .button_container.active {
        position: fixed;
        top: 14px;
        right: 16px;
        left: auto;
        bottom: auto;
        width: 36px;
        height: 34px;
        margin: 0;
        transform: none;
        z-index: 1100;
    }

    .button_container span {
        height: 3px;
    }

    .button_container span:nth-of-type(2) {
        top: 10px;
    }

    .button_container span:nth-of-type(3) {
        top: 20px;
    }

    .button_container.active .top {
        transform: translateY(10px) rotate(45deg);
    }

    .button_container.active .bottom {
        transform: translateY(-10px) rotate(-45deg);
    }

    /* Panel rozwijanego menu */
    .overlay {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 0;
        min-height: 0;
        overflow: hidden;
        z-index: 1000;
    }

    .overlay.open {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
    }

    /* Wewnętrzny obszar menu */
    .overlay nav.overlay-menu {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 62px 16px 24px;
        transform: none;
        font-size: 21px;
        line-height: 1.25;
    }

    /* Lista podstron */
    .overlay nav.overlay-menu ul {
        display: block;
        position: static;
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* Pozycje menu */
    .overlay nav.overlay-menu ul li,
    .overlay.open nav.overlay-menu ul li {
        display: block;
        position: relative;
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        opacity: 1;
        animation: none;
        -webkit-animation: none;
    }

    /* Linki do podstron */
    .overlay nav.overlay-menu ul li a {
        display: block;
        padding: 8px 6px;
        color: #fff;
        font-size: 20px;
        line-height: 1.3;
        white-space: normal;
    }
}

/* WERSTOK — POPRAWKA NR 12
   Zapobieganie rozciąganiu pozycji menu */

@media screen and (max-width: 680px) {

    .overlay.open nav.overlay-menu ul {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        height: auto;
        min-height: 0;
    }

    .overlay.open nav.overlay-menu ul li {
        display: block;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        padding: 0;
        margin: 0;
    }

    .overlay.open nav.overlay-menu ul li a {
        display: block;
        padding: 8px 6px;
        line-height: 1.3;
    }

}

/* WERSTOK — ujednolicenie przycisku menu na telefonach */

@media screen and (max-width: 680px) {

    .button_container {
        width: 30px !important;
        height: 24px !important;
    }

    .button_container span {
        width: 100% !important;
        height: 2px !important;
    }

    .button_container span.top {
        top: 0 !important;
    }

    .button_container span.middle {
        top: 11px !important;
    }

    .button_container span.bottom {
        top: 22px !important;
    }

}

/* WERSTOK — wyrównanie położenia przycisku menu */

@media screen and (max-width: 680px) {

    .button_container,
    .button_container.active {
        position: fixed !important;
        top: 14px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        transform: none !important;
    }

}

/* WERSTOK — POPRAWKA NR 15
   Zdjęcia i tekst w sekcji atrakcji */

@media screen and (max-width: 680px) {

    .contentKS img[align="right"],
    .contentKS img[align="left"] {
        float: none !important;
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 12px auto 18px !important;
    }

    .contentKS a:has(> img[align="right"]),
    .contentKS a:has(> img[align="left"]) {
        float: none !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 12px 0 18px !important;
    }

    .contentKS a:has(> img[align="right"]) img,
    .contentKS a:has(> img[align="left"]) img {
        float: none !important;
        display: block !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

/* WERSTOK — POPRAWKA NR 15
   Zdjęcia atrakcji bez opływania na smartfonach */

@media screen and (max-width: 680px) {

    .contentKS a:has(> img[style*="float:right"]) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 16px 0 !important;
    }

    .contentKS img[style*="float:right"] {
        float: none !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }

}

/* ========================================
   KONTAKT – UKŁAD NA SMARTFONACH
   ======================================== */

@media screen and (max-width: 767px) {

    /* Tabela kontaktowa zmienia się
       z dwóch kolumn w układ pionowy */

    table.kontakt-tabela {
        display: block;
        width: 100%;
        max-width: 100%;
        border-spacing: 0;
        margin: 0;
    }

    .kontakt-tabela > tbody,
    .kontakt-tabela > tbody > tr {
        display: block;
        width: 100%;
    }

    .kontakt-tabela td.kontakt-odstep {
        display: none !important;
    }

    .kontakt-tabela td.kontakt-dane,
    .kontakt-tabela td.kontakt-formularz {
        display: block;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        text-align: left;
        vertical-align: top;
        overflow-wrap: anywhere;
    }

    /* Formularz pod danymi kontaktowymi */

    .kontakt-tabela td.kontakt-formularz {
        margin-top: 28px;
    }

    .kontakt-formularz #contact_form {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .kontakt-formularz .formField {
        display: block;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .kontakt-formularz textarea.formField {
        min-height: 180px;
    }

    /* Mapa na całą dostępną szerokość */

    .kontakt-dane figure.img_inner1 {
        float: none !important;
        display: block;
        width: 100% !important;
        max-width: 100%;
        margin: 24px 0 0;
        padding: 0;
    }

    .kontakt-dane figure.img_inner1 iframe {
        display: block;
        width: 100% !important;
        max-width: 100%;
        height: 300px;
        border: 0;
    }

}

@media screen and (max-width: 767px) {
    .kontakt-tabela td.kontakt-formularz {
        margin-top: 8px;
    }
}