:root {
    color-scheme: light;
    font-family: 'Inter', sans-serif;
    --heading-font: 'Playfair Display', serif;
    color: #1f1f1f;
    background: #f7f1e8;
    --bg: #f7f1e8;
    --surface: #ffffff;
    --surface-soft: #f2e5d5;
    --text: #1f1f1f;
    --muted: #6d665d;
    --accent: #b39161;
    --accent-dark: #8c6d45;
    --border: rgba(31, 31, 31, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--heading-font);
}

strong,
b,
.header-nav a {
    font-family: var(--heading-font);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
a {
    font: inherit;
}

.container {
    width: min(1200px, calc(100% - 3rem));
    margin: 0 auto;
}

.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(20, 20, 20, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1200px;
}

.header-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.85rem 0.65rem;
    flex: 1 1 0;
    text-align: center;
    min-width: 0;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.12);
}

.header-nav a:hover {
    color: #f8f6f0;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    padding: 0;
    position: relative;
}

.hero::before {
    display: none;
}

.hero-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
    grid-template-columns: 1.1fr 0.9fr;
    position: relative;
    z-index: 1;
}

.hero-grid .hero-copy {
    min-width: 0;
}

.hero-copy {
    position: relative;
    overflow: visible;
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.9s ease forwards;
    background: var(--surface);
    border-radius: 1.8rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
    container-type: inline-size;
    container-name: hero-copy;
}

.hero-copy .hero-title,
.hero-copy p,
.hero-copy .buttons {
    animation-delay: 0.15s;
}

.hero-copy .hero-title {
    margin: 0 0 1.1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(179, 145, 97, 0.35);
    font-size: clamp(1.2rem, 3.85vw + 0.75rem, 3.5rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-family: var(--heading-font);
    font-weight: 600;
    color: #1e1b18;
    text-wrap: balance;
    overflow-wrap: break-word;
}

@container hero-copy (min-width: 0) {
    .hero-copy .hero-title {
        font-size: clamp(1.2rem, 4cqi + 0.72rem, 3.5rem);
    }
}

.hero-copy .hero-title-name {
    font-weight: 700;
    color: var(--accent-dark);
    letter-spacing: -0.01em;
}

.hero-copy .subtitle {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.hero-copy p {
    margin: 0 0 2rem;
    max-width: 42rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--muted);
}

.hero-highlights {
    list-style: none;
    padding: 0;
    margin: -0.2rem 0 1.5rem;
    display: grid;
    gap: 0.7rem;
}

.hero-highlights li {
    display: grid;
    grid-template-columns: 1.1rem 1fr;
    gap: 0.6rem;
    color: var(--muted);
    align-items: center;
}

.hero-highlights li::before {
    content: '✦';
    color: var(--accent);
    font-size: 0.95rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0 0 1.7rem;
}

.hero-meta-item {
    background: rgba(179, 145, 97, 0.11);
    border: 1px solid rgba(179, 145, 97, 0.2);
    border-radius: 0.95rem;
    padding: 0.7rem 0.85rem;
    min-width: 10.5rem;
}

.hero-meta-item strong {
    display: block;
    font-size: 0.92rem;
    color: var(--accent-dark);
}

.hero-meta-item span {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.hero-copy .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.button-primary,
.button-secondary {
    border-radius: 999px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 18px 50px rgba(180, 141, 89, 0.18);
}

.button-primary:hover {
    transform: translateY(-3px) scale(1.02);
    background: var(--accent-dark);
    box-shadow: 0 20px 40px rgba(180, 141, 89, 0.25);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border: 1px solid rgba(31, 31, 31, 0.08);
}

.button-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    background: #fff;
    box-shadow: 0 20px 40px rgba(31, 31, 31, 0.1);
}

.hero-media {
    width: 100%;
    border-radius: 2rem;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 30px 90px rgba(31, 31, 31, 0.18);
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.9s ease 0.2s forwards;
    position: relative;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.65s ease;
}

.hero-media:hover img {
    transform: scale(1.04);
}

.hero-media-note {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    background: rgba(20, 20, 20, 0.7);
    color: #fff;
    border-radius: 1rem;
    padding: 0.75rem 0.9rem;
    backdrop-filter: blur(3px);
}

.hero-media-note p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.info-block {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 1.8rem;
    padding: 2rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 20px 55px rgba(31, 31, 31, 0.08);
}

.info-block h3 {
    margin-top: 0;
    color: var(--text);
}

.section-alt {
    background: var(--surface-soft);
    border-radius: 3rem;
    padding: 5rem 2.5rem;
}

.hero-section-alt.section-alt {
    display: flex;
    align-items: center;
    min-height: calc(100dvh - 6.5rem);
    padding: clamp(2.25rem, 5vw, 3.75rem) clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid rgba(31, 31, 31, 0.07);
    box-shadow: 0 24px 70px rgba(31, 31, 31, 0.06);
}

.hero-section-alt .hero-grid {
    width: 100%;
}

section {
    padding: 5rem 0;
}

section.hero {
    padding: 2.25rem 0 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    background: var(--surface);
    border-radius: 1.8rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
}

.section-title h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.05;
    font-family: var(--heading-font);
    font-weight: 600;
}

.section-title p {
    margin: 0.75rem auto 0;
    max-width: 42rem;
    color: var(--muted);
    line-height: 1.75;
}

.section-copy {
    margin: 2rem auto 0;
    max-width: 64rem;
    color: var(--muted);
    line-height: 1.8;
    text-align: center;
}

.section-title,
.card,
.contact-card,
.benefits-item,
.step {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
}

.hero-copy::after,
.section-title::after,
.card::after,
.contact-card::after,
.benefits-item::after,
.step::after {
    content: '';
    position: absolute;
    right: -2.4rem;
    top: -2.4rem;
    width: 8.5rem;
    height: 8.5rem;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(179, 145, 97, 0.13), rgba(179, 145, 97, 0));
    pointer-events: none;
}

.about-timeline {
    position: relative;
    max-width: 52rem;
    margin: 0 auto;
    padding: 0.5rem 0 0.5rem 2.8rem;
    display: grid;
    gap: 1.25rem;
}

.about-timeline::before {
    content: '';
    position: absolute;
    left: 1.15rem;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(179, 145, 97, 0.25), rgba(140, 109, 69, 0.9), rgba(179, 145, 97, 0.25));
}

.timeline-item {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.2rem 1.2rem 1.2rem 1.4rem;
    box-shadow: 0 14px 30px rgba(31, 31, 31, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 1.55rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    z-index: 2;
    background: radial-gradient(circle at 35% 35%, #fff 0.1rem, var(--accent) 0.45rem, var(--accent-dark) 100%);
    box-shadow: 0 0 0 4px rgba(179, 145, 97, 0.18);
}

.timeline-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(31, 31, 31, 0.1);
}

.timeline-year {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-dark);
    background: rgba(179, 145, 97, 0.14);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    margin-bottom: 0.6rem;
}

.timeline-content {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Služby a ceník: stejná šířka, zarovnané sloupce */
.cards.cenik-grid,
.troubles-grid {
    max-width: 72rem;
    margin-inline: auto;
    align-items: stretch;
}

.cards.cenik-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cards.cenik-grid .card {
    grid-column: span 2;
}

.cards.cenik-grid .card:nth-child(4) {
    grid-column: 2 / 4;
}

.cards.cenik-grid .card:nth-child(5) {
    grid-column: 4 / 6;
    width: auto;
    justify-self: stretch;
    padding: 2rem;
}

.cenik-grid .card:nth-child(5) ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.cenik-grid .card:nth-child(5) li {
    flex: 1 1 12rem;
}

.card {
    background: var(--surface);
    border-radius: 1.8rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.cenik-grid .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cenik-grid .card ul {
    flex: 1;
}

.cenik-grid .price-range {
    white-space: nowrap;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(179, 145, 97, 0.25);
}

.card-icon {
    width: 3.2rem;
    height: 3.2rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: rgba(179, 145, 97, 0.12);
    color: var(--accent-dark);
    font-size: 1.6rem;
    margin-bottom: 1.4rem;
}

.card h3 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-family: 'Playfair Display', serif;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.card > p + ul {
    margin-top: 0.75rem;
}

.card ul,
.contact-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.85rem;
}

.card li {
    position: relative;
    padding-left: 1rem;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.card li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
}

.contact-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-top: 2rem;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-card--wide {
    grid-column: 1 / -1;
}

.contact-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    grid-column: 1 / -1;
}

.contact-label {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.contact-value {
    margin: 0 0 0.9rem;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.45;
}

.contact-value:last-child {
    margin-bottom: 0;
}

.contact-value a {
    font-weight: 600;
}

.contact-card {
    background: var(--surface);
    border-radius: 1.8rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.06);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: rgba(179, 145, 97, 0.25);
    box-shadow: 0 22px 50px rgba(31, 31, 31, 0.1);
}

.contact-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.contact-card p,
.contact-card a,
.contact-card li {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.contact-card a {
    color: var(--accent-dark);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.benefits-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefits-item {
    background: var(--surface);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.05);
}

.troubles-grid,
.team-grid,
.gallery-grid {
    display: grid;
    gap: 1.5rem;
}

.troubles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-grid,
.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card::after {
    content: '';
    position: absolute;
    right: -2.2rem;
    top: -2.2rem;
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(179, 145, 97, 0.14), rgba(179, 145, 97, 0));
    pointer-events: none;
}

.service-tag {
    display: inline-block;
    margin-bottom: 0.95rem;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: rgba(179, 145, 97, 0.16);
}

.service-focus {
    margin-top: auto;
    margin-bottom: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-left: 3px solid rgba(179, 145, 97, 0.7);
    border-radius: 0.75rem;
    background: rgba(247, 241, 232, 0.75);
}

.service-card > p:not(.service-focus) {
    margin-bottom: 0.5rem;
}

.service-points-line {
    display: inline-block;
    white-space: nowrap;
    margin-top: 0.15em;
}

.service-points {
    list-style: none;
    padding: 0;
    margin: 0.9rem 0 0;
    display: grid;
    gap: 1.2rem;
}

.service-points li {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.55rem;
    color: var(--muted);
    line-height: 1.7;
}

.service-points li::before {
    content: '✦';
    flex-shrink: 0;
    width: 1.1rem;
    text-align: center;
    color: var(--accent);
    font-size: 0.95rem;
    line-height: 1.7;
}

.service-points li span {
    flex: 1 1 0%;
    min-width: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.service-card > p {
    word-break: normal;
    overflow-wrap: break-word;
}

.gallery-item {
    border-radius: 1.8rem;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.08);
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.gallery-item--contain img {
    object-fit: contain;
    object-position: center;
    background: var(--surface);
}

.gallery-caption {
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    background: var(--surface);
}

@media (max-width: 960px) {
    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .troubles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .troubles-grid .service-card:last-child {
        grid-column: 1 / -1;
        width: min(100%, calc(50% - 0.75rem));
        justify-self: center;
    }

    .cards.cenik-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cards.cenik-grid .card,
    .cards.cenik-grid .card:nth-child(4),
    .cards.cenik-grid .card:nth-child(5) {
        grid-column: auto;
        width: 100%;
        justify-self: stretch;
    }

    .cards.cenik-grid .card:nth-child(3) {
        grid-column: 1 / -1;
    }

    .cards.cenik-grid .card:nth-child(4),
    .cards.cenik-grid .card:nth-child(5) {
        grid-column: auto;
        grid-row: auto;
        padding: 2rem;
    }
}

.benefits-item h3 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-family: 'Playfair Display', serif;
}

.benefits-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.steps {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 18px 45px rgba(31, 31, 31, 0.05);
}

.step-number {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h3 {
    margin: 0 0 0.75rem;
    font-family: 'Playfair Display', serif;
}

.step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.cta {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,241,232,0.96));
    border-radius: 2.5rem;
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 24px 80px rgba(31, 31, 31, 0.07);
}

.cta h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    font-family: 'Playfair Display', serif;
}

.cta p {
    margin: 0 0 2rem;
    color: var(--muted);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vstupní animace na podstránkách (stejný princip jako hero) */
main .section-alt > .section-title {
    opacity: 0;
    animation: fadeInUp 0.78s ease 0.05s forwards;
}

main .section-alt > .section-copy {
    opacity: 0;
    animation: fadeInUp 0.72s ease 0.12s forwards;
}

main .section-alt .contact-grid .contact-card {
    opacity: 0;
    animation: fadeInUp 0.72s ease forwards;
}

main .section-alt .contact-grid > .contact-card:nth-child(1) {
    animation-delay: 0.12s;
}

main .section-alt .contact-pair .contact-card:nth-child(1) {
    animation-delay: 0.2s;
}

main .section-alt .contact-pair .contact-card:nth-child(2) {
    animation-delay: 0.28s;
}

main .section-alt .contact-grid > .contact-card:nth-child(3) {
    animation-delay: 0.36s;
}

main .section-alt .troubles-grid .service-card {
    opacity: 0;
    animation: fadeInUp 0.74s ease forwards;
}

main .section-alt .troubles-grid .service-card:nth-child(1) {
    animation-delay: 0.12s;
}

main .section-alt .troubles-grid .service-card:nth-child(2) {
    animation-delay: 0.22s;
}

main .section-alt .troubles-grid .service-card:nth-child(3) {
    animation-delay: 0.32s;
}

main .section-alt .cenik-grid .card {
    opacity: 0;
    animation: fadeInUp 0.72s ease forwards;
}

main .section-alt .cenik-grid .card:nth-child(1) {
    animation-delay: 0.12s;
}

main .section-alt .cenik-grid .card:nth-child(2) {
    animation-delay: 0.2s;
}

main .section-alt .cenik-grid .card:nth-child(3) {
    animation-delay: 0.28s;
}

main .section-alt .cenik-grid .card:nth-child(4) {
    animation-delay: 0.36s;
}

main .section-alt .cenik-grid .card:nth-child(5) {
    animation-delay: 0.44s;
}

main .section-alt .about-timeline .timeline-item {
    opacity: 0;
    animation: fadeInUp 0.68s ease forwards;
}

main .section-alt .about-timeline .timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

main .section-alt .about-timeline .timeline-item:nth-child(2) {
    animation-delay: 0.16s;
}

main .section-alt .about-timeline .timeline-item:nth-child(3) {
    animation-delay: 0.22s;
}

main .section-alt .about-timeline .timeline-item:nth-child(4) {
    animation-delay: 0.28s;
}

main .section-alt .about-timeline .timeline-item:nth-child(5) {
    animation-delay: 0.34s;
}

main .section-alt .about-timeline .timeline-item:nth-child(6) {
    animation-delay: 0.4s;
}

main .section-alt .about-timeline .timeline-item:nth-child(7) {
    animation-delay: 0.46s;
}

main .section-alt .about-timeline .timeline-item:nth-child(8) {
    animation-delay: 0.52s;
}

main .section-alt .gallery-grid .gallery-item {
    opacity: 0;
    animation: fadeInUp 0.72s ease forwards;
}

main .section-alt .gallery-grid .gallery-item:nth-child(1) {
    animation-delay: 0.12s;
}

main .section-alt .gallery-grid .gallery-item:nth-child(2) {
    animation-delay: 0.22s;
}

main .section-alt .gallery-grid .gallery-item:nth-child(3) {
    animation-delay: 0.32s;
}

@media (prefers-reduced-motion: reduce) {
    .hero-copy,
    .hero-media,
    main .section-alt > .section-title,
    main .section-alt > .section-copy,
    main .section-alt .contact-grid .contact-card,
    main .section-alt .troubles-grid .service-card,
    main .section-alt .cenik-grid .card,
    main .section-alt .about-timeline .timeline-item,
    main .section-alt .gallery-grid .gallery-item {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-media:hover img {
        transform: none !important;
    }
}

@media (max-width: 960px) {
    .cards:not(.cenik-grid),
    .benefits-grid,
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .header-nav {
        flex-wrap: wrap;
    }
    .header-nav a {
        flex: 1 1 48%;
    }
    .hero {
        padding-top: 0;
    }

    section.hero {
        padding: 1.5rem 0 2.5rem;
    }

    .hero-section-alt {
        display: block;
        min-height: auto;
        padding: 2.25rem 1.5rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-copy {
        text-align: center;
    }
    .hero-copy .hero-title {
        text-align: center;
    }
    .hero-copy .buttons {
        justify-content: center;
    }
    .hero-meta {
        justify-content: center;
    }
    .hero-highlights li {
        text-align: left;
    }
    .cards:not(.cenik-grid),
    .benefits-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .troubles-grid {
        grid-template-columns: 1fr;
    }

    .troubles-grid .service-card:last-child {
        width: 100%;
        grid-column: auto;
        justify-self: stretch;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        min-width: 0;
    }

    .cards.cenik-grid {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .cards.cenik-grid .card,
    .cards.cenik-grid .card:nth-child(4),
    .cards.cenik-grid .card:nth-child(5) {
        grid-column: auto;
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .section-alt {
        padding: 3rem 1.25rem;
        border-radius: 2rem;
    }

    .container {
        width: min(1200px, calc(100% - 1.5rem));
    }

    .contact-pair {
        grid-template-columns: 1fr;
    }

    .about-timeline {
        padding-left: 2.1rem;
    }
    .about-timeline::before {
        left: 0.75rem;
    }
    .timeline-item::before {
        left: -1.7rem;
    }
    section {
        padding: 3.5rem 0;
    }
}
