/**
 * who@/B2B Search Engine - Global Styles
 * 2026 Human-Centric Web Architecture
 */

:root {
    --blue: #1a3a5c;
    --mid: #2d6a9f;
    --accent: #e8500a;
    --border: #dfe1e5;
    --muted: #70757a;
    --text: #202124;
    --footer: #f2f2f2;
}

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

html,
body {
    height: 100%;
    font-family: "Outfit", arial, sans-serif;
    background: #fff;
    color: var(--text);
}

body {
    display: flex;
    flex-direction: column;
}

/* ── HEADER ── */
.g-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.85rem 1.5rem 0;
    gap: 1rem;
    flex-shrink: 0;
    position: relative;
}

.g-header a {
    font-size: 0.8125rem;
    color: var(--text);
    text-decoration: none;
}

.g-header a:hover {
    text-decoration: underline;
}

/* ── GRID / APPS ICON ── */
.g-grid-wrap {
    position: relative;
    display: inline-flex;
}

.g-grid-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: #5f6368;
    font-size: 1.25rem;
    background: transparent;
    border: none;
}

.g-grid-icon:hover {
    background: #e8eaed;
}

/* ── MAIN CONTENT ── */
.g-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 10vh;
}

/* ── LOGO ── */
.g-logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.g-logo {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -0.04em;
    line-height: 1;
}

.g-logo span {
    color: var(--accent);
}

.g-logo-sub {
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    font-weight: 300;
    color: var(--mid);
    letter-spacing: -0.02em;
    margin-left: 0.15em;
    line-height: 1;
}

.g-share {
    position: absolute;
    right: -2rem;
    bottom: 0.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #5f6368;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}

.g-share:hover {
    background: #f1f3f4;
    color: var(--text);
}

/* ── TAGLINE ── */
.g-tagline {
    font-family: "Source Serif 4", serif;
    font-size: 0.95rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 1.75rem;
}

.g-tagline b {
    font-style: normal;
    color: var(--mid);
}

/* ── SEARCH PILL ── */
.g-search-row {
    display: flex;
    width: 100%;
    max-width: 584px;
    gap: 0;
}

.g-input-pill {
    display: flex;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.g-input-pill:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

.g-inp-q {
    flex: 1 1 0;
    height: 46px;
    padding: 0 0.75rem 0 1.25rem;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: transparent;
}

.g-divider {
    width: 1px;
    background: var(--border);
    margin: 10px 0;
    flex-shrink: 0;
}

.g-inp-ort {
    flex: 0 1 160px;
    height: 46px;
    padding: 0 1rem 0 0.75rem;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: transparent;
}

.g-pill-icon {
    display: flex;
    align-items: center;
    padding: 0 0.75rem 0 1rem;
    color: var(--muted);
    font-size: 1.1rem;
}

.g-geo-icon {
    display: flex;
    align-items: center;
    padding: 0 0.25rem 0 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* ── CHIPS ── */
.g-alt-row {
    margin-top: 1rem;
    width: 100%;
    max-width: 584px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.g-alt-chip {
    padding: 0.22rem 0.7rem;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 100px;
    font-size: 0.72rem;
    color: var(--mid);
    text-decoration: none;
    transition: all 0.13s;
}

.g-alt-chip:hover {
    background: var(--mid);
    color: #fff;
    border-color: var(--mid);
}

.g-popular-row {
    margin-top: 0.65rem;
    width: 100%;
    max-width: 584px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.g-popular-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-right: 0.15rem;
}

.g-pop-chip {
    padding: 0.28rem 0.85rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--blue);
    text-decoration: none;
    transition: all 0.13s;
}

.g-pop-chip:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

/* ── STATS ── */
.g-stats {
    margin-top: 2.5rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.g-stat {
    text-align: center;
}

.g-stat-n {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
}

.g-stat-l {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

/* ── PROFILE & DROPDOWN ── */
.g-profile-wrap {
    position: relative;
}

.g-signin-btn {
    height: 36px;
    padding: 0 1.1rem;
    background: var(--mid);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.g-signin-btn:hover {
    background: var(--blue);
}

.g-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: box-shadow 0.15s;
    outline: none;
}

.g-avatar:hover {
    box-shadow: 0 0 0 3px #e8eaed;
}

.g-avatar.open {
    box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.4);
    border-color: var(--mid);
}

.g-profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px 1px rgba(0, 0, 0, 0.2);
    z-index: 300;
    overflow: hidden;
}

.g-profile-wrap.open .g-profile-dropdown {
    display: block;
}

.g-pd-head {
    padding: 1.1rem 1.1rem 0.75rem;
    border-bottom: 1px solid #e4e4e4;
}

.g-pd-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.g-pd-email {
    font-size: 0.8rem;
    color: var(--muted);
}

.g-pd-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.1rem;
    font-size: 0.875rem;
    color: var(--text);
    text-decoration: none;
}

.g-pd-action:hover {
    background: #f1f3f4;
}

/* ── FOOTER ── */
.g-footer {
    background: var(--footer);
    border-top: 1px solid #e4e4e4;
    flex-shrink: 0;
}

.g-footer-top {
    padding: 0.9rem 1.5rem;
    font-size: 0.8125rem;
    color: var(--muted);
    border-bottom: 1px solid #e4e4e4;
}

.g-footer-bottom {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 1rem;
}

.g-footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.g-footer a {
    color: var(--muted);
    text-decoration: none;
}

.g-footer a:hover {
    text-decoration: underline;
}

/* ── TOOLTIP ── */
.g-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: #3c4043;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 200;
}

.g-grid-wrap:hover .g-tooltip {
    opacity: 1;
}

/* ── MOBILE ── */
@media (max-width: 520px) {
    .g-inp-ort,
    .g-divider,
    .g-geo-icon {
        display: none;
    }
    .g-search-row,
    .g-alt-row,
    .g-popular-row {
        max-width: 90vw;
    }
    .g-footer-top {
        padding: 1rem;
        text-align: center;
        line-height: 1.6;
    }
    .g-footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        padding: 1.25rem 1rem;
    }
    .g-footer-links {
        justify-content: center;
    }
}

/* ── RESULTS PAGE SPECIFIC ── */
.topbar {
    background: #fff;
    border-bottom: 1.5px solid var(--border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner {
    max-width: 1040px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.topbar-search-wrap {
    display: flex;
    flex: 1;
    gap: 0.5rem;
}
.ts-input {
    height: 40px;
    padding: 0 1rem 0 2.2rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #f8f9fa;
    outline: none;
    width: 100%;
}
.ts-input:focus {
    border-color: var(--mid);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.1);
}
.ts-wrap-inner {
    position: relative;
    flex: 1;
}
.ts-wrap-inner i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}
.btn-ts {
    height: 40px;
    padding: 0 1.25rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.results-layout {
    max-width: 1040px;
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
}

.results-meta {
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.firm-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.firm-card:hover {
    border-color: var(--mid);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.firm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.firm-body {
    flex: 1;
}
.firm-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--blue);
}
.firm-nace {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.25rem 0 0.75rem;
}
.firm-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.firm-meta i {
    margin-right: 0.4rem;
    color: var(--mid);
}

.firm-score {
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sidebar-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.pg-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
}
.pg-btn.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.av-0 {
    background: var(--blue);
}
.av-1 {
    background: var(--accent);
}
.av-2 {
    background: #1a7a6e;
}
.av-3 {
    background: #5a3d8a;
}
.av-4 {
    background: #3b5068;
}

@media (max-width: 768px) {
    .results-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

/* ── COMPANY DETAILS PAGE ── */
.detail-layout {
    max-width: 1040px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.detail-header {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.detail-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.detail-title-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--blue);
    margin: 0 0 0.5rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.detail-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.info-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-label {
    width: 160px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.info-value {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-stars {
    background: #fff9e6;
    color: #b45300;
    border: 1px solid #ffeeba;
}

.management-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.management-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.management-item i {
    color: var(--mid);
}

@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    .info-label {
        width: 100%;
    }
}
