
/* ==========================================
   RED DUNE BUGGY TOURS - 404 ERROR PAGE
========================================== */

.rd-404-section {
    --rd-red: #c91f22;
    --rd-red-dark: #991719;
    --rd-gold: #e8ad53;
    --rd-ink: #29221e;
    
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 690px;
    padding: 85px 6%;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 82% 20%, rgba(236, 176, 93, .15), transparent 35%),
        linear-gradient(135deg, #fffdf9 0%, #fbf4eb 55%, #f5e6d3 100%);
}

.rd-404-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .28;
    pointer-events: none;
    background-image: radial-gradient(rgba(163, 107, 48, .24) .7px, transparent .7px);
    background-size: 19px 19px;
    mask-image: linear-gradient(90deg, transparent, #000 70%);
}

.rd-404-container {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 35px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Text content */
.rd-404-content {
    position: relative;
    z-index: 2;
    animation: rd404FadeUp .7s ease both;
}

.rd-404-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    padding: 9px 14px;
    border: 1px solid rgba(201, 31, 34, .14);
    border-radius: 50px;
    background: rgba(255, 255, 255, .75);
    color: var(--rd-red-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    box-shadow: 0 5px 20px rgba(70, 40, 15, .04);
}

.rd-404-badge i {
    font-size: 15px;
    color: var(--rd-gold);
}

/* Large 404 typography */
.rd-404-number {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 2px -5px;
    color: var(--rd-red);
    font-size: clamp(100px, 13vw, 165px);
    font-weight: 900;
    letter-spacing: -10px;
    line-height: .95;
    text-shadow: 0 8px 25px rgba(171, 28, 29, .09);
}

.rd-404-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(82px, 10vw, 130px);
    height: clamp(82px, 10vw, 130px);
    margin: 0 5px 0 10px;
    border: 7px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
    background: linear-gradient(145deg, #f7c775, #d99a3f);
    color: #fffaf1;
    font-size: clamp(36px, 5vw, 65px);
    letter-spacing: 0;
    box-shadow:
        0 12px 35px rgba(180, 117, 43, .22),
        inset 0 2px 5px rgba(255, 255, 255, .5);
    animation: rd404Float 4s ease-in-out infinite;
}

.rd-404-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 210px;
    margin: 20px 0 18px;
    color: var(--rd-gold);
    font-size: 14px;
}

.rd-404-divider span {
    width: 65px;
    height: 1px;
    background: linear-gradient(90deg, var(--rd-gold), transparent);
}

.rd-404-divider span:last-child {
    transform: rotate(180deg);
}

.rd-404-title {
    margin: 0 0 15px;
    color: var(--rd-ink);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 850;
    letter-spacing: -1.5px;
    line-height: 1.15;
}

.rd-404-title span {
    color: var(--rd-red);
}

.rd-404-description {
    max-width: 480px;
    margin: 0;
    color: #74675d;
    font-size: 15px;
    line-height: 1.85;
}

/* Action buttons */
.rd-404-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.rd-404-home-btn,
.rd-404-contact-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 51px;
    padding: 13px 17px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease,
        color .25s ease;
}

.rd-404-home-btn {
    color: #fff;
    background: linear-gradient(120deg, var(--rd-red-dark), var(--rd-red));
    box-shadow: 0 8px 22px rgba(180, 29, 31, .2);
}

.rd-404-home-btn:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 13px 28px rgba(180, 29, 31, .3);
}

.rd-404-home-btn > i:first-child {
    font-size: 17px;
}

.rd-404-btn-arrow {
    margin-left: 4px;
    font-size: 14px;
    transition: transform .25s ease;
}

.rd-404-home-btn:hover .rd-404-btn-arrow {
    transform: translate(3px, -3px);
}

.rd-404-contact-btn {
    border: 1px solid #e5d3bd;
    background: rgba(255, 255, 255, .65);
    color: var(--rd-ink);
}

.rd-404-contact-btn:hover {
    transform: translateY(-3px);
    border-color: var(--rd-red);
    background: #fff;
    color: var(--rd-red);
    box-shadow: 0 8px 22px rgba(70, 40, 15, .07);
}

.rd-404-contact-btn i {
    font-size: 17px;
}

/* Bottom caption */
.rd-404-bottom-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 33px;
    color: #968574;
    font-size: 11px;
    font-weight: 600;
}

.rd-404-bottom-note > i {
    color: var(--rd-gold);
    font-size: 15px;
}

.rd-404-note-line {
    width: 25px;
    height: 1px;
    background: #ddc6a8;
}

/* Desert illustration */
.rd-404-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 430px;
    animation: rd404FadeUp .9s .12s ease both;
}

.rd-404-orbit {
    position: absolute;
    width: 350px;
    height: 350px;
    border: 1px solid rgba(203, 149, 73, .23);
    border-radius: 50%;
}

.rd-404-orbit-one {
    transform: scaleX(1.2) rotate(-20deg);
}

.rd-404-orbit-two {
    width: 285px;
    height: 390px;
    transform: rotate(35deg);
}

.rd-404-sun {
    position: absolute;
    top: 45px;
    right: 12%;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffe0a0, #edb65f);
    box-shadow: 0 0 70px rgba(237, 182, 95, .32);
}

.rd-404-desert-scene {
    position: relative;
    width: 100%;
    max-width: 470px;
    height: 330px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 48% 48% 23px 23px;
    background: linear-gradient(180deg, #f8dba9 0%, #f4c47c 47%, #d99347 100%);
    box-shadow: 0 25px 65px rgba(124, 74, 30, .15);
}

.rd-404-dune {
    position: absolute;
    right: -15%;
    bottom: -60px;
    left: -15%;
    height: 220px;
    border-radius: 50% 50% 0 0;
}

.rd-404-dune-back {
    bottom: 60px;
    left: -25%;
    width: 140%;
    height: 180px;
    background: #edb96e;
    transform: rotate(-9deg);
}

.rd-404-dune-middle {
    right: -35%;
    bottom: 5px;
    width: 145%;
    height: 170px;
    background: linear-gradient(160deg, #d99145, #e8ad61);
    transform: rotate(9deg);
}

.rd-404-dune-front {
    bottom: -105px;
    left: -25%;
    width: 155%;
    height: 210px;
    background: linear-gradient(140deg, #b96632, #d58b43);
    transform: rotate(-7deg);
}

.rd-404-tour-icon {
    position: absolute;
    top: 80px;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 27px;
    background: rgba(255, 255, 255, .23);
    color: #fffaf2;
    font-size: 57px;
    transform: translateX(-50%) rotate(-7deg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-shadow: 0 5px 18px rgba(118, 65, 26, .18);
    box-shadow: 0 12px 30px rgba(133, 75, 27, .12);
}

.rd-404-scene-caption {
    position: absolute;
    right: 17px;
    bottom: 17px;
    left: 17px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    background: rgba(95, 49, 21, .38);
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.rd-404-scene-caption i {
    color: #ffd58e;
    font-size: 16px;
}

/* Animations */
@keyframes rd404Float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@keyframes rd404FadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet */
@media (max-width: 991px) {
    .rd-404-section {
        min-height: auto;
        padding: 65px 5%;
    }

    .rd-404-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rd-404-content {
        text-align: center;
    }

    .rd-404-badge {
        margin-bottom: 18px;
    }

    .rd-404-number {
        justify-content: center;
        margin-left: 0;
        font-size: clamp(105px, 20vw, 155px);
    }

    .rd-404-icon {
        width: clamp(80px, 13vw, 115px);
        height: clamp(80px, 13vw, 115px);
    }

    .rd-404-divider {
        justify-content: center;
        margin-right: auto;
        margin-left: auto;
    }

    .rd-404-title {
        font-size: clamp(32px, 5vw, 43px);
    }

    .rd-404-description {
        margin: 0 auto;
    }

    .rd-404-actions {
        justify-content: center;
    }

    .rd-404-bottom-note {
        justify-content: center;
        margin-top: 24px;
    }

    .rd-404-visual {
        min-height: 350px;
    }

    .rd-404-desert-scene {
        max-width: 430px;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .rd-404-section {
        padding: 48px 18px 35px;
    }

    .rd-404-badge {
        gap: 7px;
        padding: 8px 11px;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .rd-404-number {
        gap: 4px;
        font-size: clamp(85px, 24vw, 125px);
        letter-spacing: -6px;
    }

    .rd-404-icon {
        width: clamp(66px, 19vw, 90px);
        height: clamp(66px, 19vw, 90px);
        margin-right: 3px;
        margin-left: 7px;
        border-width: 5px;
        font-size: clamp(29px, 8vw, 42px);
    }

    .rd-404-title {
        margin-bottom: 12px;
        font-size: 32px;
        letter-spacing: -.8px;
    }

    .rd-404-description {
        font-size: 13px;
        line-height: 1.75;
    }

    .rd-404-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 22px;
    }

    .rd-404-home-btn,
    .rd-404-contact-btn {
        width: 100%;
        min-height: 48px;
        padding: 12px 15px;
        font-size: 13px;
    }

    .rd-404-bottom-note {
        gap: 7px;
        font-size: 10px;
    }

    .rd-404-note-line {
        width: 16px;
    }

    .rd-404-visual {
        min-height: 285px;
        margin-top: 3px;
    }

    .rd-404-orbit {
        width: 260px;
        height: 260px;
    }

    .rd-404-orbit-two {
        width: 220px;
        height: 300px;
    }

    .rd-404-sun {
        top: 25px;
        right: 9%;
        width: 75px;
        height: 75px;
    }

    .rd-404-desert-scene {
        height: 260px;
        border-radius: 42% 42% 18px 18px;
    }

    .rd-404-dune-back {
        bottom: 45px;
        height: 145px;
    }

    .rd-404-dune-middle {
        height: 135px;
    }

    .rd-404-dune-front {
        bottom: -115px;
        height: 190px;
    }

    .rd-404-tour-icon {
        top: 65px;
        width: 75px;
        height: 75px;
        border-radius: 21px;
        font-size: 43px;
    }

    .rd-404-scene-caption {
        right: 10px;
        bottom: 10px;
        left: 10px;
        padding: 10px 11px;
        font-size: 11px;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .rd-404-content,
    .rd-404-visual,
    .rd-404-icon {
        animation: none !important;
    }

    .rd-404-home-btn,
    .rd-404-contact-btn {
        transition: none;
    }
}
