header {

    background-color: transparent;
    backdrop-filter: none;
    color: #f0f0f0;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: none;
    border-bottom: 1px solid transparent;

    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

header.header-scrolled {
    background-color: rgba(20, 20, 40, 0.85);

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid #333;
}

.container {
    width: 960px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.sidebar {
    width: 30%;
    float: left;
    padding: 0 15px;
}

.main-content {
    width: 70%;
    float: left;
    padding: 0 15px;
}

.flex-page-layout {
    display: flex;
    width: 960px;
    margin: 0 auto;
}

.flex-page-layout .main-content-flex {
    flex: 3;
    padding: 20px;
}

.flex-page-layout .sidebar-flex {
    flex: 1;
    padding: 20px;
    background-color: #2a2a3e;
}

main {

    background-color: transparent;
    z-index: 1;
    width: 80%;
    max-width: 960px;
    margin: 100px auto 20px auto;
    padding: 25px;
    border-radius: 8px;
    box-shadow: none;

}

section {
    padding: 30px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

#hero {
    text-align: center;
    border-bottom: none;
    padding-top: 20px;
}

#hero h1 {
    margin-bottom: 10px;
    font-size: 2.2em;
}

#hero p {
    font-size: 1.0em;
    color: #dcdcdc;
}

h2 {
    margin-bottom: 20px;
    color: #a78bfa;
    text-align: center;
    font-size: 1.8em;
}

h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9em;
    color: #aaa;
    z-index: 1;
}

#resource-section {
    padding-bottom: 30px;
}

#resource-section > p:first-of-type {
    text-align: center;
    margin-bottom: 30px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-size: 0.95em;
}

#resource-section hr {
    border: none;
    border-top: 1px solid #444;
    margin: 40px auto;
    width: 70%;
}

#resource-section h3 {
    color: #e0e0e0;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #555;
    text-align: left;
    font-size: 1.3em;
}

#resource-section h3:first-of-type {
    margin-top: 0;
}

.resource-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 15px;
}

.resource-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.5;
    color: #ccc;
    font-size: 0.9em;
}

.resource-list li::before {
    content: '\f019';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0px;
    top: 3px;
    color: #a78bfa;
    font-size: 1em;
}

#custom-404-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    min-height: 90vh;
    padding: 40px 5%;
    gap: 30px;
    color: #dcdcdc;
}

.error-text-content {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.error-image-container {
    flex: 1 1 45%;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-page-image-new {
    max-width: 650px;
    width: 100%;
    height: auto;
    display: block;
}

#custom-404-page .error-code,
#custom-404-page .error-tagline,
#custom-404-page .error-description,
#custom-404-page .redirect-message {
    text-align: left;
    width: 100%;
}

#custom-404-page .error-code {
    font-size: clamp(4.5em, 16vw, 9em);
    font-weight: bold;
    color: #e8e8e8;
    margin-bottom: 0px;
    line-height: 1;
}

#custom-404-page .error-tagline {
    font-size: clamp(1.2em, 4vw, 1.8em);
    color: #ccc;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

#custom-404-page .error-description {
    font-size: 1.1em;
    color: #bbb;
    margin-bottom: 25px;
    max-width: 100%;
    line-height: 1.7;
}

#custom-404-page .redirect-message {
    font-size: 1em;
    color: #aaa;
    margin-bottom: 30px;
}

#custom-404-page .redirect-message strong#countdown-timer {
    color: #a78bfa;
    font-weight: bold;
    font-size: 1.2em;
}

.take-me-home {
    display: inline-block;
    padding: 14px 35px;
    background-color: #a78bfa;
    color: #0f0f24;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.take-me-home:hover {
    background-color: #c4b0ff;
    color: #0a0a1a;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

@media (max-width: 1024px) {
    .container,
    .flex-page-layout {
        width: 90%;
    }

    main {
        width: 90%;
        padding: 20px;
        margin-top: 90px;
    }

    #hero h1 {
        font-size: 2em;
    }
    #hero p {
        font-size: 0.95em;
    }
    h2 {
        font-size: 1.6em;
    }
    h3 {
        font-size: 1.3em;
    }
    #resource-section h3 {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    .container,
    .flex-page-layout {
        width: 95%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar,
    .main-content {
        width: 100%;
        float: none;
        padding-left: 0;
        padding-right: 0;
    }
    .sidebar {
        margin-bottom: 20px;
    }

    .flex-page-layout {
        flex-direction: column;
    }
    .flex-page-layout .sidebar-flex {
        margin-bottom: 20px;
    }

    main {
        width: 100%;
        margin-top: 80px;
        padding: 15px;
        border-radius: 0;
    }

    section {
        padding: 20px 0;
    }

    #hero h1 {
        font-size: 1.8em;
    }
    #hero p {
        font-size: 0.9em;
    }
    h2 {
        font-size: 1.4em;
    }
    h3 {
        font-size: 1.2em;
    }

    #resource-section > p:first-of-type {
        margin-bottom: 20px;
        font-size: 0.9em;
        line-height: 1.5;
    }

    #resource-section hr {
        margin: 30px auto;
        width: 80%;
    }

    #resource-section h3 {
        font-size: 1.1em;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .resource-list li {
        margin-bottom: 12px;
        padding-left: 25px;
        font-size: 0.85em;
    }
    .resource-list li::before {
        top: 2px;
        font-size: 0.9em;
    }

    #custom-404-page {
        padding: 20px 5%;
        min-height: 80vh;
    }
    .error-text-content {
        margin-top: 20px;
    }
    .error-page-image-new {
        max-width: 200px;
    }
    .take-me-home {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px 0;
    }
    main {
        margin-top: 70px;
        padding: 10px;
    }
    #hero h1 {
        font-size: 1.6em;
    }
    #hero p {
        font-size: 0.85em;
    }
    h2 {
        font-size: 1.3em;
    }
    h3 {
        font-size: 1.1em;
    }

    #resource-section h3 {
        font-size: 1.0em;
    }
    .resource-list li {
        font-size: 0.8em;
    }
}
