/**
*-----------------------------------------------
* 404 - nie znaleziono strony
*-----------------------------------------------
*/

.e404 {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 4.5rem;
    color: #1a1a1a;
    background-color: #f5f5f5;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
    background-size: 32px 32px;
}

.e404:before {
    content: ' ';
    position: absolute;
    top: -12rem;
    left: 50%;
    width: 46rem;
    height: 46rem;
    margin-left: -23rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.e404_inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

/* 4 [pachołek] 4 */

.e404_code {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    font-size: 12rem;
    font-size: clamp(7rem, 22vw, 12rem);
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.e404_digit {
    display: block;
    color: #1a1a1a;
    letter-spacing: -0.03em;
    text-shadow: 0.04em 0.04em 0 rgba(195, 44, 46, 0.2);
    animation: e404_drop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.e404_digit:last-child {
    animation-delay: 0.15s;
}

.e404_cone {
    display: block;
    width: 0.69em;
    height: 0.82em;
    margin: 0 0.04em 0.12em;
    animation: e404_drop 0.7s 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.e404_cone svg {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 50% 92%;
    animation: e404_wobble 3s 1s ease-in-out infinite;
}

/* teksty */

.e404_label {
    display: inline-block;
    margin: 0 0 1rem;
    padding: 0.35rem 0.9rem;
    background: #c32c2e;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 140%;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 3px;
}

.e404_title {
    margin: 0 0 1rem;
    color: #1a1a1a;
    font-size: 2.4rem;
    font-size: clamp(1.6rem, 3.6vw, 2.4rem);
    font-weight: 700;
}

.e404_lead {
    max-width: 620px;
    margin: 0 auto 2rem;
    color: #555;
    font-size: 1.05rem;
    line-height: 160%;
}

/* wyszukiwarka */

.e404_search {
    display: flex;
    max-width: 580px;
    margin: 0 auto 1.75rem;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.e404_search:focus-within {
    border-color: #c32c2e;
    box-shadow: 0 10px 30px rgba(195, 44, 46, 0.18);
}

.e404_search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.7rem 1rem;
    border: 0;
    background: transparent;
    color: #1a1a1a;
    font-size: 1rem;
    outline: none;
    box-shadow: none;
}

.e404_search button {
    flex: 0 0 auto;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: 3px;
    background: #c32c2e;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.e404_search button:hover,
.e404_search button:focus {
    background: #1a1a1a;
}

/* przyciski */

.e404_actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.e404 .e404_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    background: transparent;
    color: #1a1a1a;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s;
}

.e404 .e404_btn:hover,
.e404 .e404_btn:focus {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.e404 .e404_btn_primary {
    background: #c32c2e;
    border-color: #c32c2e;
    color: #fff;
}

.e404 .e404_btn_block {
    display: flex;
    width: 100%;
}

/* taśma ostrzegawcza */

.e404_tape {
    position: relative;
    z-index: 1;
    margin: 3.5rem -3rem 3rem;
    padding: calc(8px + 0.65rem) 0;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    transform: rotate(-2deg);
}

.e404_tape:before,
.e404_tape:after {
    content: ' ';
    position: absolute;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(-45deg, #c32c2e 0, #c32c2e 12px, #fff 12px, #fff 24px);
}

.e404_tape:before {
    top: 0;
}

.e404_tape:after {
    bottom: 0;
}

.e404_tape_track {
    display: flex;
    width: max-content;
    animation: e404_marquee 35s linear infinite;
}

.e404_tape_track span {
    display: flex;
    flex-shrink: 0;
}

.e404_tape_track em {
    padding: 0 1.5rem;
    color: #fff;
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
}

.e404_tape_track em:before {
    content: ' ';
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 1.5rem;
    background: #c32c2e;
    vertical-align: middle;
    transform: rotate(45deg);
}

/* kategorie + pomoc */

.e404_bottom {
    position: relative;
    z-index: 2;
}

.e404_subtitle {
    margin: 0 0 1.25rem;
    padding-left: 0.9rem;
    border-left: 4px solid #c32c2e;
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 700;
}

.e404_cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.e404 .e404_cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    height: 100%;
    padding: 0.9rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    color: #1a1a1a;
    font-weight: 500;
    transition: all 0.3s;
}

.e404 .e404_cats a i {
    flex-shrink: 0;
    color: #c32c2e;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.e404 .e404_cats a:hover,
.e404 .e404_cats a:focus {
    border-color: #c32c2e;
    color: #c32c2e;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.e404 .e404_cats a:hover i,
.e404 .e404_cats a:focus i {
    transform: translateX(4px);
}

.e404_help {
    position: relative;
    height: 100%;
    padding: 2rem 1.75rem;
    overflow: hidden;
    background: #1a1a1a;
    border-radius: 4px;
    color: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.e404_help:before {
    content: ' ';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(-45deg, #c32c2e 0, #c32c2e 10px, #1a1a1a 10px, #1a1a1a 20px);
}

.e404_help > * {
    position: relative;
    z-index: 2;
}

.e404_help .e404_help_icon {
    position: absolute;
    right: -0.75rem;
    bottom: -1rem;
    z-index: 1;
    color: rgba(255, 255, 255, 0.06);
    font-size: 8rem;
}

.e404_help .e404_subtitle {
    color: #fff;
}

.e404_help p {
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.75);
}

.e404 .e404_help_tel {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
}

.e404 .e404_help_tel i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #c32c2e;
    font-size: 1rem;
    transition: transform 0.3s;
}

.e404 .e404_help_tel:hover,
.e404 .e404_help_tel:focus {
    color: #fff;
}

.e404 .e404_help_tel:hover i,
.e404 .e404_help_tel:focus i {
    transform: rotate(-15deg) scale(1.1);
}

.e404 .e404_help .e404_btn_primary:hover,
.e404 .e404_help .e404_btn_primary:focus {
    background: #fff;
    border-color: #fff;
    color: #1a1a1a;
}

/* animacje */

@keyframes e404_drop {
    0% {
        opacity: 0;
        transform: translateY(-40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes e404_wobble {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@keyframes e404_marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .e404_digit,
    .e404_cone,
    .e404_cone svg,
    .e404_tape_track {
        animation: none;
    }
}

/* responsive */

@media all and (max-width: 991px) {
    .e404_bottom > div + div {
        margin-top: 2.5rem;
    }
}

@media all and (max-width: 767px) {
    .e404 {
        padding: 2.5rem 0 3rem;
    }

    .e404_tape {
        margin: 2.5rem -3rem 2.5rem;
    }
}

@media all and (max-width: 575px) {
    .e404_search button span {
        display: none;
    }

    .e404_actions .e404_btn {
        width: 100%;
    }

    .e404_cats {
        grid-template-columns: 1fr;
    }

    .e404_help {
        padding: 1.75rem 1.25rem;
    }
}
