/* ═══════════════════════════════════════════════════════════════════
   CRITICAL / SHARED CSS — copied from assets/css/main.css
   Universal foundation meant to load on every page: CSS custom
   properties, base resets, the container utility system, header/nav/
   mobile-menu/footer, and components reused across many page templates
   (buttons, review carousel, CTA-bottom section, shared title/subtitle
   styles). Page-specific stylesheets (e.g. frontpage.css) only need to
   add what's exclusive to that page on top of this file.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Global resets & root variables ── */
a,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
    list-style: none;
}

:root {
  /* Max widths per breakpoint */
    --container-max-xs:   96%;
    --container-max-sm:   540px;
    --container-max-md:   720px;
    --container-max-lg:   960px;
    --container-max-xl:   1140px;
    --container-max-xxl:  1320px;
    --gravity-blue: oklch(0.278 0.0902 263);
    --gravity-green: #89fc00;
    --gravity-yellow: #F5CB5C;
    --gravity-darkblue: #010B21;
    --gravity-midblue: #05163A;
    --gravity-lightblue: #23396D;
    --gravity-lightestblue: #3A5284;
    --gravity-gray: #161616;
    --gravity-offwhite: rgb(221, 221, 221);
    --gravity-font-family: "articulat-cf", sans-serif;
    --gravity-font-style: normal;
    --bold: 800;
    --demi-bold: 700;
    --normal: 400;
  /* Horizontal padding (gutter) */
    --container-padding-x: 1rem;
    --offer-gap: 1rem;
    --offer-card-width: 350px;
    --offer-card-height: 350px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: transparent;
}

body {
    font-style: var(--gravity-font-style);
    font-family: var(--gravity-font-family);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  border-bottom: none;
  padding: 0;
}

h2 {
    line-height: 1.2;
}

br {
  margin: 0;
  padding: 0;
}

.spacer{
    padding-top: 1rem;
}

/* ── Universal container system ── */
.container {
    width: var(--container-max-xs);
    margin-inline: auto;
    padding-inline: var(--container-padding-x);
    box-sizing: border-box;
}

.content{
    padding-bottom: 2rem;
    text-align: center;
}

@media (min-width: 576px) {
  .container {
    max-width: var(--container-max-sm);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: var(--container-max-md);
    --container-padding-x: 1.5rem;
  }
}

@media (min-width: 992px) {
    .container { max-width: var(--container-max-lg); }
}

@media (min-width: 1200px) {
  .container { max-width: var(--container-max-xl); }
}

@media (min-width: 1400px) {
  .container {
    max-width: var(--container-max-xxl);
    --container-padding-x: 2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════ */
.site-header{
    display: flex;
    position: fixed;
    top: 1%;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1400px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    padding: 1rem;
    height: 72px;
    gap: 16px;
    z-index: 9999999;
    background: rgba(227, 227, 227, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-nav{
    display: flex;
    flex-direction: row;
    flex: 1;
    align-items: center;
}

.nav-menu{
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    transform: translateY(-100%);
    animation: slideIn 0.2s ease-out forwards;
    z-index: 1000;
    padding: 1.5rem;
    color: rgb(0, 0, 0);
}
@keyframes slideIn {
    to { transform: translateY(0); }
}
.nav-menu a {
    text-decoration: none;
    color: var(--gravity-darkblue);
}

.apply-now-nav-btn{
    all: unset;
    margin-left: auto;
    border-radius: 12px;
    padding: 0.5rem 0.5rem;
    background-color: var(--gravity-green);
    color: var(--gravity-blue);
}

.apply-now-btn-nav{
    all: unset;
    text-align: center;
    border-radius: 12px;
    margin-left: 12px;
    padding: 0.4rem 0.85rem;
    font-size: 14px;
    white-space: nowrap;
    background-color: var(--gravity-green);
    color: var(--gravity-blue);
    border: 1px solid var(--gravity-gray);
    cursor: pointer;
}

.company-logo{
    padding-top: 2px;
}

/* ── Header search ── */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-search-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-left: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.nav-search-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
}
.nav-search-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

body.search-open {
    overflow: hidden;
}

.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18vh 1.5rem 2rem;
    background: rgba(1, 11, 33, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.search-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.search-overlay-close {
    all: unset;
    position: absolute;
    top: 24px;
    right: 28px;
    font-size: 2.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.2s ease;
}
.search-overlay-close:hover {
    color: #fff;
}

.search-overlay-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 640px;
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.search-overlay-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--gravity-darkblue);
    padding: 12px 0;
}
.search-overlay-input::placeholder {
    color: #98a2b3;
}
.search-overlay-submit {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gravity-green);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.search-overlay-submit:hover {
    transform: scale(1.05);
}
.search-overlay-submit img {
    width: 20px;
    height: 20px;
    display: block;
}

.mobile-menu-search {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0.9rem 0;
    color: var(--gravity-darkblue);
    font-weight: var(--demi-bold);
    cursor: pointer;
}
.mobile-menu-search img {
    width: 18px;
    height: 18px;
}

/* ── Hamburger / mobile menu / dropdown ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: rgb(0, 0, 0);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
    display: none;
}

body.mobile-menu-open {
    overflow: hidden;
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: inherit;
    font: inherit;
    color: inherit;
}

.dropdown-icon {
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-icon,
.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    list-style: none;
    padding: 8px 8px;
    margin: 8px 0 0 0;
    min-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

@media (max-width: 768px) {
    .site-header.container {
        max-width: 100%;
        padding: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        border-radius: 0;
        background-color: white;
    }
}

/* Mobile Navigation — collapse to hamburger before the desktop nav gets
   cramped (links wrap / logo overflows) in the ~768–924px range. */
@media (max-width: 924px) {
    .hamburger {
        display: flex;
    }

    .site-nav {
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-menu {
        display: none;
    }

    .apply-now-btn-nav {
        display: none;
    }

    .nav-search-btn {
        display: none;
    }

    .mobile-menu.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 999998;
        background-color: rgb(255, 255, 255);
        overflow-y: auto;
        padding: 6.5rem 1.5rem 2rem;
    }

    .mobile-menu-list {
        list-style: none;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-list > li {
        border-top: 1px solid rgba(1, 11, 33, 0.1);
    }

    .mobile-menu-list > li:last-child {
        border-bottom: 1px solid rgba(1, 11, 33, 0.1);
    }

    .mobile-menu-list > li > a,
    .mobile-menu-list .dropdown-toggle {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.9rem 0;
        color: var(--gravity-darkblue);
        font-weight: var(--demi-bold);
        text-decoration: none;
    }

    .mobile-menu-list .dropdown-menu li a {
        padding: 0.6rem 0 0.6rem 1rem;
        color: rgba(1, 11, 33, 0.7);
        font-weight: var(--normal);
        border-top: 1px solid rgba(1, 11, 33, 0.08) !important;
    }

    .mobile-menu-apply {
        margin-top: 1.5rem;
        justify-content: center !important;
        background-color: var(--gravity-green);
        border-radius: 12px;
        padding: 0.75rem !important;
    }
}

/* Desktop Navigation */
@media (min-width: 925px) {
    .hamburger {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        transform: none;
        animation: none;
        flex-direction: row;
        margin-left: auto;
        justify-content: flex-end;
        gap: 2rem;
        padding: 0;
        z-index: auto;
    }

    .nav-menu li a {
        display: inline;
        padding: 0;
        border: none;
        color: rgb(0, 0, 0);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════ */
.footer-inner, .footer-outer{
    border-radius: 10px;
    width: 100%;
    background-color: var(--gravity-darkblue);
}
.footer-inner{
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    border: 1px solid #655D5D;
    gap: 64px;
}
.footer-outer{
    padding: 1rem;
}

.footer-nav{
    display: flex;
    flex-direction: row;
    align-items: start;
    justify-content: space-between;
    padding: 0.5rem;
    gap: 16px;
}
.footer-menu-left, .footer-menu-right{
    list-style: none;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgb(183, 183, 183);
    gap: 8px;
}
.footer-menu a {
    text-decoration: none;
    color: inherit;
}
.footer-menu a:visited {
    color: inherit;
}

.footer-disclaimer{
    text-align: center;
    color: rgb(183, 183, 183);
}

.apply-now-footer-btn{
    all: unset;
    text-align: center;
    border-radius: 12px;
    margin-top: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 14px;
    white-space: nowrap;
    align-self: flex-start;
    background-color: var(--gravity-green);
    color: var(--gravity-blue);
    border: 1px solid var(--gravity-gray);
    cursor: pointer;
}

.footer-column-title{
    font-weight: var(--bold);
    color: white;
    padding-bottom: 8px;
}
.social-wrapper{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.company-info{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.company-info-left, .company-info-right{
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.company-info-wrapper{
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-footer{
    display: flex;
    flex-direction: column;
    color: white;
}

@media (min-width: 576px) {
    .footer-nav{
        padding: 0.5rem 3rem;
    }
    .company-info{
        padding: 0.5rem 1rem;
    }
}
@media (min-width: 768px) {
    .footer-nav{
        padding: 0.5rem 7rem;
    }
}
@media (min-width: 992px) {
    .footer-nav{
        padding: 0.5rem 10rem;
    }
}
@media (min-width: 1200px) {
    .footer-nav{
        padding: 0.5rem 20rem;
    }
}
@media (min-width: 1400px) {
    .footer-nav{
        padding: 0.5rem 30rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SHARED COMPONENTS — used across many page templates, not just one
   ═══════════════════════════════════════════════════════════════════ */

/* ── Buttons ── */
.apply-now-btn{
    all: unset;
    text-align: center;
    border-radius: 12px;
    width: 100px;
    margin-top: 8px;
    padding: 0.5rem 0.5rem;
    background-color: var(--gravity-green);
    color: var(--gravity-darkblue) !important;
    border: 1px solid var(--gravity-gray);
    cursor: pointer;
}

.check-my-rate-btn{
    all: unset;
    border-radius: 12px;
    width: 240px;
    margin-top: 24px;
    padding: 0.5rem 0.5rem;
    font-size: 20px;
    font-weight: var(--demi-bold);
    background-color: var(--gravity-green);
    color: var(--gravity-blue);
    border: 1px solid var(--gravity-gray);
    cursor: pointer;
}

.apply-now-btn,
.apply-now-nav-btn,
.check-my-rate-btn,
.beyond-refi-btn,
.career-apply-btn{
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}
.apply-now-btn:hover,
.apply-now-nav-btn:hover,
.check-my-rate-btn:hover,
.beyond-refi-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.career-apply-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    opacity: 1;
}
.apply-now-btn:active,
.apply-now-nav-btn:active,
.check-my-rate-btn:active,
.beyond-refi-btn:active,
.career-apply-btn:active{
    transform: translateY(0);
    box-shadow: none;
}

/* ── CTA-bottom section (used on the front page and multiple product/
   protection-plan pages) ── */
.cta-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}
.cta-bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--gravity-darkblue);
    border-radius: 1.5rem;
    padding: 3.5rem 2.5rem;
    width: 100%;
    max-width: 720px;
    gap: 0.75rem;
}
.cta-bottom-eyebrow {
    font-size: 0.8rem;
    font-weight: var(--demi-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gravity-green);
    margin: 0;
}
.cta-bottom-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: var(--bold);
    color: white;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.15;
}
.cta-bottom-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 520px;
    margin: 0 0 0.75rem;
}
.cta-bottom-btn {
    all: unset;
    cursor: pointer;
    background-color: var(--gravity-green);
    color: var(--gravity-blue);
    font-weight: var(--demi-bold);
    font-size: 1rem;
    border-radius: 12px;
    padding: 0.75rem 2rem;
    border: 1px solid var(--gravity-gray);
    margin-top: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-bottom-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.cta-bottom-phone {
    font-size: 0.875rem;
    color: rgb(255, 255, 255);
    margin: 0;
}
.cta-bottom-phone a {
    color: rgb(255, 255, 255);
    text-decoration: none;
}
.cta-bottom-phone a:hover { color: white; }

/* ── Shared title/subtitle rule (grouped selector spans ~14 different
   page types' titles, e.g. how-refi-saves, time-to-refi, our-process,
   beyond-refi, documents-you-need, faq, glossary, about, careers, blog,
   offer-wall, benefits, reviews, how-it-works) ── */
.reviews-title, .how-it-works-title, .how-refi-saves-title, .time-to-refi-title, .our-process-steps-title, .beyond-refi-title, .documents-you-need-title, .faq-hero-title, .glossary-hero-title, .about-hero-title, .careers-hero-title, .blog-title, .offer-wall-title, .benefits-title{
    font-weight: var(--bold);
    font-size: 36px;
    color: var(--gravity-darkblue);
    border-bottom: none;
    text-align: center;
    margin: 0;
    padding: 0;
    padding-bottom: 0.5rem;
}
.reviews-subtitle, .how-refi-saves-subtitle, .time-to-refi-subtitle, .our-process-steps-subtitle, .beyond-refi-subtitle, .documents-you-need-subtitle, .benefits-subtitle, .faq-hero-subtitle, .glossary-hero-subtitle, .about-hero-subtitle, .careers-hero-subtitle, .blog-subtitle, .offer-wall-subtitle{
    font-weight: 400;
    padding-bottom: 1.5rem;
}

/* ── Reviews / review carousel (used on the front page and in the
   application form template) ── */
.reviews{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.reviews-subtitle{
    font-weight: var(--normal);
    font-size: 20px;
    text-align: center;
    color: var(--gravity-darkblue);
}
.review-grid{
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
}
.review-card{
    display: flex;
    position: relative;
    padding: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: var(--gravity-darkblue);
    color: white;
    border-radius: 8px;
}
.review-source-icon{
    position: absolute;
    top: 5%;
    right: 5%;
}
.review-card-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.review-card-meta{
    font-size: 0.72rem;
    opacity: 0.65;
    margin-bottom: 4px;
}
.review-card-date{
    position: absolute;
    top: 5%;
    left: 8px;
    font-size: 0.72rem;
    opacity: 0.55;
}
.review-carousel{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}
.review-carousel-viewport{
    overflow: hidden;
    width: 100%;
}
.review-carousel-track{
    display: flex;
    transition: transform 0.6s ease;
}
.review-slide{
    min-width: 100%;
}
.review-arrow{
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--gravity-darkblue);
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.review-arrow:hover{
    opacity: 0.75;
}

@media (min-width: 992px) {
    .review-grid{
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        padding: 0 0.5rem;
    }
    .review-card{
        width: 100%;
        max-width: 340px;
    }
}
