/* Top Bar Styling */
.header-top-bar {
    background-color: #f8f8f8;
    border-bottom: 1px solid #eaeaea;
    height: 32px;
    display: flex;
    align-items: center;
    font-family: inherit;
}

.header-top-bar .container {
    display: flex;
    justify-content: flex-end;
    /* Align to the right */
    width: 100%;
}

/* The Link Styling */
.fdsm-top-link {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    letter-spacing: 0.5px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0 5px;
}

.fdsm-top-link:hover {
    color: var(--fudan-red);
}

/* CSS Drawn Icon */
.fdsm-icon-mini {
    position: relative;
    width: 14px;
    height: 12px;
    margin-right: 8px;
    display: inline-block;
    border-bottom: 1px solid currentColor;
    /* Base */
}

/* Roof */
.fdsm-icon-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid currentColor;
    /* Takes text color */
}

/* Columns / Body */
.fdsm-icon-mini::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    /* Slightly narrower than roof (10px) */
    height: 6px;
    background: transparent;
    box-shadow: inset 0 0 0 1px currentColor;
    /* Outline box */
    /* Add vertical lines for columns perception if possible, or keep simple */
    background-image: linear-gradient(to right, currentColor 1px, transparent 1px);
    background-size: 3px 100%;
    /* Striped effect for columns */
    background-position: 1px 0;
    /* Align stripes */
}

/* Adjust Hero margin because header is taller now (80px + 32px = 112px) */
body:has(.header-top-bar) .hero {
    margin-top: 112px !important;
}

/* Fallback if :has not supported fully (it is in modern browsers) 
   We will also modify inline style for robust output */

@media (max-width: 768px) {
    .header-top-bar {
        /* display: none; */
        /* Show on mobile, but centered and smaller */
        display: flex;
        justify-content: center;
        height: auto;
        padding: 6px 0;
    }

    .header-top-bar .container {
        justify-content: center;
    }

    .fdsm-top-link {
        font-size: 11px;
    }

    body:has(.header-top-bar) .hero {
        margin-top: 112px !important;
    }
}