/* ============================
   HEADER + HERO MODULE
   ============================ */

/* LOGIN BUTTON (TOP RIGHT) */
.top-login {
    position: fixed;
    top: 20px;
    right: 20px;
}
.top-login button {
    background: none;
    border: 1px solid #2f4f2f;
    color: #2f4f2f;
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
    z-index: 9999;
}
.top-login button:hover {
    background: #2f4f2f;
    color: white;
}
.nav-login-btn {
    background: none;
    border: 1px solid #2f4f2f;
    color: #2f4f2f;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.nav-login-btn:hover {
    background: #2f4f2f;
    color: #fff;
}

/* Legacy accordion removed — see /css/auth.css (auth-stage) */

/* HEADER LOGO */
.site-header {
    width: 100vw;
    margin: 0;
    padding: 20px 0;
    position: relative;
}
.logo {
    width: 280px !important;
    height: auto !important;
    display: block;
    margin: 0 auto; /* top-left, but not glued to edge */
}
.i-need-a{
    font-size: 24px;
}
.i-need-a, input{
    font-size: 20px;
}
/* TAGLINE */
.tagline {
    text-align: center;
    font-size: 1.4rem;
    color: #555;
    margin: 10px 0 0 0;
    position: relative;
    right: -20px;
    padding: 0 20px;
}

/* ROTATING WORD */
.rotate-word {
    display: inline-block;
    text-align: left;
    font-family: var(--lo-logo-font, 'Nunito', sans-serif);
    font-style: normal;
    font-weight: 800;
    color: #222;
    opacity: 1;
    transition: opacity 0.6s ease;
}
.rotate-word.fade-out { opacity: 0; }
.rotate-word.fade-in { opacity: 1; }

/* DOWN ARROW */
.down-arrow {
    font-size: 38px;
    color: #2f4f2f;
    opacity: 0.4;
    margin: 10px 0 4px;
    text-align: center;
    animation: arrowFade 1.8s ease-in-out infinite;
}
@keyframes arrowFade {
    0% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 0.6; transform: translateY(4px); }
    100% { opacity: 0.2; transform: translateY(0); }
}

/* HERO SECTION */
.hero {
    height: auto;
    padding: 90px 20px 60px;
    text-align: center;
    background: radial-gradient(
        circle at top,
        #fefce8 0%,
        #ffffff 60%
    );
}
.hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

/* HERO TEXT + INPUT */
.need-line {
    align-items: center;
    gap: 22px;
    font-size: 4rem;
    font-family: var(--lo-logo-font, 'Nunito', sans-serif);
    font-style: normal;
    font-weight: 800;
    flex-wrap: wrap;
}
.need-label {
    font-weight: 800;
}
.need-input {
    background: transparent;
    font-family: var(--lo-logo-font, 'Nunito', sans-serif);
    font-style: normal;
    font-weight: 800;
    font-size: 4rem;
    border: none;
    border-bottom: 4px solid #ccc;
    outline: none;
    width: 380px;
    transition: border-color 0.3s ease;
    position: relative;
}
.need-input:focus {
    border-bottom-color: #222;
}
.need-input::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    height: 4px;
    width: 0%;
    background: #222;
    transition: width 0.35s ease;
}
.need-input:focus::after {
    width: 100%;
}
.need-input::placeholder {
    color: #eaec60;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.need-input:focus::placeholder {
    opacity: 0;
}

/* ============================
   COMPACT NAV
   ============================ */

.compact-nav {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.nav-left,
.nav-center,
.nav-right {
    display: flex;
    align-items: center;
}

.nav-logo {
    width: 140px;
    height: auto;
}

.nav-center {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* compact nav input */
.nav-input,
#need-summary {
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    width: 200px;
    background: transparent;
    margin-left: 4px;
    border-bottom: 2px solid #ccc;
    padding: 4px 6px;
}
.nav-input:focus,
#need-summary:focus {
    border-bottom-color: #222;
}
.nav-input::placeholder,
#need-summary::placeholder {
    color: #aaa;
}

/* Login button — same look in full header and minimized/compact header */
.nav-right .nav-login-btn,
.compact-login-btn.nav-login-btn,
.full-header-login-btn.nav-login-btn {
    background: none;
    border: 1px solid #2f4f2f;
    color: #2f4f2f;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}
.nav-right .nav-login-btn:hover,
.compact-login-btn.nav-login-btn:hover,
.full-header-login-btn.nav-login-btn:hover {
    background: #2f4f2f;
    color: #fff;
}

/* Back button */
.nav-back-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    margin-right: 12px;
    cursor: pointer;
}

/* ============================
   COMPACT MODE STATE
   ============================ */

body.compact-mode .hero,
body.compact-mode .hero-inner,
body.compact-mode .tagline,
body.compact-mode .down-arrow,
body.compact-mode .top-login,
body.compact-mode .logo,
body.compact-mode .landing-presearch,
body.compact-mode .info-sections,
body.compact-mode .how-wrapper,
body.compact-mode .how-payments-work,
body.compact-mode .speed-meter,
body.compact-mode .cta-section,
body.compact-mode .testimonials {
    display: none !important;
}

/* fixed, full-width nav AFTER search JSON returns (not on Enter alone) */
body.compact-mode .compact-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    margin: 0;
    padding: 12px 20px;
    z-index: 9999;

    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;

    justify-content: space-between;
    align-items: center;
    gap: 16px;

    animation: fadeUpNav 0.45s ease-out forwards;
}

/* prevent content from hiding behind fixed nav */
body.compact-mode {
    padding-top: 70px; /* match nav height */
}

/* login accordion under nav in compact mode */
body.compact-mode .auth-accordion {
    top: 80px;
}

/* Results shell — only visible in post-search state */
.search-results-interface {
    display: none;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

body.compact-mode .search-results-interface {
    display: block;
}

.search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.search-tab {
    background: #fff;
    border: 1px solid #d0d0d0;
    color: #333;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.search-tab.is-active {
    border-color: #2f4f2f;
    background: #2f4f2f;
    color: #fff;
}

.search-viewport {
    min-height: 200px;
}

.search-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.search-card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}

.search-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.search-card .search-card-meta {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 8px;
}

.search-card .search-card-desc {
    color: #444;
    font-size: 0.92rem;
    margin: 0;
}

.search-empty {
    color: #666;
    font-size: 1rem;
    padding: 24px 0;
}

body.is-searching .need-input,
body.is-searching #need-summary,
body.is-searching #mobile-need-input {
    opacity: 0.6;
}


/* Hide mobile nav by default */
    .mobile-compact-nav {
        display: none;
    }
/* Fade-up animation for nav */
@keyframes fadeUpNav {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* (optional) hero fade if you re-enable it in JS */
@keyframes fadeUpHero {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px);
    }
}

/* ============================
   MOBILE LOGIN BAR (FULL WIDTH)
   ============================ */
@media (max-width: 600px) {

    /* Make the login button a full-width top bar */
  
    

    body {
        padding-top: 60px; /* height of the login bar */
    }
    .tagline {
        width: 100% !important;
        text-align: left;
        padding: 0; /* ← THIS is the magic */
        font-size: 16px;
        line-height: 1.3;
        box-sizing: border-box;
        display: block;
        white-space: normal;
    }

    .rotate-word {
        white-space: nowrap;
    }
    .need-label {
        font-size: 30px !important;
        white-space: nowrap;
    }
    .need-input {
        font-size: 26px !important;
    }
    
    .need-line {
        align-items: center;
        font-size: 24px;
        gap: 8px;
        width: 100%;
    }

    .need-input {
        font-size: 2.8rem;
        border-bottom-width: 3px;
        width: 100px;
    }
}

@media (max-width: 600px) {
    .mobile-compact-nav .compact-login-btn {
        background: none;
        border: 1px solid #2f4f2f;
        color: #2f4f2f;
        padding: 6px 14px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s ease;
        z-index: 9999;
    }

    .mobile-compact-nav .compact-login-btn:hover {
        background: #2f4f2f;
        color: #fff;
    }


    /* Remove all top spacing when in compact mode */
    body.compact-mode,
    body.compact-mode main,
    body.compact-mode header,
    body.compact-mode .hero {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    /* Hide desktop nav ONLY in compact mode */
    body.compact-mode .compact-nav {
        display: none !important;
    }

    /* Show mobile nav ONLY in compact mode */
    body.compact-mode .mobile-compact-nav {
        display: block !important;
        position: sticky;
        top: 0;
        background: #fff;
        padding: 12px 16px;
        border-bottom: 1px solid #e5e5e5;
        z-index: 9999;
    }


    
    /* MOBILE NAV LAYOUT */
    .mobile-compact-nav {
        width: 100%;
        background: #fff;
        padding: 12px 16px;
        border-bottom: 1px solid #e5e5e5;
    }

    /* Top row: logo centered, login right */
    .mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-logo {
        height: 28px;
    }

    /* Login button */
    .mobile-login {
        font-size: 1rem;
        font-weight: 600;
        color: #333;
        z-index: 9999;
    }

    /* Search row */
    .mobile-search-row {
        margin-top: 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        font-size: 1rem;
    }

    /* Mobile input */
    .mobile-search-row input {
        flex: 1;
        border: none;
        border-bottom: 2px solid #ccc;
        padding: 4px 6px;
        font-size: 1rem;
        font-weight: 600;
        outline: none;
    }

    .mobile-search-row input:focus {
        border-bottom-color: #222;
    }

}
