/* Site navigation — logo left, links + actions right */
.nav-bar-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    height: 5rem;
}

.nav-bar-brand {
    flex-shrink: 0;
}

.nav-bar-actions {
    flex-shrink: 0;
    margin-left: auto;
}

/* Image & media card system — Lapin Manuaaliterapia */

/**
 * Alt text lives only on <img alt="…">. Browsers show it when the image
 * fails to load; it is not rendered as visible page copy when the image loads.
 * Screen readers still receive the alt attribute in the accessibility tree.
 */
main img[alt]:not([alt=""]) {
    display: block;
}

.image-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid rgba(110, 184, 232, 0.28);
    box-shadow:
        0 1px 2px rgba(30, 51, 72, 0.04),
        0 8px 28px rgba(30, 51, 72, 0.07);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

@media (hover: hover) {
    .image-card:hover {
        transform: translateY(-6px);
        box-shadow:
            0 4px 12px rgba(74, 159, 212, 0.08),
            0 20px 48px rgba(30, 51, 72, 0.12);
    }
}

/* Corner light on large photos — not logos or circular avatars (.profile-chip__avatar) */
:is(.image-card__media, .photo-card__inner, .portrait-card__photo, .hero-media, .editorial-photo)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 46% 42% at 100% 0%, rgba(110, 184, 232, 0.16) 0%, transparent 72%),
        radial-gradient(ellipse 42% 38% at 0% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.image-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #eef6fc 0%, #d8eaf8 100%);
}

.image-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-card:hover .image-card__media img {
    transform: scale(1.05);
}

.image-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        transparent 35%,
        rgba(30, 51, 72, 0.25) 100%
    );
    opacity: 0.65;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.image-card:hover .image-card__media::after {
    opacity: 0.85;
}

.image-card__label {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 3;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #2d6a94;
    box-shadow: 0 2px 8px rgba(30, 51, 72, 0.1);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.image-card:hover .image-card__label {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(74, 159, 212, 0.2);
}

.image-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.75rem 1.75rem 2rem;
    gap: 0;
}

/* Services section intro — compact typography (index + palvelut page) */
.services-section-intro__title {
    letter-spacing: 0.04em;
    line-height: 1.35;
}

.services-section-intro__lead {
    max-width: none;
}

/* Homepage: Minusta chip matches Palvelut section content width (container-max) */
.homepage-about-teaser__inner {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
}

.homepage-about-teaser .profile-chip {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Service cards — full-width centered copy, actions side by side */
.service-cards-grid > .image-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.service-cards-grid .image-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 1.75rem 2rem 2rem;
    box-sizing: border-box;
}

.service-cards-grid .image-card__content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

.service-cards-grid .image-card__content > :is(h2, h3),
.service-cards-grid .image-card__content > .image-card__desc {
    width: 100%;
    text-align: center;
}

.service-cards-grid .price-list {
    width: 100%;
    margin-inline: 0;
    text-align: left;
}

.service-cards-grid .price-list > li {
    width: 100%;
}

.service-cards-grid .image-card__actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 1.5rem;
    width: 100%;
    margin-top: auto;
    padding-top: 1.5rem;
}

.service-cards-grid .image-card__actions > a {
    white-space: nowrap;
}

.service-cards-grid .image-card__actions .ice-button {
    width: auto;
}

.image-card__desc {
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .image-card__desc {
        min-height: 7.25rem;
        margin-bottom: 2rem;
    }

    .service-cards-grid .image-card__desc {
        min-height: 7.25rem;
    }

    .service-cards-grid .image-card--single-price .image-card__desc {
        min-height: 7.25rem;
    }
}

.price-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.price-list > li {
    display: grid;
    grid-template-columns: 1fr 3.5rem;
    align-items: baseline;
    column-gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(220, 232, 240, 0.85);
}

.price-list > li:last-child {
    margin-bottom: 0;
    padding-bottom: 0.25rem;
    border-bottom: none;
}

.price-list__duration {
    font-size: 1rem;
    line-height: 1.5;
    color: #1e3348;
}

.price-list__amount {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6eb8e8;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.image-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto;
}

/* Editorial photo — benefits, feature rows */
.photo-card {
    position: relative;
    border-radius: 1.25rem;
    padding: 0.625rem;
    background: linear-gradient(160deg, #ffffff 0%, #f0f7fc 100%);
    border: 1px solid rgba(110, 184, 232, 0.22);
    box-shadow:
        0 4px 24px rgba(30, 51, 72, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (hover: hover) {
    .photo-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(74, 159, 212, 0.12);
    }
}

.photo-card__inner {
    position: relative;
    border-radius: 0.875rem;
    overflow: hidden;
    aspect-ratio: 5 / 4;
}

@media (min-width: 768px) {
    .photo-card__inner--tall {
        aspect-ratio: auto;
        min-height: 20rem;
    }
}

.photo-card__inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-card:hover .photo-card__inner img {
    transform: scale(1.03);
}

/* Portrait stack — Minusta */
.portrait-card {
    border-radius: 1.25rem;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(110, 184, 232, 0.28);
    box-shadow: 0 12px 40px rgba(30, 51, 72, 0.1);
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.38s ease,
        border-color 0.38s ease;
}

@media (hover: hover) {
    .portrait-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 48px rgba(74, 159, 212, 0.14);
        border-color: rgba(110, 184, 232, 0.45);
    }

    .portrait-card:hover .portrait-card__photo img {
        transform: scale(1.03);
    }
}

.portrait-card__photo img {
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.portrait-card__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: linear-gradient(180deg, #d8eaf8 0%, #eef6fc 100%);
}

.portrait-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.portrait-card__quote {
    padding: 1.5rem 1.75rem 1.75rem;
    background: linear-gradient(180deg, #f8fcff 0%, #ffffff 100%);
    border-top: 1px solid rgba(110, 184, 232, 0.15);
}

/* Sidebar / service page hero image */
.photo-card--portrait .photo-card__inner {
    aspect-ratio: 4 / 5;
}

.photo-card--portrait .photo-card__inner img {
    min-height: 100%;
}

/* Magazine / sidebar feature image (index) */
.editorial-photo {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.editorial-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile chip — homepage teaser */
.profile-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    border-radius: 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(110, 184, 232, 0.22);
    box-shadow: 0 8px 32px rgba(30, 51, 72, 0.06);
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.38s ease,
        border-color 0.38s ease;
}

@media (hover: hover) {
    .profile-chip:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 44px rgba(74, 159, 212, 0.12);
        border-color: rgba(110, 184, 232, 0.4);
    }

    .profile-chip:hover .profile-chip__avatar {
        transform: scale(1.03);
    }
}

.profile-chip__avatar {
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
    .profile-chip {
        flex-direction: row;
        align-items: center;
        gap: 2.5rem;
        padding: 2.5rem 3rem;
    }
}

.profile-chip__avatar {
    flex-shrink: 0;
    padding: 0.35rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #8ecae6 0%, #6eb8e8 50%, #4a9fd4 100%);
    box-shadow: 0 4px 16px rgba(74, 159, 212, 0.25);
}

.profile-chip__avatar img {
    width: 7rem;
    height: 7rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 3px solid #ffffff;
    display: block;
}

@media (min-width: 768px) {
    .profile-chip__avatar img {
        width: 8.5rem;
        height: 8.5rem;
    }
}

/* Text promo cards (slogans) */
.promo-card {
    display: block;
    padding: 2rem 2.25rem;
    border-radius: 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(110, 184, 232, 0.22);
    border-left: 4px solid #6eb8e8;
    box-shadow: 0 4px 20px rgba(30, 51, 72, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (hover: hover) {
    .promo-card:hover {
        transform: translateY(-5px);
        border-left-color: #4a9fd4;
        box-shadow: 0 14px 40px rgba(74, 159, 212, 0.14);
    }

    .promo-card:hover .font-headline-md {
        color: #4a9fd4;
    }
}

.promo-card .font-headline-md {
    transition: color 0.3s ease;
}

/* Testimonial carousel */
.testimonial-carousel {
    max-width: 56rem;
    margin: 0 auto;
}

.testimonial-carousel__stage {
    position: relative;
    height: 26rem;
    margin: 0 auto 2rem;
    perspective: 1400px;
}

@media (min-width: 768px) {
    .testimonial-carousel__stage {
        height: 24rem;
    }
}

.testimonial-carousel__card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(calc(100% - 2rem), 28rem);
    margin: 0;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid rgba(110, 184, 232, 0.28);
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 6px 28px rgba(30, 51, 72, 0.08);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0.35;
    filter: blur(5px);
    z-index: 1;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s ease,
        filter 0.55s ease,
        box-shadow 0.55s ease;
    will-change: transform, opacity, filter;
}

.testimonial-carousel__card.is-active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    filter: blur(0);
    z-index: 10;
    box-shadow:
        0 4px 16px rgba(74, 159, 212, 0.1),
        0 24px 56px rgba(30, 51, 72, 0.14);
    cursor: pointer;
}

.testimonial-carousel__card.is-prev {
    transform: translate(calc(-50% - 10.5rem), -50%) scale(0.9);
    z-index: 2;
}

.testimonial-carousel__card.is-next {
    transform: translate(calc(-50% + 10.5rem), -50%) scale(0.9);
    z-index: 2;
}

@media (max-width: 767px) {
    .testimonial-carousel__stage {
        height: 22rem;
    }
    .testimonial-carousel__card.is-prev {
        transform: translate(calc(-50% - 4.5rem), -50%) scale(0.82);
        opacity: 0.25;
    }
    .testimonial-carousel__card.is-next {
        transform: translate(calc(-50% + 4.5rem), -50%) scale(0.82);
        opacity: 0.25;
    }
}

.testimonial-carousel__quote-icon {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 3rem;
    color: rgba(110, 184, 232, 0.2);
    pointer-events: none;
    line-height: 1;
}

.testimonial-carousel__card.is-prev .testimonial-carousel__quote-icon,
.testimonial-carousel__card.is-next .testimonial-carousel__quote-icon {
    opacity: 0.5;
}

.testimonial-carousel__text {
    position: relative;
    z-index: 1;
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    line-height: 1.55;
    font-style: italic;
    color: #5a6d80;
}

.testimonial-carousel__card.is-active .testimonial-carousel__text {
    color: #1e3348;
    font-size: 0.9375rem;
}

.testimonial-carousel__author {
    position: relative;
    z-index: 1;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #6eb8e8;
}

.testimonial-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.testimonial-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(110, 184, 232, 0.45);
    background: #ffffff;
    color: #4a9fd4;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
    .testimonial-carousel__arrow:hover {
        background: #eef6fc;
        border-color: #6eb8e8;
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(74, 159, 212, 0.2);
    }

    .testimonial-carousel__arrow:active {
        transform: scale(0.96);
    }
}

.testimonial-carousel__dots {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.testimonial-carousel__dots li {
    display: flex;
}

.testimonial-carousel__dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(110, 184, 232, 0.35);
    cursor: pointer;
    transition:
        width 0.3s ease,
        background 0.3s ease,
        transform 0.25s ease;
}

@media (hover: hover) {
    .testimonial-carousel__dot:not(.is-active):hover {
        transform: scale(1.25);
        background: rgba(110, 184, 232, 0.55);
    }
}

.testimonial-carousel__dot.is-active {
    width: 1.75rem;
    background: #6eb8e8;
}

.testimonial-carousel__card:focus-visible,
.testimonial-carousel__arrow:focus-visible,
.testimonial-carousel__dot:focus-visible {
    outline: 2px solid #4a9fd4;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .image-card,
    .image-card__media img,
    .photo-card,
    .photo-card__inner img,
    .promo-card,
    .testimonial-carousel__card {
        transition: none;
    }
    .image-card:hover,
    .photo-card:hover,
    .promo-card:hover {
        transform: none;
    }
    .image-card:hover .image-card__media img,
    .photo-card:hover .photo-card__inner img {
        transform: none;
    }
    .testimonial-carousel__card.is-prev {
        transform: translate(calc(-50% - 10.5rem), -50%) scale(0.9);
    }
    .testimonial-carousel__card.is-next {
        transform: translate(calc(-50% + 10.5rem), -50%) scale(0.9);
    }
    @media (max-width: 767px) {
        .testimonial-carousel__card.is-prev {
            transform: translate(calc(-50% - 4.5rem), -50%) scale(0.82);
        }
        .testimonial-carousel__card.is-next {
            transform: translate(calc(-50% + 4.5rem), -50%) scale(0.82);
        }
    }
}

/* 404 error page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 5rem);
    padding: 6rem 1.5rem;
}

.error-page__panel {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
}

@media (min-width: 768px) {
    .error-page__panel {
        padding: 3.5rem 3rem;
    }
}

.error-page__code {
    font-family: Montserrat, sans-serif;
    font-size: clamp(4.5rem, 16vw, 7.5rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: 0.12em;
    color: rgba(110, 184, 232, 0.4);
    margin-bottom: 0.5rem;
}

.error-page__icon {
    font-size: 3rem;
    color: #6eb8e8;
    margin-bottom: 1rem;
}
