/* HAVA — edytowalna strona /uslugi/ */
.hava-services-page {
    --hava-navy: #21234A;
    --hava-light: #EEEEF6;
    --hava-blue: #BBCBD7;
    --hava-white: #FFFFFF;
    --hava-slate: #404E66;
    color: var(--hava-slate);
    background: var(--hava-light);
    font-size: var(--hava-services-body, 13px);
}

.hava-services-container {
    width: min(1160px, calc(100% - 48px));
    margin-inline: auto;
}

.hava-services-hero,
.hava-services-section {
    padding: 68px 0;
}

.hava-services-hero {
    padding-top: 74px;
    padding-bottom: 74px;
}

.hava-services-bg--light { background: var(--hava-light); }
.hava-services-bg--white { background: var(--hava-white); }
.hava-services-bg--blue { background: rgba(187, 203, 215, .55); }
.hava-services-bg--navy { background: var(--hava-navy); color: var(--hava-white); }

.hava-services-layout-inner {
    display: grid;
    gap: 44px;
    align-items: center;
}

.hava-services-layout--centered .hava-services-layout-inner {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    text-align: center;
}

.hava-services-layout--text-left-image-right .hava-services-layout-inner,
.hava-services-layout--image-left-text .hava-services-layout-inner {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr);
}

.hava-services-layout--image-left-text .hava-services-media { order: 1; }
.hava-services-layout--image-left-text .hava-services-content-block { order: 2; }

.hava-services-content-block {
    min-width: 0;
}

.hava-services-layout--centered .hava-services-content-block {
    max-width: 760px;
    margin-inline: auto;
}

.hava-services-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    margin: 0 0 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--hava-white);
    background: var(--hava-navy);
    font-size: var(--hava-services-label, 9px);
    font-weight: 500;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hava-services-layout--centered .hava-services-label,
.hava-services-section-header.is-centered .hava-services-label {
    margin-inline: auto;
}

.hava-services-bg--navy .hava-services-label {
    color: var(--hava-navy);
    background: var(--hava-blue);
}

.hava-services-heading {
    margin: 0;
    color: var(--hava-navy);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.08;
}

h1.hava-services-heading {
    font-size: var(--hava-services-h1, 42px);
}

h2.hava-services-heading {
    font-size: var(--hava-services-h2, 30px);
}

.hava-services-bg--navy .hava-services-heading,
.hava-services-bg--navy .hava-services-description {
    color: var(--hava-white);
}

.hava-services-description {
    max-width: 720px;
    margin-top: 16px;
    font-size: var(--hava-services-body, 13px);
    line-height: 1.7;
}

.hava-services-layout--centered .hava-services-description,
.hava-services-section-header.is-centered .hava-services-description {
    margin-inline: auto;
}

.hava-services-description > :first-child { margin-top: 0; }
.hava-services-description > :last-child { margin-bottom: 0; }

.hava-services-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hava-services-layout--centered .hava-services-actions,
.hava-services-section-header.is-centered .hava-services-actions {
    justify-content: center;
}

.hava-services-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--hava-navy);
    border-radius: 999px;
    font-size: var(--hava-services-button, 10px);
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity .18s ease, transform .18s ease, background-color .18s ease;
}

.hava-services-button:hover {
    transform: translateY(-1px);
}

.hava-services-button--primary {
    color: var(--hava-white);
    background: var(--hava-navy);
}

.hava-services-button--secondary {
    color: var(--hava-navy);
    background: transparent;
}

.hava-services-bg--navy .hava-services-button--primary {
    color: var(--hava-navy);
    border-color: var(--hava-white);
    background: var(--hava-white);
}

.hava-services-bg--navy .hava-services-button--secondary {
    color: var(--hava-white);
    border-color: rgba(255,255,255,.55);
}

.hava-services-media {
    overflow: hidden;
    border-radius: 14px;
}

.hava-services-media__image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hava-services-section-header {
    max-width: 760px;
    margin-bottom: 34px;
}

.hava-services-section-header.is-centered {
    margin-inline: auto;
    text-align: center;
}

.hava-services-grid {
    display: grid;
    gap: 22px;
}

.hava-services-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hava-services-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hava-services-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hava-services-archive-card {
    overflow: hidden;
    border: 1px solid rgba(33, 35, 74, .07);
    border-radius: 14px;
    background: var(--hava-white);
    box-shadow: 0 10px 28px rgba(33, 35, 74, .045);
    transition: transform .18s ease, box-shadow .18s ease;
}

.hava-services-archive-card:hover {
    box-shadow: 0 14px 32px rgba(33, 35, 74, .08);
    transform: translateY(-3px);
}

.hava-services-archive-card__image-link {
    display: block;
    overflow: hidden;
    background: rgba(187, 203, 215, .25);
}

.hava-services-archive-card__image,
.hava-services-archive-card__placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hava-image-position--center { object-position: center; }
.hava-image-position--top { object-position: top; }
.hava-image-position--bottom { object-position: bottom; }
.hava-image-position--left { object-position: left; }
.hava-image-position--right { object-position: right; }

.hava-services-archive-card__body {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    padding: 22px;
}

.hava-services-archive-card__title {
    margin: 0 0 10px;
    color: var(--hava-navy);
    font-size: var(--hava-services-card-title, 20px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.hava-services-archive-card__title a {
    color: inherit;
    text-decoration: none;
}

.hava-services-archive-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 18px;
    color: var(--hava-slate);
    font-size: var(--hava-services-body, 13px);
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hava-services-archive-card__description > :first-child { margin-top: 0; }
.hava-services-archive-card__description > :last-child { margin-bottom: 0; }

.hava-services-archive-card__link {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    color: var(--hava-navy);
    font-size: var(--hava-services-button, 10px);
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
}

.hava-services-bg--navy .hava-services-archive-card {
    color: var(--hava-slate);
}

.hava-services-section--highlight .hava-services-layout-inner {
    padding: 34px;
    border-radius: 14px;
}

@media (max-width: 1000px) {
    .hava-services-grid--4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .hava-services-layout--text-left-image-right .hava-services-layout-inner,
    .hava-services-layout--image-left-text .hava-services-layout-inner {
        grid-template-columns: 1fr;
    }

    .hava-services-layout--image-left-text .hava-services-media,
    .hava-services-layout--image-left-text .hava-services-content-block {
        order: initial;
    }

    .hava-services-grid--3,
    .hava-services-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .hava-services-container {
        width: min(100% - 30px, 1160px);
    }

    .hava-services-hero,
    .hava-services-section {
        padding: 48px 0;
    }

    h1.hava-services-heading {
        font-size: min(var(--hava-services-h1, 42px), 38px);
    }

    h2.hava-services-heading {
        font-size: min(var(--hava-services-h2, 30px), 29px);
    }

    .hava-services-grid--2,
    .hava-services-grid--3,
    .hava-services-grid--4 {
        grid-template-columns: 1fr;
    }
}

/* === Etap 21 — zachowanie linku „Dowiedz się więcej” === */
.hava-services-archive-card__link,
.hava-services-archive-card__link:visited,
.hava-services-archive-card__link:hover,
.hava-services-archive-card__link:focus-visible,
.hava-services-archive-card:hover .hava-services-archive-card__link,
.hava-services-archive-card:hover .hava-services-archive-card__link span {
    color: var(--hava-navy) !important;
}


/* === Etap 22 — przycisk „Skontaktuj się” na stronie Usługi ===
 * Kadence nadpisywał kolor tekstu linku przy hover.
 * Wymuszamy stały granat dla drugiego przycisku na jasnym tle.
 */
.hava-services-button--secondary,
.hava-services-button--secondary:link,
.hava-services-button--secondary:visited,
.hava-services-button--secondary:hover,
.hava-services-button--secondary:focus,
.hava-services-button--secondary:focus-visible,
.hava-services-button--secondary:active {
    color: var(--hava-navy) !important;
    border-color: var(--hava-navy) !important;
    background: transparent !important;
    text-decoration: none !important;
}

/* Na granatowych sekcjach zachowujemy wariant biały. */
.hava-services-bg--navy .hava-services-button--secondary,
.hava-services-bg--navy .hava-services-button--secondary:link,
.hava-services-bg--navy .hava-services-button--secondary:visited,
.hava-services-bg--navy .hava-services-button--secondary:hover,
.hava-services-bg--navy .hava-services-button--secondary:focus,
.hava-services-bg--navy .hava-services-button--secondary:focus-visible,
.hava-services-bg--navy .hava-services-button--secondary:active {
    color: var(--hava-white) !important;
    border-color: rgba(255,255,255,.55) !important;
    background: transparent !important;
}

/* === Etap 23 — Hero z obrazem w tle + czytelny hover CTA === */
.hava-services-button--primary,
.hava-services-button--primary:link,
.hava-services-button--primary:visited {
    color: var(--hava-white) !important;
    background: var(--hava-navy);
}

.hava-services-button--primary:hover,
.hava-services-button--primary:focus-visible,
.hava-services-button--primary:active {
    color: var(--hava-white) !important;
    border-color: #3B3E70 !important;
    background: #3B3E70 !important;
}

.hava-services-hero--has-bg-image {
    display: flex;
    align-items: center;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

.hava-services-hero--has-bg-image .hava-services-heading,
.hava-services-hero--has-bg-image .hava-services-description {
    color: var(--hava-white) !important;
}

.hava-services-hero--has-bg-image .hava-services-label {
    color: var(--hava-navy) !important;
    background: var(--hava-blue) !important;
}

.hava-services-hero--has-bg-image .hava-services-button--secondary,
.hava-services-hero--has-bg-image .hava-services-button--secondary:link,
.hava-services-hero--has-bg-image .hava-services-button--secondary:visited,
.hava-services-hero--has-bg-image .hava-services-button--secondary:hover,
.hava-services-hero--has-bg-image .hava-services-button--secondary:focus-visible {
    color: var(--hava-white) !important;
    border-color: rgba(255,255,255,.72) !important;
    background: rgba(33,35,74,.12) !important;
}

.hava-services-hero--has-bg-image .hava-services-button--secondary:hover,
.hava-services-hero--has-bg-image .hava-services-button--secondary:focus-visible {
    background: rgba(33,35,74,.32) !important;
}

/* Na granatowych sekcjach główny przycisk pozostaje jasny. */
.hava-services-bg--navy .hava-services-button--primary:hover,
.hava-services-bg--navy .hava-services-button--primary:focus-visible {
    color: var(--hava-navy) !important;
    border-color: var(--hava-blue) !important;
    background: var(--hava-blue) !important;
}


/* === Etap 29 — spójność strony Usługi ze stroną główną === */
.hava-services-hero {
    display: flex;
    min-height: 360px;
    align-items: center;
}

.hava-services-page {
    font-size: var(--hava-services-body, 14px);
}

.hava-services-description {
    line-height: 1.62;
}

.hava-services-archive-card__description {
    line-height: 1.55;
}

.hava-services-button {
    min-height: 40px;
    padding: 10px 18px;
    font-size: var(--hava-services-button, 10px);
}

@media (max-width: 580px) {
    .hava-services-hero {
        min-height: 300px;
        padding-top: 48px;
        padding-bottom: 48px;
    }
}

/* === Etap 30 — typografia strony Usługi jak na stronie głównej === */
.hava-services-page,
.hava-services-page p,
.hava-services-description,
.hava-services-archive-card__description,
.hava-services-section__description {
    font-size: 16px;
}

h1.hava-services-heading {
    font-size: 55px;
}

.hava-services-button,
.hava-services-archive-card__link,
.hava-services-cta .hava-services-button {
    font-size: 15px;
}

.hava-services-button {
    min-height: 44px;
    padding: 11px 20px;
}

@media (max-width: 580px) {
    h1.hava-services-heading {
        font-size: 42px;
    }

    .hava-services-page,
    .hava-services-page p,
    .hava-services-description,
    .hava-services-archive-card__description,
    .hava-services-section__description {
        font-size: 16px;
    }

    .hava-services-button,
    .hava-services-archive-card__link,
    .hava-services-cta .hava-services-button {
        font-size: 15px;
    }
}
