/* Specific styles for 404 page content */

/* Main section padding */
.error-main-section {
    padding: 60px 0;
    text-align: center;
}

.error-content-wrapper {
    background: rgba(255, 255, 255, 0.95); /* Slightly more opaque for better readability on textured background */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInContent 1s ease-out 0.5s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInContent {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Error Code Styles with Glitch Effect */
.error-code {
    font-family: 'Arial Black', Gadget, sans-serif; /* More impactful font */
    font-size: clamp(6rem, 20vw, 12rem); /* Responsive font size */
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--blue-royal, #1E3A8A); /* Using theme color */
    line-height: 1;
    position: relative;
    animation: glitch-load 0.5s ease-out 0.8s forwards, glitch 3s infinite linear 1.5s;
    text-shadow:
        0 0 5px rgba(255,255,255,0.5),
        0 0 10px var(--gold, #FFD700),
        0 0 15px var(--gold, #FFD700);
}

.error-code span {
    display: inline-block;
}

@keyframes glitch-load {
    0% { text-shadow: none; opacity: 0; transform: scale(0.8); }
    100% { 
        text-shadow:
            0 0 5px rgba(255,255,255,0.5),
            0 0 10px var(--gold, #FFD700),
            0 0 15px var(--gold, #FFD700);
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes glitch {
    0%, 100% {
        transform: skew(0deg);
        text-shadow:
            0 0 5px rgba(255,255,255,0.5),
            0 0 10px var(--gold, #FFD700),
            0 0 15px var(--gold, #FFD700);
    }
    5% {
        transform: skew(1deg) translateX(-2px);
        text-shadow:
            2px 0px 1px rgba(255,0,0,0.5),
            -2px 0px 1px rgba(0,255,0,0.5),
            0px 0px 10px var(--gold, #FFD700);
    }
    10% {
        transform: skew(-1deg) translateX(2px);
    }
    15% {
        transform: skew(0.5deg) translateY(-1px);
    }
    20% {
        transform: skew(0deg);
    }
    /* Add more steps for a more complex glitch if desired */
}


/* Text Styles */
.error-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--blue-deep, #0A1628);
    margin-bottom: 20px;
    font-weight: 700;
}

.error-message {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--gray-700, #374151);
    margin-bottom: 30px;
    line-height: 1.7;
}

/* Quote Styles */
.error-quote {
    margin: 30px auto;
    padding: 20px;
    border-left: 5px solid var(--gold, #FFD700);
    background-color: var(--gray-50, #F9FAFB);
    border-radius: 8px;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.error-quote blockquote {
    margin: 0;
    font-style: italic;
    color: var(--gray-600, #4B5563);
    font-size: 1.05em;
}

.error-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--gray-700, #374151);
    text-align: right;
    font-weight: 500;
}

/* Action Buttons - Aligned with theme */
.error-actions .btn {
    text-decoration: none;
    padding: 14px 30px;
    margin: 10px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.error-actions .btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: var(--blue-royal, #1E3A8A);
    color: white;
}

.btn-primary:hover {
    background-color: var(--blue-deep, #0A1628);
}

.btn-secondary {
    background-color: var(--gray-200, #E5E7EB);
    color: var(--blue-deep, #0A1628);
    border-color: var(--gray-200, #E5E7EB);
}

.btn-secondary:hover {
    background-color: var(--gray-50, #F9FAFB);
    border-color: var(--blue-royal, #1E3A8A);
    color: var(--blue-royal, #1E3A8A);
}

/* Font Awesome Icons */
.fas {
    font-size: 1.1em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .error-content-wrapper {
        padding: 30px;
        margin: 20px;
    }
    .error-code {
        font-size: clamp(5rem, 18vw, 8rem);
    }
    .error-title {
        font-size: clamp(1.5rem, 3.5vw, 2rem);
    }
    .error-message {
        font-size: clamp(0.9rem, 2.2vw, 1.05rem);
    }
    .error-quote {
        max-width: 95%;
    }
    .error-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .error-actions .btn {
        width: calc(100% - 20px); /* Full width buttons on mobile, accounting for margin */
        margin: 0 10px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .error-content-wrapper {
        padding: 20px;
    }
     .error-code {
        font-size: clamp(4rem, 15vw, 6rem);
        margin-bottom: 15px;
    }
    .error-title {
        font-size: clamp(1.3rem, 3vw, 1.8rem);
        margin-bottom: 15px;
    }
    .error-message {
        font-size: clamp(0.85rem, 2vw, 1rem);
        margin-bottom: 20px;
    }
    .error-quote {
        padding: 15px;
    }
    .error-actions .btn {
        font-size: 1rem;
    }
}

