/* ---------------------------------------------------------
   Subpages: title alignment and content inset
   --------------------------------------------------------- */

.page:not(.home) .inner-page > .wrap {
    width: calc(100% - 48px);
    max-width: 900px;
    margin-inline: auto;
}

.page:not(.home) .inner-page > .wrap > article > h1 {
    margin-inline: 0;
    padding-inline: 0;
}

.page:not(.home) .inner-page > .wrap > article > .entry-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}


/* ---------------------------------------------------------
   Contact page: width and introduction
   --------------------------------------------------------- */

.page-id-2 .contact-page {
    width: min(1350px, calc(50vw + 50% - 24px));
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-id-2 .contact-intro {
    max-width: 760px;
    margin: 0 0 48px;
    font-size: 1.05rem;
    line-height: 1.75;
}


/* ---------------------------------------------------------
   Contact layout: details 40%, form 60%, excluding the gap
   --------------------------------------------------------- */

.page-id-2 .contact-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 40px;
    align-items: start;
}

.page-id-2 .contact-main > *,
.page-id-2 .contact-location-grid > * {
    min-width: 0;
}

.page-id-2 .contact-details h2,
.page-id-2 .contact-form-box h2,
.page-id-2 .contact-location h2,
.page-id-2 .contact-location-info h3 {
    margin-top: 0;
}


/* ---------------------------------------------------------
   Contact details
   --------------------------------------------------------- */

.page-id-2 .contact-office {
    margin-top: 30px;
}

.page-id-2 .contact-office h3 {
    margin: 0 0 4px;
}

.page-id-2 .contact-office-name {
    margin-top: 0;
    font-weight: 600;
}

.page-id-2 .contact-details address,
.page-id-2 .contact-location-info address {
    margin: 20px 0;
    font-style: normal;
    line-height: 1.7;
}

.page-id-2 .contact-details a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.page-id-2 .contact-details a:hover {
    text-decoration: underline;
}

.page-id-2 .contact-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.65;
}

.page-id-2 .contact-person {
    padding: 22px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.page-id-2 .contact-person h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.45;
}

.page-id-2 .contact-person p {
    margin: 10px 0;
    line-height: 1.5;
}

/* Remove redundant line breaks inserted by the editor. */
.page-id-2 .contact-person .contact-label + br,
.page-id-2 .contact-person a br {
    display: none;
}

.page-id-2 .contact-company-data {
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 0.86rem;
    line-height: 1.7;
    opacity: 0.65;
}


/* ---------------------------------------------------------
   Contact page: form
   --------------------------------------------------------- */

.page-id-2 .contact-form-box {
    padding: 38px 42px;
    background: #f6f4f0;
    box-sizing: border-box;
}

.page-id-2 .contact-form-box > p {
    margin-bottom: 28px;
    line-height: 1.7;
}

.page-id-2 .contact-form-box .wpcf7-form label,
.page-id-2 .contact-form-box .wpcf7-form-control-wrap,
.page-id-2 .contact-form-box input[type="text"],
.page-id-2 .contact-form-box input[type="email"],
.page-id-2 .contact-form-box input[type="tel"],
.page-id-2 .contact-form-box select,
.page-id-2 .contact-form-box textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.page-id-2 .contact-form-box .wpcf7-form-control-wrap {
    display: block;
}

.page-id-2 .contact-form-box textarea {
    min-height: 150px;
    resize: vertical;
}


/* ---------------------------------------------------------
   Location
   --------------------------------------------------------- */

.page-id-2 .contact-location {
    margin-top: 35px;
}

.page-id-2 .contact-location-header {
    margin-bottom: 30px;
}

.page-id-2 .section-eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* Preserve the 8:3 column ratio with a 5% white gap. */
.page-id-2 .contact-location-grid {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
    column-gap: 5%;
    row-gap: 0;
    align-items: stretch;
    background: #fff;
}

.page-id-2 .contact-map {
    position: relative;
    min-height: 440px;
}

.page-id-2 .contact-map iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
}

.page-id-2 .contact-location-info {
    padding: 42px;
    background: #f6f4f0;
    box-sizing: border-box;
}

.page-id-2 .location-feature {
    margin-top: 26px;
}

.page-id-2 .location-feature strong,
.page-id-2 .location-feature span {
    display: block;
}

.page-id-2 .location-feature span {
    margin-top: 4px;
    line-height: 1.6;
    opacity: 0.75;
}


/* ---------------------------------------------------------
   Route button
   --------------------------------------------------------- */

.page-id-2 .contact-route-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 44px;
    height: auto;
    margin-top: 24px;
    padding: 10px 18px;
    border: 1px solid currentColor;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    transition: opacity 0.2s ease;
}

/* Prevent empty lines inside the route button. */
.page-id-2 .contact-route-button br {
    display: none;
}

.page-id-2 .contact-route-button:hover {
    text-decoration: none;
    opacity: 0.8;
}


/* ---------------------------------------------------------
   Team: Natalia's portrait
   --------------------------------------------------------- */

#zespol .person:nth-child(2) > img {
    object-position: 10% 50%;
}


/* ---------------------------------------------------------
   Static reviews
   --------------------------------------------------------- */

.review-card blockquote {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #172c3a;
}


/* ---------------------------------------------------------
   About page: centered photos and captions
   --------------------------------------------------------- */

.page-id-135 .entry-content .aligncenter {
    display: block;
    margin: 24px auto;
    text-align: center;
}

.page-id-135 .entry-content .aligncenter img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}


/* ---------------------------------------------------------
   Homepage: compact contact form
   --------------------------------------------------------- */

.home .contact-form-section {
    padding-block: 45px;
}

.home .kg-form {
    padding: 22px;
}

.home .kg-form .wpcf7-form p {
    margin-bottom: 14px;
}

.home .kg-form .wpcf7-form-control-wrap {
    margin-top: 5px;
}

.home .kg-form input[type="text"],
.home .kg-form input[type="email"],
.home .kg-form input[type="tel"],
.home .kg-form textarea.wpcf7-textarea {
    padding: 9px 12px;
}

.home .kg-form textarea.wpcf7-textarea {
    height: 110px;
    min-height: 110px;
    resize: vertical;
}

.home .kg-form .form-privacy {
    margin-top: 12px;
}


/* ---------------------------------------------------------
   Forms: consent
   --------------------------------------------------------- */

.wpcf7 .contact-consent,
.wpcf7 .recaptcha-notice {
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1.65;
    color: #52606a;
    text-align: left;
}

.wpcf7 .contact-consent {
    margin: 20px 0;
}

.wpcf7 .contact-consent p,
.home .kg-form .wpcf7-form .contact-consent p {
    margin: 0;
}

.wpcf7 .contact-consent .wpcf7-list-item {
    display: block;
    margin: 0;
}

.wpcf7 .contact-consent .wpcf7-list-item > label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}

.wpcf7 .contact-consent input[type="checkbox"] {
    box-sizing: border-box;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 3px 0 0;
    padding: 0;
    accent-color: #172c3a;
}

.wpcf7 .contact-consent .wpcf7-list-item-label {
    flex: 1;
    min-width: 0;
}

.wpcf7 .contact-consent strong {
    font-weight: 600;
}

.wpcf7-list-item-label {
	font-size: 0.82rem;
}

/* ---------------------------------------------------------
   reCAPTCHA: hidden badge and visible form notice
   --------------------------------------------------------- */

.grecaptcha-badge {
    visibility: hidden !important;
}

.wpcf7 p.recaptcha-notice,
.home .kg-form .wpcf7-form p.recaptcha-notice {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(23, 44, 58, 0.12);
}

.wpcf7 .recaptcha-notice a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wpcf7 .recaptcha-notice a:hover {
    color: #172c3a;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer a[href*="/polityka-prywatnosci"] {
    text-decoration: none;
}


/* ---------------------------------------------------------
   Desktop: justified page and blog paragraphs
   --------------------------------------------------------- */

@media (min-width: 901px) {
    .page:not(.home):not(.page-id-2) .entry-content p,
    .single-post .entry-content p {
        text-align: justify;
        -webkit-hyphens: auto;
        hyphens: auto;
    }
}


/* ---------------------------------------------------------
   Mobile navigation: scrolling within the visible viewport
   --------------------------------------------------------- */

@media (max-width: 1080px) {
    .head nav.is-open .nav-menu {
        box-sizing: border-box;
        max-height: calc(100vh - 120px);
        max-height: calc(
            100dvh - 120px - env(safe-area-inset-bottom, 0px)
        );
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(
            32px + env(safe-area-inset-bottom, 0px)
        );
    }

    /* Account for the WordPress toolbar when logged in. */
    .admin-bar .head nav.is-open .nav-menu {
        max-height: calc(100vh - 166px);
        max-height: calc(
            100dvh - 166px - env(safe-area-inset-bottom, 0px)
        );
    }
}


/* ---------------------------------------------------------
   Tablet: single-column contact layout
   --------------------------------------------------------- */

@media (max-width: 900px) {
    .page-id-2 .contact-page {
        width: 100%;
    }

    .page-id-2 .contact-intro {
        margin-bottom: 36px;
    }

    .page-id-2 .contact-main,
    .page-id-2 .contact-location-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .page-id-2 .contact-form-box,
    .page-id-2 .contact-location-info {
        padding: 30px 24px;
    }

    .page-id-2 .contact-map {
        min-height: 380px;
    }
}


/* ---------------------------------------------------------
   Mobile: page margins and floating call button
   --------------------------------------------------------- */

@media (max-width: 600px) {
    .page:not(.home) .inner-page > .wrap {
        width: calc(100% - 36px);
    }

    .mobile-contact {
        bottom: calc(
            35px + env(safe-area-inset-bottom, 0px)
        );
    }
}


/* ---------------------------------------------------------
   Small screens: compact contact panels
   --------------------------------------------------------- */

@media (max-width: 520px) {
    .page-id-2 .contact-intro {
        font-size: 1rem;
        line-height: 1.7;
    }

    .page-id-2 .contact-form-box {
        padding: 25px 20px;
    }

    .page-id-2 .contact-location-info {
        padding: 26px 20px;
    }

    .page-id-2 .contact-map {
        min-height: 320px;
    }

    .page-id-2 .contact-route-button {
        width: 100%;
    }
}


/* Page and blog post headings. */
.inner-page h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.2;
}

.inner-page h2 {
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    line-height: 1.3;
}

/* Homepage headings. */
.home .hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.15;
}

.home main h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.5;
}

/* Blog title and individual post titles. */
.blog main h1,
.archive main h1,
.single-post main h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.2;
}

/* Post titles on the blog listing. */
.blog main h2,
.archive main h2 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    line-height: 1.3;
}

/* Visually separate the contact section from the footer. */
/* Match the homepage contact section background. */
.section.page-contact {
    background: #e8ecec;
    color: #172c3a;
    padding-block: 50px;
}

.page-contact h2 {
    color: #172c3a;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
	  line-height: 1.25;
}

.page-contact p {
    color: #52606a;
}

.page-contact .eyebrow {
    color: #76603e;
}

/* Keep the outline button readable on the light background. */
.page-contact .btn.outline {
    color: #172c3a;
    border-color: #172c3a;
    background: transparent;
}

.page-contact .btn.outline:hover,
.page-contact .btn.outline:focus-visible {
    color: #fff;
    background: #172c3a;
}

@media (max-width: 600px) {
    .section.page-contact {
        padding-block: 36px;
    }

    .page-contact .wrap {
        gap: 24px;
    }
}

/* Remove automatic link styling from footer company details. */
.site-footer .footer-bottom a,
.site-footer .footer-bottom a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

/* Homepage: visit preparation section background. */
.home #wizyta {
    background-color: #f7f5f0;
}


/* Match the privacy link spacing to the footer menu items. */
.site-footer .footer-grid > div:last-child .footer-links {
    margin-bottom: 9px;
}

/* Homepage: contact form section background. */
.home #zapytanie {
    background-color: #fff;
}
