﻿/* Base Reset & Typography */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Full-page background image on home page ── */
.page-home {
    background: url('/images/scaled.png') center/cover no-repeat fixed;
    background-color: #111;
}

    .page-home::before {
        content: "";
        position: fixed;
        inset: 0;
        background: linear-gradient( 180deg, rgba(0, 0, 0, 0.40) 0%, rgba(0, 0, 0, 0.30) 40%, rgba(0, 0, 0, 0.55) 100%);
        z-index: 0;
        pointer-events: none;
    }

    .page-home > * {
        position: relative;
        z-index: 1;
    }

    .page-home > app-topbar {
        z-index: 100;
    }

a {
    text-decoration: none;
    color: inherit;
}

.page-home header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding-left: 5%;
    padding-right: 5%;
    transition: box-shadow 0.3s, background-color 0.3s, border-color 0.3s;
}

    .page-home header.scrolled {
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom-color: rgba(234, 234, 234, 0.8);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    }

    /* White logo text when header is transparent */
    .page-home header .logo span {
        color: #fff !important;
        transition: color 0.3s;
    }

    .page-home header.scrolled .logo span {
        color: #60a5fa !important;
    }

    /* White Sign-In button adapts when over hero */
    .page-home header .nav-cta {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: none;
        transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
    }

        .page-home header .nav-cta:hover {
            background: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.5);
        }

    .page-home header.scrolled .nav-cta {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        border: none;
        border-radius: 7px;
        box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
    }

        .page-home header.scrolled .nav-cta:hover {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
        }

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-self: end;
}

/* ── Sign In / Auth ── */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.52rem 1.25rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 7px;
    font-size: 0.87rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
    transition: background 0.18s, box-shadow 0.18s, transform 0.14s;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

    .nav-cta:hover {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45);
        transform: translateY(-1px);
    }

    .nav-cta:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    }

    .nav-cta svg {
        flex-shrink: 0;
    }

/* Main Container */
main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Hero Section ── */
.hero {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 6rem 2rem 3rem;
    min-height: 60vh;
}

    .hero h1 {
        font-size: clamp(2.2rem, 4vw, 3.75rem);
        line-height: 1.15;
        margin-bottom: 1rem;
        color: #fff;
        font-weight: 800;
        letter-spacing: -0.02em;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    }

    .hero p {
        font-size: clamp(0.95rem, 1.2vw, 1.2rem);
        color: rgba(255, 255, 255, 0.85);
        max-width: 620px;
        margin: 0 auto 2rem auto;
    }

.hero-title .highlight {
    color: #FFD700;
}

/* ── Search Input — white, flat, modern ── */
.hero form {
    width: 100%;
}

.search-wrapper {
    max-width: 680px;
    width: 100%;
    margin: 0 auto 1rem auto;
    padding: 0.28rem 0.28rem 0.28rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22), 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.22s, border-color 0.22s;
    gap: 0.5rem;
}

    .search-wrapper:focus-within {
        box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(37,99,235,0.15);
        border-color: #93c5fd;
    }

    .search-wrapper input {
        flex: 1;
        padding: 0.6rem 0;
        font-size: 0.92rem;
        border: none;
        outline: none;
        background: transparent;
        color: #111827;
        font-family: inherit;
    }

        .search-wrapper input::placeholder {
            color: #9ca3af;
            font-weight: 400;
        }

    .search-wrapper button {
        padding: 0.58rem 1.35rem;
        font-size: 0.87rem;
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        color: #fff;
        border: none;
        border-radius: 7px;
        cursor: pointer;
        font-weight: 600;
        letter-spacing: 0.02em;
        box-shadow: 0 2px 10px rgba(37,99,235,0.35);
        transition: background 0.18s, box-shadow 0.18s, transform 0.14s;
        white-space: nowrap;
        flex-shrink: 0;
        font-family: inherit;
    }

        .search-wrapper button:hover {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            box-shadow: 0 4px 18px rgba(37,99,235,0.45);
            transform: translateY(-1px);
        }

        .search-wrapper button:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(37,99,235,0.3);
        }

/* ── Try Suggestions ── */
.try-examples {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

    .try-examples strong {
        color: rgba(255, 255, 255, 0.85);
    }

    .try-examples span.hint-chip {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        padding: 0.4rem 0.85rem;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.25);
        font-size: 0.85rem;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.85);
        transition: background 0.2s, border-color 0.2s, color 0.2s;
    }

        .try-examples span.hint-chip:hover {
            background: rgba(255, 255, 255, 0.25);
            border-color: #60a5fa;
            color: #fff;
        }

/* ── Features Section — glass cards over background ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 5%;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

    .feature-card:hover {
        transform: translateY(-4px);
        background: rgba(255, 255, 255, 0.18);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
    }

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #fff;
    font-size: 1.1rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

/* ── Footer — translucent over background ── */
.page-home footer {
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
}

footer {
    text-align: center;
    padding: 1rem 5%;
    border-top: 1px solid #eaeaea;
    color: #888;
    font-size: 0.85rem;
    background-color: #fff;
}

/* ── Nav tabs — white when over hero, normal when scrolled ── */
.page-home header .nav-tab {
    color: rgba(255, 255, 255, 0.88);
}

    .page-home header .nav-tab:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.12);
    }

    .page-home header .nav-tab::after {
        background: #fff;
    }

.page-home header .nav-tab--dropdown svg.chevron {
    color: rgba(255, 255, 255, 0.6);
}

.page-home header .nav-tab--dropdown[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

    .page-home header .nav-tab--dropdown[aria-expanded="true"] svg.chevron {
        color: #fff;
    }

/* Dividers between tabs — lighter on hero */
.page-home header .nav-tab-divider {
    background: rgba(255, 255, 255, 0.25);
}

/* Favorites link — white on hero */
.page-home header .nav-link {
    color: rgba(255, 255, 255, 0.82);
}

    .page-home header .nav-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.12);
    }

/* ── Restore normal colors once scrolled ── */
.page-home header.scrolled .nav-tab {
    color: #555e6d;
}

    .page-home header.scrolled .nav-tab:hover {
        color: #1a1a2e;
        background: rgba(0, 0, 0, 0.035);
    }

    .page-home header.scrolled .nav-tab::after {
        background: #2563eb;
    }

.page-home header.scrolled .nav-tab--dropdown svg.chevron {
    color: #9ca3af;
}

.page-home header.scrolled .nav-tab--dropdown[aria-expanded="true"] {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
}

    .page-home header.scrolled .nav-tab--dropdown[aria-expanded="true"] svg.chevron {
        color: #2563eb;
    }

.page-home header.scrolled .nav-tab-divider {
    background: #e2e8f0;
}

.page-home header.scrolled .nav-link {
    color: #64748b;
}

    .page-home header.scrolled .nav-link:hover {
        color: #e11d48;
        background: rgba(225, 29, 72, 0.05);
    }

/* ── Filter Tabs Bar — white, flat ── */
.filter-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    max-width: 680px;
    width: 100%;
    margin: 0 auto 0.9rem auto;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 0.22rem 0.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0,0,0,0.07);
    position: relative;
    z-index: 50;
    justify-content: center;
}

.filter-tab-divider {
    width: 1px;
    height: 16px;
    background: #e5e7eb;
    flex-shrink: 0;
    margin: 0 0.1rem;
}

/* Individual Tab */
.filter-tab {
    position: relative;
    flex-shrink: 1;
    min-width: 0;
}

.filter-tab__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.42rem 0.8rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    letter-spacing: 0.01em;
    min-width: 0;
    overflow: hidden;
}

    .filter-tab__btn:hover {
        background: #f3f4f6;
        color: #111827;
    }

    .filter-tab__btn[aria-expanded="true"] {
        background: #eff6ff;
        color: #2563eb;
    }

    .filter-tab__btn.has-value {
        color: #2563eb;
        font-weight: 600;
    }

        .filter-tab__btn.has-value .tab-chevron {
            color: #2563eb;
        }

/* Label text inside the button — truncate if too long */
.filter-tab__label {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}

.tab-chevron {
    width: 13px;
    height: 13px;
    color: #9ca3af;
    transition: transform 0.18s, color 0.18s;
    flex-shrink: 0;
}

.filter-tab__btn[aria-expanded="true"] .tab-chevron {
    transform: rotate(180deg);
    color: #2563eb;
}

.filter-tab__panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 290px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.1rem 1.15rem 0.9rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 9999;
    animation: panelFadeIn 0.15s ease;
}

.filter-tab__panel--wide {
    min-width: 320px;
}

.filter-tab:last-child .filter-tab__panel,
.filter-tab:nth-last-child(2) .filter-tab__panel {
    left: auto;
    right: 0;
    transform: none;
}

.filter-tab__panel.is-open {
    display: block;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.filter-tab:last-child .filter-tab__panel.is-open,
.filter-tab:nth-last-child(2) .filter-tab__panel.is-open {
    animation: panelFadeInRight 0.15s ease;
}

@keyframes panelFadeInRight {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Panel internals */
.panel-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #111827 !important;
    margin-bottom: 0.6rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-sep {
    color: #d1d5db;
    font-weight: 500;
    flex-shrink: 0;
}

.panel-input {
    flex: 1;
    min-width: 0;
    padding: 0.52rem 0.75rem;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    color: #111827;
    font-size: 0.86rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

    .panel-input:focus {
        border-color: #2563eb;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    }

    .panel-input::placeholder {
        color: #b0b7c3;
    }

/* Chip group */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chip-group--multi {
    justify-content: center;
}

.option-chip {
    padding: 0.36rem 0.78rem;
    border-radius: 6px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    font-weight: 500;
}

    .option-chip:hover {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #1d4ed8;
    }

    .option-chip.is-selected {
        background: #2563eb;
        border-color: #2563eb;
        color: #fff;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(37,99,235,0.3);
    }

/* Panel actions */
.panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.panel-clear {
    padding: 0.38rem 0.9rem;
    border-radius: 6px;
    border: 1.5px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

    .panel-clear:hover {
        background: #f3f4f6;
        color: #111827;
        border-color: #d1d5db;
    }

.panel-apply {
    padding: 0.38rem 1.1rem;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}

    .panel-apply:hover {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        box-shadow: 0 4px 14px rgba(37,99,235,0.4);
        transform: translateY(-1px);
    }

.page-home header.scrolled ~ main .filter-tab__btn {
    color: #374151;
}

@media (max-width: 600px) {
    /* ── Hero padding ── */
    .hero {
        padding: 5rem 1.25rem 2.5rem;
    }

    /* ── Filter bar: wrapping pill grid ── */
    .filter-tabs {
        display: flex;
        flex-wrap: wrap;
        overflow: visible;
        gap: 0.5rem;
        padding: 0.5rem 0.25rem;
        justify-content: center;
        max-width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-bottom: 0.5rem;
    }

    .filter-tab-divider {
        display: none;
    }

    .filter-tab {
        flex-shrink: 0;
    }

    .filter-tab__btn {
        font-size: 0.82rem;
        padding: 0.48rem 1rem;
        border: 1.5px solid rgba(255,255,255,0.5);
        border-radius: 999px;
        background: rgba(255,255,255,0.92);
        color: #374151;
        white-space: nowrap;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    .filter-tab__btn:hover {
        background: #fff;
    }

    .filter-tab__btn[aria-expanded="true"],
    .filter-tab__btn.has-value {
        border-color: #2563eb;
        background: #eff6ff;
        color: #2563eb;
    }

    /* ── Bottom-sheet panel ── */
    .filter-tab__panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none !important;
        border-radius: 20px 20px 0 0;
        min-width: unset;
        width: 100%;
        max-height: 75vh;
        overflow-y: auto;
        padding: 0.5rem 1.25rem 2.5rem;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.22);
        z-index: 9999;
    }

    /* drag handle */
    .filter-tab__panel::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
        margin: 0.75rem auto 1rem;
    }

    @keyframes panelFadeIn {
        from { opacity: 0; transform: translateY(24px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    @keyframes panelFadeInRight {
        from { opacity: 0; transform: translateY(24px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .filter-tab:last-child .filter-tab__panel,
    .filter-tab:nth-last-child(2) .filter-tab__panel {
        left: 0;
        right: 0;
        transform: none !important;
    }

    /* ── Search wrapper ── */
    .search-wrapper {
        border-radius: 10px;
        padding: 0.22rem 0.22rem 0.22rem 0.85rem;
    }

    /* ── Feature cards ── */
    .features-grid {
        grid-template-columns: 1fr;
        padding: 1rem 1.25rem;
    }
}

/* ── Search tooltip ─────────────────────────────────────────────────────── */
.search-wrapper {
  position: relative;
}

.search-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.search-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}

.search-tooltip--visible {
  opacity: 1;
}
