@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

@font-face {
    font-family: kapraneue-mediumcondensed;
    font-weight: 600;
    font-display: block;
    src: url('../../fonts/kapraneue-mediumcondensed-webfont.woff') format('woff');
    src: url('../../fonts/kapraneue-mediumcondensed-webfont.woff') format('woff');
}

@layer theme {
    :root {
        --body-font-family: 'Raleway';
        --heading-font-family: kapraneue-mediumcondensed, sans-serif;
        --color-red-1: #a50000;
        --color-red-2: #e11837;
        --color-black-1: #000000;
        --primary-button-background-color: var(--color-red-1);
        --text-color: #595959;
        --gray-background-color: #2c2a29;
        --footer-text-color: #d2d3d4;
        --footer-background-color: #5a5a5c;
    }

    h1 {
        font-family: var(--heading-font-family);
        color: var(--color-red-1);
    }

    h2 {
        font-family: var(--heading-font-family);
        color: var(--color-red-2);
    }

    h3,
    h4 {
        color: var(--text-color);
    }

    .loader {
        width: 45px;
        aspect-ratio: 1;
        --c: no-repeat linear-gradient(var(--color-red-2) 0 0);
        background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
        background-size: 20% 100%;
        animation: l1 1s infinite linear;
    }

    @keyframes l1 {
        0% {
            background-size: 20% 100%, 20% 100%, 20% 100%;
        }

        33% {
            background-size: 20% 10%, 20% 100%, 20% 100%;
        }

        50% {
            background-size: 20% 100%, 20% 10%, 20% 100%;
        }

        66% {
            background-size: 20% 100%, 20% 100%, 20% 10%;
        }

        100% {
            background-size: 20% 100%, 20% 100%, 20% 100%;
        }
    }
}

@layer global {
    body {
        p {
            & a {
                word-break: break-all;
                overflow-wrap: break-word;
                hyphens: auto;
            }
        }
    }

    .primary-outline {
        border: 2px solid var(--color-red-1);
        padding: 10px 20px;
        color: var(--color-red-1);
        transition: all 0.3s ease-in-out;
        border-radius: 5px;

        &:hover {
            box-shadow: var(--color-red-1) 0px 0px 0px 4px inset;
        }
    }
}

@layer overrides {

    h1,
    h2 {
        text-transform: uppercase;
    }

    .header-wrapper {
        .icon-bradley-logo {
            & img {
                width: 500px;
                max-height: 101px;
                object-fit: cover;

                /* @media (width <62em) {
                    width: 240px;
                    max-height: 80px;
                } */

                @media (width <48em) {
                    width: 240px;
                    max-height: 40px;
                }
            }
        }

        & .main-nav {

            & .main-nav-button,
            & a {
                color: var(--color-red-2);

                &:hover {
                    color: var(--color-red-1);
                }
            }

            &>li> :where(a, button) {
                @media (width >=75em) {
                    &::after {
                        background-color: var(--color-red-2);
                        block-size: 5px;
                        content: '';
                        inset: auto 0 0;
                        position: absolute;
                        scale: 1 var(--nav-underline-scale, 0);
                        transform-origin: center bottom;
                        transition: scale var(--transition-time) ease-in-out;
                    }
                }
            }

            & .sub-nav {
                & li {
                    & a {
                        color: var(--color-red-2);

                        &:hover {
                            color: var(--color-red-1);
                        }
                    }
                }
            }
        }
    }

    .footer-wrapper {
        background-color: var(--footer-background-color);

        & .footer-top {
            color: var(--footer-text-color);

            & .icon-bradley-footer-logo {
                & img {
                    max-width: 500px;
                }
            }

            & a {
                color: var(--color-white);
            }
        }

        & .footer-bottom {
            border-block-start-color: var(--footer-text-color);
            color: var(--footer-text-color);
        }
    }

    .hero {
        .hero-content-wrapper {
            position: relative;

            & h1,
            h2 {
                color: var(--color-white);

                strong {
                    font-weight: 700;
                }
            }

            & .text {
                display: flex;
                flex-direction: column;
                gap: 0.2rem;

                & h1:first-child {
                    font-size: 2.5rem;
                }
            }

            & .title-extra-extra-large.hero-text-width {
                max-width: 50%;
            }
        }
    }

    .hero-container {
        @media (width >=48em) {
            --hero-padding: 100px;
        }

        &:has(.homepage) {
            --hero-padding: 170px 30px;

            @media (width >=48em) {
                --hero-padding: 140px;
            }
        }
    }

    dialog.modal {
        transition: none;
    }

    .modal-form-wrapper {
        & .modal-form {

            & .modal-top-section {
                & p {
                    color: var(--text-color);
                }
            }

            & .modal-multistep-form-wrapper {
                & label {
                    color: var(--text-color);
                }

                & form {
                    & .modal-progress-container {
                        & .modal-progress-bar {
                            background-color: var(--color-red-2);
                        }
                    }

                    div>button {
                        background-color: var(--color-red-1);
                        border: 1px solid var(--color-red-1);
                    }

                    div>button:hover {
                        background-color: var(--color-red-2);
                        border: 1px solid var(--color-red-2);
                    }

                    div>button.modal-back-button {
                        background-color: transparent;
                        border: 2px solid var(--color-red-1);
                        color: var(--color-red-1);
                    }

                    div>button.modal-back-button:hover {
                        background-color: var(--color-red-2);
                        border: 2px solid var(--color-red-2);
                        color: white;
                    }
                }
            }
        }
    }

    .hero-container:has(.gradient) {
        position: relative;

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(to right,
                    rgba(0, 0, 0, 1) 0%,
                    rgba(0, 0, 0, 0.1) 60%,
                    rgba(0, 0, 0, 0.01) 100%);
            z-index: 0;

            @media (width<=36em) {
                background: linear-gradient(to right,
                        rgba(0, 0, 0, 0.8) 0%,
                        rgba(0, 0, 0, 0.1) 90%,
                        rgba(0, 0, 0, 0.01) 100%);
            }
        }
    }

    .icon-bradley-logo {
        & img {
            max-width: 400px;

            @media (width<=36rem) {
                max-width: 200px;
            }
        }
    }

    .content-block-wrapper,
    .columns-wrapper,
    .columns.block.columns-2 {

        & .title-large,
        .title-extra-large {
            text-transform: uppercase;
            color: var(--color-red-2);
        }
    }

    .degreelink-heading {
        color: var(--color-red-2);
        text-transform: uppercase;
    }

    .title-underline {
        &::after {
            background-color: var(--color-red-2);
        }
    }

    .icon-cards {
        grid-template-columns: 1fr 1fr 1fr;

        @media (width<=48rem) {
            grid-template-columns: 1fr 1fr;
        }

        @media (width<=36rem) {
            grid-template-columns: 1fr;
        }

        .card {
            & picture {
                & img {
                    width: 60px;
                }
            }
        }
    }

    .multistep-form-container {
        z-index: unset;
    }

    .multistep-form-container:not(.no-gradient) {
        &::before {
            background: var(--color-red-1);
        }
    }

    .multistep-form-alternative-container:not(.no-gradient) {
        &::before {
            background: var(--color-red-1);
        }
    }

    .border {
        border: 1px solid var(--color-gray-5);
        max-width: 340px;
        border-radius: 5px;
        padding: 20px;

        & h2,
        h3 {
            margin-top: 15px;
        }
    }

    .column.block {
        h2 {
            color: var(--color-red-2);
        }
    }

    .faculty-modal-block {
        background-color: var(--color-red-1);
        margin: 0%;
        padding: 45px 0px;

        & .banner-form {
            & p {
                margin-top: 1rem;
            }
        }
    }

    .sticky-footer-wrapper {
        background-color: var(--color-red-1);

        & .sticky-footer {
            & .sticky-footer-text-container {
                font-size: 1.125rem;
                color: var(--color-white);
            }

            & .button-container {
                flex-wrap: nowrap;

                & .button.primary {
                    border-radius: 5px;
                    background: var(--color-red-1);
                    border: 1px solid var(--color-white);
                    font-weight: 700;
                    text-decoration: none;
                    transition: all 0.2s ease-in-out;

                    &:hover {
                        box-shadow: rgb(255, 255, 255) 0px 0px 0px 4px inset;
                    }

                    @media (width<=36em) {
                        padding: 0px 10px;
                        font-size: 12px;
                    }
                }

                & .button.secondary {
                    border-radius: 5px;
                    min-width: 200px;
                    min-height: 49px;
                    background-color: var(--color-white);
                    border: 1px solid var(--color-white);
                    color: var(--color-red-1);
                    gap: 0.5rem;
                    padding: 0 1.25rem;
                    transition: all 0.2s ease-in-out;

                    &:hover {
                        border-width: 4px;
                        background-color: transparent;
                        border: 4px solid var(--color-white);
                        color: var(--color-white);
                        text-decoration: none;
                    }

                    @media (width<=36em) {
                        padding: 0px 10px;
                        font-size: 12px;
                        min-width: fit-content;
                    }
                }
            }
        }
    }

    .banner.gradient {
        & .banner-images {
            z-index: -2;
        }

        & .banner-content {
            color: var(--color-white);
        }

        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background: linear-gradient(to right,
                    rgba(0, 0, 0, 0.8) 0%,
                    rgba(0, 0, 0, 0.1) 70%,
                    rgba(0, 0, 0, 0.01) 100%);
        }
    }

    .back-to-top {
        bottom: 190px;

        @media (width <36em) {
            display: none;
        }
    }

    .blog-hero {
        img {
            width: 100%;
            max-height: 500px;
            object-fit: cover;
        }

        & .blog-time {
            display: none;
        }

        & .blog-hero {
            &:not(:has(img)) {
                & h1 {
                    margin-block-end: 0px;
                }
            }
        }
    }

    .template-1 {
        & h2 {
            display: grid;
            gap: 20px;
            font-size: var(--heading-font-size-xl);
            margin-block: 30px;
            font-weight: 500;

            &::after {
                display: block;
                background-color: var(--color-gray-7);
                block-size: 5px;
                content: '';
                inline-size: 60px;
            }
        }

        & h3,
        h4,
        h5 {
            font-size: var(--heading-font-size-m);
            margin-block: 32px;
            font-weight: 600;
            color: var(--text-color);
        }

        & h4 {
            font-size: var(--heading-font-size-s);
        }

        & h5 {
            font-size: var(--heading-font-size-xs);
        }

        & .content-block-row {
            grid-template-columns: 1fr;
        }
    }

    .image-right {
        & .content-block-row {
            grid-template-columns: 1fr;
        }

        & picture {
            padding: 10px;
            float: right;
            max-width: 500px;
        }
    }

    .image-left {
        & .content-block-row {
            grid-template-columns: 1fr;
        }

        & picture {
            padding: 0 20px;
            float: left;
            max-width: 500px;
        }
    }

    .cookie-consent-wrapper {
        z-index: 10;
    }

    .blog-cards {
        & .card {
            & .card-header {
                height: 131px;

                & img {
                    object-fit: cover;
                }
            }

            & .card-body {
                & p:nth-child(2) {
                    display: none;
                }

                min-block-size: 150px;
            }
        }
    }

    /* progarm banner styles */
    .banner.program-banner.block {
        background-color: var(--gray-background-color);

        & .banner-content {
            max-inline-size: unset;
            color: var(--color-white);

            & h2 {
                color: var(--color-white);
            }
        }

        & .banner-images {
            display: none;
        }
    }

    .intro-columns {
        & .column-row {
            grid-template-columns: 1fr 4fr;

            @media (width <48em) {
                grid-template-columns: 1fr 2fr;
            }

            @media (width <36em) {
                grid-template-columns: 1fr;
            }

            & img {
                width: 100%;
                object-fit: contain;
            }
        }
    }

    .teaser-cards.normal-card {
        & ul li {
            &:hover {
                background-color: none;
            }

            & a {
                background-color: var(--color-gray-2);

                &:hover {
                    color: var(--color-black-1);
                }

                span {
                    &::before {
                        display: none;
                    }

                    & p:first-child {
                        font-weight: 700;
                        color: var(--color-black-2);
                        font-size: var(--heading-font-size-l);
                    }

                    & p:nth-child(2) {
                        margin-top: 0px;
                        color: var(--color-black-1);
                    }
                }
            }
        }
    }

    .program-hero {
        & .hero-content-wrapper {
            & h1 {
                color: var(--color-red-2);
            }
        }
    }

    .paid-asset-nav {
        & .main-nav {
            border-block-end: transparent;
        }
    }

    .resources-style {
        & .card {
            border: 2px solid var(--text-color);
            padding: 20px;

            & .button-container {
                & a {
                    width: 100%;
                    background-color: transparent;
                    color: black;
                    border-color: black;
                    transition: all 0.2s ease-in-out;

                    &:hover {
                        background-color: black;
                        color: white;
                    }
                }
            }
        }
    }

    .jumplinks-label {
        position: relative;
        z-index: 100;
    }

    /* Fixing gap and padding in columns */
    .bdu-no-gap-column {
        & .column {
            gap: 0px;

            & ul li {
                padding-bottom: 10px;
            }
        }
    }

    .bdu-para-space {
        & p:not(:last-child) {
            margin-bottom: 15px;
        }
    }

    /* Guide Page CSS */
    .bdu-guide-content-block {
        & h3 {
            font-size: var(--heading-font-size-m);
            font-weight: 600;
            color: var(--text-color);
        }

        & .text h3:last-child {
            margin-top: 15px;
        }

        & p {
            margin-block-start: 10px;
        }
    }

    .bdu-content-block-with-list {
        & ul {
            display: grid;
            grid-template-columns: 1fr 1fr;
            margin-top: 0px;

            @media (width <62em) {
                grid-template-columns: 1fr;
                margin: 16px 0px;
            }

            & li {
                align-self: end;
            }
        }
    }

    .bdu-column-space {
        margin: -25px 0px;
    }

    .bdu-table-accordion-title {
        padding-bottom: 10px;
    }

    .guide-page-table {
        grid-auto-rows: min-content;

        & .table-with-accordion-wrapper {
            display: contents;

            >.table-with-accordion {
                display: contents;
            }
        }
    }

    .col-image-size {
        & picture {
            img {
                min-width: 558.98px;
                min-height: 277.99px;

                @media (width <71em) {
                    min-width: initial;
                    min-height: initial;
                }
            }
        }
    }

    .extra-mb {
        margin-bottom: 30px;
    }

    .extra-mt {
        margin-top: 30px;
    }

    .mh50 {
        min-height: 50vh;
    }

    .program-interested-banner {
        background-color: var(--gray-background-color);

        &>* {
            padding: 45px 45px 45px 10px;

            @media (width < 75em) {
                padding: 30px 0px;
            }
        }

        & h2 {
            color: var(--color-white);
        }

        & .banner-content {
            padding: 0px;
        }

        & .banner-images {
            display: none;
        }
    }

    .apply-now-container {
        & label {
            color: var(--text-color);
        }
    }
}