/* --- Shared Layout Styles for All Pages --- */

/* --- Cross-Browser Compatible Reset & Base Styles --- */


html, body {
    margin: 0;
    padding: 0;
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    background: #fff;
    color: #222;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- Font and Color Variables --- */
:root {
    --purple: #514a78;
    --purple-dark: #3d355c;
    --header-bg: #d1cee4;
    --input-bg: #f4f4f6;
    --input-border: #bdb9c9;
    --button-bg: #554e7c;
    --button-bg-hover: #3d355c;
}

/* --- Header Styles --- */
.site-header {
    background: #f7f6fa;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 1000;
}


@-webkit-keyframes headerTopBarScroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@-moz-keyframes headerTopBarScroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes headerTopBarScroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.container.header-flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: space-around;
    -webkit-justify-content: space-around;
    -moz-box-pack: space-around;
    -ms-flex-pack: space-around;
    justify-content: space-around;
    margin: 0 auto;
    padding: 0 1rem;
    min-height: 80px;
    background: #c9c8e0;
}

.logo {
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 2.5rem;
    color: #434364;
    font-weight: 100;
    letter-spacing: 0.01em;
}

.main-nav ul {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    gap: 5rem;
}

.main-nav a {
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    color: #2d2c4e;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    -webkit-transition: color 0.2s ease;
    -moz-transition: color 0.2s ease;
    -o-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

    .main-nav a:hover {
        color: #6c5ebf;
    }

/* --- Quiz Header Bar --- */
.header-bar {
    width: 100%;
    background: var(--header-bg);
    padding: 0;
    margin: 0;
    min-height: 56px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-family: 'ivyepic', serif;
    font-size: 2rem;
    font-weight: 100;
    color: var(--purple-dark);
    letter-spacing: 0.01em;
    margin: 0;
    padding: 16px 0 12px 0;
}

/* --- Mobile Navigation --- */
.hamburger-menu {
    display: none;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.hamburger-bar {
    width: 28px;
    height: 3px;
    background: #2d2c4e;
    margin: 3px 0;
    border-radius: 2px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.hamburger-menu.open .hamburger-bar:nth-child(1) {
    -webkit-transform: translateY(7px) rotate(45deg);
    -moz-transform: translateY(7px) rotate(45deg);
    -ms-transform: translateY(7px) rotate(45deg);
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .hamburger-bar:nth-child(3) {
    -webkit-transform: translateY(-7px) rotate(-45deg);
    -moz-transform: translateY(-7px) rotate(-45deg);
    -ms-transform: translateY(-7px) rotate(-45deg);
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(44, 44, 78, 0.25);
    z-index: 1000;
}

    .mobile-nav-overlay.active {
        display: block;
    }

/* --- Footer Styles --- */
.site-footer {
    background: none;
    padding: 0;
    margin: 0;
}

.footer-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    min-height: 340px;
    width: 100%;
}

.footer-left {
    background: #474787;
    color: #fff;
    -webkit-box-flex: 1.1;
    -webkit-flex: 1.1;
    -moz-box-flex: 1.1;
    -ms-flex: 1.1;
    flex: 1.1;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    -moz-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 3.5rem 3.5rem 3.5rem 4.5rem;
    min-width: 350px;
}

.footer-logo {
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 3.2rem;
    font-weight: 400;
    margin-bottom: 2.2rem;
    letter-spacing: 0.01em;
}

.footer-newsletter-heading {
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
    letter-spacing: 0.01em;
}

.footer-newsletter-form {
    width: 100%;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    -moz-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin-top: 1.2rem;
}

.footer-newsletter-label {
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
    letter-spacing: 0.01em;
    display: block !important;
}

.footer-newsletter-input {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #fff !important;
    color: #fff !important;
    font-size: 1.2rem !important;
    font-family: 'ivyepic', 'Inter', Arial, sans-serif !important;
    margin-bottom: 2.2rem !important;
    padding: 0.5rem 0 !important;
    outline: none !important;
    border-radius: 0 !important;
}

    .footer-newsletter-input:focus {
        border-bottom: 2px solid #b6aee2 !important;
    }

.footer-newsletter-btn {
    background: #fff;
    color: #474787;
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 2rem;
    padding: 0.9rem 3.2rem;
    margin-top: 0.7rem;
    cursor: pointer;
    -webkit-box-shadow: 0 2px 8px rgba(60,40,120,0.10);
    -moz-box-shadow: 0 2px 8px rgba(60,40,120,0.10);
    box-shadow: 0 2px 8px rgba(60,40,120,0.10);
    -webkit-transition: background 0.2s ease, color 0.2s ease;
    -moz-transition: background 0.2s ease, color 0.2s ease;
    -o-transition: background 0.2s ease, color 0.2s ease;
    transition: background 0.2s ease, color 0.2s ease;
}

    .footer-newsletter-btn:hover {
        background: #eceaf7;
        color: #474787;
    }

.footer-right {
    background: #e6e6f2;
    color: #474787;
    -webkit-box-flex: 2;
    -webkit-flex: 2;
    -moz-box-flex: 2;
    -ms-flex: 2;
    flex: 2;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -moz-box-orient: horizontal;
    -moz-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
    -moz-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    -moz-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    gap: 4.5rem;
    padding: 3.5rem 2.5rem 3.5rem 2.5rem;
}

.footer-links-col {
    min-width: 180px;
    margin-right: 2.2rem;
}

.footer-col-heading {
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    letter-spacing: 0.01em;
    color: #2a272a;
}

.footer-links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-col li {
    margin-bottom: 1.1rem;
}

.footer-links-col a {
    color: #474787;
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    -webkit-transition: color 0.2s ease;
    -moz-transition: color 0.2s ease;
    -o-transition: color 0.2s ease;
    transition: color 0.2s ease;
}

    .footer-links-col a:hover {
        color: #18173a;
    }

/* --- Common Button Styles --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: 'ivyepic', 'Inter', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .btn.primary {
        background: #474787;
        color: #fff;
    }

    .btn.secondary {
        background: #fff;
        color: #3d316a;
        border: 2px solid #3d316a;
        padding: 0.8rem 4rem;
        height: -webkit-fit-content;
        height: -moz-fit-content;
        height: max-content;
    }

        .btn.primary:hover, .btn.secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }



/* --- Responsive Design --- */
@media (max-width: 900px) {
    .hamburger-menu {
        display: -webkit-box;
        display: -webkit-flex;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
        position: absolute;
        right: 25px;
    }
    .hamburger-menu.open {
       top: 25px;
    }
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80vw;
        max-width: 320px;
        background: #fff;
        -webkit-box-shadow: -2px 0 16px rgba(60, 40, 120, 0.10);
        -moz-box-shadow: -2px 0 16px rgba(60,40,120,0.10);
        box-shadow: -2px 0 16px rgba(60, 40, 120, 0.10);
        -webkit-transform: translateX(100%);
        -moz-transform: translateX(100%);
        -ms-transform: translateX(100%);
        transform: translateX(100%);
        -webkit-transition: -webkit-transform 0.3s cubic-bezier(.4,0,.2,1);
        -moz-transition: -moz-transform 0.3s cubic-bezier(.4,0,.2,1);
        -o-transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        transition: transform 0.3s cubic-bezier(.4,0,.2,1);
        z-index: 1001;
        display: -webkit-box;
        display: -webkit-flex;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: start;
        -webkit-align-items: flex-start;
        -moz-box-align: start;
        -ms-flex-align: start;
        align-items: flex-start;
        padding: 5rem 2rem 2rem 2rem;
    }

    .main-nav.open {
        right: 300px;
    }
        .main-nav ul {
            flex-direction: column;
            gap: 1rem;
            width: 100%;
        }

        .main-nav li {
            width: 100%;
        }

        .main-nav a {
            display: block;
            padding: 1rem 0;
            border-bottom: 1px solid #e0e0e0;
            width: 100%;
        }

    .container.header-flex {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -webkit-flex-direction: row;
        -moz-box-orient: horizontal;
        -moz-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -moz-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -moz-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        padding: 0.3rem 1rem;
        zoom: 0.8;
    }



    .footer-container {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .footer-left, .footer-right {
        min-width: 0;
        width: 100%;
        padding: 2rem 1.2rem;
    }

    .footer-right {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.2rem;
    }

    .footer-links-col {
        margin-right: 0;
        min-width: 0;
    }

    .footer-newsletter-heading {
        max-width: 360px;
    }

    .footer-newsletter-form {
        max-width: 330px;
        -webkit-box-align: normal !important;
        -webkit-align-items: normal !important;
        -moz-box-align: normal !important;
        -ms-flex-align: normal !important;
        align-items: normal !important;
    }

    .footer-newsletter-label {
        text-align: left;
    }

    .footer-left {
        padding-left: 0 !important;
        -webkit-box-align: center !important;
        -webkit-align-items: center !important;
        -moz-box-align: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        text-align: center !important;
    }
}

@media (max-width: 600px) {
    .footer-left {
        zoom: 0.8;
    }

}

/* --- Legacy Bootstrap Overrides --- */
a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}
