/* ============================================
   HEADER.CSS — Sticky header, logo, search,
   actions & navigation bar
   ============================================ */

/* --- Main Header --- */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    max-width: 1280px;
    margin: 0 auto;
}

/* --- Logo --- */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.logo-text .le  { color: #4CAF50; }
.logo-text .bon { color: var(--orange); }
.logo-text .coit { color: var(--red); }

.logo-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    margin-left: 1px;
    vertical-align: super;
    font-size: 0;
}

.logo-sub {
    font-size: 10px;
    color: var(--text-light);
    margin-left: 10px;
    line-height: 1.3;
    border-left: 2px solid var(--border);
    padding-left: 10px;
}

/* --- Search Box --- */
.search-wrap {
    flex: 1;
    max-width: 620px;
}

.search-box {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--orange);
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: none;
    outline: none;
    color: var(--text);
}

.search-input::placeholder {
    color: var(--text-lighter);
}

.search-divider {
    width: 1px;
    background: var(--border);
    margin: 8px 0;
}

.search-location {
    padding: 10px 12px;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-light);
    background: white;
    min-width: 140px;
    cursor: pointer;
}

.search-btn {
    background: var(--orange);
    color: white;
    border: none;
    padding: 0 20px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.search-btn:hover {
    background: var(--orange-dark);
}

/* --- Header Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hdr-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 11px;
    transition: background 0.15s;
    border: none;
    background: none;
}

.hdr-icon-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.hdr-icon-btn .icon {
    font-size: 20px;
}

.btn-post {
    background: var(--orange);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-post:hover {
    background: var(--orange-dark);
}

.btn-login {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s;
}

.btn-login:hover {
    border-color: var(--orange);
    color: var(--orange);
}

/* --- Navigation Bar --- */
.nav-bar {
    border-top: 1px solid var(--border-light);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 11px 16px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    color: var(--text);
    border-bottom-color: var(--border);
}

.nav-link.active {
    color: var(--orange);
    border-bottom-color: var(--orange);
    font-weight: 600;
}

.nav-link .nav-emoji {
    font-size: 14px;
}

.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px;
}

/* ============================================
   RESPONSIVE — Tablet (768px) & Mobile (480px)
   ============================================ */
@media (max-width: 768px) {
    .header-main {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }

    .logo {
        order: 1;
    }

    .search-wrap {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }

    .search-location {
        min-width: 100px;
    }

    .header-actions {
        order: 2;
        margin-left: auto;
    }

    .logo-sub {
        display: none;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: 10px 12px;
    }

    .logo-text {
        font-size: 22px;
    }

    .btn-login {
        display: none;
    }

    .search-location {
        display: none;
    }

    .search-divider {
        display: none;
    }

    .search-wrap {
        order: 2;
        flex-basis: 100%;
    }
}
