/* Stacking Strategy:
 * Use isolation to create a contained stacking context for the entire 404 widget.
 * This ensures the header (z-index: 99999) will always overlay the entire 404 page.
 */
.custom-404-container {
    padding: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

@media (max-width: 768px) {
    .custom-404-container {
        padding: 0;
    }
}

.bg-decorations {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.bg-circle-1 {
    top: 5rem;
    left: 2.5rem;
    width: 18rem;
    height: 18rem;
    background-color: rgba(52, 152, 219, 0.08);
    animation: pulse1 8s ease-in-out infinite;
}

.bg-circle-2 {
    bottom: 5rem;
    right: 2.5rem;
    width: 24rem;
    height: 24rem;
    background-color: rgba(236, 240, 241, 0.5);
    animation: pulse2 10s ease-in-out infinite;
}

@keyframes pulse1 {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

@keyframes pulse2 {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.15); opacity: 0.5; }
}

.content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 64rem;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

@media (max-width: 1024px) {
    .content-wrapper {
        padding: 0;
    }
}

.heading-404 {
    position: relative;
    margin-top: 0;
    margin-bottom: 2rem;
}

.error-code {
    font-size: clamp(100px, 20vw, 180px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    user-select: none;
    margin: 0;
}

.message-section {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .message-section {
        padding: 0;
    }
}

.main-heading {
    font-size: clamp(1.5rem, 4vw, 1.875rem);
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.75rem;
}

.description {
    color: #5D6D7E;
    font-size: 1.125rem;
    max-width: 28rem;
    margin: 0 auto;
    line-height: 1.75;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .action-cards {
        padding: 0;
        gap: 0.75rem;
    }
}

@media (max-width: 639px) {
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .hire-card {
        grid-column: 1;
    }
}

.action-card {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid #E8ECF1;
    background: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 200px;
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: #3498DB;
}

.action-cards .action-card:hover {
    box-shadow: 0 8px 24px var(--hover-shadow-color, rgba(52, 152, 219, 0.12));
}

.primary-card {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    border-color: transparent;
    color: white;
}

.primary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.25);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-card .card-icon {
    background: rgba(255, 255, 255, 0.15);
}

.card-icon svg {
    width: 22px;
    height: 22px;
}

.primary-card .card-icon svg {
    color: #ffffff;
}

.card-content {
    flex: 1;
    text-align: center;
}

.card-content h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    letter-spacing: -0.01em;
}

.action-card:hover h3 {
    text-decoration: none;
}

.primary-card h3 {
    color: white;
}

.action-card:not(.primary-card) h3 {
    color: #2C3E50;
}

.card-content p {
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
    opacity: 0.85;
}

.primary-card p {
    color: rgba(255, 255, 255, 0.9);
}

.action-card:not(.primary-card) p {
    color: #5D6D7E;
}

.arrow-icon {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-4px);
}

.action-card:hover .arrow-icon {
    opacity: 0.6;
    transform: translateX(0);
}

.primary-card .arrow-icon {
    color: rgba(255, 255, 255, 0.8);
}

.action-card:not(.primary-card) .arrow-icon {
    color: #3498DB;
}

.footer-note {
    margin-top: 3rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #7F8C8D;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .footer-note {
        padding: 0;
    }
}

.footer-note a {
    color: #3498DB;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.footer-note a:hover {
    color: #2874A6;
}
