
/* ***********************************************************************
   Filename: index.css
   Description: Homepage styling for SACFinance website
   Last worked on by: Sarina Lalria

   Related Files:
       - index.cfm
************************************************************************ */


/* =========================================================
   GLOBAL RESET
========================================================= */

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}


/* =========================================================
   HOMEPAGE CONTAINER
========================================================= */

.homepage-container {
    width: 100%;
    min-height: 50vh;
    margin: 0 auto;
    padding: 2rem 1rem;

    font-family: 'Calibri', sans-serif;
    color: #000000;
    text-align: center;

    background-color: #f0f4f8;
    background-image: url('../Images/homepage_background_desktop.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    position: relative;
    z-index: 0;
}


/* =========================================================
   INTRO BOX
========================================================= */

.intro-box {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 1.5rem 2rem;

    background: rgba(255, 255, 255, 0.45);
    border-radius: 16px;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.intro-box h1 {
    margin: 0 0 1rem;

    color: #000000;
    font-size: 50px;
    font-weight: bold;
    line-height: 1.15;
    text-align: center;
}

.intro-box p {
    width: 100%;
    max-width: 625px;
    margin: 0 auto 10px;
    padding: 0 10px;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
}


/* =========================================================
   ADVERTISEMENT BOX
========================================================= */

.advertisement-box {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 0.75rem 1.5rem;

    background: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
}


/* =========================================================
   PROMOTIONAL BANNER
========================================================= */

.promo-banner {
    width: 100%;
    max-width: 700px;
    margin: 2rem auto;
    text-align: center;
}

.promo-banner img {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;

    border-radius: 18px;
}


/* =========================================================
   RELATED FINANCE SECTION
========================================================= */

.related-finance {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;

    margin-top: 2rem;

    font-size: 12px;
}

.related-finance span {
    display: inline-block;
    max-width: 170px;
    flex-wrap: wrap;
}

.related-finance .superior-logo {
    width: auto;
    height: 30px;
    vertical-align: middle;
}


/* =========================================================
   HOMEPAGE BUTTON GRID
========================================================= */

.button-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;

    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
}


/* Standard homepage buttons */

.button-container a.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    min-width: 0;
    padding: 1rem;

    background-color: #ffffff;
    color: #005f90;
    border: 1px solid transparent;
    border-radius: 6px;

    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Standard button hover */

.button-container a.btn:hover {
    background-color: #2A95D1;
    color: #ffffff;
}


/* Standard button icons */

.button-container a.btn i {
    flex-shrink: 0;
    font-size: 1.2rem;
}


/* Standard button keyboard focus */

.button-container a.btn:focus-visible {
    outline: 3px solid #005f90;
    outline-offset: 3px;
}


/* =========================================================
   CUSTOMER LOYALTY PROGRAM
   URGENT FEATURED PROMOTION
========================================================= */

.button-container a.promo-button {
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    align-items: center;
    justify-items: center;
    gap: 16px;

    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 20px 24px;

    background: linear-gradient(
        115deg,
        #922332 0%,
        #bd293b 52%,
        #a51f32 100%
    );

    color: #ffffff;
    border: 1px solid #821c2b;
    border-radius: 12px;

    text-decoration: none;
    text-align: center;

    box-shadow:
        0 5px 14px rgba(130, 28, 43, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);

    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Gift and arrow icon circles */

.button-container a.promo-button .sac-promo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    flex: 0 0 46px;

    border-radius: 50%;
    background: #ffffff;
    color: #a51f32;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}


/* Promotion icons */

.button-container a.promo-button .sac-promo-icon i {
    display: inline-block;

    width: auto;
    height: auto;
    margin: 0;

    background: transparent;
    color: inherit;
    font-size: 19px;
    line-height: 1;
}


/* Arrow hover animation */

.button-container a.promo-button .sac-promo-arrow {
    transition: transform 0.2s ease;
}


/* Promotion text container */

.button-container a.promo-button .sac-promo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    width: 100%;
    min-width: 0;

    text-align: center;
}


/* Urgency message */

.button-container a.promo-button .sac-promo-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.4;
    text-transform: uppercase;
}


/* LIMITED TIME badge */

.button-container a.promo-button .sac-promo-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 5px 9px;

    background: #ffffff;
    color: #922332;
    border: 1px solid #ffffff;
    border-radius: 5px;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.2;
}


/* Main promotion title */

.button-container a.promo-button .sac-promo-title {
    display: block;
    max-width: 100%;

    color: #ffffff;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.01em;

    overflow-wrap: anywhere;
}


/* Supporting message */

.button-container a.promo-button .sac-promo-subtitle {
    display: block;

    color: #ffe8eb;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}


/* Promotion hover */

.button-container a.promo-button:hover {
    background: linear-gradient(
        115deg,
        #741927 0%,
        #971e30 52%,
        #801a2a 100%
    );

    color: #ffffff;
    border-color: #741927;

    box-shadow: 0 8px 18px rgba(130, 28, 43, 0.34);

    transform: translateY(-2px);
}


/* Preserve icon styling on hover */

.button-container a.promo-button:hover .sac-promo-icon {
    background: #ffffff;
    color: #922332;
}


/* Move arrow slightly to indicate click action */

.button-container a.promo-button:hover .sac-promo-arrow {
    transform: translateX(4px);
}


/* Preserve text styling on hover */

.button-container a.promo-button:hover .sac-promo-eyebrow,
.button-container a.promo-button:hover .sac-promo-title {
    color: #ffffff;
}

.button-container a.promo-button:hover .sac-promo-subtitle {
    color: #ffe8eb;
}


/* Promotion keyboard accessibility */

.button-container a.promo-button:focus-visible {
    outline: 3px solid #922332;
    outline-offset: 4px;
}


/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {

    .button-container a.promo-button,
    .button-container a.promo-button .sac-promo-arrow {
        transition: none;
    }

    .button-container a.promo-button:hover {
        transform: none;
    }

    .button-container a.promo-button:hover .sac-promo-arrow {
        transform: none;
    }
}


/* =========================================================
   MOBILE VIEW
========================================================= */

@media (max-width: 600px) {

    /* Mobile background */

    .homepage-container {
        padding: 1.5rem 1rem;

        background-color: #f0f4f8;
        background-image: url('../Images/homepage_background_mobile.png');
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
    }


    /* Intro box */

    .intro-box {
        width: 100%;
        margin-bottom: 1.5rem;
        padding: 1.5rem 1rem;

        border-radius: 14px;
    }

    .intro-box h1 {
        margin-bottom: 0.75rem;

        font-size: clamp(1.7rem, 7vw, 2.2rem);
        line-height: 1.15;
    }

    .intro-box p {
        width: 100%;
        padding: 0;

        font-size: 0.95rem;
        line-height: 1.5;
    }


    /* Advertisement box */

    .advertisement-box {
        padding: 0.75rem 1rem;
    }


    /* Promotional banner */

    .promo-banner {
        margin: 1.5rem auto;
    }

    .promo-banner img {
        border-radius: 12px;
    }


    /* Related finance */

    .related-finance {
        flex-direction: column;
        gap: 0.3rem;

        margin-top: 1.5rem;
        font-size: 0.8rem;
    }

    .related-finance span {
        max-width: 100%;
    }

    .related-finance .superior-logo {
        height: 25px;
        margin-top: 4px;
    }


    /* Stack standard homepage buttons */

    .button-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;

        width: 100%;
        max-width: 420px;
        margin: 0 auto 1rem;
    }

    .button-container a.btn {
        width: 100%;
        min-height: 48px;
        padding: 0.85rem 0.75rem;

        font-size: 1rem;
    }


    /* Urgent featured promotion — mobile */

    .button-container a.promo-button {
        grid-column: 1 / -1;

        grid-template-columns: 32px minmax(0, 1fr) 32px;
        align-items: center;
        justify-items: center;
        gap: 9px;

        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 15px 10px;

        border-radius: 11px;
        text-align: center;
    }

    .button-container a.promo-button .sac-promo-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .button-container a.promo-button .sac-promo-icon i {
        font-size: 14px;
    }

    .button-container a.promo-button .sac-promo-text {
        width: 100%;
        min-width: 0;
        gap: 5px;

        align-items: center;
        text-align: center;
    }

    .button-container a.promo-button .sac-promo-eyebrow {
        justify-content: center;
        gap: 5px;

        font-size: 9px;
        letter-spacing: 0.04em;
        line-height: 1.4;
    }

    .button-container a.promo-button .sac-promo-new {
        padding: 3px 6px;

        font-size: 8px;
    }

    .button-container a.promo-button .sac-promo-title {
        width: 100%;

        font-size: 15px;
        line-height: 1.3;

        overflow-wrap: anywhere;
    }

    .button-container a.promo-button .sac-promo-subtitle {
        font-size: 11px;
    }
}


/* =========================================================
   EXTRA-SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .homepage-container {
        padding: 1rem 0.75rem;
    }

    .intro-box {
        padding: 1.25rem 0.85rem;
    }

    .intro-box h1 {
        font-size: 1.65rem;
    }

    .intro-box p {
        font-size: 0.9rem;
    }


    /* Standard buttons */

    .button-container {
        gap: 9px;
    }

    .button-container a.btn {
        font-size: 0.95rem;
        padding: 0.8rem 0.6rem;
    }


    /* Compact featured promotion */

    .button-container a.promo-button {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        gap: 6px;

        padding: 13px 9px;
    }

    .button-container a.promo-button .sac-promo-icon {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .button-container a.promo-button .sac-promo-icon i {
        font-size: 13px;
    }

    .button-container a.promo-button .sac-promo-eyebrow {
        gap: 4px;

        font-size: 8px;
        letter-spacing: 0.025em;
    }

    .button-container a.promo-button .sac-promo-title {
        font-size: 13px;
    }

    .button-container a.promo-button .sac-promo-subtitle {
        font-size: 10px;
    }
}


/* =========================================================
   TABLET VIEW
========================================================= */

@media (min-width: 601px) and (max-width: 1024px) {

    .intro-box,
    .button-container {
        max-width: 700px;
    }

    .intro-box h1 {
        font-size: clamp(2.5rem, 5vw, 3.125rem);
    }

    .intro-box p {
        width: 100%;
        font-size: 1.1rem;
    }

    .related-finance {
        font-size: 14px;
    }
}


/* =========================================================
   OPTIONAL: HIDE PROMOTION WHEN THE OFFER ENDS

   Uncomment the rule below when the promotion is no longer active.

   .button-container a.promo-button {
       display: none;
   }
========================================================= */
