/* ========================================= */
/* 404 ERROR PAGE SPECIFIC STYLES */
/* ========================================= */

/* Font Fix for Hero Title */
.error-hero .display-1 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 900;
}

.error-hero .display-6 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 700;
}

.error-hero h1 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 700;
}

.error-hero h2 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 700;
}

.error-hero p {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 400;
}

/* Error Hero Section */
.error-hero {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 30%, #A0522D 70%, #654321 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.error-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 193, 7, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(152, 251, 152, 0.1) 0%, transparent 50%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
    z-index: 1;
    animation: twinkle 3s ease-in-out infinite alternate;
}

.error-hero .container {
    position: relative;
    z-index: 2;
}

/* Deer Badge - ใช้สีเหมือนหน้าอื่น */
.deer-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--warning) 0%, #f39c12 100%);
    color: var(--dark);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(245, 213, 71, 0.4);
    transform: translateY(30px);
    opacity: 0;
    animation: slideInUp 0.8s ease-out 0.2s forwards;
}

/* Error Number Animation */
.error-number {
    font-size: 8rem !important;
    font-weight: 900;
    background: linear-gradient(45deg, #ffc107, #fff, #ffc107);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2s ease-in-out infinite, bounce 2s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 193, 7, 0.5);
}

/* Deer Container */
.error-deer-container {
    position: relative;
    display: inline-block;
}

.error-deer-img {
    max-height: 400px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.7;
    animation: floatRandom 4s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.floating-element:nth-child(3) {
    top: 80%;
    left: 70%;
    animation-delay: 2s;
}

/* Quick Link Cards */
.quick-link-card {
    background: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
    text-align: center;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-top-color: #8B4513;
}

.quick-link-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8B4513, #CD853F);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.quick-link-icon i {
    font-size: 1.8rem;
    color: white;
}

.quick-link-card:hover .quick-link-icon {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(139, 69, 19, 0.3);
}

.quick-link-card h5 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.quick-link-card p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Fun Facts */
.fact-item {
    text-align: center;
    padding: 20px;
}

.fact-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.fact-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #8B4513;
}

.fact-item p {
    color: #6c757d;
    font-weight: 500;
    margin: 0;
}

/* Enhanced Buttons */
.btn.enhanced {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn.enhanced:hover::before {
    left: 100%;
}

.btn.enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Show on Load Animation */
.show-on-load {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
}

.show-on-load:nth-child(1) {
    animation-delay: 0.1s;
}

.show-on-load:nth-child(2) {
    animation-delay: 0.2s;
}

.show-on-load:nth-child(3) {
    animation-delay: 0.3s;
}

.show-on-load:nth-child(4) {
    animation-delay: 0.4s;
}

/* Animations */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes floatRandom {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(10px, -10px) rotate(5deg);
    }

    66% {
        transform: translate(-5px, 5px) rotate(-3deg);
    }
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .error-number {
        font-size: 6rem !important;
    }

    .error-deer-img {
        max-height: 300px;
    }

    .quick-link-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 767.98px) {
    .error-number {
        font-size: 4rem !important;
    }

    .error-deer-img {
        max-height: 250px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .quick-link-card {
        color: white;
    }

    .quick-link-card h5 {
        color: white;
    }
}

/* Print Styles */
@media print {

    .error-hero::before,
    .floating-elements,
    .btn {
        display: none !important;
    }

    .error-hero {
        background: white !important;
        color: black !important;
    }
}